summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-09-16 13:08:38 +0300
committerAndrew Dolgov <[email protected]>2021-09-16 13:08:38 +0300
commit9f291c1dfc65fd50217f910c702cb420edf5f4f6 (patch)
treed92a284a9faedd3b02341cc0b161d7d47bd0ebd9
parentc9e10e6568a42e2a620b18cf9d01f4c5ea868466 (diff)
experimental: rebuild with latest epubjs
-rw-r--r--.gitignore1
-rw-r--r--dist/app-libs.min.js2
-rw-r--r--gulpfile.js3
3 files changed, 4 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 61ae359..ca7b8c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
/.app_is_ready
/config.php
/lib/fonts/*.ttf
+/lib/epub.js/.git
/db/*.db
/sessions/*
.idea/*
diff --git a/dist/app-libs.min.js b/dist/app-libs.min.js
index 9a08e38..d46cab9 100644
--- a/dist/app-libs.min.js
+++ b/dist/app-libs.min.js
@@ -23,7 +23,7 @@ if(function(t,e){var i,n,r=t.document,o=t.location,s=t.jQuery,a=t.$,l={},c=[],h=
* Released under the MIT license
* http://sizzlejs.com/
*/
-function(t,e){var i,n,r,o,s,a,l,c,h,u,d,f,p,g,m,y,b,w="sizzle"+-new Date,x=t.document,_={},k=0,E=0,S=tt(),T=tt(),C=tt(),O=[],A=O.pop,N=O.push,I=O.slice,R=O.indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(this[e]===t)return e;return-1},j="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",z=L.replace("w","w#"),D="\\["+j+"*("+L+")"+j+"*(?:([*^$|!~]?=)"+j+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+z+")|)|)"+j+"*\\]",P=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+D.replace(3,8)+")*)|.*)\\)|)",B=new RegExp("^"+j+"+|((?:^|[^\\\\])(?:\\\\.)*)"+j+"+$","g"),M=new RegExp("^"+j+"*,"+j+"*"),F=new RegExp("^"+j+"*([\\x20\\t\\r\\n\\f>+~])"+j+"*"),q=new RegExp(P),U=new RegExp("^"+z+"$"),W={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),NAME:new RegExp("^\\[name=['\"]?("+L+")['\"]?\\]"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+D),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},$=/[\x20\t\r\n\f]*[+~]/,H=/^[^{]+\{\s*\[native code/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,Z=/'|\\/g,G=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,K=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,J=function(t,e){var i="0x"+e-65536;return i!=i?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{I.call(x.documentElement.childNodes,0)[0].nodeType}catch(t){I=function(t){for(var e,i=[];e=this[t++];)i.push(e);return i}}function Q(t){return H.test(t+"")}function tt(){var t,e=[];return t=function(i,n){return e.push(i+=" ")>r.cacheLength&&delete t[e.shift()],t[i]=n}}function et(t){return t[w]=!0,t}function it(t){var e=u.createElement("div");try{return t(e)}catch(t){return!1}finally{e=null}}function nt(t,e,i,n){var o,s,l,c,d,g,m,v,b,k;if((e?e.ownerDocument||e:x)!==u&&h(e),i=i||[],!t||"string"!=typeof t)return i;if(1!==(c=(e=e||u).nodeType)&&9!==c)return[];if(!f&&!n){if(o=X.exec(t))if(l=o[1]){if(9===c){if(!(s=e.getElementById(l))||!s.parentNode)return i;if(s.id===l)return i.push(s),i}else if(e.ownerDocument&&(s=e.ownerDocument.getElementById(l))&&y(e,s)&&s.id===l)return i.push(s),i}else{if(o[2])return N.apply(i,I.call(e.getElementsByTagName(t),0)),i;if((l=o[3])&&_.getByClassName&&e.getElementsByClassName)return N.apply(i,I.call(e.getElementsByClassName(l),0)),i}if(_.qsa&&!p.test(t)){if(m=!0,v=w,b=e,k=9===c&&t,1===c&&"object"!==e.nodeName.toLowerCase()){for(g=lt(t),(m=e.getAttribute("id"))?v=m.replace(Z,"\\$&"):e.setAttribute("id",v),v="[id='"+v+"'] ",d=g.length;d--;)g[d]=v+ct(g[d]);b=$.test(t)&&e.parentNode||e,k=g.join(",")}if(k)try{return N.apply(i,I.call(b.querySelectorAll(k),0)),i}catch(t){}finally{m||e.removeAttribute("id")}}}return function(t,e,i,n){var o,s,l,c,h,u=lt(t);if(!n&&1===u.length){if((s=u[0]=u[0].slice(0)).length>2&&"ID"===(l=s[0]).type&&9===e.nodeType&&!f&&r.relative[s[1].type]){if(!(e=r.find.ID(l.matches[0].replace(K,J),e)[0]))return i;t=t.slice(s.shift().value.length)}for(o=W.needsContext.test(t)?0:s.length;o--&&(l=s[o],!r.relative[c=l.type]);)if((h=r.find[c])&&(n=h(l.matches[0].replace(K,J),$.test(s[0].type)&&e.parentNode||e))){if(s.splice(o,1),!(t=n.length&&ct(s)))return N.apply(i,I.call(n,0)),i;break}}return a(t,u)(n,e,f,i,$.test(t)),i}(t.replace(B,"$1"),e,i,n)}function rt(t,e){var i=e&&t,n=i&&(~e.sourceIndex||1<<31)-(~t.sourceIndex||1<<31);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function ot(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function st(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function at(t){return et((function(e){return e=+e,et((function(i,n){for(var r,o=t([],i.length,e),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))}))}))}for(i in s=nt.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},h=nt.setDocument=function(t){var e=t?t.ownerDocument||t:x;return e!==u&&9===e.nodeType&&e.documentElement?(u=e,d=e.documentElement,f=s(e),_.tagNameNoComments=it((function(t){return t.appendChild(e.createComment("")),!t.getElementsByTagName("*").length})),_.attributes=it((function(t){t.innerHTML="<select></select>";var e=typeof t.lastChild.getAttribute("multiple");return"boolean"!==e&&"string"!==e})),_.getByClassName=it((function(t){return t.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!(!t.getElementsByClassName||!t.getElementsByClassName("e").length)&&(t.lastChild.className="e",2===t.getElementsByClassName("e").length)})),_.getByName=it((function(t){t.id=w+0,t.innerHTML="<a name='"+w+"'></a><div name='"+w+"'></div>",d.insertBefore(t,d.firstChild);var i=e.getElementsByName&&e.getElementsByName(w).length===2+e.getElementsByName(w+0).length;return _.getIdNotName=!e.getElementById(w),d.removeChild(t),i})),r.attrHandle=it((function(t){return t.innerHTML="<a href='#'></a>",t.firstChild&&void 0!==t.firstChild.getAttribute&&"#"===t.firstChild.getAttribute("href")}))?{}:{href:function(t){return t.getAttribute("href",2)},type:function(t){return t.getAttribute("type")}},_.getIdNotName?(r.find.ID=function(t,e){if(void 0!==e.getElementById&&!f){var i=e.getElementById(t);return i&&i.parentNode?[i]:[]}},r.filter.ID=function(t){var e=t.replace(K,J);return function(t){return t.getAttribute("id")===e}}):(r.find.ID=function(t,e){if(void 0!==e.getElementById&&!f){var i=e.getElementById(t);return i?i.id===t||void 0!==i.getAttributeNode&&i.getAttributeNode("id").value===t?[i]:void 0:[]}},r.filter.ID=function(t){var e=t.replace(K,J);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}}),r.find.TAG=_.tagNameNoComments?function(t,e){if(void 0!==e.getElementsByTagName)return e.getElementsByTagName(t)}:function(t,e){var i,n=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},r.find.NAME=_.getByName&&function(t,e){if(void 0!==e.getElementsByName)return e.getElementsByName(name)},r.find.CLASS=_.getByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&!f)return e.getElementsByClassName(t)},g=[],p=[":focus"],(_.qsa=Q(e.querySelectorAll))&&(it((function(t){t.innerHTML="<select><option selected=''></option></select>",t.querySelectorAll("[selected]").length||p.push("\\["+j+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),t.querySelectorAll(":checked").length||p.push(":checked")})),it((function(t){t.innerHTML="<input type='hidden' i=''/>",t.querySelectorAll("[i^='']").length&&p.push("[*^$]="+j+"*(?:\"\"|'')"),t.querySelectorAll(":enabled").length||p.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),p.push(",.*:")}))),(_.matchesSelector=Q(m=d.matchesSelector||d.mozMatchesSelector||d.webkitMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&it((function(t){_.disconnectedMatch=m.call(t,"div"),m.call(t,"[s!='']:x"),g.push("!=",P)})),p=new RegExp(p.join("|")),g=new RegExp(g.join("|")),y=Q(d.contains)||d.compareDocumentPosition?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},b=d.compareDocumentPosition?function(t,i){var n;return t===i?(l=!0,0):(n=i.compareDocumentPosition&&t.compareDocumentPosition&&t.compareDocumentPosition(i))?1&n||t.parentNode&&11===t.parentNode.nodeType?t===e||y(x,t)?-1:i===e||y(x,i)?1:0:4&n?-1:1:t.compareDocumentPosition?-1:1}:function(t,i){var n,r=0,o=t.parentNode,s=i.parentNode,a=[t],c=[i];if(t===i)return l=!0,0;if(!o||!s)return t===e?-1:i===e?1:o?-1:s?1:0;if(o===s)return rt(t,i);for(n=t;n=n.parentNode;)a.unshift(n);for(n=i;n=n.parentNode;)c.unshift(n);for(;a[r]===c[r];)r++;return r?rt(a[r],c[r]):a[r]===x?-1:c[r]===x?1:0},l=!1,[0,0].sort(b),_.detectDuplicates=l,u):u},nt.matches=function(t,e){return nt(t,null,null,e)},nt.matchesSelector=function(t,e){if((t.ownerDocument||t)!==u&&h(t),e=e.replace(G,"='$1']"),_.matchesSelector&&!f&&(!g||!g.test(e))&&!p.test(e))try{var i=m.call(t,e);if(i||_.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return nt(e,u,null,[t]).length>0},nt.contains=function(t,e){return(t.ownerDocument||t)!==u&&h(t),y(t,e)},nt.attr=function(t,e){var i;return(t.ownerDocument||t)!==u&&h(t),f||(e=e.toLowerCase()),(i=r.attrHandle[e])?i(t):f||_.attributes?t.getAttribute(e):((i=t.getAttributeNode(e))||t.getAttribute(e))&&!0===t[e]?e:i&&i.specified?i.value:null},nt.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},nt.uniqueSort=function(t){var e,i=[],n=1,r=0;if(l=!_.detectDuplicates,t.sort(b),l){for(;e=t[n];n++)e===t[n-1]&&(r=i.push(n));for(;r--;)t.splice(i[r],1)}return t},o=nt.getText=function(t){var e,i="",n=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=o(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[n];n++)i+=o(e);return i},r=nt.selectors={cacheLength:50,createPseudo:et,match:W,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(K,J),t[3]=(t[4]||t[5]||"").replace(K,J),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||nt.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&nt.error(t[0]),t},PSEUDO:function(t){var e,i=!t[5]&&t[2];return W.CHILD.test(t[0])?null:(t[4]?t[2]=t[4]:i&&q.test(i)&&(e=lt(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){return"*"===t?function(){return!0}:(t=t.replace(K,J).toLowerCase(),function(e){return e.nodeName&&e.nodeName.toLowerCase()===t})},CLASS:function(t){var e=S[t+" "];return e||(e=new RegExp("(^|"+j+")"+t+"("+j+"|$)"))&&S(t,(function(t){return e.test(t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,i){return function(n){var r=nt.attr(n,t);return null==r?"!="===e:!e||(r+="","="===e?r===i:"!="===e?r!==i:"^="===e?i&&0===r.indexOf(i):"*="===e?i&&r.indexOf(i)>-1:"$="===e?i&&r.slice(-i.length)===i:"~="===e?(" "+r+" ").indexOf(i)>-1:"|="===e&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===r?function(t){return!!t.parentNode}:function(e,i,l){var c,h,u,d,f,p,g=o!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a;if(m){if(o){for(;g;){for(u=e;u=u[g];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&y){for(f=(c=(h=m[w]||(m[w]={}))[t]||[])[0]===k&&c[1],d=c[0]===k&&c[2],u=f&&m.childNodes[f];u=++f&&u&&u[g]||(d=f=0)||p.pop();)if(1===u.nodeType&&++d&&u===e){h[t]=[k,f,d];break}}else if(y&&(c=(e[w]||(e[w]={}))[t])&&c[0]===k)d=c[1];else for(;(u=++f&&u&&u[g]||(d=f=0)||p.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++d||(y&&((u[w]||(u[w]={}))[t]=[k,d]),u!==e)););return(d-=r)===n||d%n==0&&d/n>=0}}},PSEUDO:function(t,e){var i,n=r.pseudos[t]||r.setFilters[t.toLowerCase()]||nt.error("unsupported pseudo: "+t);return n[w]?n(e):n.length>1?(i=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,i){for(var r,o=n(t,e),s=o.length;s--;)t[r=R.call(t,o[s])]=!(i[r]=o[s])})):function(t){return n(t,0,i)}):n}},pseudos:{not:et((function(t){var e=[],i=[],n=a(t.replace(B,"$1"));return n[w]?et((function(t,e,i,r){for(var o,s=n(t,null,r,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))})):function(t,r,o){return e[0]=t,n(e,null,o,i),!i.pop()}})),has:et((function(t){return function(e){return nt(t,e).length>0}})),contains:et((function(t){return function(e){return(e.textContent||e.innerText||o(e)).indexOf(t)>-1}})),lang:et((function(t){return U.test(t||"")||nt.error("unsupported lang: "+t),t=t.replace(K,J).toLowerCase(),function(e){var i;do{if(i=f?e.getAttribute("xml:lang")||e.getAttribute("lang"):e.lang)return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===d},focus:function(t){return t===u.activeElement&&(!u.hasFocus||u.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeName>"@"||3===t.nodeType||4===t.nodeType)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return V.test(t.nodeName)},input:function(t){return Y.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||e.toLowerCase()===t.type)},first:at((function(){return[0]})),last:at((function(t,e){return[e-1]})),eq:at((function(t,e,i){return[i<0?i+e:i]})),even:at((function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t})),odd:at((function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t})),lt:at((function(t,e,i){for(var n=i<0?i+e:i;--n>=0;)t.push(n);return t})),gt:at((function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t}))}},{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[i]=ot(i);for(i in{submit:!0,reset:!0})r.pseudos[i]=st(i);function lt(t,e){var i,n,o,s,a,l,c,h=T[t+" "];if(h)return e?0:h.slice(0);for(a=t,l=[],c=r.preFilter;a;){for(s in i&&!(n=M.exec(a))||(n&&(a=a.slice(n[0].length)||a),l.push(o=[])),i=!1,(n=F.exec(a))&&(i=n.shift(),o.push({value:i,type:n[0].replace(B," ")}),a=a.slice(i.length)),r.filter)!(n=W[s].exec(a))||c[s]&&!(n=c[s](n))||(i=n.shift(),o.push({value:i,type:s,matches:n}),a=a.slice(i.length));if(!i)break}return e?a.length:a?nt.error(t):T(t,l).slice(0)}function ct(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function ht(t,e,i){var r=e.dir,o=i&&"parentNode"===r,s=E++;return e.first?function(e,i,n){for(;e=e[r];)if(1===e.nodeType||o)return t(e,i,n)}:function(e,i,a){var l,c,h,u=k+" "+s;if(a){for(;e=e[r];)if((1===e.nodeType||o)&&t(e,i,a))return!0}else for(;e=e[r];)if(1===e.nodeType||o)if((c=(h=e[w]||(e[w]={}))[r])&&c[0]===u){if(!0===(l=c[1])||l===n)return!0===l}else if((c=h[r]=[u])[1]=t(e,i,a)||n,!0===c[1])return!0}}function ut(t){return t.length>1?function(e,i,n){for(var r=t.length;r--;)if(!t[r](e,i,n))return!1;return!0}:t[0]}function dt(t,e,i,n,r){for(var o,s=[],a=0,l=t.length,c=null!=e;a<l;a++)(o=t[a])&&(i&&!i(o,n,r)||(s.push(o),c&&e.push(a)));return s}function ft(t,e,i,n,r,o){return n&&!n[w]&&(n=ft(n)),r&&!r[w]&&(r=ft(r,o)),et((function(o,s,a,l){var c,h,u,d=[],f=[],p=s.length,g=o||function(t,e,i){for(var n=0,r=e.length;n<r;n++)nt(t,e[n],i);return i}(e||"*",a.nodeType?[a]:a,[]),m=!t||!o&&e?g:dt(g,d,t,a,l),v=i?r||(o?t:p||n)?[]:s:m;if(i&&i(m,v,a,l),n)for(c=dt(v,f),n(c,[],a,l),h=c.length;h--;)(u=c[h])&&(v[f[h]]=!(m[f[h]]=u));if(o){if(r||t){if(r){for(c=[],h=v.length;h--;)(u=v[h])&&c.push(m[h]=u);r(null,v=[],c,l)}for(h=v.length;h--;)(u=v[h])&&(c=r?R.call(o,u):d[h])>-1&&(o[c]=!(s[c]=u))}}else v=dt(v===s?v.splice(p,v.length):v),r?r(null,s,v,l):N.apply(s,v)}))}function pt(t){for(var e,i,n,o=t.length,s=r.relative[t[0].type],a=s||r.relative[" "],l=s?1:0,h=ht((function(t){return t===e}),a,!0),u=ht((function(t){return R.call(e,t)>-1}),a,!0),d=[function(t,i,n){return!s&&(n||i!==c)||((e=i).nodeType?h(t,i,n):u(t,i,n))}];l<o;l++)if(i=r.relative[t[l].type])d=[ht(ut(d),i)];else{if((i=r.filter[t[l].type].apply(null,t[l].matches))[w]){for(n=++l;n<o&&!r.relative[t[n].type];n++);return ft(l>1&&ut(d),l>1&&ct(t.slice(0,l-1)).replace(B,"$1"),i,l<n&&pt(t.slice(l,n)),n<o&&pt(t=t.slice(n)),n<o&&ct(t))}d.push(i)}return ut(d)}function gt(){}a=nt.compile=function(t,e){var i,o=[],s=[],a=C[t+" "];if(!a){for(e||(e=lt(t)),i=e.length;i--;)(a=pt(e[i]))[w]?o.push(a):s.push(a);a=C(t,function(t,e){var i=0,o=e.length>0,s=t.length>0,a=function(a,l,h,d,f){var p,g,m,v=[],y=0,b="0",w=a&&[],x=null!=f,_=c,E=a||s&&r.find.TAG("*",f&&l.parentNode||l),S=k+=null==_?1:Math.random()||.1;for(x&&(c=l!==u&&l,n=i);null!=(p=E[b]);b++){if(s&&p){for(g=0;m=t[g++];)if(m(p,l,h)){d.push(p);break}x&&(k=S,n=++i)}o&&((p=!m&&p)&&y--,a&&w.push(p))}if(y+=b,o&&b!==y){for(g=0;m=e[g++];)m(w,v,l,h);if(a){if(y>0)for(;b--;)w[b]||v[b]||(v[b]=A.call(d));v=dt(v)}N.apply(d,v),x&&!a&&v.length>0&&y+e.length>1&&nt.uniqueSort(d)}return x&&(k=S,c=_),w};return o?et(a):a}(s,o))}return a},r.pseudos.nth=r.pseudos.eq,r.filters=gt.prototype=r.pseudos,r.setFilters=new gt,h(),nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(t);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,ot=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,at={children:!0,contents:!0,next:!0,prev:!0};function lt(t,e){do{t=t[e]}while(t&&1!==t.nodeType);return t}function ct(t,e,i){if(e=e||0,v.isFunction(e))return v.grep(t,(function(t,n){return!!e.call(t,n,t)===i}));if(e.nodeType)return v.grep(t,(function(t){return t===e===i}));if("string"==typeof e){var n=v.grep(t,(function(t){return 1===t.nodeType}));if(ot.test(e))return v.filter(e,n,!i);e=v.filter(e,n)}return v.grep(t,(function(t){return v.inArray(t,e)>=0===i}))}function ht(t){var e=ut.split("|"),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}v.fn.extend({find:function(t){var e,i,n,r=this.length;if("string"!=typeof t)return n=this,this.pushStack(v(t).filter((function(){for(e=0;e<r;e++)if(v.contains(n[e],this))return!0})));for(i=[],e=0;e<r;e++)v.find(t,this[e],i);return(i=this.pushStack(r>1?v.unique(i):i)).selector=(this.selector?this.selector+" ":"")+t,i},has:function(t){var e,i=v(t,this),n=i.length;return this.filter((function(){for(e=0;e<n;e++)if(v.contains(this,i[e]))return!0}))},not:function(t){return this.pushStack(ct(this,t,!1))},filter:function(t){return this.pushStack(ct(this,t,!0))},is:function(t){return!!t&&("string"==typeof t?st.test(t)?v(t,this.context).index(this[0])>=0:v.filter(t,this).length>0:this.filter(t).length>0)},closest:function(t,e){for(var i,n=0,r=this.length,o=[],s=st.test(t)||"string"!=typeof t?v(t,e||this.context):0;n<r;n++)for(i=this[n];i&&i.ownerDocument&&i!==e&&11!==i.nodeType;){if(s?s.index(i)>-1:v.find.matchesSelector(i,t)){o.push(i);break}i=i.parentNode}return this.pushStack(o.length>1?v.unique(o):o)},index:function(t){return t?"string"==typeof t?v.inArray(this[0],v(t)):v.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){var i="string"==typeof t?v(t,e):v.makeArray(t&&t.nodeType?[t]:t),n=v.merge(this.get(),i);return this.pushStack(v.unique(n))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return v.dir(t,"parentNode")},parentsUntil:function(t,e,i){return v.dir(t,"parentNode",i)},next:function(t){return lt(t,"nextSibling")},prev:function(t){return lt(t,"previousSibling")},nextAll:function(t){return v.dir(t,"nextSibling")},prevAll:function(t){return v.dir(t,"previousSibling")},nextUntil:function(t,e,i){return v.dir(t,"nextSibling",i)},prevUntil:function(t,e,i){return v.dir(t,"previousSibling",i)},siblings:function(t){return v.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return v.sibling(t.firstChild)},contents:function(t){return v.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:v.merge([],t.childNodes)}},(function(t,e){v.fn[t]=function(i,n){var r=v.map(this,e,i);return nt.test(t)||(n=i),n&&"string"==typeof n&&(r=v.filter(n,r)),r=this.length>1&&!at[t]?v.unique(r):r,this.length>1&&rt.test(t)&&(r=r.reverse()),this.pushStack(r)}})),v.extend({filter:function(t,e,i){return i&&(t=":not("+t+")"),1===e.length?v.find.matchesSelector(e[0],t)?[e[0]]:[]:v.find.matches(t,e)},dir:function(t,e,i){for(var n=[],r=t[e];r&&9!==r.nodeType&&(void 0===i||1!==r.nodeType||!v(r).is(i));)1===r.nodeType&&n.push(r),r=r[e];return n},sibling:function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}});var ut="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",dt=/ jQuery\d+="(?:null|\d+)"/g,ft=new RegExp("<(?:"+ut+")[\\s/>]","i"),pt=/^\s+/,gt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,mt=/<([\w:]+)/,vt=/<tbody/i,yt=/<|&#?\w+;/,bt=/<(?:script|style|link)/i,wt=/^(?:checkbox|radio)$/i,xt=/checked\s*(?:[^=]|=\s*.checked.)/i,_t=/^$|\/(?:java|ecma)script/i,kt=/^true\/(.*)/,Et=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,St={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:v.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Tt=ht(r).appendChild(r.createElement("div"));function Ct(t){var e=t.getAttributeNode("type");return t.type=(e&&e.specified)+"/"+t.type,t}function Ot(t){var e=kt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function At(t,e){for(var i,n=0;null!=(i=t[n]);n++)v._data(i,"globalEval",!e||v._data(e[n],"globalEval"))}function Nt(t,e){if(1===e.nodeType&&v.hasData(t)){var i,n,r,o=v._data(t),s=v._data(e,o),a=o.events;if(a)for(i in delete s.handle,s.events={},a)for(n=0,r=a[i].length;n<r;n++)v.event.add(e,i,a[i][n]);s.data&&(s.data=v.extend({},s.data))}}function It(t,e){var i,n,r;if(1===e.nodeType){if(i=e.nodeName.toLowerCase(),!v.support.noCloneEvent&&e[v.expando]){for(n in(r=v._data(e)).events)v.removeEvent(e,n,r.handle);e.removeAttribute(v.expando)}"script"===i&&e.text!==t.text?(Ct(e).text=t.text,Ot(e)):"object"===i?(e.parentNode&&(e.outerHTML=t.outerHTML),v.support.html5Clone&&t.innerHTML&&!v.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===i&&wt.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===i?e.defaultSelected=e.selected=t.defaultSelected:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}}function Rt(t,e){var i,n,r=0,o=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],i=t.childNodes||t;null!=(n=i[r]);r++)!e||v.nodeName(n,e)?o.push(n):v.merge(o,Rt(n,e));return void 0===e||e&&v.nodeName(t,e)?v.merge([t],o):o}function jt(t){wt.test(t.type)&&(t.defaultChecked=t.checked)}St.optgroup=St.option,St.tbody=St.tfoot=St.colgroup=St.caption=St.thead,St.th=St.td,v.fn.extend({text:function(t){return v.access(this,(function(t){return void 0===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(t))}),null,t,arguments.length)},wrapAll:function(t){if(v.isFunction(t))return this.each((function(e){v(this).wrapAll(t.call(this,e))}));if(this[0]){var e=v(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t})).append(this)}return this},wrapInner:function(t){return v.isFunction(t)?this.each((function(e){v(this).wrapInner(t.call(this,e))})):this.each((function(){var e=v(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)}))},wrap:function(t){var e=v.isFunction(t);return this.each((function(i){v(this).wrapAll(e?t.call(this,i):t)}))},unwrap:function(){return this.parent().each((function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)})).end()},append:function(){return this.domManip(arguments,!0,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(t)}))},prepend:function(){return this.domManip(arguments,!0,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(t,this.firstChild)}))},before:function(){return this.domManip(arguments,!1,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return this.domManip(arguments,!1,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},remove:function(t,e){for(var i,n=0;null!=(i=this[n]);n++)(!t||v.filter(t,[i]).length>0)&&(e||1!==i.nodeType||v.cleanData(Rt(i)),i.parentNode&&(e&&v.contains(i.ownerDocument,i)&&At(Rt(i,"script")),i.parentNode.removeChild(i)));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&v.cleanData(Rt(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&v.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return v.clone(this,t,e)}))},html:function(t){return v.access(this,(function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(dt,""):void 0;if("string"==typeof t&&!bt.test(t)&&(v.support.htmlSerialize||!ft.test(t))&&(v.support.leadingWhitespace||!pt.test(t))&&!St[(mt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(gt,"<$1></$2>");try{for(;i<n;i++)1===(e=this[i]||{}).nodeType&&(v.cleanData(Rt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(t){return v.isFunction(t)||"string"==typeof t||(t=v(t).not(this).detach()),this.domManip([t],!0,(function(t){var e=this.nextSibling,i=this.parentNode;i&&(v(this).remove(),i.insertBefore(t,e))}))},detach:function(t){return this.remove(t,!0)},domManip:function(t,e,i){t=h.apply([],t);var n,r,o,s,a,l,c,u,d=0,f=this.length,p=this,g=f-1,m=t[0],y=v.isFunction(m);if(y||!(f<=1||"string"!=typeof m||v.support.checkClone)&&xt.test(m))return this.each((function(n){var r=p.eq(n);y&&(t[0]=m.call(this,n,e?r.html():void 0)),r.domManip(t,e,i)}));if(f&&(n=(l=v.buildFragment(t,this[0].ownerDocument,!1,this)).firstChild,1===l.childNodes.length&&(l=n),n)){for(e=e&&v.nodeName(n,"tr"),o=(s=v.map(Rt(l,"script"),Ct)).length;d<f;d++)r=l,d!==g&&(r=v.clone(r,!0,!0),o&&v.merge(s,Rt(r,"script"))),i.call(e&&v.nodeName(this[d],"table")?(c=this[d],u="tbody",c.getElementsByTagName(u)[0]||c.appendChild(c.ownerDocument.createElement(u))):this[d],r,d);if(o)for(a=s[s.length-1].ownerDocument,v.map(s,Ot),d=0;d<o;d++)r=s[d],_t.test(r.type||"")&&!v._data(r,"globalEval")&&v.contains(a,r)&&(r.src?v.ajax({url:r.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):v.globalEval((r.text||r.textContent||r.innerHTML||"").replace(Et,"")));l=n=null}return this}}),v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){v.fn[t]=function(t){for(var i,n=0,r=[],o=v(t),s=o.length-1;n<=s;n++)i=n===s?this:this.clone(!0),v(o[n])[e](i),u.apply(r,i.get());return this.pushStack(r)}})),v.extend({clone:function(t,e,i){var n,r,o,s,a,l=v.contains(t.ownerDocument,t);if(v.support.html5Clone||v.isXMLDoc(t)||!ft.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(Tt.innerHTML=t.outerHTML,Tt.removeChild(o=Tt.firstChild)),!(v.support.noCloneEvent&&v.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||v.isXMLDoc(t)))for(n=Rt(o),a=Rt(t),s=0;null!=(r=a[s]);++s)n[s]&&It(r,n[s]);if(e)if(i)for(a=a||Rt(t),n=n||Rt(o),s=0;null!=(r=a[s]);s++)Nt(r,n[s]);else Nt(t,o);return(n=Rt(o,"script")).length>0&&At(n,!l&&Rt(t,"script")),n=a=r=null,o},buildFragment:function(t,e,i,n){for(var r,o,s,a,l,c,h,u=t.length,d=ht(e),f=[],p=0;p<u;p++)if((o=t[p])||0===o)if("object"===v.type(o))v.merge(f,o.nodeType?[o]:o);else if(yt.test(o)){for(a=a||d.appendChild(e.createElement("div")),l=(mt.exec(o)||["",""])[1].toLowerCase(),h=St[l]||St._default,a.innerHTML=h[1]+o.replace(gt,"<$1></$2>")+h[2],r=h[0];r--;)a=a.lastChild;if(!v.support.leadingWhitespace&&pt.test(o)&&f.push(e.createTextNode(pt.exec(o)[0])),!v.support.tbody)for(r=(o="table"!==l||vt.test(o)?"<table>"!==h[1]||vt.test(o)?0:a:a.firstChild)&&o.childNodes.length;r--;)v.nodeName(c=o.childNodes[r],"tbody")&&!c.childNodes.length&&o.removeChild(c);for(v.merge(f,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=d.lastChild}else f.push(e.createTextNode(o));for(a&&d.removeChild(a),v.support.appendChecked||v.grep(Rt(f,"input"),jt),p=0;o=f[p++];)if((!n||-1===v.inArray(o,n))&&(s=v.contains(o.ownerDocument,o),a=Rt(d.appendChild(o),"script"),s&&At(a),i))for(r=0;o=a[r++];)_t.test(o.type||"")&&i.push(o);return a=null,d},cleanData:function(t,e){for(var i,n,r,o,s=0,a=v.expando,l=v.cache,h=v.support.deleteExpando,u=v.event.special;null!=(i=t[s]);s++)if((e||v.acceptData(i))&&(o=(r=i[a])&&l[r])){if(o.events)for(n in o.events)u[n]?v.event.remove(i,n):v.removeEvent(i,n,o.handle);l[r]&&(delete l[r],h?delete i[a]:void 0!==i.removeAttribute?i.removeAttribute(a):i[a]=null,c.push(r))}}});var Lt,zt,Dt,Pt=/alpha\([^)]*\)/i,Bt=/opacity\s*=\s*([^)]*)/,Mt=/^(top|right|bottom|left)$/,Ft=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Ut=new RegExp("^("+y+")(.*)$","i"),Wt=new RegExp("^("+y+")(?!px)[a-z%]+$","i"),$t=new RegExp("^([+-])=("+y+")","i"),Ht={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Yt={letterSpacing:0,fontWeight:400},Vt=["Top","Right","Bottom","Left"],Zt=["Webkit","O","Moz","ms"];function Gt(t,e){if(e in t)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),n=e,r=Zt.length;r--;)if((e=Zt[r]+i)in t)return e;return n}function Kt(t,e){return t=e||t,"none"===v.css(t,"display")||!v.contains(t.ownerDocument,t)}function Jt(t,e){for(var i,n,r,o=[],s=0,a=t.length;s<a;s++)(n=t[s]).style&&(o[s]=v._data(n,"olddisplay"),i=n.style.display,e?(o[s]||"none"!==i||(n.style.display=""),""===n.style.display&&Kt(n)&&(o[s]=v._data(n,"olddisplay",ie(n.nodeName)))):o[s]||(r=Kt(n),(i&&"none"!==i||!r)&&v._data(n,"olddisplay",r?i:v.css(n,"display"))));for(s=0;s<a;s++)(n=t[s]).style&&(e&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=e?o[s]||"":"none"));return t}function Qt(t,e,i){var n=Ut.exec(e);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):e}function te(t,e,i,n,r){for(var o=i===(n?"border":"content")?4:"width"===e?1:0,s=0;o<4;o+=2)"margin"===i&&(s+=v.css(t,i+Vt[o],!0,r)),n?("content"===i&&(s-=v.css(t,"padding"+Vt[o],!0,r)),"margin"!==i&&(s-=v.css(t,"border"+Vt[o]+"Width",!0,r))):(s+=v.css(t,"padding"+Vt[o],!0,r),"padding"!==i&&(s+=v.css(t,"border"+Vt[o]+"Width",!0,r)));return s}function ee(t,e,i){var n=!0,r="width"===e?t.offsetWidth:t.offsetHeight,o=zt(t),s=v.support.boxSizing&&"border-box"===v.css(t,"boxSizing",!1,o);if(r<=0||null==r){if(((r=Dt(t,e,o))<0||null==r)&&(r=t.style[e]),Wt.test(r))return r;n=s&&(v.support.boxSizingReliable||r===t.style[e]),r=parseFloat(r)||0}return r+te(t,e,i||(s?"border":"content"),n,o)+"px"}function ie(t){var e=r,i=Ht[t];return i||("none"!==(i=ne(t,e))&&i||((e=((Lt=(Lt||v("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(e.documentElement))[0].contentWindow||Lt[0].contentDocument).document).write("<!doctype html><html><body>"),e.close(),i=ne(t,e),Lt.detach()),Ht[t]=i),i}function ne(t,e){var i=v(e.createElement(t)).appendTo(e.body),n=v.css(i[0],"display");return i.remove(),n}v.fn.extend({css:function(t,e){return v.access(this,(function(t,e,i){var n,r,o={},s=0;if(v.isArray(e)){for(r=zt(t),n=e.length;s<n;s++)o[e[s]]=v.css(t,e[s],!1,r);return o}return void 0!==i?v.style(t,e,i):v.css(t,e)}),t,e,arguments.length>1)},show:function(){return Jt(this,!0)},hide:function(){return Jt(this)},toggle:function(t){var e="boolean"==typeof t;return this.each((function(){(e?t:Kt(this))?v(this).show():v(this).hide()}))}}),v.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Dt(t,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:v.support.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=v.camelCase(e),l=t.style;if(e=v.cssProps[a]||(v.cssProps[a]=Gt(l,a)),s=v.cssHooks[e]||v.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(r=s.get(t,!1,n))?r:l[e];if(!("string"===(o=typeof i)&&(r=$t.exec(i))&&(i=(r[1]+1)*r[2]+parseFloat(v.css(t,e)),o="number"),null==i||"number"===o&&isNaN(i)||("number"!==o||v.cssNumber[a]||(i+="px"),v.support.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&void 0===(i=s.set(t,i,n)))))try{l[e]=i}catch(t){}}},css:function(t,e,i,n){var r,o,s,a=v.camelCase(e);return e=v.cssProps[a]||(v.cssProps[a]=Gt(t.style,a)),(s=v.cssHooks[e]||v.cssHooks[a])&&"get"in s&&(o=s.get(t,!0,i)),void 0===o&&(o=Dt(t,e,n)),"normal"===o&&e in Yt&&(o=Yt[e]),""===i||i?(r=parseFloat(o),!0===i||v.isNumeric(r)?r||0:o):o},swap:function(t,e,i,n){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];for(o in r=i.apply(t,n||[]),e)t.style[o]=s[o];return r}}),t.getComputedStyle?(zt=function(e){return t.getComputedStyle(e,null)},Dt=function(t,e,i){var n,r,o,s=i||zt(t),a=s?s.getPropertyValue(e)||s[e]:void 0,l=t.style;return s&&(""!==a||v.contains(t.ownerDocument,t)||(a=v.style(t,e)),Wt.test(a)&&qt.test(e)&&(n=l.width,r=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=s.width,l.width=n,l.minWidth=r,l.maxWidth=o)),a}):r.documentElement.currentStyle&&(zt=function(t){return t.currentStyle},Dt=function(t,e,i){var n,r,o,s=i||zt(t),a=s?s[e]:void 0,l=t.style;return null==a&&l&&l[e]&&(a=l[e]),Wt.test(a)&&!Mt.test(e)&&(n=l.left,(o=(r=t.runtimeStyle)&&r.left)&&(r.left=t.currentStyle.left),l.left="fontSize"===e?"1em":a,a=l.pixelLeft+"px",l.left=n,o&&(r.left=o)),""===a?"auto":a}),v.each(["height","width"],(function(t,e){v.cssHooks[e]={get:function(t,i,n){if(i)return 0===t.offsetWidth&&Ft.test(v.css(t,"display"))?v.swap(t,Xt,(function(){return ee(t,e,n)})):ee(t,e,n)},set:function(t,i,n){var r=n&&zt(t);return Qt(0,i,n?te(t,e,n,v.support.boxSizing&&"border-box"===v.css(t,"boxSizing",!1,r),r):0)}}})),v.support.opacity||(v.cssHooks.opacity={get:function(t,e){return Bt.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,r=v.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=n&&n.filter||i.filter||"";i.zoom=1,(e>=1||""===e)&&""===v.trim(o.replace(Pt,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===e||n&&!n.filter)||(i.filter=Pt.test(o)?o.replace(Pt,r):o+" "+r)}}),v((function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(t,e){if(e)return v.swap(t,{display:"inline-block"},Dt,[t,"marginRight"])}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],(function(t,e){v.cssHooks[e]={get:function(t,i){if(i)return i=Dt(t,e),Wt.test(i)?v(t).position()[e]+"px":i}}}))})),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!v.support.reliableHiddenOffsets&&"none"===(t.style&&t.style.display||v.css(t,"display"))},v.expr.filters.visible=function(t){return!v.expr.filters.hidden(t)}),v.each({margin:"",padding:"",border:"Width"},(function(t,e){v.cssHooks[t+e]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];n<4;n++)r[t+Vt[n]+e]=o[n]||o[n-2]||o[0];return r}},qt.test(t)||(v.cssHooks[t+e].set=Qt)}));var re=/%20/g,oe=/\[\]$/,se=/\r?\n/g,ae=/^(?:submit|button|image|reset|file)$/i,le=/^(?:input|select|textarea|keygen)/i;function ce(t,e,i,n){var r;if(v.isArray(e))v.each(e,(function(e,r){i||oe.test(t)?n(t,r):ce(t+"["+("object"==typeof r?e:"")+"]",r,i,n)}));else if(i||"object"!==v.type(e))n(t,e);else for(r in e)ce(t+"["+r+"]",e[r],i,n)}v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=v.prop(this,"elements");return t?v.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!v(this).is(":disabled")&&le.test(this.nodeName)&&!ae.test(t)&&(this.checked||!wt.test(t))})).map((function(t,e){var i=v(this).val();return null==i?null:v.isArray(i)?v.map(i,(function(t){return{name:e.name,value:t.replace(se,"\r\n")}})):{name:e.name,value:i.replace(se,"\r\n")}})).get()}}),v.param=function(t,e){var i,n=[],r=function(t,e){e=v.isFunction(e)?e():null==e?"":e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=v.ajaxSettings&&v.ajaxSettings.traditional),v.isArray(t)||t.jquery&&!v.isPlainObject(t))v.each(t,(function(){r(this.name,this.value)}));else for(i in t)ce(i,t[i],e,r);return n.join("&").replace(re,"+")},v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),(function(t,e){v.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}})),v.fn.hover=function(t,e){return this.mouseenter(t).mouseleave(e||t)};var he,ue,de=v.now(),fe=/\?/,pe=/#.*$/,ge=/([?&])_=[^&]*/,me=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,ve=/^(?:GET|HEAD)$/,ye=/^\/\//,be=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,we=v.fn.load,xe={},_e={},ke="*/".concat("*");try{ue=o.href}catch(t){(ue=r.createElement("a")).href="",ue=ue.href}function Ee(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,r=0,o=e.toLowerCase().match(b)||[];if(v.isFunction(i))for(;n=o[r++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function Se(t,e,i,n){var r={},o=t===_e;function s(a){var l;return r[a]=!0,v.each(t[a]||[],(function(t,a){var c=a(e,i,n);return"string"!=typeof c||o||r[c]?o?!(l=c):void 0:(e.dataTypes.unshift(c),s(c),!1)})),l}return s(e.dataTypes[0])||!r["*"]&&s("*")}function Te(t,e){var i,n,r=v.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&v.extend(!0,t,i),t}he=be.exec(ue.toLowerCase())||[],v.fn.load=function(t,e,i){if("string"!=typeof t&&we)return we.apply(this,arguments);var n,r,o,s=this,a=t.indexOf(" ");return a>=0&&(n=t.slice(a,t.length),t=t.slice(0,a)),v.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&v.ajax({url:t,type:o,dataType:"html",data:e}).done((function(t){r=arguments,s.html(n?v("<div>").append(v.parseHTML(t)).find(n):t)})).complete(i&&function(t,e){s.each(i,r||[t.responseText,e,t])}),this},v.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){v.fn[e]=function(t){return this.on(e,t)}})),v.each(["get","post"],(function(t,e){v[e]=function(t,i,n,r){return v.isFunction(i)&&(r=r||n,n=i,i=void 0),v.ajax({url:t,type:e,dataType:r,data:i,success:n})}})),v.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ue,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(he[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ke,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":t.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Te(Te(t,v.ajaxSettings),e):Te(v.ajaxSettings,t)},ajaxPrefilter:Ee(xe),ajaxTransport:Ee(_e),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,n,r,o,s,a,l,c,h=v.ajaxSetup({},e),u=h.context||h,d=h.context&&(u.nodeType||u.jquery)?v(u):v.event,f=v.Deferred(),p=v.Callbacks("once memory"),g=h.statusCode||{},m={},y={},w=0,x="canceled",_={readyState:0,getResponseHeader:function(t){var e;if(2===w){if(!c)for(c={};e=me.exec(o);)c[e[1].toLowerCase()]=e[2];e=c[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===w?o:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return w||(t=y[i]=y[i]||t,m[t]=e),this},overrideMimeType:function(t){return w||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(w<2)for(e in t)g[e]=[g[e],t[e]];else _.always(t[_.status]);return this},abort:function(t){var e=t||x;return l&&l.abort(e),k(0,e),this}};if(f.promise(_).complete=p.add,_.success=_.done,_.error=_.fail,h.url=((t||h.url||ue)+"").replace(pe,"").replace(ye,he[1]+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=v.trim(h.dataType||"*").toLowerCase().match(b)||[""],null==h.crossDomain&&(i=be.exec(h.url.toLowerCase()),h.crossDomain=!(!i||i[1]===he[1]&&i[2]===he[2]&&(i[3]||("http:"===i[1]?80:443))==(he[3]||("http:"===he[1]?80:443)))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=v.param(h.data,h.traditional)),Se(xe,h,e,_),2===w)return _;for(n in(a=h.global)&&0==v.active++&&v.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!ve.test(h.type),r=h.url,h.hasContent||(h.data&&(r=h.url+=(fe.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=ge.test(r)?r.replace(ge,"$1_="+de++):r+(fe.test(r)?"&":"?")+"_="+de++)),h.ifModified&&(v.lastModified[r]&&_.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&_.setRequestHeader("If-None-Match",v.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&_.setRequestHeader("Content-Type",h.contentType),_.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+ke+"; q=0.01":""):h.accepts["*"]),h.headers)_.setRequestHeader(n,h.headers[n]);if(h.beforeSend&&(!1===h.beforeSend.call(u,_,h)||2===w))return _.abort();for(n in x="abort",{success:1,error:1,complete:1})_[n](h[n]);if(l=Se(_e,h,e,_)){_.readyState=1,a&&d.trigger("ajaxSend",[_,h]),h.async&&h.timeout>0&&(s=setTimeout((function(){_.abort("timeout")}),h.timeout));try{w=1,l.send(m,k)}catch(t){if(!(w<2))throw t;k(-1,t)}}else k(-1,"No Transport");function k(t,e,i,n){var c,m,y,b,x,k=e;2!==w&&(w=2,s&&clearTimeout(s),l=void 0,o=n||"",_.readyState=t>0?4:0,i&&(b=function(t,e,i){var n,r,o,s,a=t.contents,l=t.dataTypes,c=t.responseFields;for(s in c)s in i&&(e[c[s]]=i[s]);for(;"*"===l[0];)l.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(s in a)if(a[s]&&a[s].test(r)){l.unshift(s);break}if(l[0]in i)o=l[0];else{for(s in i){if(!l[0]||t.converters[s+" "+l[0]]){o=s;break}n||(n=s)}o=o||n}if(o)return o!==l[0]&&l.unshift(o),i[o]}(h,_,i)),t>=200&&t<300||304===t?(h.ifModified&&((x=_.getResponseHeader("Last-Modified"))&&(v.lastModified[r]=x),(x=_.getResponseHeader("etag"))&&(v.etag[r]=x)),204===t?(c=!0,k="nocontent"):304===t?(c=!0,k="notmodified"):(k=(c=function(t,e){var i,n,r,o,s={},a=0,l=t.dataTypes.slice(),c=l[0];t.dataFilter&&(e=t.dataFilter(e,t.dataType));if(l[1])for(r in t.converters)s[r.toLowerCase()]=t.converters[r];for(;n=l[++a];)if("*"!==n){if("*"!==c&&c!==n){if(!(r=s[c+" "+n]||s["* "+n]))for(i in s)if((o=i.split(" "))[1]===n&&(r=s[c+" "+o[0]]||s["* "+o[0]])){!0===r?r=s[i]:!0!==s[i]&&(n=o[0],l.splice(a--,0,n));break}if(!0!==r)if(r&&t.throws)e=r(e);else try{e=r(e)}catch(t){return{state:"parsererror",error:r?t:"No conversion from "+c+" to "+n}}}c=n}return{state:"success",data:e}}(h,b)).state,m=c.data,c=!(y=c.error))):(y=k,!t&&k||(k="error",t<0&&(t=0))),_.status=t,_.statusText=(e||k)+"",c?f.resolveWith(u,[m,k,_]):f.rejectWith(u,[_,k,y]),_.statusCode(g),g=void 0,a&&d.trigger(c?"ajaxSuccess":"ajaxError",[_,h,c?m:y]),p.fireWith(u,[_,k]),a&&(d.trigger("ajaxComplete",[_,h]),--v.active||v.event.trigger("ajaxStop")))}return _},getScript:function(t,e){return v.get(t,void 0,e,"script")},getJSON:function(t,e,i){return v.get(t,e,i,"json")}}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return v.globalEval(t),t}}}),v.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)})),v.ajaxTransport("script",(function(t){if(t.crossDomain){var e,i=r.head||v("head")[0]||r.documentElement;return{send:function(n,o){(e=r.createElement("script")).async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,i){(i||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,i||o(200,"success"))},i.insertBefore(e,i.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}}));var Ce=[],Oe=/(=)\?(?=&|$)|\?\?/;v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ce.pop()||v.expando+"_"+de++;return this[t]=!0,t}}),v.ajaxPrefilter("json jsonp",(function(e,i,n){var r,o,s,a=!1!==e.jsonp&&(Oe.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Oe.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Oe,"$1"+r):!1!==e.jsonp&&(e.url+=(fe.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||v.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){s=arguments},n.always((function(){t[r]=o,e[r]&&(e.jsonpCallback=i.jsonpCallback,Ce.push(r)),s&&v.isFunction(o)&&o(s[0]),s=o=void 0})),"script"}));var Ae,Ne,Ie=0,Re=t.ActiveXObject&&function(){var t;for(t in Ae)Ae[t](void 0,!0)};function je(){try{return new t.XMLHttpRequest}catch(t){}}v.ajaxSettings.xhr=t.ActiveXObject?function(){return!this.isLocal&&je()||function(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}()}:je,Ne=v.ajaxSettings.xhr(),v.support.cors=!!Ne&&"withCredentials"in Ne,(Ne=v.support.ajax=!!Ne)&&v.ajaxTransport((function(e){var i;if(!e.crossDomain||v.support.cors)return{send:function(n,r){var o,s,a=e.xhr();if(e.username?a.open(e.type,e.url,e.async,e.username,e.password):a.open(e.type,e.url,e.async),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");try{for(s in n)a.setRequestHeader(s,n[s])}catch(t){}a.send(e.hasContent&&e.data||null),i=function(t,n){var s,l,c,h;try{if(i&&(n||4===a.readyState))if(i=void 0,o&&(a.onreadystatechange=v.noop,Re&&delete Ae[o]),n)4!==a.readyState&&a.abort();else{h={},s=a.status,l=a.getAllResponseHeaders(),"string"==typeof a.responseText&&(h.text=a.responseText);try{c=a.statusText}catch(t){c=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=h.text?200:404}}catch(t){n||r(-1,t)}h&&r(s,c,h,l)},e.async?4===a.readyState?setTimeout(i):(o=++Ie,Re&&(Ae||(Ae={},v(t).unload(Re)),Ae[o]=i),a.onreadystatechange=i):i()},abort:function(){i&&i(void 0,!0)}}}));var Le,ze,De=/^(?:toggle|show|hide)$/,Pe=new RegExp("^(?:([+-])=|)("+y+")([a-z%]*)$","i"),Be=/queueHooks$/,Me=[function(t,e,i){var n,r,o,s,a,l,c,h,u,d=this,f=t.style,p={},g=[],m=t.nodeType&&Kt(t);i.queue||(null==(h=v._queueHooks(t,"fx")).unqueued&&(h.unqueued=0,u=h.empty.fire,h.empty.fire=function(){h.unqueued||u()}),h.unqueued++,d.always((function(){d.always((function(){h.unqueued--,v.queue(t,"fx").length||h.empty.fire()}))})));1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===v.css(t,"display")&&"none"===v.css(t,"float")&&(v.support.inlineBlockNeedsLayout&&"inline"!==ie(t.nodeName)?f.zoom=1:f.display="inline-block"));i.overflow&&(f.overflow="hidden",v.support.shrinkWrapBlocks||d.always((function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]})));for(r in e)if(s=e[r],De.exec(s)){if(delete e[r],l=l||"toggle"===s,s===(m?"hide":"show"))continue;g.push(r)}if(o=g.length){"hidden"in(a=v._data(t,"fxshow")||v._data(t,"fxshow",{}))&&(m=a.hidden),l&&(a.hidden=!m),m?v(t).show():d.done((function(){v(t).hide()})),d.done((function(){var e;for(e in v._removeData(t,"fxshow"),p)v.style(t,e,p[e])}));for(r=0;r<o;r++)n=g[r],c=d.createTween(n,m?a[n]:0),p[n]=a[n]||v.style(t,n),n in a||(a[n]=c.start,m&&(c.end=c.start,c.start="width"===n||"height"===n?1:0))}}],Fe={"*":[function(t,e){var i,n,r=this.createTween(t,e),o=Pe.exec(e),s=r.cur(),a=+s||0,l=1,c=20;if(o){if(i=+o[2],"px"!==(n=o[3]||(v.cssNumber[t]?"":"px"))&&a){a=v.css(r.elem,t,!0)||i||1;do{a/=l=l||".5",v.style(r.elem,t,a+n)}while(l!==(l=r.cur()/s)&&1!==l&&--c)}r.unit=n,r.start=a,r.end=o[1]?a+(o[1]+1)*i:i}return r}]};function qe(){return setTimeout((function(){Le=void 0})),Le=v.now()}function Ue(t,e,i){var n,r,o=0,s=Me.length,a=v.Deferred().always((function(){delete l.elem})),l=function(){if(r)return!1;for(var e=Le||qe(),i=Math.max(0,c.startTime+c.duration-e),n=1-(i/c.duration||0),o=0,s=c.tweens.length;o<s;o++)c.tweens[o].run(n);return a.notifyWith(t,[c,n,i]),n<1&&s?i:(a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:v.extend({},e),opts:v.extend(!0,{specialEasing:{}},i),originalProperties:e,originalOptions:i,startTime:Le||qe(),duration:i.duration,tweens:[],createTween:function(e,i){var n=v.Tween(t,c.opts,e,i,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var i=0,n=e?c.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)c.tweens[i].run(1);return e?a.resolveWith(t,[c,e]):a.rejectWith(t,[c,e]),this}}),h=c.props;for(!function(t,e){var i,n,r,o,s;for(r in t)if(n=v.camelCase(r),o=e[n],i=t[r],v.isArray(i)&&(o=i[1],i=t[r]=i[0]),r!==n&&(t[n]=i,delete t[r]),(s=v.cssHooks[n])&&"expand"in s)for(r in i=s.expand(i),delete t[n],i)r in t||(t[r]=i[r],e[r]=o);else e[n]=o}(h,c.opts.specialEasing);o<s;o++)if(n=Me[o].call(c,t,h,c.opts))return n;return function(t,e){v.each(e,(function(e,i){for(var n=(Fe[e]||[]).concat(Fe["*"]),r=0,o=n.length;r<o;r++)if(n[r].call(t,e,i))return}))}(c,h),v.isFunction(c.opts.start)&&c.opts.start.call(t,c),v.fx.timer(v.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function We(t,e,i,n,r){return new We.prototype.init(t,e,i,n,r)}function $e(t,e){var i,n={height:t},r=0;for(e=e?1:0;r<4;r+=2-e)n["margin"+(i=Vt[r])]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function He(t){return v.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}v.Animation=v.extend(Ue,{tweener:function(t,e){v.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var i,n=0,r=t.length;n<r;n++)i=t[n],Fe[i]=Fe[i]||[],Fe[i].unshift(e)},prefilter:function(t,e){e?Me.unshift(t):Me.push(t)}}),v.Tween=We,We.prototype={constructor:We,init:function(t,e,i,n,r,o){this.elem=t,this.prop=i,this.easing=r||"swing",this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(v.cssNumber[i]?"":"px")},cur:function(){var t=We.propHooks[this.prop];return t&&t.get?t.get(this):We.propHooks._default.get(this)},run:function(t){var e,i=We.propHooks[this.prop];return this.options.duration?this.pos=e=v.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):We.propHooks._default.set(this),this}},We.prototype.init.prototype=We.prototype,We.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=v.css(t.elem,t.prop,""))&&"auto"!==e?e:0:t.elem[t.prop]},set:function(t){v.fx.step[t.prop]?v.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[v.cssProps[t.prop]]||v.cssHooks[t.prop])?v.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},We.propHooks.scrollTop=We.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},v.each(["toggle","show","hide"],(function(t,e){var i=v.fn[e];v.fn[e]=function(t,n,r){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate($e(e,!0),t,n,r)}})),v.fn.extend({fadeTo:function(t,e,i,n){return this.filter(Kt).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var r=v.isEmptyObject(t),o=v.speed(e,i,n),s=function(){var e=Ue(this,v.extend({},t),o);s.finish=function(){e.stop(!0)},(r||v._data(this,"finish"))&&e.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each((function(){var e=!0,r=null!=t&&t+"queueHooks",o=v.timers,s=v._data(this);if(r)s[r]&&s[r].stop&&n(s[r]);else for(r in s)s[r]&&s[r].stop&&Be.test(r)&&n(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(i),e=!1,o.splice(r,1));!e&&i||v.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,i=v._data(this),n=i[t+"queue"],r=i[t+"queueHooks"],o=v.timers,s=n?n.length:0;for(i.finish=!0,v.queue(this,t,[]),r&&r.cur&&r.cur.finish&&r.cur.finish.call(this),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish}))}}),v.each({slideDown:$e("show"),slideUp:$e("hide"),slideToggle:$e("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){v.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}})),v.speed=function(t,e,i){var n=t&&"object"==typeof t?v.extend({},t):{complete:i||!i&&e||v.isFunction(t)&&t,duration:t,easing:i&&e||e&&!v.isFunction(e)&&e};return n.duration=v.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in v.fx.speeds?v.fx.speeds[n.duration]:v.fx.speeds._default,null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){v.isFunction(n.old)&&n.old.call(this),n.queue&&v.dequeue(this,n.queue)},n},v.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},v.timers=[],v.fx=We.prototype.init,v.fx.tick=function(){var t,e=v.timers,i=0;for(Le=v.now();i<e.length;i++)(t=e[i])()||e[i]!==t||e.splice(i--,1);e.length||v.fx.stop(),Le=void 0},v.fx.timer=function(t){t()&&v.timers.push(t)&&v.fx.start()},v.fx.interval=13,v.fx.start=function(){ze||(ze=setInterval(v.fx.tick,v.fx.interval))},v.fx.stop=function(){clearInterval(ze),ze=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(t){return v.grep(v.timers,(function(e){return t===e.elem})).length}),v.fn.offset=function(t){if(arguments.length)return void 0===t?this:this.each((function(e){v.offset.setOffset(this,t,e)}));var e,i,n={top:0,left:0},r=this[0],o=r&&r.ownerDocument;return o?(e=o.documentElement,v.contains(e,r)?(void 0!==r.getBoundingClientRect&&(n=r.getBoundingClientRect()),i=He(o),{top:n.top+(i.pageYOffset||e.scrollTop)-(e.clientTop||0),left:n.left+(i.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):n):void 0},v.offset={setOffset:function(t,e,i){var n=v.css(t,"position");"static"===n&&(t.style.position="relative");var r,o,s=v(t),a=s.offset(),l=v.css(t,"top"),c=v.css(t,"left"),h={},u={};("absolute"===n||"fixed"===n)&&v.inArray("auto",[l,c])>-1?(r=(u=s.position()).top,o=u.left):(r=parseFloat(l)||0,o=parseFloat(c)||0),v.isFunction(e)&&(e=e.call(t,i,a)),null!=e.top&&(h.top=e.top-a.top+r),null!=e.left&&(h.left=e.left-a.left+o),"using"in e?e.using.call(t,h):s.css(h)}},v.fn.extend({position:function(){if(this[0]){var t,e,i={top:0,left:0},n=this[0];return"fixed"===v.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),v.nodeName(t[0],"html")||(i=t.offset()),i.top+=v.css(t[0],"borderTopWidth",!0),i.left+=v.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-v.css(n,"marginTop",!0),left:e.left-i.left-v.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||r.documentElement;t&&!v.nodeName(t,"html")&&"static"===v.css(t,"position");)t=t.offsetParent;return t||r.documentElement}))}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var i=/Y/.test(e);v.fn[t]=function(n){return v.access(this,(function(t,n,r){var o=He(t);if(void 0===r)return o?e in o?o[e]:o.document.documentElement[n]:t[n];o?o.scrollTo(i?v(o).scrollLeft():r,i?r:v(o).scrollTop()):t[n]=r}),t,n,arguments.length,null)}})),v.each({Height:"height",Width:"width"},(function(t,e){v.each({padding:"inner"+t,content:e,"":"outer"+t},(function(i,n){v.fn[n]=function(n,r){var o=arguments.length&&(i||"boolean"!=typeof n),s=i||(!0===n||!0===r?"margin":"border");return v.access(this,(function(e,i,n){var r;return v.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===n?v.css(e,i,s):v.style(e,i,n,s)}),e,o?n:void 0,o,null)}}))})),t.jQuery=t.$=v,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],(function(){return v}))}(window),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(),function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",(function(){i=!0}));return setTimeout((function(){i||t(n).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})}))}(jQuery),function(t){"use strict";var e='[data-dismiss="alert"]',i=function(i){t(i).on("click",e,this.close)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){s.detach().trigger("closed.bs.alert").remove()}var r=t(this),o=r.attr("data-target");o||(o=(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]*$)/,""));var s=t(o);e&&e.preventDefault(),s.length||(s=r.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var n=t.fn.alert;t.fn.alert=function(e){return this.each((function(){var n=t(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof e&&r[e].call(n)}))},t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",e,i.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.button"),o="object"==typeof e&&e;r||n.data("bs.button",r=new i(this,o)),"toggle"==e?r.toggle():e&&r.setState(e)}))}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.3.5",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,r=n.is("input")?"val":"html",o=n.data();e+="Text",null==o.resetText&&n.data("resetText",n[r]()),setTimeout(t.proxy((function(){n[r](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i))}),this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(i){var n=t(i.target);n.hasClass("btn")||(n=n.closest(".btn")),e.call(n,"toggle"),t(i.target).is('input[type="radio"]')||t(i.target).is('input[type="checkbox"]')||i.preventDefault()})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))}))}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.carousel"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),s="string"==typeof e?e:o.slide;r||n.data("bs.carousel",r=new i(this,o)),"number"==typeof e?r.to(e):s?r[s]():o.interval&&r.pause().cycle()}))}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.5",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var n=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(n)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",(function(){e.to(t)})):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,n){var r=this.$element.find(".item.active"),o=n||this.getItemForDirection(e,r),s=this.interval,a="next"==e?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],h=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(h),!h.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(o)]);u&&u.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(e),o[0].offsetWidth,r.addClass(a),o.addClass(a),r.one("bsTransitionEnd",(function(){o.removeClass([e,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout((function(){l.$element.trigger(d)}),0)})).emulateTransitionEnd(i.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),s&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var r=function(i){var n,r=t(this),o=t(r.attr("data-target")||(n=r.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var s=t.extend({},o.data(),r.data()),a=r.attr("data-slide-to");a&&(s.interval=!1),e.call(o,s),a&&o.data("bs.carousel").to(a),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),t(window).on("load",(function(){t('[data-ride="carousel"]').each((function(){var i=t(this);e.call(i,i.data())}))}))}(jQuery),function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function i(e){return this.each((function(){var i=t(this),r=i.data("bs.collapse"),o=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e);!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||i.data("bs.collapse",r=new n(this,o)),"string"==typeof e&&r[e]()}))}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.5",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(e=r.data("bs.collapse"),e&&e.transitioning))){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(i.call(r,"hide"),e||r.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[s](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(n.TRANSITION_DURATION):r.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy((function(i,n){var r=t(n);this.addAriaAndCollapsedClass(e(r),r)}),this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var r=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=r,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(n){var r=t(this);r.attr("data-target")||n.preventDefault();var o=e(r),s=o.data("bs.collapse")?"toggle":r.data();i.call(o,s)}))}(jQuery),function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=(i=e.attr("href"))&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}function i(i){i&&3===i.which||(t(n).remove(),t(r).each((function(){var n=t(this),r=e(n),o={relatedTarget:this};r.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(r[0],i.target)||(r.trigger(i=t.Event("hide.bs.dropdown",o)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),r.removeClass("open").trigger("hidden.bs.dropdown",o))))})))}var n=".dropdown-backdrop",r='[data-toggle="dropdown"]',o=function(e){t(e).on("click.bs.dropdown",this.toggle)};o.VERSION="3.3.5",o.prototype.toggle=function(n){var r=t(this);if(!r.is(".disabled, :disabled")){var o=e(r),s=o.hasClass("open");if(i(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(o.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},o.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),s=o.hasClass("open");if(!s&&27!=i.which||s&&27==i.which)return 27==i.which&&o.find(r).trigger("focus"),n.trigger("click");var a=o.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var l=a.index(i.target);38==i.which&&l>0&&l--,40==i.which&&l<a.length-1&&l++,~l||(l=0),a.eq(l).trigger("focus")}}}};var s=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new o(this)),"string"==typeof e&&n[e].call(i)}))},t.fn.dropdown.Constructor=o,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=s,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r,o.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",o.prototype.keydown)}(jQuery),function(t){"use strict";function e(e,n){return this.each((function(){var r=t(this),o=r.data("bs.modal"),s=t.extend({},i.DEFAULTS,r.data(),"object"==typeof e&&e);o||r.data("bs.modal",o=new i(this,s)),"string"==typeof e?o[e](n):s.show&&o.show(n)}))}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};i.VERSION="3.3.5",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var n=this,r=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",(function(){n.$element.one("mouseup.dismiss.bs.modal",(function(e){t(e.target).is(n.$element)&&(n.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var r=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),n.adjustDialog(),r&&n.$element[0].offsetWidth,n.$element.addClass("in"),n.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:e});r?n.$dialog.one("bsTransitionEnd",(function(){n.$element.trigger("focus").trigger(o)})).emulateTransitionEnd(i.TRANSITION_DURATION):n.$element.trigger("focus").trigger(o)})))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy((function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}),this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy((function(t){27==t.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop((function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")}))},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&r;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy((function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))}),this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;o?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):s()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(i){var n=t(this),r=n.attr("href"),o=t(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=o.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},o.data(),n.data());n.is("a")&&i.preventDefault(),o.one("show.bs.modal",(function(t){t.isDefaultPrevented()||o.one("hidden.bs.modal",(function(){n.is(":visible")&&n.trigger("focus")}))})),e.call(o,s,this)}))}(jQuery),function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};e.VERSION="3.3.5",e.TRANSITION_DURATION=150,e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},e.prototype.init=function(e,i,n){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var s=r[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return(e=t.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,(function(t,n){i[t]!=n&&(e[t]=n)})),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout((function(){"in"==i.hoverState&&i.show()}),i.options.delay.show)):i.show())},e.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout((function(){"out"==i.hoverState&&i.hide()}),i.options.delay.hide)):i.hide())},e.prototype.show=function(){var i=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(i);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(i.isDefaultPrevented()||!n)return;var r=this,o=this.tip(),s=this.getUID(this.type);this.setContent(),o.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&o.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var h=this.getPosition(),u=o[0].offsetWidth,d=o[0].offsetHeight;if(c){var f=a,p=this.getPosition(this.$viewport);a="bottom"==a&&h.bottom+d>p.bottom?"top":"top"==a&&h.top-d<p.top?"bottom":"right"==a&&h.right+u>p.width?"left":"left"==a&&h.left-u<p.left?"right":a,o.removeClass(f).addClass(a)}var g=this.getCalculatedOffset(a,h,u,d);this.applyPlacement(g,a);var m=function(){var t=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==t&&r.leave(r)};t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",m).emulateTransitionEnd(e.TRANSITION_DURATION):m()}},e.prototype.applyPlacement=function(e,i){var n=this.tip(),r=n[0].offsetWidth,o=n[0].offsetHeight,s=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(n[0],t.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),n.addClass("in");var l=n[0].offsetWidth,c=n[0].offsetHeight;"top"==i&&c!=o&&(e.top=e.top+o-c);var h=this.getViewportAdjustedDelta(i,e,l,c);h.left?e.left+=h.left:e.top+=h.top;var u=/top|bottom/.test(i),d=u?2*h.left-r+l:2*h.top-o+c,f=u?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(d,n[0][f],u)},e.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},e.prototype.hide=function(i){function n(){"in"!=r.hoverState&&o.detach(),r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),i&&i()}var r=this,o=t(this.$tip),s=t.Event("hide.bs."+this.type);return this.$element.trigger(s),s.isDefaultPrevented()?void 0:(o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(e.TRANSITION_DURATION):n(),this.hoverState=null,this)},e.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},e.prototype.hasContent=function(){return this.getTitle()},e.prototype.getPosition=function(e){var i=(e=e||this.$element)[0],n="BODY"==i.tagName,r=i.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=n?{top:0,left:0}:e.offset(),s={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},a=n?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,s,a,o)},e.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},e.prototype.getViewportAdjustedDelta=function(t,e,i,n){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-s.scroll,l=e.top+o-s.scroll+n;a<s.top?r.top=s.top-a:l>s.top+s.height&&(r.top=s.top+s.height-l)}else{var c=e.left-o,h=e.left+o+i;c<s.left?r.left=s.left-c:h>s.right&&(r.left=s.left+s.width-h)}return r},e.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},e.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},e.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.toggleEnabled=function(){this.enabled=!this.enabled},e.prototype.toggle=function(e){var i=this;e&&((i=t(e.currentTarget).data("bs."+this.type))||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},e.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null}))};var i=t.fn.tooltip;t.fn.tooltip=function(i){return this.each((function(){var n=t(this),r=n.data("bs.tooltip"),o="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||n.data("bs.tooltip",r=new e(this,o)),"string"==typeof i&&r[i]())}))},t.fn.tooltip.Constructor=e,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery),function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");e.VERSION="3.3.5",e.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=function(i){return this.each((function(){var n=t(this),r=n.data("bs.popover"),o="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||n.data("bs.popover",r=new e(this,o)),"string"==typeof i&&r[i]())}))},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery),function(t){"use strict";function e(i,n){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each((function(){var n=t(this),r=n.data("bs.scrollspy"),o="object"==typeof i&&i;r||n.data("bs.scrollspy",r=new e(this,o)),"string"==typeof i&&r[i]()}))}e.VERSION="3.3.5",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var e=t(this),r=e.data("target")||e.attr("href"),o=/^#./.test(r)&&t(r);return o&&o.length&&o.is(":visible")&&[[o[i]().top+n,r]]||null})).sort((function(t,e){return t[0]-e[0]})).each((function(){e.offsets.push(this[0]),e.targets.push(this[1])}))},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return s!=(t=o[o.length-1])&&this.activate(t);if(s&&e<r[0])return this.activeTarget=null,this.clear();for(t=r.length;t--;)s!=o[t]&&e>=r[t]&&(void 0===r[t+1]||e<r[t+1])&&this.activate(o[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=t(i).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var n=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=n,this},t(window).on("load.bs.scrollspy.data-api",(function(){t('[data-spy="scroll"]').each((function(){var e=t(this);i.call(e,e.data())}))}))}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.tab");r||n.data("bs.tab",r=new i(this)),"string"==typeof e&&r[e]()}))}var i=function(e){this.element=t(e)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var r=i.find(".active:last a"),o=t.Event("hide.bs.tab",{relatedTarget:e[0]}),s=t.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(o),e.trigger(s),!s.isDefaultPrevented()&&!o.isDefaultPrevented()){var a=t(n);this.activate(e.closest("li"),i),this.activate(a,a.parent(),(function(){r.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}}},i.prototype.activate=function(e,n,r){function o(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var s=n.find("> .active"),a=r&&t.support.transition&&(s.length&&s.hasClass("fade")||!!n.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",o).emulateTransitionEnd(i.TRANSITION_DURATION):o(),s.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var r=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.affix"),o="object"==typeof e&&e;r||n.data("bs.affix",r=new i(this,o)),"string"==typeof e&&r[e]()}))}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.5",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,n){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=i&&"top"==this.affixed)return i>r&&"top";if("bottom"==this.affixed)return null!=i?!(r+this.unpin<=o.top)&&"bottom":!(t-n>=r+s)&&"bottom";var a=null==this.affixed,l=a?r:o.top;return null!=i&&i>=r?"top":null!=n&&l+(a?s:e)>=t-n&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,r=n.top,o=n.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(o=r=n),"function"==typeof r&&(r=n.top(this.$element)),"function"==typeof o&&(o=n.bottom(this.$element));var a=this.getState(s,e,r,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-o})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)}))}))}(jQuery),function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[s]={exports:{}};e[s][0].call(h.exports,(function(t){return r(e[s][1][t]||t)}),h,h.exports,t,e,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,i){"use strict";var n=t("./utils"),r=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(t){for(var e,i,r,s,a,l,c,h=[],u=0,d=t.length,f=d,p="string"!==n.getTypeOf(t);u<t.length;)f=d-u,r=p?(e=t[u++],i=u<d?t[u++]:0,u<d?t[u++]:0):(e=t.charCodeAt(u++),i=u<d?t.charCodeAt(u++):0,u<d?t.charCodeAt(u++):0),s=e>>2,a=(3&e)<<4|i>>4,l=1<f?(15&i)<<2|r>>6:64,c=2<f?63&r:64,h.push(o.charAt(s)+o.charAt(a)+o.charAt(l)+o.charAt(c));return h.join("")},i.decode=function(t){var e,i,n,s,a,l,c=0,h=0,u="data:";if(t.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&f--,t.charAt(t.length-2)===o.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=r.uint8array?new Uint8Array(0|f):new Array(0|f);c<t.length;)e=o.indexOf(t.charAt(c++))<<2|(s=o.indexOf(t.charAt(c++)))>>4,i=(15&s)<<4|(a=o.indexOf(t.charAt(c++)))>>2,n=(3&a)<<6|(l=o.indexOf(t.charAt(c++))),d[h++]=e,64!==a&&(d[h++]=i),64!==l&&(d[h++]=n);return d}},{"./support":30,"./utils":32}],2:[function(t,e,i){"use strict";var n=t("./external"),r=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),s=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 s("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 o).pipe(new s("uncompressedSize")).pipe(e.compressWorker(i)).pipe(new s("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"),r=function(){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}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,i,n){var o=r,s=0+i;t^=-1;for(var a=0;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}(0|e,t,t.length):function(t,e,i,n){var o=r,s=0+i;t^=-1;for(var a=0;a<s;a++)t=t>>>8^o[255&(t^e.charCodeAt(a))];return-1^t}(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;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"),o=t("./utils"),s=t("./stream/GenericWorker"),a=n?"uint8array":"array";function l(t,e){s.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}i.magic="\b\0",o.inherits(l,s),l.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,t.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.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 l("Deflate",t)},i.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,i){"use strict";function n(t,e){var i,n="";for(i=0;i<e;i++)n+=String.fromCharCode(255&t),t>>>=8;return n}function r(t,e,i,r,s,h){var u,d,f=t.file,p=t.compression,g=h!==a.utf8encode,m=o.transformTo("string",h(f.name)),v=o.transformTo("string",a.utf8encode(f.name)),y=f.comment,b=o.transformTo("string",h(y)),w=o.transformTo("string",a.utf8encode(y)),x=v.length!==f.name.length,_=w.length!==y.length,k="",E="",S="",T=f.dir,C=f.date,O={crc32:0,compressedSize:0,uncompressedSize:0};e&&!i||(O.crc32=t.crc32,O.compressedSize=t.compressedSize,O.uncompressedSize=t.uncompressedSize);var A=0;e&&(A|=8),g||!x&&!_||(A|=2048);var N=0,I=0;T&&(N|=16),"UNIX"===s?(I=798,N|=function(t,e){var i=t;return t||(i=e?16893:33204),(65535&i)<<16}(f.unixPermissions,T)):(I=20,N|=function(t){return 63&(t||0)}(f.dosPermissions)),u=C.getUTCHours(),u<<=6,u|=C.getUTCMinutes(),u<<=5,u|=C.getUTCSeconds()/2,d=C.getUTCFullYear()-1980,d<<=4,d|=C.getUTCMonth()+1,d<<=5,d|=C.getUTCDate(),x&&(E=n(1,1)+n(l(m),4)+v,k+="up"+n(E.length,2)+E),_&&(S=n(1,1)+n(l(b),4)+w,k+="uc"+n(S.length,2)+S);var R="";return R+="\n\0",R+=n(A,2),R+=p.magic,R+=n(u,2),R+=n(d,2),R+=n(O.crc32,4),R+=n(O.compressedSize,4),R+=n(O.uncompressedSize,4),R+=n(m.length,2),R+=n(k.length,2),{fileRecord:c.LOCAL_FILE_HEADER+R+m+k,dirRecord:c.CENTRAL_FILE_HEADER+n(I,2)+R+n(b.length,2)+"\0\0\0\0"+n(N,4)+n(r,4)+m+k+b}}var o=t("../utils"),s=t("../stream/GenericWorker"),a=t("../utf8"),l=t("../crc32"),c=t("../signature");function h(t,e,i,n){s.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=[]}o.inherits(h,s),h.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,s.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:i?(e+100*(i-n-1))/i:100}}))},h.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var i=r(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:i.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,i=r(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(i.dirRecord),e)this.push({data:function(t){return c.DATA_DESCRIPTOR+n(t.crc32,4)+n(t.compressedSize,4)+n(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:i.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.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,r=function(t,e,i,r,s){var a=o.transformTo("string",s(r));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(t,2)+n(t,2)+n(e,4)+n(i,4)+n(a.length,2)+a}(this.dirRecords.length,i,t,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.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},h.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(t){var e=this._sources;if(!s.prototype.error.call(this,t))return!1;for(var i=0;i<e.length;i++)try{e[i].error(t)}catch(t){}return!0},h.prototype.lock=function(){s.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=h},{"../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");i.generateWorker=function(t,e,i){var o=new r(e.streamFiles,i,e.platform,e.encodeFileName),s=0;try{t.forEach((function(t,i){s++;var r=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.options.compression,e.compression),a=i.options.compressionOptions||e.compressionOptions||{},l=i.dir,c=i.date;i._compressWorker(r,a).withStreamInfo("file",{name:t,dir:l,date:c,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(o)})),o.entriesCount=s}catch(t){o.error(t)}return o}},{"../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")).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"),o=t("./utf8"),s=t("./zipEntries"),a=t("./stream/Crc32Probe"),l=t("./nodejsUtils");function c(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:o.utf8decode}),l.isNode&&l.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 s(e);return i.load(t),i})).then((function(t){var i=[r.Promise.resolve(t)],n=t.files;if(e.checkCRC32)for(var o=0;o<n.length;o++)i.push(c(n[o]));return r.Promise.all(i)})).then((function(t){for(var n=t.shift(),r=n.files,o=0;o<r.length;o++){var s=r[o];i.file(s.fileNameStr,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.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 o(t,e){r.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}n.inherits(o,r),o.prototype._bindStream=function(t){var e=this;(this._stream=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()}))},o.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,i){"use strict";var n=t("readable-stream").Readable;function r(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)}))}t("../utils").inherits(r,n),r.prototype._read=function(){this._helper.resume()},e.exports=r},{"../utils":32,"readable-stream":16}],14:[function(t,e,i){"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return Buffer.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";function n(t,e,i){var n,r=o.getTypeOf(e),a=o.extend(i||{},l);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(t=g(t)),a.createFolders&&(n=p(t))&&m.call(this,n,!0);var u="string"===r&&!1===a.binary&&!1===a.base64;i&&void 0!==i.binary||(a.binary=!u),(e instanceof c&&0===e.uncompressedSize||a.dir||!e||0===e.length)&&(a.base64=!1,a.binary=!0,e="",a.compression="STORE",r="string");var v;v=e instanceof c||e instanceof s?e:d.isNode&&d.isStream(e)?new f(t,e):o.prepareContent(t,e,a.binary,a.optimizedBinaryString,a.base64);var y=new h(t,v,a);this.files[t]=y}var r=t("./utf8"),o=t("./utils"),s=t("./stream/GenericWorker"),a=t("./stream/StreamHelper"),l=t("./defaults"),c=t("./compressedObject"),h=t("./zipObject"),u=t("./generate"),d=t("./nodejsUtils"),f=t("./nodejs/NodejsStreamInputAdapter"),p=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return 0<e?t.substring(0,e):""},g=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},m=function(t,e){return e=void 0!==e?e:l.createFolders,t=g(t),this.files[t]||n.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function v(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var y={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))&&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)return t=this.root+t,n.call(this,t,e,i),this;if(v(t)){var r=t;return this.filter((function(t,e){return!e.dir&&r.test(t)}))}var o=this.files[this.root+t];return o&&!o.dir?o:null},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=m.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=o.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:r.utf8encode})).type=i.type.toLowerCase(),i.compression=i.compression.toUpperCase(),"binarystring"===i.type&&(i.type="string"),!i.type)throw new Error("No output type specified.");o.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 n=i.comment||this.comment||"";e=u.generateWorker(this,i,n)}catch(t){(e=new s("error")).error(t)}return new a(e,i.type||"string",i.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=y},{"./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");function r(t){n.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}t("../utils").inherits(r,n),r.prototype.byteAt=function(t){return this.data[this.zero+t]},r.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),i=t.charCodeAt(1),n=t.charCodeAt(2),r=t.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===e&&this.data[o+1]===i&&this.data[o+2]===n&&this.data[o+3]===r)return o-this.zero;return-1},r.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),i=t.charCodeAt(1),n=t.charCodeAt(2),r=t.charCodeAt(3),o=this.readData(4);return e===o[0]&&i===o[1]&&n===o[2]&&r===o[3]},r.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=r},{"../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");function r(t){n.call(this,t)}t("../utils").inherits(r,n),r.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=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,i){"use strict";var n=t("./DataReader");function r(t){n.call(this,t)}t("../utils").inherits(r,n),r.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},r.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},r.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},r.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=r},{"../utils":32,"./DataReader":18}],21:[function(t,e,i){"use strict";var n=t("./ArrayReader");function r(t){n.call(this,t)}t("../utils").inherits(r,n),r.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=r},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,i){"use strict";var n=t("../utils"),r=t("../support"),o=t("./ArrayReader"),s=t("./StringReader"),a=t("./NodeBufferReader"),l=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 l(n.transformTo("uint8array",t)):new o(n.transformTo("array",t)):new s(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 o(t){n.call(this,"ConvertWorker to "+t),this.destType=t}r.inherits(o,n),o.prototype.processChunk=function(t){this.push({data:r.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,i){"use strict";var n=t("./GenericWorker"),r=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").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 o(t){r.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(o,r),o.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=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,i){"use strict";var n=t("../utils"),r=t("./GenericWorker");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=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,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;var t=this.isPaused=!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,e,i){"use strict";var n=t("../utils"),r=t("./ConvertWorker"),o=t("./GenericWorker"),s=t("../base64"),a=t("../support"),l=t("../external"),c=null;if(a.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function h(t,e,i){var s=e;switch(e){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=e,this._mimeType=i,n.checkSupport(s),this._worker=t.pipe(new r(s)),t.lock()}catch(t){this._worker=new o("error"),this._worker.error(t)}}h.prototype={accumulate:function(t){return function(t,e){return new l.Promise((function(i,r){var o=[],a=t._internalType,l=t._outputType,c=t._mimeType;t.on("data",(function(t,i){o.push(t),e&&e(i)})).on("error",(function(t){o=[],r(t)})).on("end",(function(){try{var t=function(t,e,i){switch(t){case"blob":return n.newBlob(n.transformTo("arraybuffer",e),i);case"base64":return s.encode(e);default:return n.transformTo(t,e)}}(l,function(t,e){var i,n=0,r=null,o=0;for(i=0;i<e.length;i++)o+=e[i].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(r=new Uint8Array(o),i=0;i<e.length;i++)r.set(e[i],n),n+=e[i].length;return r;case"nodebuffer":return Buffer.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}(a,o),c);i(t)}catch(t){r(t)}o=[]})).resume()}))}(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(){n.delay(e,arguments,i)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(n.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)}},e.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,i){"use strict";if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,i.nodebuffer="undefined"!=typeof Buffer,i.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)i.blob=!1;else{var n=new ArrayBuffer(0);try{i.blob=0===new Blob([n],{type:"application/zip"}).size}catch(t){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),i.blob=0===r.getBlob("application/zip").size}catch(t){i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch(t){i.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,i){"use strict";for(var n=t("./utils"),r=t("./support"),o=t("./nodejsUtils"),s=t("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(){s.call(this,"utf-8 decode"),this.leftOver=null}function h(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,i.utf8encode=function(t){return r.nodebuffer?o.newBufferFrom(t,"utf-8"):function(t){var e,i,n,o,s,a=t.length,l=0;for(o=0;o<a;o++)55296==(64512&(i=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(n-56320),o++),l+=i<128?1:i<2048?2:i<65536?3:4;for(e=r.uint8array?new Uint8Array(l):new Array(l),o=s=0;s<l;o++)55296==(64512&(i=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(n-56320),o++),i<128?e[s++]=i:(i<2048?e[s++]=192|i>>>6:(i<65536?e[s++]=224|i>>>12:(e[s++]=240|i>>>18,e[s++]=128|i>>>12&63),e[s++]=128|i>>>6&63),e[s++]=128|63&i);return e}(t)},i.utf8decode=function(t){return r.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,i,r,o,s=t.length,l=new Array(2*s);for(e=i=0;e<s;)if((r=t[e++])<128)l[i++]=r;else if(4<(o=a[r]))l[i++]=65533,e+=o-1;else{for(r&=2===o?31:3===o?15:7;1<o&&e<s;)r=r<<6|63&t[e++],o--;1<o?l[i++]=65533:r<65536?l[i++]=r:(r-=65536,l[i++]=55296|r>>10&1023,l[i++]=56320|1023&r)}return l.length!==i&&(l.subarray?l=l.subarray(0,i):l.length=i),n.applyFromCharCode(l)}(t=n.transformTo(r.uint8array?"uint8array":"array",t))},n.inherits(c,s),c.prototype.processChunk=function(t){var e=n.transformTo(r.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var s=function(t,e){var i;for((e=e||t.length)>t.length&&(e=t.length),i=e-1;0<=i&&128==(192&t[i]);)i--;return i<0||0===i?e:i+a[t[i]]>e?i:e}(e),l=e;s!==e.length&&(r.uint8array?(l=e.subarray(0,s),this.leftOver=e.subarray(s,e.length)):(l=e.slice(0,s),this.leftOver=e.slice(s,e.length))),this.push({data:i.utf8decode(l),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=c,n.inherits(h,s),h.prototype.processChunk=function(t){this.push({data:i.utf8encode(t.data),meta:t.meta})},i.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,i){"use strict";var n=t("./support"),r=t("./base64"),o=t("./nodejsUtils"),s=t("set-immediate-shim"),a=t("./external");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(i){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(e)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var h={stringifyByChunk:function(t,e,i){var n=[],r=0,o=t.length;if(o<=i)return String.fromCharCode.apply(null,t);for(;r<o;)"array"===e||"nodebuffer"===e?n.push(String.fromCharCode.apply(null,t.slice(r,Math.min(r+i,o)))):n.push(String.fromCharCode.apply(null,t.subarray(r,Math.min(r+i,o)))),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,o.allocBuffer(1)).length}catch(t){return!1}}()}};function u(t){var e=65536,n=i.getTypeOf(t),r=!0;if("uint8array"===n?r=h.applyCanBeUsed.uint8array:"nodebuffer"===n&&(r=h.applyCanBeUsed.nodebuffer),r)for(;1<e;)try{return h.stringifyByChunk(t,n,e)}catch(t){e=Math.floor(e/2)}return h.stringifyByChar(t)}function d(t,e){for(var i=0;i<t.length;i++)e[i]=t[i];return e}i.applyFromCharCode=u;var f={};f.string={string:l,array:function(t){return c(t,new Array(t.length))},arraybuffer:function(t){return f.string.uint8array(t).buffer},uint8array:function(t){return c(t,new Uint8Array(t.length))},nodebuffer:function(t){return c(t,o.allocBuffer(t.length))}},f.array={string:u,array:l,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(t)}},f.arraybuffer={string:function(t){return u(new Uint8Array(t))},array:function(t){return d(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:l,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(new Uint8Array(t))}},f.uint8array={string:u,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:l,nodebuffer:function(t){return o.newBufferFrom(t)}},f.nodebuffer={string:u,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return f.nodebuffer.uint8array(t).buffer},uint8array:function(t){return d(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);return f[n][t](e)},i.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":n.nodebuffer&&o.isBuffer(t)?"nodebuffer":n.uint8array&&t instanceof Uint8Array?"uint8array":n.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(t){if(!n[t.toLowerCase()])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++)n+="\\x"+((e=t.charCodeAt(i))<16?"0":"")+e.toString(16).toUpperCase();return n},i.delay=function(t,e,i){s((function(){t.apply(i||null,e||[])}))},i.inherits=function(t,e){function i(){}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)&&void 0===i[e]&&(i[e]=arguments[t][e]);return i},i.prepareContent=function(t,e,o,s,l){return a.Promise.resolve(e).then((function(t){return n.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"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})).then((function(e){var h=i.getTypeOf(e);return h?("arraybuffer"===h?e=i.transformTo("uint8array",e):"string"===h&&(l?e=r.decode(e):o&&!0!==s&&(e=function(t){return c(t,n.uint8array?new Uint8Array(t.length):new Array(t.length))}(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"),o=t("./signature"),s=t("./zipEntry"),a=(t("./utf8"),t("./support"));function l(t){this.files=[],this.loadOptions=t}l.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)===e;return this.reader.setIndex(i),n},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={};for(var t,e,i,n=this.zip64EndOfCentralSize-44;0<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),1<this.disksCount)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(o.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(t=new s({zip64:this.zip64},this.loadOptions)).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(o.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):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");this.reader.setIndex(t);var e=t;if(this.checkSignature(o.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(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.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(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var n=e-i;if(0<n)this.isSignature(e,o.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(t){this.reader=n(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=l},{"./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"),o=t("./compressedObject"),s=t("./crc32"),a=t("./utf8"),l=t("./compressions"),c=t("./support");function h(t,e){this.options=t,this.loadOptions=e}h.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(null===(e=function(t){for(var e in l)if(l.hasOwnProperty(e)&&l[e].magic===t)return l[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+r.pretty(this.compressionMethod)+" unknown (inner file : "+r.transformTo("string",this.fileName)+")");this.decompressed=new o(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),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(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;for(this.extraFields||(this.extraFields={});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=c.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 o=r.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=n(t.value);return 1!==e.readInt(1)||s(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)||s(this.fileComment)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null}},e.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,i){"use strict";function n(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}}var r=t("./stream/StreamHelper"),o=t("./stream/DataWorker"),s=t("./utf8"),a=t("./compressedObject"),l=t("./stream/GenericWorker");n.prototype={internalStream:function(t){var e=null,i="string";try{if(!t)throw new Error("No output type specified.");var n="string"===(i=t.toLowerCase())||"text"===i;"binarystring"!==i&&"text"!==i||(i="string"),e=this._decompressWorker();var o=!this._dataBinary;o&&!n&&(e=e.pipe(new s.Utf8EncodeWorker)),!o&&n&&(e=e.pipe(new s.Utf8DecodeWorker))}catch(t){(e=new l("error")).error(t)}return new r(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 a&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var i=this._decompressWorker();return this._dataBinary||(i=i.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(i,t,e)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new o(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<c.length;u++)n.prototype[c[u]]=h;e.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,e,i){(function(t){"use strict";var i,n,r=t.MutationObserver||t.WebKitMutationObserver;if(r){var o=0,s=new r(h),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),i=function(){a.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)i="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){h(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(h,0)};else{var l=new t.MessageChannel;l.port1.onmessage=h,i=function(){l.port2.postMessage(0)}}var c=[];function h(){var t,e;n=!0;for(var i=c.length;i;){for(e=c,c=[],t=-1;++t<i;)e[t]();i=c.length}n=!1}e.exports=function(t){1!==c.push(t)||n||i()}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,e,i){"use strict";var n=t("immediate");function r(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,t!==r&&f(this,t)}function h(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(n){return o.reject(t,n)}n===t?o.reject(t,new TypeError("Cannot resolve promise with itself")):o.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,o.reject(t,e))}function r(e){i||(i=!0,o.resolve(t,e))}var s=p((function(){e(r,n)}));"error"===s.status&&n(s.value)}function p(t,e){var i={};try{i.value=t(e),i.status="success"}catch(t){i.status="error",i.value=t}return i}(e.exports=c).prototype.finally=function(t){if("function"!=typeof t)return this;var e=this.constructor;return this.then((function(i){return e.resolve(t()).then((function(){return i}))}),(function(i){return e.resolve(t()).then((function(){throw i}))}))},c.prototype.catch=function(t){return this.then(null,t)},c.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var i=new this.constructor(r);return this.state!==l?u(i,this.state===a?t:e,this.outcome):this.queue.push(new h(i,t,e)),i},h.prototype.callFulfilled=function(t){o.resolve(this.promise,t)},h.prototype.otherCallFulfilled=function(t){u(this.promise,this.onFulfilled,t)},h.prototype.callRejected=function(t){o.reject(this.promise,t)},h.prototype.otherCallRejected=function(t){u(this.promise,this.onRejected,t)},o.resolve=function(t,e){var i=p(d,e);if("error"===i.status)return o.reject(t,i.value);var n=i.value;if(n)f(t,n);else{t.state=a,t.outcome=e;for(var r=-1,s=t.queue.length;++r<s;)t.queue[r].callFulfilled(e)}return t},o.reject=function(t,e){t.state=s,t.outcome=e;for(var i=-1,n=t.queue.length;++i<n;)t.queue[i].callRejected(e);return t},c.resolve=function(t){return t instanceof this?t:o.resolve(new this(r),t)},c.reject=function(t){var e=new this(r);return o.reject(e,t)},c.all=function(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([]);for(var s=new Array(i),a=0,l=-1,c=new this(r);++l<i;)h(t[l],l);return c;function h(t,r){e.resolve(t).then((function(t){s[r]=t,++a!==i||n||(n=!0,o.resolve(c,s))}),(function(t){n||(n=!0,o.reject(c,t))}))}},c.race=function(t){if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var e=t.length,i=!1;if(!e)return this.resolve([]);for(var n,s=-1,a=new this(r);++s<e;)n=t[s],this.resolve(n).then((function(t){i||(i=!0,o.resolve(a,t))}),(function(t){i||(i=!0,o.reject(a,t))}));return a}},{immediate:36}],38:[function(t,e,i){"use strict";var n={};(0,t("./lib/utils/common").assign)(n,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=n},{"./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"),o=t("./utils/strings"),s=t("./zlib/messages"),a=t("./zlib/zstream"),l=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=r.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&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(0!==i)throw new Error(s[i]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var h;if(h="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(i=n.deflateSetDictionary(this.strm,h)))throw new Error(s[i]);this._dict_set=!0}}function h(t,e){var i=new c(e);if(i.push(t,!0),i.err)throw i.msg||s[i.err];return i.result}c.prototype.push=function(t,e){var i,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof t?a.input=o.string2buf(t):"[object ArrayBuffer]"===l.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(c),a.next_out=0,a.avail_out=c),1!==(i=n.deflate(a,s))&&0!==i)return this.onEnd(i),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(r.shrinkBuf(a.output,a.next_out))):this.onData(r.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==i);return 4===s?(i=n.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,0===i):2!==s||(this.onEnd(0),!(a.avail_out=0))},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){0===t&&("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=c,i.deflate=h,i.deflateRaw=function(t,e){return(e=e||{}).raw=!0,h(t,e)},i.gzip=function(t,e){return(e=e||{}).gzip=!0,h(t,e)}},{"./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"),o=t("./utils/strings"),s=t("./zlib/constants"),a=t("./zlib/messages"),l=t("./zlib/zstream"),c=t("./zlib/gzheader"),h=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&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,e.windowBits);if(i!==s.Z_OK)throw new Error(a[i]);this.header=new c,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}u.prototype.push=function(t,e){var i,a,l,c,u,d,f=this.strm,p=this.options.chunkSize,g=this.options.dictionary,m=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof t?f.input=o.binstring2buf(t):"[object ArrayBuffer]"===h.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,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&g&&(d="string"==typeof g?o.string2buf(g):"[object ArrayBuffer]"===h.call(g)?new Uint8Array(g):g,i=n.inflateSetDictionary(this.strm,d)),i===s.Z_BUF_ERROR&&!0===m&&(i=s.Z_OK,m=!1),i!==s.Z_STREAM_END&&i!==s.Z_OK)return this.onEnd(i),!(this.ended=!0);f.next_out&&(0!==f.avail_out&&i!==s.Z_STREAM_END&&(0!==f.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(f.output,f.next_out),c=f.next_out-l,u=o.buf2string(f.output,l),f.next_out=c,f.avail_out=p-c,c&&r.arraySet(f.output,f.output,l,c,0),this.onData(u)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((0<f.avail_in||0===f.avail_out)&&i!==s.Z_STREAM_END);return i===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(f.avail_out=0))},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){t===s.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=function(t,e){return(e=e||{}).raw=!0,d(t,e)},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){for(var e=Array.prototype.slice.call(arguments,1);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 o=0;o<n;o++)t[r+o]=e[i+o]},flattenChunks:function(t){var e,i,n,r,o,s;for(e=n=0,i=t.length;e<i;e++)n+=t[e].length;for(s=new Uint8Array(n),e=r=0,i=t.length;e<i;e++)o=t[e],s.set(o,r),r+=o.length;return s}},o={arraySet:function(t,e,i,n,r){for(var o=0;o<n;o++)t[r+o]=e[i+o]},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,o))},i.setTyped(n)},{}],42:[function(t,e,i){"use strict";var n=t("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(t,e){if(e<65537&&(t.subarray&&o||!t.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var i="",s=0;s<e;s++)i+=String.fromCharCode(t[s]);return i}s[254]=s[254]=1,i.string2buf=function(t){var e,i,r,o,s,a=t.length,l=0;for(o=0;o<a;o++)55296==(64512&(i=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(r=t.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(r-56320),o++),l+=i<128?1:i<2048?2:i<65536?3:4;for(e=new n.Buf8(l),o=s=0;s<l;o++)55296==(64512&(i=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(r=t.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(r-56320),o++),i<128?e[s++]=i:(i<2048?e[s++]=192|i>>>6:(i<65536?e[s++]=224|i>>>12:(e[s++]=240|i>>>18,e[s++]=128|i>>>12&63),e[s++]=128|i>>>6&63),e[s++]=128|63&i);return e},i.buf2binstring=function(t){return l(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,o,a=e||t.length,c=new Array(2*a);for(i=n=0;i<a;)if((r=t[i++])<128)c[n++]=r;else if(4<(o=s[r]))c[n++]=65533,i+=o-1;else{for(r&=2===o?31:3===o?15:7;1<o&&i<a;)r=r<<6|63&t[i++],o--;1<o?c[n++]=65533:r<65536?c[n++]=r:(r-=65536,c[n++]=55296|r>>10&1023,c[n++]=56320|1023&r)}return l(c,n)},i.utf8border=function(t,e){var i;for((e=e||t.length)>t.length&&(e=t.length),i=e-1;0<=i&&128==(192&t[i]);)i--;return i<0||0===i?e:i+s[t[i]]>e?i:e}},{"./common":41}],43:[function(t,e,i){"use strict";e.exports=function(t,e,i,n){for(var r=65535&t|0,o=t>>>16&65535|0,s=0;0!==i;){for(i-=s=2e3<i?2e3:i;o=o+(r=r+e[n++]|0)|0,--s;);r%=65521,o%=65521}return r|o<<16|0}},{}],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";var n=function(){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}();e.exports=function(t,e,i,r){var o=n,s=r+i;t^=-1;for(var a=r;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}},{}],46:[function(t,e,i){"use strict";var n,r=t("../utils/common"),o=t("./trees"),s=t("./adler32"),a=t("./crc32"),l=t("./messages"),c=-2,h=258,u=262,d=113;function f(t,e){return t.msg=l[e],e}function p(t){return(t<<1)-(4<t?9:0)}function g(t){for(var e=t.length;0<=--e;)t[e]=0}function m(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 v(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,m(t.strm)}function y(t,e){t.pending_buf[t.pending++]=e}function b(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function w(t,e){var i,n,r=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,l=t.strstart>t.w_size-u?t.strstart-(t.w_size-u):0,c=t.window,d=t.w_mask,f=t.prev,p=t.strstart+h,g=c[o+s-1],m=c[o+s];t.prev_length>=t.good_match&&(r>>=2),a>t.lookahead&&(a=t.lookahead);do{if(c[(i=e)+s]===m&&c[i+s-1]===g&&c[i]===c[o]&&c[++i]===c[o+1]){o+=2,i++;do{}while(c[++o]===c[++i]&&c[++o]===c[++i]&&c[++o]===c[++i]&&c[++o]===c[++i]&&c[++o]===c[++i]&&c[++o]===c[++i]&&c[++o]===c[++i]&&c[++o]===c[++i]&&o<p);if(n=h-(p-o),o=p-h,s<n){if(t.match_start=e,a<=(s=n))break;g=c[o+s-1],m=c[o+s]}}}while((e=f[e&d])>l&&0!=--r);return s<=t.lookahead?s:t.lookahead}function x(t){var e,i,n,o,l,c,h,d,f,p,g=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=g+(g-u)){for(r.arraySet(t.window,t.window,g,g,0),t.match_start-=g,t.strstart-=g,t.block_start-=g,e=i=t.hash_size;n=t.head[--e],t.head[e]=g<=n?n-g:0,--i;);for(e=i=g;n=t.prev[--e],t.prev[e]=g<=n?n-g:0,--i;);o+=g}if(0===t.strm.avail_in)break;if(c=t.strm,h=t.window,d=t.strstart+t.lookahead,p=void 0,(f=o)<(p=c.avail_in)&&(p=f),i=0===p?0:(c.avail_in-=p,r.arraySet(h,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=s(c.adler,h,p,d):2===c.state.wrap&&(c.adler=a(c.adler,h,p,d)),c.next_in+=p,c.total_in+=p,p),t.lookahead+=i,t.lookahead+t.insert>=3)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<<t.hash_shift^t.window[l+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[l+3-1])&t.hash_mask,t.prev[l&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=l,l++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<u&&0!==t.strm.avail_in)}function _(t,e){for(var i,n;;){if(t.lookahead<u){if(x(t),t.lookahead<u&&0===e)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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=w(t,i)),t.match_length>=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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!=--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=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}function k(t,e){for(var i,n,r;;){if(t.lookahead<u){if(x(t),t.lookahead<u&&0===e)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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=2,0!==i&&t.prev_length<t.max_lazy_match&&t.strstart-i<=t.w_size-u&&(t.match_length=w(t,i),t.match_length<=5&&(1===t.strategy||3===t.match_length&&4096<t.strstart-t.match_start)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){for(r=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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!=--t.prev_length;);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(v(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&v(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}function E(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 S(){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=8,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(1146),this.dyn_dtree=new r.Buf16(122),this.bl_tree=new r.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(16),this.heap=new r.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(573),g(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 T(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:d,t.adler=2===e.wrap?0:1,e.last_flush=0,o._tr_init(e),0):f(t,c)}function C(t){var e=T(t);return 0===e&&function(t){t.window_size=2*t.w_size,g(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=2,t.match_available=0,t.ins_h=0}(t.state),e}function O(t,e,i,n,o,s){if(!t)return c;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),o<1||9<o||8!==i||n<8||15<n||e<0||9<e||s<0||4<s)return f(t,c);8===n&&(n=9);var l=new S;return(t.state=l).strm=t,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=o+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new r.Buf8(2*l.w_size),l.head=new r.Buf16(l.hash_size),l.prev=new r.Buf16(l.w_size),l.lit_bufsize=1<<o+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new r.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=e,l.strategy=s,l.method=i,C(t)}n=[new E(0,0,0,0,(function(t,e){var i=65535;for(i>t.pending_buf_size-5&&(i=t.pending_buf_size-5);;){if(t.lookahead<=1){if(x(t),0===t.lookahead&&0===e)return 1;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,v(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-u&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(v(t,!1),t.strm.avail_out),1)})),new E(4,4,8,4,_),new E(4,5,16,8,_),new E(4,6,32,32,_),new E(4,4,16,16,k),new E(8,16,32,32,k),new E(8,16,128,128,k),new E(8,32,128,256,k),new E(32,128,258,1024,k),new E(32,258,258,4096,k)],i.deflateInit=function(t,e){return O(t,e,8,15,8,0)},i.deflateInit2=O,i.deflateReset=C,i.deflateResetKeep=T,i.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,0):c},i.deflate=function(t,e){var i,r,s,l;if(!t||!t.state||5<e||e<0)return t?f(t,c):c;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||666===r.status&&4!==e)return f(t,0===t.avail_out?-5:c);if(r.strm=t,i=r.last_flush,r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,y(r,31),y(r,139),y(r,8),r.gzhead?(y(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)),y(r,255&r.gzhead.time),y(r,r.gzhead.time>>8&255),y(r,r.gzhead.time>>16&255),y(r,r.gzhead.time>>24&255),y(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),y(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(y(r,255&r.gzhead.extra.length),y(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=69):(y(r,0),y(r,0),y(r,0),y(r,0),y(r,0),y(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),y(r,3),r.status=d);else{var u=8+(r.w_bits-8<<4)<<8;u|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(u|=32),u+=31-u%31,r.status=d,b(r,u),0!==r.strstart&&(b(r,t.adler>>>16),b(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(s=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),m(t),s=r.pending,r.pending!==r.pending_buf_size));)y(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),m(t),s=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,y(r,l)}while(0!==l);r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),0===l&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),m(t),s=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,y(r,l)}while(0!==l);r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),0===l&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&m(t),r.pending+2<=r.pending_buf_size&&(y(r,255&t.adler),y(r,t.adler>>8&255),t.adler=0,r.status=d)):r.status=d),0!==r.pending){if(m(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(i)&&4!==e)return f(t,-5);if(666===r.status&&0!==t.avail_in)return f(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&666!==r.status){var w=2===r.strategy?function(t,e){for(var i;;){if(0===t.lookahead&&(x(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,i=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,i&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var i,n,r,s,a=t.window;;){if(t.lookahead<=h){if(x(t),t.lookahead<=h&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0<t.strstart&&(n=a[r=t.strstart-1])===a[++r]&&n===a[++r]&&n===a[++r]){s=t.strstart+h;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<s);t.match_length=h-(s-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(i=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(i=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),i&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(r,e):n[r.level].func(r,e);if(3!==w&&4!==w||(r.status=666),1===w||3===w)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===w&&(1===e?o._tr_align(r):5!==e&&(o._tr_stored_block(r,0,0,!1),3===e&&(g(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),m(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(y(r,255&t.adler),y(r,t.adler>>8&255),y(r,t.adler>>16&255),y(r,t.adler>>24&255),y(r,255&t.total_in),y(r,t.total_in>>8&255),y(r,t.total_in>>16&255),y(r,t.total_in>>24&255)):(b(r,t.adler>>>16),b(r,65535&t.adler)),m(t),0<r.wrap&&(r.wrap=-r.wrap),0!==r.pending?0:1)},i.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&e!==d&&666!==e?f(t,c):(t.state=null,e===d?f(t,-3):0):c},i.deflateSetDictionary=function(t,e){var i,n,o,a,l,h,u,d,f=e.length;if(!t||!t.state)return c;if(2===(a=(i=t.state).wrap)||1===a&&42!==i.status||i.lookahead)return c;for(1===a&&(t.adler=s(t.adler,e,f,0)),i.wrap=0,f>=i.w_size&&(0===a&&(g(i.head),i.strstart=0,i.block_start=0,i.insert=0),d=new r.Buf8(i.w_size),r.arraySet(d,e,f-i.w_size,i.w_size,0),e=d,f=i.w_size),l=t.avail_in,h=t.next_in,u=t.input,t.avail_in=f,t.next_in=0,t.input=e,x(i);i.lookahead>=3;){for(n=i.strstart,o=i.lookahead-2;i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+3-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++,--o;);i.strstart=n,i.lookahead=2,x(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=h,t.input=u,t.avail_in=l,i.wrap=a,0},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";e.exports=function(){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}},{}],48:[function(t,e,i){"use strict";e.exports=function(t,e){var i,n,r,o,s,a,l,c,h,u,d,f,p,g,m,v,y,b,w,x,_,k,E,S,T;i=t.state,n=t.next_in,S=t.input,r=n+(t.avail_in-5),o=t.next_out,T=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),l=i.dmax,c=i.wsize,h=i.whave,u=i.wnext,d=i.window,f=i.hold,p=i.bits,g=i.lencode,m=i.distcode,v=(1<<i.lenbits)-1,y=(1<<i.distbits)-1;t:do{p<15&&(f+=S[n++]<<p,p+=8,f+=S[n++]<<p,p+=8),b=g[f&v];e:for(;;){if(f>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))T[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=g[(65535&b)+(f&(1<<w)-1)];continue e}if(32&w){i.mode=12;break t}t.msg="invalid literal/length code",i.mode=30;break t}x=65535&b,(w&=15)&&(p<w&&(f+=S[n++]<<p,p+=8),x+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=S[n++]<<p,p+=8,f+=S[n++]<<p,p+=8),b=m[f&y];i:for(;;){if(f>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=m[(65535&b)+(f&(1<<w)-1)];continue i}t.msg="invalid distance code",i.mode=30;break t}if(_=65535&b,p<(w&=15)&&(f+=S[n++]<<p,(p+=8)<w&&(f+=S[n++]<<p,p+=8)),l<(_+=f&(1<<w)-1)){t.msg="invalid distance too far back",i.mode=30;break t}if(f>>>=w,p-=w,(w=o-s)<_){if(h<(w=_-w)&&i.sane){t.msg="invalid distance too far back",i.mode=30;break t}if(E=d,(k=0)===u){if(k+=c-w,w<x){for(x-=w;T[o++]=d[k++],--w;);k=o-_,E=T}}else if(u<w){if(k+=c+u-w,(w-=u)<x){for(x-=w;T[o++]=d[k++],--w;);if(k=0,u<x){for(x-=w=u;T[o++]=d[k++],--w;);k=o-_,E=T}}}else if(k+=u-w,w<x){for(x-=w;T[o++]=d[k++],--w;);k=o-_,E=T}for(;2<x;)T[o++]=E[k++],T[o++]=E[k++],T[o++]=E[k++],x-=3;x&&(T[o++]=E[k++],1<x&&(T[o++]=E[k++]))}else{for(k=o-_;T[o++]=T[k++],T[o++]=T[k++],T[o++]=T[k++],2<(x-=3););x&&(T[o++]=T[k++],1<x&&(T[o++]=T[k++]))}break}}break}}while(n<r&&o<a);n-=x=p>>3,f&=(1<<(p-=x<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n<r?r-n+5:5-(n-r),t.avail_out=o<a?a-o+257:257-(o-a),i.hold=f,i.bits=p}},{}],49:[function(t,e,i){"use strict";var n=t("../utils/common"),r=t("./adler32"),o=t("./crc32"),s=t("./inffast"),a=t("./inftrees"),l=-2;function c(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function h(){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 u(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=1,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(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):l}function d(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,u(t)):l}function f(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||15<e)?l:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=i,n.wbits=e,d(t))):l}function p(t,e){var i,n;return t?(n=new h,(t.state=n).window=null,0!==(i=f(t,e))&&(t.state=null),i):l}var g,m,v=!0;function y(t){if(v){var e;for(g=new n.Buf32(512),m=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,g,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,m,0,t.work,{bits:5}),v=!1}t.lencode=g,t.lenbits=9,t.distcode=m,t.distbits=5}function b(t,e,i,r){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),r>=s.wsize?(n.arraySet(s.window,e,i-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(r<(o=s.wsize-s.wnext)&&(o=r),n.arraySet(s.window,e,i-r,o,s.wnext),(r-=o)?(n.arraySet(s.window,e,i-r,r,0),s.wnext=r,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}i.inflateReset=d,i.inflateReset2=f,i.inflateResetKeep=u,i.inflateInit=function(t){return p(t,15)},i.inflateInit2=p,i.inflate=function(t,e){var i,h,u,d,f,p,g,m,v,w,x,_,k,E,S,T,C,O,A,N,I,R,j,L,z=0,D=new n.Buf8(4),P=[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 l;12===(i=t.state).mode&&(i.mode=13),f=t.next_out,u=t.output,g=t.avail_out,d=t.next_in,h=t.input,p=t.avail_in,m=i.hold,v=i.bits,w=p,x=g,R=0;t:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;v<16;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(2&i.wrap&&35615===m){D[i.check=0]=255&m,D[1]=m>>>8&255,i.check=o(i.check,D,2,0),v=m=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",i.mode=30;break}if(8!=(15&m)){t.msg="unknown compression method",i.mode=30;break}if(v-=4,I=8+(15&(m>>>=4)),0===i.wbits)i.wbits=I;else if(I>i.wbits){t.msg="invalid window size",i.mode=30;break}i.dmax=1<<I,t.adler=i.check=1,i.mode=512&m?10:12,v=m=0;break;case 2:for(;v<16;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(i.flags=m,8!=(255&i.flags)){t.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){t.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=m>>8&1),512&i.flags&&(D[0]=255&m,D[1]=m>>>8&255,i.check=o(i.check,D,2,0)),v=m=0,i.mode=3;case 3:for(;v<32;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}i.head&&(i.head.time=m),512&i.flags&&(D[0]=255&m,D[1]=m>>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,i.check=o(i.check,D,4,0)),v=m=0,i.mode=4;case 4:for(;v<16;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}i.head&&(i.head.xflags=255&m,i.head.os=m>>8),512&i.flags&&(D[0]=255&m,D[1]=m>>>8&255,i.check=o(i.check,D,2,0)),v=m=0,i.mode=5;case 5:if(1024&i.flags){for(;v<16;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}i.length=m,i.head&&(i.head.extra_len=m),512&i.flags&&(D[0]=255&m,D[1]=m>>>8&255,i.check=o(i.check,D,2,0)),v=m=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(p<(_=i.length)&&(_=p),_&&(i.head&&(I=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,h,d,_,I)),512&i.flags&&(i.check=o(i.check,h,_,d)),p-=_,d+=_,i.length-=_),i.length))break t;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===p)break t;for(_=0;I=h[d+_++],i.head&&I&&i.length<65536&&(i.head.name+=String.fromCharCode(I)),I&&_<p;);if(512&i.flags&&(i.check=o(i.check,h,_,d)),p-=_,d+=_,I)break t}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===p)break t;for(_=0;I=h[d+_++],i.head&&I&&i.length<65536&&(i.head.comment+=String.fromCharCode(I)),I&&_<p;);if(512&i.flags&&(i.check=o(i.check,h,_,d)),p-=_,d+=_,I)break t}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;v<16;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(m!==(65535&i.check)){t.msg="header crc mismatch",i.mode=30;break}v=m=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),t.adler=i.check=0,i.mode=12;break;case 10:for(;v<32;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}t.adler=i.check=c(m),v=m=0,i.mode=11;case 11:if(0===i.havedict)return t.next_out=f,t.avail_out=g,t.next_in=d,t.avail_in=p,i.hold=m,i.bits=v,2;t.adler=i.check=1,i.mode=12;case 12:if(5===e||6===e)break t;case 13:if(i.last){m>>>=7&v,v-=7&v,i.mode=27;break}for(;v<3;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}switch(i.last=1&m,v-=1,3&(m>>>=1)){case 0:i.mode=14;break;case 1:if(y(i),i.mode=20,6!==e)break;m>>>=2,v-=2;break t;case 2:i.mode=17;break;case 3:t.msg="invalid block type",i.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){t.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&m,v=m=0,i.mode=15,6===e)break t;case 15:i.mode=16;case 16:if(_=i.length){if(p<_&&(_=p),g<_&&(_=g),0===_)break t;n.arraySet(u,h,d,_,f),p-=_,d+=_,g-=_,f+=_,i.length-=_;break}i.mode=12;break;case 17:for(;v<14;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(i.nlen=257+(31&m),m>>>=5,v-=5,i.ndist=1+(31&m),m>>>=5,v-=5,i.ncode=4+(15&m),m>>>=4,v-=4,286<i.nlen||30<i.ndist){t.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;v<3;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}i.lens[P[i.have++]]=7&m,m>>>=3,v-=3}for(;i.have<19;)i.lens[P[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,j={bits:i.lenbits},R=a(0,i.lens,0,19,i.lencode,0,i.work,j),i.lenbits=j.bits,R){t.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;T=(z=i.lencode[m&(1<<i.lenbits)-1])>>>16&255,C=65535&z,!((S=z>>>24)<=v);){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(C<16)m>>>=S,v-=S,i.lens[i.have++]=C;else{if(16===C){for(L=S+2;v<L;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(m>>>=S,v-=S,0===i.have){t.msg="invalid bit length repeat",i.mode=30;break}I=i.lens[i.have-1],_=3+(3&m),m>>>=2,v-=2}else if(17===C){for(L=S+3;v<L;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}v-=S,I=0,_=3+(7&(m>>>=S)),m>>>=3,v-=3}else{for(L=S+7;v<L;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}v-=S,I=0,_=11+(127&(m>>>=S)),m>>>=7,v-=7}if(i.have+_>i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=30;break}for(;_--;)i.lens[i.have++]=I}}if(30===i.mode)break;if(0===i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,j={bits:i.lenbits},R=a(1,i.lens,0,i.nlen,i.lencode,0,i.work,j),i.lenbits=j.bits,R){t.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,j={bits:i.distbits},R=a(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,j),i.distbits=j.bits,R){t.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===e)break t;case 20:i.mode=21;case 21:if(6<=p&&258<=g){t.next_out=f,t.avail_out=g,t.next_in=d,t.avail_in=p,i.hold=m,i.bits=v,s(t,x),f=t.next_out,u=t.output,g=t.avail_out,d=t.next_in,h=t.input,p=t.avail_in,m=i.hold,v=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;T=(z=i.lencode[m&(1<<i.lenbits)-1])>>>16&255,C=65535&z,!((S=z>>>24)<=v);){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(T&&0==(240&T)){for(O=S,A=T,N=C;T=(z=i.lencode[N+((m&(1<<O+A)-1)>>O)])>>>16&255,C=65535&z,!(O+(S=z>>>24)<=v);){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}m>>>=O,v-=O,i.back+=O}if(m>>>=S,v-=S,i.back+=S,i.length=C,0===T){i.mode=26;break}if(32&T){i.back=-1,i.mode=12;break}if(64&T){t.msg="invalid literal/length code",i.mode=30;break}i.extra=15&T,i.mode=22;case 22:if(i.extra){for(L=i.extra;v<L;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}i.length+=m&(1<<i.extra)-1,m>>>=i.extra,v-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;T=(z=i.distcode[m&(1<<i.distbits)-1])>>>16&255,C=65535&z,!((S=z>>>24)<=v);){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(0==(240&T)){for(O=S,A=T,N=C;T=(z=i.distcode[N+((m&(1<<O+A)-1)>>O)])>>>16&255,C=65535&z,!(O+(S=z>>>24)<=v);){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}m>>>=O,v-=O,i.back+=O}if(m>>>=S,v-=S,i.back+=S,64&T){t.msg="invalid distance code",i.mode=30;break}i.offset=C,i.extra=15&T,i.mode=24;case 24:if(i.extra){for(L=i.extra;v<L;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}i.offset+=m&(1<<i.extra)-1,m>>>=i.extra,v-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){t.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===g)break t;if(_=x-g,i.offset>_){if((_=i.offset-_)>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=30;break}k=_>i.wnext?(_-=i.wnext,i.wsize-_):i.wnext-_,_>i.length&&(_=i.length),E=i.window}else E=u,k=f-i.offset,_=i.length;for(g<_&&(_=g),g-=_,i.length-=_;u[f++]=E[k++],--_;);0===i.length&&(i.mode=21);break;case 26:if(0===g)break t;u[f++]=i.length,g--,i.mode=21;break;case 27:if(i.wrap){for(;v<32;){if(0===p)break t;p--,m|=h[d++]<<v,v+=8}if(x-=g,t.total_out+=x,i.total+=x,x&&(t.adler=i.check=i.flags?o(i.check,u,x,f-x):r(i.check,u,x,f-x)),x=g,(i.flags?m:c(m))!==i.check){t.msg="incorrect data check",i.mode=30;break}v=m=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;v<32;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(m!==(4294967295&i.total)){t.msg="incorrect length check",i.mode=30;break}v=m=0}i.mode=29;case 29:R=1;break t;case 30:R=-3;break t;case 31:return-4;case 32:default:return l}return t.next_out=f,t.avail_out=g,t.next_in=d,t.avail_in=p,i.hold=m,i.bits=v,(i.wsize||x!==t.avail_out&&i.mode<30&&(i.mode<27||4!==e))&&b(t,t.output,t.next_out,x-t.avail_out)?(i.mode=31,-4):(w-=t.avail_in,x-=t.avail_out,t.total_in+=w,t.total_out+=x,i.total+=x,i.wrap&&x&&(t.adler=i.check=i.flags?o(i.check,u,x,t.next_out-x):r(i.check,u,x,t.next_out-x)),t.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0==w&&0===x||4===e)&&0===R&&(R=-5),R)},i.inflateEnd=function(t){if(!t||!t.state)return l;var e=t.state;return e.window&&(e.window=null),t.state=null,0},i.inflateGetHeader=function(t,e){var i;return t&&t.state?0==(2&(i=t.state).wrap)?l:((i.head=e).done=!1,0):l},i.inflateSetDictionary=function(t,e){var i,n=e.length;return t&&t.state?0!==(i=t.state).wrap&&11!==i.mode?l:11===i.mode&&r(1,e,n,0)!==i.check?-3:b(t,e,n,n)?(i.mode=31,-4):(i.havedict=1,0):l},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=[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],o=[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],s=[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],a=[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,l,c,h,u,d){var f,p,g,m,v,y,b,w,x,_=d.bits,k=0,E=0,S=0,T=0,C=0,O=0,A=0,N=0,I=0,R=0,j=null,L=0,z=new n.Buf16(16),D=new n.Buf16(16),P=null,B=0;for(k=0;k<=15;k++)z[k]=0;for(E=0;E<l;E++)z[e[i+E]]++;for(C=_,T=15;1<=T&&0===z[T];T--);if(T<C&&(C=T),0===T)return c[h++]=20971520,c[h++]=20971520,d.bits=1,0;for(S=1;S<T&&0===z[S];S++);for(C<S&&(C=S),k=N=1;k<=15;k++)if(N<<=1,(N-=z[k])<0)return-1;if(0<N&&(0===t||1!==T))return-1;for(D[1]=0,k=1;k<15;k++)D[k+1]=D[k]+z[k];for(E=0;E<l;E++)0!==e[i+E]&&(u[D[e[i+E]]++]=E);if(y=0===t?(j=P=u,19):1===t?(j=r,L-=257,P=o,B-=257,256):(j=s,P=a,-1),k=S,v=h,A=E=R=0,g=-1,m=(I=1<<(O=C))-1,1===t&&852<I||2===t&&592<I)return 1;for(;;){for(b=k-A,x=u[E]<y?(w=0,u[E]):u[E]>y?(w=P[B+u[E]],j[L+u[E]]):(w=96,0),f=1<<k-A,S=p=1<<O;c[v+(R>>A)+(p-=f)]=b<<24|w<<16|x|0,0!==p;);for(f=1<<k-1;R&f;)f>>=1;if(0!==f?(R&=f-1,R+=f):R=0,E++,0==--z[k]){if(k===T)break;k=e[i+u[E]]}if(C<k&&(R&m)!==g){for(0===A&&(A=C),v+=S,N=1<<(O=k-A);O+A<T&&!((N-=z[O+A])<=0);)O++,N<<=1;if(I+=1<<O,1===t&&852<I||2===t&&592<I)return 1;c[g=R&m]=C<<24|O<<16|v-h|0}}return 0!==R&&(c[v+R]=k-A<<24|64<<16|0),d.bits=C,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");function r(t){for(var e=t.length;0<=--e;)t[e]=0}var o=256,s=286,a=30,l=15,c=[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],h=[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],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],d=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576);r(f);var p=new Array(60);r(p);var g=new Array(512);r(g);var m=new Array(256);r(m);var v=new Array(29);r(v);var y,b,w,x=new Array(a);function _(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 k(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function E(t){return t<256?g[t]:g[256+(t>>>7)]}function S(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function T(t,e,i){t.bi_valid>16-i?(t.bi_buf|=e<<t.bi_valid&65535,S(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=i-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=i)}function C(t,e,i){T(t,i[2*e],i[2*e+1])}function O(t,e){for(var i=0;i|=1&t,t>>>=1,i<<=1,0<--e;);return i>>>1}function A(t,e,i){var n,r,o=new Array(16),s=0;for(n=1;n<=l;n++)o[n]=s=s+i[n-1]<<1;for(r=0;r<=e;r++){var a=t[2*r+1];0!==a&&(t[2*r]=O(o[a]++,a))}}function N(t){var e;for(e=0;e<s;e++)t.dyn_ltree[2*e]=0;for(e=0;e<a;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function I(t){8<t.bi_valid?S(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function R(t,e,i,n){var r=2*e,o=2*i;return t[r]<t[o]||t[r]===t[o]&&n[e]<=n[i]}function j(t,e,i){for(var n=t.heap[i],r=i<<1;r<=t.heap_len&&(r<t.heap_len&&R(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!R(e,n,t.heap[r],t.depth));)t.heap[i]=t.heap[r],i=r,r<<=1;t.heap[i]=n}function L(t,e,i){var n,r,s,a,l=0;if(0!==t.last_lit)for(;n=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],r=t.pending_buf[t.l_buf+l],l++,0===n?C(t,r,e):(C(t,(s=m[r])+o+1,e),0!==(a=c[s])&&T(t,r-=v[s],a),C(t,s=E(--n),i),0!==(a=h[s])&&T(t,n-=x[s],a)),l<t.last_lit;);C(t,256,e)}function z(t,e){var i,n,r,o=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,c=e.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=573,i=0;i<c;i++)0!==o[2*i]?(t.heap[++t.heap_len]=h=i,t.depth[i]=0):o[2*i+1]=0;for(;t.heap_len<2;)o[2*(r=t.heap[++t.heap_len]=h<2?++h:0)]=1,t.depth[r]=0,t.opt_len--,a&&(t.static_len-=s[2*r+1]);for(e.max_code=h,i=t.heap_len>>1;1<=i;i--)j(t,o,i);for(r=c;i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],j(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=n,o[2*r]=o[2*i]+o[2*n],t.depth[r]=(t.depth[i]>=t.depth[n]?t.depth[i]:t.depth[n])+1,o[2*i+1]=o[2*n+1]=r,t.heap[1]=r++,j(t,o,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var i,n,r,o,s,a,c=e.dyn_tree,h=e.max_code,u=e.stat_desc.static_tree,d=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,g=e.stat_desc.max_length,m=0;for(o=0;o<=l;o++)t.bl_count[o]=0;for(c[2*t.heap[t.heap_max]+1]=0,i=t.heap_max+1;i<573;i++)g<(o=c[2*c[2*(n=t.heap[i])+1]+1]+1)&&(o=g,m++),c[2*n+1]=o,h<n||(t.bl_count[o]++,s=0,p<=n&&(s=f[n-p]),a=c[2*n],t.opt_len+=a*(o+s),d&&(t.static_len+=a*(u[2*n+1]+s)));if(0!==m){do{for(o=g-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[g]--,m-=2}while(0<m);for(o=g;0!==o;o--)for(n=t.bl_count[o];0!==n;)h<(r=t.heap[--i])||(c[2*r+1]!==o&&(t.opt_len+=(o-c[2*r+1])*c[2*r],c[2*r+1]=o),n--)}}(t,e),A(o,h,t.bl_count)}function D(t,e,i){var n,r,o=-1,s=e[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),e[2*(i+1)+1]=65535,n=0;n<=i;n++)r=s,s=e[2*(n+1)+1],++a<l&&r===s||(a<c?t.bl_tree[2*r]+=a:0!==r?(r!==o&&t.bl_tree[2*r]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=r,c=(a=0)===s?(l=138,3):r===s?(l=6,3):(l=7,4))}function P(t,e,i){var n,r,o=-1,s=e[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),n=0;n<=i;n++)if(r=s,s=e[2*(n+1)+1],!(++a<l&&r===s)){if(a<c)for(;C(t,r,t.bl_tree),0!=--a;);else 0!==r?(r!==o&&(C(t,r,t.bl_tree),a--),C(t,16,t.bl_tree),T(t,a-3,2)):a<=10?(C(t,17,t.bl_tree),T(t,a-3,3)):(C(t,18,t.bl_tree),T(t,a-11,7));o=r,c=(a=0)===s?(l=138,3):r===s?(l=6,3):(l=7,4)}}r(x);var B=!1;function M(t,e,i,r){T(t,0+(r?1:0),3),function(t,e,i,r){I(t),S(t,i),S(t,~i),n.arraySet(t.pending_buf,t.window,e,i,t.pending),t.pending+=i}(t,e,i)}i._tr_init=function(t){B||(function(){var t,e,i,n,r,o=new Array(16);for(n=i=0;n<28;n++)for(v[n]=i,t=0;t<1<<c[n];t++)m[i++]=n;for(m[i-1]=n,n=r=0;n<16;n++)for(x[n]=r,t=0;t<1<<h[n];t++)g[r++]=n;for(r>>=7;n<a;n++)for(x[n]=r<<7,t=0;t<1<<h[n]-7;t++)g[256+r++]=n;for(e=0;e<=l;e++)o[e]=0;for(t=0;t<=143;)f[2*t+1]=8,t++,o[8]++;for(;t<=255;)f[2*t+1]=9,t++,o[9]++;for(;t<=279;)f[2*t+1]=7,t++,o[7]++;for(;t<=287;)f[2*t+1]=8,t++,o[8]++;for(A(f,287,o),t=0;t<a;t++)p[2*t+1]=5,p[2*t]=O(t,5);y=new _(f,c,257,s,l),b=new _(p,h,0,a,l),w=new _(new Array(0),u,0,19,7)}(),B=!0),t.l_desc=new k(t.dyn_ltree,y),t.d_desc=new k(t.dyn_dtree,b),t.bl_desc=new k(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,N(t)},i._tr_stored_block=M,i._tr_flush_block=function(t,e,i,n){var r,s,a=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<o;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),z(t,t.l_desc),z(t,t.d_desc),a=function(t){var e;for(D(t,t.dyn_ltree,t.l_desc.max_code),D(t,t.dyn_dtree,t.d_desc.max_code),z(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*d[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=r&&(r=s)):r=s=i+5,i+4<=r&&-1!==e?M(t,e,i,n):4===t.strategy||s===r?(T(t,2+(n?1:0),3),L(t,f,p)):(T(t,4+(n?1:0),3),function(t,e,i,n){var r;for(T(t,e-257,5),T(t,i-1,5),T(t,n-4,4),r=0;r<n;r++)T(t,t.bl_tree[2*d[r]+1],3);P(t,t.dyn_ltree,e-1),P(t,t.dyn_dtree,i-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),L(t,t.dyn_ltree,t.dyn_dtree)),N(t),n&&I(t)},i._tr_tally=function(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*(m[i]+o+1)]++,t.dyn_dtree[2*E(e)]++),t.last_lit===t.lit_bufsize-1},i._tr_align=function(t){T(t,2,3),C(t,256,f),function(t){16===t.bi_valid?(S(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,i){"use strict";e.exports=function(){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}},{}],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)})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("xmldom"),require("JSZip")):"function"==typeof define&&define.amd?define(["xmldom","JSZip"],e):"object"==typeof exports?exports.ePub=e(require("xmldom"),require("JSZip")):t.ePub=e(t.xmldom,t.JSZip)}(window,(function(t,e){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=86)}([function(t,e,i){"use strict";i.r(e),i.d(e,"requestAnimationFrame",(function(){return r})),i.d(e,"uuid",(function(){return s})),i.d(e,"documentHeight",(function(){return a})),i.d(e,"isElement",(function(){return l})),i.d(e,"isNumber",(function(){return c})),i.d(e,"isFloat",(function(){return h})),i.d(e,"prefixed",(function(){return u})),i.d(e,"defaults",(function(){return d})),i.d(e,"extend",(function(){return f})),i.d(e,"insert",(function(){return p})),i.d(e,"locationOf",(function(){return g})),i.d(e,"indexOfSorted",(function(){return m})),i.d(e,"bounds",(function(){return v})),i.d(e,"borders",(function(){return y})),i.d(e,"nodeBounds",(function(){return b})),i.d(e,"windowBounds",(function(){return w})),i.d(e,"indexOfNode",(function(){return x})),i.d(e,"indexOfTextNode",(function(){return _})),i.d(e,"indexOfElementNode",(function(){return k})),i.d(e,"isXml",(function(){return E})),i.d(e,"createBlob",(function(){return S})),i.d(e,"createBlobUrl",(function(){return T})),i.d(e,"revokeBlobUrl",(function(){return C})),i.d(e,"createBase64Url",(function(){return O})),i.d(e,"type",(function(){return A})),i.d(e,"parse",(function(){return N})),i.d(e,"qs",(function(){return I})),i.d(e,"qsa",(function(){return R})),i.d(e,"qsp",(function(){return j})),i.d(e,"sprint",(function(){return L})),i.d(e,"treeWalker",(function(){return z})),i.d(e,"walk",(function(){return D})),i.d(e,"blob2base64",(function(){return P})),i.d(e,"defer",(function(){return B})),i.d(e,"querySelectorByType",(function(){return M})),i.d(e,"findChildren",(function(){return F})),i.d(e,"parents",(function(){return q})),i.d(e,"filterChildren",(function(){return U})),i.d(e,"getParentByTagName",(function(){return W})),i.d(e,"RangeObject",(function(){return $}));i(24),i(14),i(20);var n=i(38);const r="undefined"!=typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),o="undefined"!=typeof URL?URL:"undefined"!=typeof window?window.URL||window.webkitURL||window.mozURL:void 0;function s(){var t=(new Date).getTime();return"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)}))}function a(){return Math.max(document.documentElement.clientHeight,document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight)}function l(t){return!(!t||1!=t.nodeType)}function c(t){return!isNaN(parseFloat(t))&&isFinite(t)}function h(t){let e=parseFloat(t);return!1!==c(t)&&("string"==typeof t&&t.indexOf(".")>-1||Math.floor(e)!==e)}function u(t){var e=["-webkit-","-webkit-","-moz-","-o-","-ms-"],i=t.toLowerCase(),n=["Webkit","webkit","Moz","O","ms"].length;if("undefined"==typeof document||void 0!==document.body.style[i])return t;for(var r=0;r<n;r++)if(void 0!==document.body.style[e[r]+i])return e[r]+i;return t}function d(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 f(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 p(t,e,i){var n=g(t,e,i);return e.splice(n,0,t),n}function g(t,e,i,n,r){var o,s=n||0,a=r||e.length,l=parseInt(s+(a-s)/2);return i||(i=function(t,e){return t>e?1:t<e?-1:t==e?0:void 0}),a-s<=0?l:(o=i(e[l],t),a-s==1?o>=0?l:l+1:0===o?l:-1===o?g(t,e,i,l,a):g(t,e,i,s,l))}function m(t,e,i,n,r){var o,s=n||0,a=r||e.length,l=parseInt(s+(a-s)/2);return i||(i=function(t,e){return t>e?1:t<e?-1:t==e?0:void 0}),a-s<=0?-1:(o=i(e[l],t),a-s==1?0===o?l:-1:0===o?l:-1===o?m(t,e,i,l,a):m(t,e,i,s,l))}function v(t){var e=window.getComputedStyle(t),i=0,n=0;return["width","paddingRight","paddingLeft","marginRight","marginLeft","borderRightWidth","borderLeftWidth"].forEach((function(t){i+=parseFloat(e[t])||0})),["height","paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"].forEach((function(t){n+=parseFloat(e[t])||0})),{height:n,width:i}}function y(t){var e=window.getComputedStyle(t),i=0,n=0;return["paddingRight","paddingLeft","marginRight","marginLeft","borderRightWidth","borderLeftWidth"].forEach((function(t){i+=parseFloat(e[t])||0})),["paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"].forEach((function(t){n+=parseFloat(e[t])||0})),{height:n,width:i}}function b(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 w(){var t=window.innerWidth,e=window.innerHeight;return{top:0,left:0,right:t,bottom:e,width:t,height:e}}function x(t,e){for(var i,n=t.parentNode.childNodes,r=-1,o=0;o<n.length&&((i=n[o]).nodeType===e&&r++,i!=t);o++);return r}function _(t){return x(t,3)}function k(t){return x(t,1)}function E(t){return["xml","opf","ncx"].indexOf(t)>-1}function S(t,e){return new Blob([t],{type:e})}function T(t,e){var i=S(t,e);return o.createObjectURL(i)}function C(t){return o.revokeObjectURL(t)}function O(t,e){if("string"==typeof t)return"data:"+e+";base64,"+btoa(encodeURIComponent(t))}function A(t){return Object.prototype.toString.call(t).slice(8,-1)}function N(t,e,i){var r;return r="undefined"==typeof DOMParser||i?n.DOMParser:DOMParser,65279===t.charCodeAt(0)&&(t=t.slice(1)),(new r).parseFromString(t,e)}function I(t,e){var i;if(!t)throw new Error("No Element Provided");return void 0!==t.querySelector?t.querySelector(e):(i=t.getElementsByTagName(e)).length?i[0]:void 0}function R(t,e){return void 0!==t.querySelector?t.querySelectorAll(e):t.getElementsByTagName(e)}function j(t,e,i){var n,r;if(void 0!==t.querySelector){for(var o in e+="[",i)e+=o+"~='"+i[o]+"'";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})))return r[0]}function L(t,e){void 0!==(t.ownerDocument||t).createTreeWalker?z(t,e,NodeFilter.SHOW_TEXT):D(t,(function(t){t&&3===t.nodeType&&e(t)}))}function z(t,e,i){var n=document.createTreeWalker(t,i,null,!1);let r;for(;r=n.nextNode();)e(r)}function D(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(D(t,e))return!0;t=t.nextSibling}while(t)}function P(t){return new Promise((function(e,i){var n=new FileReader;n.readAsDataURL(t),n.onloadend=function(){e(n.result)}}))}function B(){this.resolve=null,this.reject=null,this.id=s(),this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e}),Object.freeze(this)}function M(t,e,i){var n;if(void 0!==t.querySelector&&(n=t.querySelector(`${e}[*|type="${i}"]`)),n&&0!==n.length)return n;n=R(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 F(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 U(t,e,i){for(var n=[],r=t.childNodes,o=0;o<r.length;o++){let t=r[o];if(1===t.nodeType&&t.nodeName.toLowerCase()===e){if(i)return t;n.push(t)}}if(!i)return n}function W(t,e){let i;if(null!==t&&""!==e)for(i=t.parentNode;1===i.nodeType;){if(i.tagName.toLowerCase()===e)return i;i=i.parentNode}}class ${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(){}}},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 o}));const n="0.3",r=["keydown","keyup","keypressed","mouseup","mousedown","click","touchend","touchstart","touchmove"],o={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"}}},function(t,e,i){"use strict";var n=i(0);class r{constructor(t,e,i){var o;if(this.str="",this.base={},this.spinePos=0,this.range=!1,this.path={},this.start=null,this.end=null,!(this instanceof r))return new r(t,e,i);if("string"==typeof e?this.base=this.parseComponent(e):"object"==typeof e&&e.steps&&(this.base=e),"string"===(o=this.checkType(t)))return this.str=t,Object(n.extend)(this,this.parse(t));if("range"===o)return Object(n.extend)(this,this.fromRange(t,this.base,i));if("node"===o)return Object(n.extend)(this,this.fromNode(t,this.base,i));if("EpubCFI"===o&&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)&&void 0===t.startContainer?t&&"object"==typeof t&&void 0!==t.nodeType?"node":!!(t&&"object"==typeof t&&t instanceof r)&&"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))?(r.base=this.parseComponent(e),i=this.getPathComponent(t),r.path=this.parseComponent(i),(n=this.getRange(t))&&(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,o;if((r=t.match(/\[(.*)\]/))&&r[1]&&(o=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:o||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){return t.split("!")[0]}getPathComponent(t){var e=t.split("!");if(e[1]){return e[1].split(",")[0]}}getRange(t){var e=t.split(",");return 3===e.length&&[e[1],e[2]]}getCharecterOffsetComponent(t){return t.split(":")[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+=")"}compare(t,e){var i,n,o,s;if("string"==typeof t&&(t=new r(t)),"string"==typeof e&&(e=new r(e)),t.spinePos>e.spinePos)return 1;if(t.spinePos<e.spinePos)return-1;t.range?(i=t.path.steps.concat(t.start.steps),o=t.start.terminal):(i=t.path.steps,o=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 a=0;a<i.length;a++){if(!i[a])return-1;if(!n[a])return 1;if(i[a].index>n[a].index)return 1;if(i[a].index<n[a].index)return-1}return i.length<n.length?-1:o.offset>s.offset?1:o.offset<s.offset?-1:0}step(t){var e=3===t.nodeType?"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=3===n.nodeType?"text":"element",{id:n.id,tagName:n.tagName,type:i,index:this.filteredPosition(n,e)}}pathTo(t,e,i){for(var n,r={steps:[],terminal:{offset:null,assertion:null}},o=t;o&&o.parentNode&&9!=o.parentNode.nodeType;)(n=i?this.filteredStep(o,i):this.step(o))&&r.steps.unshift(n),o=o.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,o=t.endContainer,s=t.startOffset,a=t.endOffset,l=!1;if(i&&(l=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)l&&(s=this.patchOffset(r,s,i)),n.path=this.pathTo(r,s,i);else{n.range=!0,l&&(s=this.patchOffset(r,s,i)),n.start=this.pathTo(r,s,i),l&&(a=this.patchOffset(o,a,i)),n.end=this.pathTo(o,a,i),n.path={steps:[],terminal:null};var c,h=n.start.steps.length;for(c=0;c<h&&this.equalStep(n.start.steps[c],n.end.steps[c]);c++)c===h-1?n.start.terminal===n.end.terminal&&(n.path.steps.push(n.start.steps[c]),n.range=!1):n.path.steps.push(n.start.steps[c]);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,s,a=!1;return 3===t.nodeType?(a=!0,r=t.parentNode,i=t.parentNode.classList.contains(e)):(a=!1,i=t.classList.contains(e)),i&&a?(o=r.previousSibling,s=r.nextSibling,o&&3===o.nodeType?n=o:s&&3===s.nodeType&&(n=s),n||t):!(i&&!a)&&t}patchOffset(t,e,i){if(3!=t.nodeType)throw new Error("Anchor must be a text node");var n=t,r=e;for(t.parentNode.classList.contains(i)&&(n=t.parentNode);n.previousSibling;){if(1===n.previousSibling.nodeType){if(!n.previousSibling.classList.contains(i))break;r+=n.previousSibling.textContent.length}else r+=n.previousSibling.textContent.length;n=n.previousSibling}return r}normalizedMap(t,e,i){var n,r,o,s={},a=-1,l=t.length;for(n=0;n<l;n++)1===(r=t[n].nodeType)&&t[n].classList.contains(i)&&(r=3),n>0&&3===r&&3===o?s[n]=a:e===r&&(a+=1,s[n]=a),o=r;return s}position(t){var e,i;return 1===t.nodeType?((e=t.parentNode.children)||(e=Object(n.findChildren)(t.parentNode)),i=Array.prototype.indexOf.call(e,t)):i=(e=this.textNodes(t.parentNode)).indexOf(t),i}filteredPosition(t,e){var i,n;return 1===t.nodeType?(i=t.parentNode.children,n=this.normalizedMap(i,1,e)):(i=t.parentNode.childNodes,t.parentNode.classList.contains(e)&&(i=(t=t.parentNode).parentNode.childNodes),n=this.normalizedMap(i,3,e)),n[Array.prototype.indexOf.call(i,t)]}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 3===t.nodeType||!(!e||!t.classList.contains(e))}))}walkToNode(t,e,i){var r,o,s=e||document,a=s.documentElement,l=t.length;for(o=0;o<l&&("element"===(r=t[o]).type?a=r.id?s.getElementById(r.id):(a.children||Object(n.findChildren)(a))[r.index]:"text"===r.type&&(a=this.textNodes(a,i)[r.index]),a);o++);return a}findNode(t,e,i){var n,r,o=e||document;return i||void 0===o.evaluate?n=i?this.walkToNode(t,o,i):this.walkToNode(t,o):(r=this.stepsToXpath(t),n=o.evaluate(r,o,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue),n}fixMiss(t,e,i,n){var r,o,s=this.findNode(t.slice(0,-1),i,n),a=s.childNodes,l=this.normalizedMap(a,3,n),c=t[t.length-1].index;for(let t in l){if(!l.hasOwnProperty(t))return;if(l[t]===c){if(!(e>(o=(r=a[t]).textContent.length))){s=1===r.nodeType?r.childNodes[0]:r;break}e-=o}}return{container:s,offset:e}}toRange(t,e){var i,r,o,s,a,l,c,h,u=t||document,d=!!e&&null!=u.querySelector("."+e);if(i=void 0!==u.createRange?u.createRange():new n.RangeObject,this.range?(r=this.start,l=this.path.steps.concat(r.steps),s=this.findNode(l,u,d?e:null),o=this.end,c=this.path.steps.concat(o.steps),a=this.findNode(c,u,d?e:null)):(r=this.path,l=this.path.steps,s=this.findNode(this.path.steps,u,d?e:null)),!s)return console.log("No startContainer found for",this.toString()),null;try{null!=r.terminal.offset?i.setStart(s,r.terminal.offset):i.setStart(s,0)}catch(t){h=this.fixMiss(l,r.terminal.offset,u,d?e:null),i.setStart(h.container,h.offset)}if(a)try{null!=o.terminal.offset?i.setEnd(a,o.terminal.offset):i.setEnd(a,0)}catch(t){h=this.fixMiss(c,this.end.terminal.offset,u,d?e:null),i.setEnd(h.container,h.offset)}return i}isCfiString(t){return"string"==typeof t&&0===t.indexOf("epubcfi(")&&")"===t[t.length-1]}generateChapterComponent(t,e,i){var n="/"+2*(t+1)+"/";return n+=2*(parseInt(e)+1),i&&(n+="["+i+"]"),n}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=r},function(t,e,i){"use strict";var n,r,o,s,a,l,c,h=i(108),u=i(122),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,g=Object.defineProperty,m=Object.defineProperties,v=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var i,r;return u(e),r=this,n.call(this,t,i=function(){o.call(r,t,i),d.call(e,this,arguments)}),i.__eeOnceListener__=e,this},a={on:n=function(t,e){var i;return u(e),v.call(this,"__ee__")?i=this.__ee__:(i=y.value=p(null),g(this,"__ee__",y),y.value=null),i[t]?"object"==typeof i[t]?i[t].push(e):i[t]=[i[t],e]:i[t]=e,this},once:r,off:o=function(t,e){var i,n,r,o;if(u(e),!v.call(this,"__ee__"))return this;if(!(i=this.__ee__)[t])return this;if("object"==typeof(n=i[t]))for(o=0;r=n[o];++o)r!==e&&r.__eeOnceListener__!==e||(2===n.length?i[t]=n[o?0:1]:n.splice(o,1));else n!==e&&n.__eeOnceListener__!==e||delete i[t];return this},emit:s=function(t){var e,i,n,r,o;if(v.call(this,"__ee__")&&(r=this.__ee__[t]))if("object"==typeof r){for(i=arguments.length,o=new Array(i-1),e=1;e<i;++e)o[e-1]=arguments[e];for(r=r.slice(),e=0;n=r[e];++e)d.call(n,this,o)}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,o=new Array(i-1),e=1;e<i;++e)o[e-1]=arguments[e];d.call(r,this,o)}}},l={on:h(n),once:h(r),off:h(o),emit:h(s)},c=m({},l),t.exports=e=function(t){return null==t?p(c):m(Object(t),l)},e.methods=a},function(t,e,i){"use strict";i(14),i(20);var n=i(9),r=i.n(n);e.a=class{constructor(t){var e;t.indexOf("://")>-1&&(t=new URL(t).pathname),e=this.parse(t),this.path=t,this.isDirectory(t)?this.directory=t:this.directory=e.dir+"/",this.filename=e.base,this.extension=e.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){return t&&t.indexOf("://")>-1?t:r.a.relative(this.directory,t)}splitPath(t){return this.splitPathRe.exec(t).slice(1)}toString(){return this.path}}},function(t,e,i){"use strict";i(14),i(20);var n=i(4),r=i(9),o=i.n(r);e.a=class{constructor(t,e){var i=t.indexOf("://")>-1,r=t;if(this.Url=void 0,this.href=t,this.protocol="",this.origin="",this.hash="",this.hash="",this.search="",this.base=e,!i&&!1!==e&&"string"!=typeof e&&window&&window.location&&(this.base=window.location.href),i||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,r=this.Url.pathname+(this.Url.search?this.Url.search:"")}catch(t){this.Url=void 0,this.base&&(r=new n.a(this.base).resolve(r))}this.Path=new n.a(r),this.directory=this.Path.directory,this.filename=this.Path.filename,this.extension=this.Path.extension}path(){return this.Path}resolve(t){var e;return t.indexOf("://")>-1?t:(e=o.a.resolve(this.directory,t),this.origin+e)}relative(t){return o.a.relative(t,this.directory)}toString(){return this.href}}},function(t,e,i){"use strict";i(14);e.a=class{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){var r=n.apply(e,t);r&&"function"==typeof r.then&&i.push(r)})),Promise.all(i)}list(){return this.hooks}clear(){return this.hooks=[]}}},function(t,e,i){(function(e){var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||Function("return this")()}).call(this,i(30))},function(t,e,i){var n=i(7),r=i(66),o=i(10),s=i(67),a=i(70),l=i(99),c=r("wks"),h=n.Symbol,u=l?h:h&&h.withoutSetter||s;t.exports=function(t){return o(c,t)||(a&&o(h,t)?c[t]=h[t]:c[t]=u("Symbol."+t)),c[t]}},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 o(t,e){for(var i,n="",r=-1,o=0,s=0;s<=t.length;++s){if(s<t.length)i=t.charCodeAt(s);else{if(47===i)break;i=47}if(47===i){if(r===s-1||1===o);else if(r!==s-1&&2===o){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,l=a;l>=0&&47!==n.charCodeAt(l);--l);if(l!==a){n=-1===l?"":n.slice(0,l),r=s,o=0;continue}}else if(2===n.length||1===n.length){n="",r=s,o=0;continue}e&&(n.length>0?n+="/..":n="..")}else n.length>0?n+="/"+t.slice(r+1,s):n=t.slice(r+1,s);r=s,o=0}else 46===i&&-1!==o?++o:o=-1}return n}var s={resolve:function(){for(var t,e="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a;s>=0?a=arguments[s]:(void 0===t&&(t=n.cwd()),a=t),r(a),0!==a.length&&(e=a+"/"+e,i=47===a.charCodeAt(0))}return e=o(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 0!==(t=o(t,!e)).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?".":s.normalize(t)},relative:function(t,e){if(r(t),r(e),t===e)return"";if((t=s.resolve(t))===(e=s.resolve(e)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var n=t.length,o=n-i,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var l=e.length-a,c=o<l?o:l,h=-1,u=0;u<=c;++u){if(u===c){if(l>c){if(47===e.charCodeAt(a+u))return e.slice(a+u+1);if(0===u)return e.slice(a+u)}else o>c&&(47===t.charCodeAt(i+u)?h=u:0===u&&(h=0));break}var d=t.charCodeAt(i+u);if(d!==e.charCodeAt(a+u))break;47===d&&(h=u)}var f="";for(u=i+h+1;u<=n;++u)u!==n&&47!==t.charCodeAt(u)||(0===f.length?f+="..":f+="/..");return f.length>0?f+e.slice(a+h):(a+=h,47===e.charCodeAt(a)&&++a,e.slice(a))},_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,o=!0,s=t.length-1;s>=1;--s)if(47===(e=t.charCodeAt(s))){if(!o){n=s;break}}else o=!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,o=-1,s=!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,l=-1;for(i=t.length-1;i>=0;--i){var c=t.charCodeAt(i);if(47===c){if(!s){n=i+1;break}}else-1===l&&(s=!1,l=i+1),a>=0&&(c===e.charCodeAt(a)?-1==--a&&(o=i):(a=-1,o=l))}return n===o?o=l:-1===o&&(o=t.length),t.slice(n,o)}for(i=t.length-1;i>=0;--i)if(47===t.charCodeAt(i)){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":t.slice(n,o)},extname:function(t){r(t);for(var e=-1,i=0,n=-1,o=!0,s=0,a=t.length-1;a>=0;--a){var l=t.charCodeAt(a);if(47!==l)-1===n&&(o=!1,n=a+1),46===l?-1===e?e=a:1!==s&&(s=1):-1!==e&&(s=-1);else if(!o){i=a+1;break}}return-1===e||-1===n||0===s||1===s&&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 function(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}("/",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),o=47===n;o?(e.root="/",i=1):i=0;for(var s=-1,a=0,l=-1,c=!0,h=t.length-1,u=0;h>=i;--h)if(47!==(n=t.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===n?-1===s?s=h:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){a=h+1;break}return-1===s||-1===l||0===u||1===u&&s===l-1&&s===a+1?-1!==l&&(e.base=e.name=0===a&&o?t.slice(1,l):t.slice(a,l)):(0===a&&o?(e.name=t.slice(1,s),e.base=t.slice(1,l)):(e.name=t.slice(a,s),e.base=t.slice(a,l)),e.ext=t.slice(s,l)),a>0?e.dir=t.slice(0,a-1):o&&(e.dir="/"),e},sep:"/",delimiter:":",posix:null};t.exports=s},function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e,i){"use strict";i.d(e,"a",(function(){return o})),i.d(e,"b",(function(){return s})),i.d(e,"d",(function(){return a})),i.d(e,"c",(function(){return l})),i.d(e,"e",(function(){return c}));i(24);var n=i(0),r=i(5);i(4);function o(t,e){var i,r,o=e.url,s=o.indexOf("://")>-1;t&&(r=Object(n.qs)(t,"head"),(i=Object(n.qs)(r,"base"))||(i=t.createElement("base"),r.insertBefore(i,r.firstChild)),!s&&window&&window.location&&(o=window.location.origin+o),i.setAttribute("href",o))}function s(t,e){var i,r,o=e.canonical;t&&(i=Object(n.qs)(t,"head"),(r=Object(n.qs)(i,"link[rel='canonical']"))?r.setAttribute("href",o):((r=t.createElement("link")).setAttribute("rel","canonical"),r.setAttribute("href",o),i.appendChild(r)))}function a(t,e){var i,r,o=e.idref;t&&(i=Object(n.qs)(t,"head"),(r=Object(n.qs)(i,"link[property='dc.identifier']"))?r.setAttribute("content",o):((r=t.createElement("meta")).setAttribute("name","dc.identifier"),r.setAttribute("content",o),i.appendChild(r)))}function l(t,e){var i=t.querySelectorAll("a[href]");if(i.length)for(var o=Object(n.qs)(t.ownerDocument,"base"),s=o?o.getAttribute("href"):void 0,a=function(t){var i=t.getAttribute("href");if(0!==i.indexOf("mailto:"))if(i.indexOf("://")>-1)t.setAttribute("target","_blank");else{var n;try{n=new r.a(i,s)}catch(t){}t.onclick=function(){return n&&n.hash?e(n.Path.path+n.hash):e(n?n.Path.path:i),!1}}}.bind(this),l=0;l<i.length;l++)a(i[l])}function c(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}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,i){var n=i(17);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,i){var n=i(7),r=i(102),o=i(71),s=i(15),a=i(8),l=a("iterator"),c=a("toStringTag"),h=o.values;for(var u in r){var d=n[u],f=d&&d.prototype;if(f){if(f[l]!==h)try{s(f,l,h)}catch(t){f[l]=h}if(f[c]||s(f,c,u),r[u])for(var p in o)if(f[p]!==o[p])try{s(f,p,o[p])}catch(t){f[p]=o[p]}}}},function(t,e,i){var n=i(16),r=i(18),o=i(25);t.exports=n?function(t,e,i){return r.f(t,e,o(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e,i){var n=i(12);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,i){var n=i(16),r=i(62),o=i(13),s=i(41),a=Object.defineProperty;e.f=n?a:function(t,e,i){if(o(t),e=s(e,!0),o(i),r)try{return a(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},function(t,e,i){var n=i(7),r=i(15),o=i(10),s=i(42),a=i(64),l=i(26),c=l.get,h=l.enforce,u=String(String).split("String");(t.exports=function(t,e,i,a){var l=!!a&&!!a.unsafe,c=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||o(i,"name")||r(i,"name",e),h(i).source=u.join("string"==typeof e?e:"")),t!==n?(l?!d&&t[e]&&(c=!0):delete t[e],c?t[e]=i:r(t,e,i)):c?t[e]=i:s(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||a(this)}))},function(t,e,i){"use strict";i(123);var n,r=i(31),o=i(16),s=i(78),a=i(7),l=i(72),c=i(19),h=i(79),u=i(10),d=i(124),f=i(125),p=i(49).codeAt,g=i(131),m=i(37),v=i(132),y=i(26),b=a.URL,w=v.URLSearchParams,x=v.getState,_=y.set,k=y.getterFor("URL"),E=Math.floor,S=Math.pow,T=/[A-Za-z]/,C=/[\d+-.A-Za-z]/,O=/\d/,A=/^(0x|0X)/,N=/^[0-7]+$/,I=/^\d+$/,R=/^[\dA-Fa-f]+$/,j=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,L=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,z=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,D=/[\u0009\u000A\u000D]/g,P=function(t,e){var i,n,r;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return"Invalid host";if(!(i=M(e.slice(1,-1))))return"Invalid host";t.host=i}else if(Y(t)){if(e=g(e),j.test(e))return"Invalid host";if(null===(i=B(e)))return"Invalid host";t.host=i}else{if(L.test(e))return"Invalid host";for(i="",n=f(e),r=0;r<n.length;r++)i+=H(n[r],q);t.host=i}},B=function(t){var e,i,n,r,o,s,a,l=t.split(".");if(l.length&&""==l[l.length-1]&&l.pop(),(e=l.length)>4)return t;for(i=[],n=0;n<e;n++){if(""==(r=l[n]))return t;if(o=10,r.length>1&&"0"==r.charAt(0)&&(o=A.test(r)?16:8,r=r.slice(8==o?1:2)),""===r)s=0;else{if(!(10==o?I:8==o?N:R).test(r))return t;s=parseInt(r,o)}i.push(s)}for(n=0;n<e;n++)if(s=i[n],n==e-1){if(s>=S(256,5-e))return null}else if(s>255)return null;for(a=i.pop(),n=0;n<i.length;n++)a+=i[n]*S(256,3-n);return a},M=function(t){var e,i,n,r,o,s,a,l=[0,0,0,0,0,0,0,0],c=0,h=null,u=0,d=function(){return t.charAt(u)};if(":"==d()){if(":"!=t.charAt(1))return;u+=2,h=++c}for(;d();){if(8==c)return;if(":"!=d()){for(e=i=0;i<4&&R.test(d());)e=16*e+parseInt(d(),16),u++,i++;if("."==d()){if(0==i)return;if(u-=i,c>6)return;for(n=0;d();){if(r=null,n>0){if(!("."==d()&&n<4))return;u++}if(!O.test(d()))return;for(;O.test(d());){if(o=parseInt(d(),10),null===r)r=o;else{if(0==r)return;r=10*r+o}if(r>255)return;u++}l[c]=256*l[c]+r,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==d()){if(u++,!d())return}else if(d())return;l[c++]=e}else{if(null!==h)return;u++,h=++c}}if(null!==h)for(s=c-h,c=7;0!=c&&s>0;)a=l[c],l[c--]=l[h+s-1],l[h+--s]=a;else if(8!=c)return;return l},F=function(t){var e,i,n,r;if("number"==typeof t){for(e=[],i=0;i<4;i++)e.unshift(t%256),t=E(t/256);return e.join(".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,i=1,n=null,r=0,o=0;o<8;o++)0!==t[o]?(r>i&&(e=n,i=r),n=null,r=0):(null===n&&(n=o),++r);return r>i&&(e=n,i=r),e}(t),i=0;i<8;i++)r&&0===t[i]||(r&&(r=!1),n===i?(e+=i?":":"::",r=!0):(e+=t[i].toString(16),i<7&&(e+=":")));return"["+e+"]"}return t},q={},U=d({},q,{" ":1,'"':1,"<":1,">":1,"`":1}),W=d({},U,{"#":1,"?":1,"{":1,"}":1}),$=d({},W,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),H=function(t,e){var i=p(t,0);return i>32&&i<127&&!u(e,t)?t:encodeURIComponent(t)},X={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Y=function(t){return u(X,t.scheme)},V=function(t){return""!=t.username||""!=t.password},Z=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},G=function(t,e){var i;return 2==t.length&&T.test(t.charAt(0))&&(":"==(i=t.charAt(1))||!e&&"|"==i)},K=function(t){var e;return t.length>1&&G(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},J=function(t){var e=t.path,i=e.length;!i||"file"==t.scheme&&1==i&&G(e[0],!0)||e.pop()},Q=function(t){return"."===t||"%2e"===t.toLowerCase()},tt={},et={},it={},nt={},rt={},ot={},st={},at={},lt={},ct={},ht={},ut={},dt={},ft={},pt={},gt={},mt={},vt={},yt={},bt={},wt={},xt=function(t,e,i,r){var o,s,a,l,c,h=i||tt,d=0,p="",g=!1,m=!1,v=!1;for(i||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(z,"")),e=e.replace(D,""),o=f(e);d<=o.length;){switch(s=o[d],h){case tt:if(!s||!T.test(s)){if(i)return"Invalid scheme";h=it;continue}p+=s.toLowerCase(),h=et;break;case et:if(s&&(C.test(s)||"+"==s||"-"==s||"."==s))p+=s.toLowerCase();else{if(":"!=s){if(i)return"Invalid scheme";p="",h=it,d=0;continue}if(i&&(Y(t)!=u(X,p)||"file"==p&&(V(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=p,i)return void(Y(t)&&X[t.scheme]==t.port&&(t.port=null));p="","file"==t.scheme?h=ft:Y(t)&&r&&r.scheme==t.scheme?h=nt:Y(t)?h=at:"/"==o[d+1]?(h=rt,d++):(t.cannotBeABaseURL=!0,t.path.push(""),h=yt)}break;case it:if(!r||r.cannotBeABaseURL&&"#"!=s)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==s){t.scheme=r.scheme,t.path=r.path.slice(),t.query=r.query,t.fragment="",t.cannotBeABaseURL=!0,h=wt;break}h="file"==r.scheme?ft:ot;continue;case nt:if("/"!=s||"/"!=o[d+1]){h=ot;continue}h=lt,d++;break;case rt:if("/"==s){h=ct;break}h=vt;continue;case ot:if(t.scheme=r.scheme,s==n)t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query=r.query;else if("/"==s||"\\"==s&&Y(t))h=st;else if("?"==s)t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query="",h=bt;else{if("#"!=s){t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.path.pop(),h=vt;continue}t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query=r.query,t.fragment="",h=wt}break;case st:if(!Y(t)||"/"!=s&&"\\"!=s){if("/"!=s){t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,h=vt;continue}h=ct}else h=lt;break;case at:if(h=lt,"/"!=s||"/"!=p.charAt(d+1))continue;d++;break;case lt:if("/"!=s&&"\\"!=s){h=ct;continue}break;case ct:if("@"==s){g&&(p="%40"+p),g=!0,a=f(p);for(var y=0;y<a.length;y++){var b=a[y];if(":"!=b||v){var w=H(b,$);v?t.password+=w:t.username+=w}else v=!0}p=""}else if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&Y(t)){if(g&&""==p)return"Invalid authority";d-=f(p).length+1,p="",h=ht}else p+=s;break;case ht:case ut:if(i&&"file"==t.scheme){h=gt;continue}if(":"!=s||m){if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&Y(t)){if(Y(t)&&""==p)return"Invalid host";if(i&&""==p&&(V(t)||null!==t.port))return;if(l=P(t,p))return l;if(p="",h=mt,i)return;continue}"["==s?m=!0:"]"==s&&(m=!1),p+=s}else{if(""==p)return"Invalid host";if(l=P(t,p))return l;if(p="",h=dt,i==ut)return}break;case dt:if(!O.test(s)){if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&Y(t)||i){if(""!=p){var x=parseInt(p,10);if(x>65535)return"Invalid port";t.port=Y(t)&&x===X[t.scheme]?null:x,p=""}if(i)return;h=mt;continue}return"Invalid port"}p+=s;break;case ft:if(t.scheme="file","/"==s||"\\"==s)h=pt;else{if(!r||"file"!=r.scheme){h=vt;continue}if(s==n)t.host=r.host,t.path=r.path.slice(),t.query=r.query;else if("?"==s)t.host=r.host,t.path=r.path.slice(),t.query="",h=bt;else{if("#"!=s){K(o.slice(d).join(""))||(t.host=r.host,t.path=r.path.slice(),J(t)),h=vt;continue}t.host=r.host,t.path=r.path.slice(),t.query=r.query,t.fragment="",h=wt}}break;case pt:if("/"==s||"\\"==s){h=gt;break}r&&"file"==r.scheme&&!K(o.slice(d).join(""))&&(G(r.path[0],!0)?t.path.push(r.path[0]):t.host=r.host),h=vt;continue;case gt:if(s==n||"/"==s||"\\"==s||"?"==s||"#"==s){if(!i&&G(p))h=vt;else if(""==p){if(t.host="",i)return;h=mt}else{if(l=P(t,p))return l;if("localhost"==t.host&&(t.host=""),i)return;p="",h=mt}continue}p+=s;break;case mt:if(Y(t)){if(h=vt,"/"!=s&&"\\"!=s)continue}else if(i||"?"!=s)if(i||"#"!=s){if(s!=n&&(h=vt,"/"!=s))continue}else t.fragment="",h=wt;else t.query="",h=bt;break;case vt:if(s==n||"/"==s||"\\"==s&&Y(t)||!i&&("?"==s||"#"==s)){if(".."===(c=(c=p).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(J(t),"/"==s||"\\"==s&&Y(t)||t.path.push("")):Q(p)?"/"==s||"\\"==s&&Y(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&G(p)&&(t.host&&(t.host=""),p=p.charAt(0)+":"),t.path.push(p)),p="","file"==t.scheme&&(s==n||"?"==s||"#"==s))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==s?(t.query="",h=bt):"#"==s&&(t.fragment="",h=wt)}else p+=H(s,W);break;case yt:"?"==s?(t.query="",h=bt):"#"==s?(t.fragment="",h=wt):s!=n&&(t.path[0]+=H(s,q));break;case bt:i||"#"!=s?s!=n&&("'"==s&&Y(t)?t.query+="%27":t.query+="#"==s?"%23":H(s,q)):(t.fragment="",h=wt);break;case wt:s!=n&&(t.fragment+=H(s,U))}d++}},_t=function(t){var e,i,n=h(this,_t,"URL"),r=arguments.length>1?arguments[1]:void 0,s=String(t),a=_(n,{type:"URL"});if(void 0!==r)if(r instanceof _t)e=k(r);else if(i=xt(e={},String(r)))throw TypeError(i);if(i=xt(a,s,null,e))throw TypeError(i);var l=a.searchParams=new w,c=x(l);c.updateSearchParams(a.query),c.updateURL=function(){a.query=String(l)||null},o||(n.href=Et.call(n),n.origin=St.call(n),n.protocol=Tt.call(n),n.username=Ct.call(n),n.password=Ot.call(n),n.host=At.call(n),n.hostname=Nt.call(n),n.port=It.call(n),n.pathname=Rt.call(n),n.search=jt.call(n),n.searchParams=Lt.call(n),n.hash=zt.call(n))},kt=_t.prototype,Et=function(){var t=k(this),e=t.scheme,i=t.username,n=t.password,r=t.host,o=t.port,s=t.path,a=t.query,l=t.fragment,c=e+":";return null!==r?(c+="//",V(t)&&(c+=i+(n?":"+n:"")+"@"),c+=F(r),null!==o&&(c+=":"+o)):"file"==e&&(c+="//"),c+=t.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==a&&(c+="?"+a),null!==l&&(c+="#"+l),c},St=function(){var t=k(this),e=t.scheme,i=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&Y(t)?e+"://"+F(t.host)+(null!==i?":"+i:""):"null"},Tt=function(){return k(this).scheme+":"},Ct=function(){return k(this).username},Ot=function(){return k(this).password},At=function(){var t=k(this),e=t.host,i=t.port;return null===e?"":null===i?F(e):F(e)+":"+i},Nt=function(){var t=k(this).host;return null===t?"":F(t)},It=function(){var t=k(this).port;return null===t?"":String(t)},Rt=function(){var t=k(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},jt=function(){var t=k(this).query;return t?"?"+t:""},Lt=function(){return k(this).searchParams},zt=function(){var t=k(this).fragment;return t?"#"+t:""},Dt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(o&&l(kt,{href:Dt(Et,(function(t){var e=k(this),i=String(t),n=xt(e,i);if(n)throw TypeError(n);x(e.searchParams).updateSearchParams(e.query)})),origin:Dt(St),protocol:Dt(Tt,(function(t){var e=k(this);xt(e,String(t)+":",tt)})),username:Dt(Ct,(function(t){var e=k(this),i=f(String(t));if(!Z(e)){e.username="";for(var n=0;n<i.length;n++)e.username+=H(i[n],$)}})),password:Dt(Ot,(function(t){var e=k(this),i=f(String(t));if(!Z(e)){e.password="";for(var n=0;n<i.length;n++)e.password+=H(i[n],$)}})),host:Dt(At,(function(t){var e=k(this);e.cannotBeABaseURL||xt(e,String(t),ht)})),hostname:Dt(Nt,(function(t){var e=k(this);e.cannotBeABaseURL||xt(e,String(t),ut)})),port:Dt(It,(function(t){var e=k(this);Z(e)||(""==(t=String(t))?e.port=null:xt(e,t,dt))})),pathname:Dt(Rt,(function(t){var e=k(this);e.cannotBeABaseURL||(e.path=[],xt(e,t+"",mt))})),search:Dt(jt,(function(t){var e=k(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",xt(e,t,bt)),x(e.searchParams).updateSearchParams(e.query)})),searchParams:Dt(Lt),hash:Dt(zt,(function(t){var e=k(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",xt(e,t,wt)):e.fragment=null}))}),c(kt,"toJSON",(function(){return Et.call(this)}),{enumerable:!0}),c(kt,"toString",(function(){return Et.call(this)}),{enumerable:!0}),b){var Pt=b.createObjectURL,Bt=b.revokeObjectURL;Pt&&c(_t,"createObjectURL",(function(t){return Pt.apply(b,arguments)})),Bt&&c(_t,"revokeObjectURL",(function(t){return Bt.apply(b,arguments)}))}m(_t,"URL"),r({global:!0,forced:!s,sham:!o},{URL:_t})},function(t,e,i){"use strict";var n=i(0);e.a=class{constructor(t){this._q=[],this.context=t,this.tick=n.requestAnimationFrame,this.running=!1,this.paused=!1}enqueue(){var t,e,i=[].shift.call(arguments),r=arguments;if(!i)throw new Error("No Task Provided");return e="function"==typeof i?{task:i,args:r,deferred:t=new n.defer,promise:t.promise}:{promise:i},this._q.push(e),0!=this.paused||this.running||this.run(),e.promise}dequeue(){var t,e,i;return!this._q.length||this.paused?((t=new n.defer).deferred.resolve(),t.promise):(e=(t=this._q.shift()).task)?(i=e.apply(this.context,t.args))&&"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(){for(;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}}},function(t,e,i){"use strict";var n=i(3),r=i.n(n),o=i(0);function s(){var t="reverse",e=function(){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}();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}var a=i(23),l=i(21),c=i(84),h=i.n(c);var u=class{constructor(t){this.settings=t||{},this.id="epubjs-container-"+Object(o.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",s=t.direction;Object(o.extend)(this.settings,t),t.height&&Object(o.isNumber)(t.height)&&(e=t.height+"px"),t.width&&Object(o.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),s&&(a.dir=s,a.style.direction=s),s&&this.settings.fullsize&&(document.body.style.direction=s),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(o.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(o.isNumber)(this.settings.width)&&Object(o.isNumber)(this.settings.height)||(this.resizeFunc=h()(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()).width&&(t=Math.floor(i.width),this.container.style.width=t+"px"):Object(o.isNumber)(t)?this.container.style.width=t+"px":this.container.style.width=t,null===e?(i=i||this.element.getBoundingClientRect()).height&&(e=i.height,this.container.style.height=e+"px"):Object(o.isNumber)(e)?this.container.style.height=e+"px":this.container.style.height=e,Object(o.isNumber)(t)||(t=this.container.clientWidth),Object(o.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 s=Object(o.windowBounds)(),a=window.getComputedStyle(document.body),l=parseFloat(a["padding-left"])||0,c=parseFloat(a["padding-right"])||0,h=parseFloat(a["padding-top"])||0,u=parseFloat(a["padding-bottom"])||0;return n||(t=s.width-l-c),(this.settings.fullsize&&!r||!r)&&(e=s.height-h-u),{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(o.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 d=class{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]).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]).displayed&&e.push(t);return e}show(){for(var t,e=this.length,i=0;i<e;i++)(t=this._views[i]).displayed&&t.show();this.hidden=!1}hide(){for(var t,e=this.length,i=0;i<e;i++)(t=this._views[i]).displayed&&t.hide();this.hidden=!0}},f=i(1);class p{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(o.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}),Object(o.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},this.rendered=!1}render(t,e){let i=t.tagName;void 0!==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=s(),this.stage=new u({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 d(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(){(this.settings.fullsize?window:this.container).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(f.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(o.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(f.c.MANAGERS.RESIZED,{width:this._stageSize.width,height:this._stageSize.height},i))}createView(t,e){return new this.View(t,Object(o.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 o.defer,n=i.promise;(e===t.href||Object(o.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);this.moveTo(t)}return i.resolve(),n}this.clear();let s=!1;return"pre-paginated"===this.layout.name&&2===this.layout.divisor&&t.properties.includes("page-spread-right")&&(s=!0),this.add(t,s).then(function(t){if(e){let i=t.locationOf(e);this.moveTo(i)}}.bind(this),t=>{i.reject(t)}).then(function(){return this.handleNextPrePaginated(s,t,this.add)}.bind(this)).then(function(){this.views.show(),i.resolve()}.bind(this)),n}afterDisplayed(t){this.emit(f.c.MANAGERS.ADDED,t)}afterResized(t){this.emit(f.c.MANAGERS.RESIZE,t.section)}moveTo(t){var e=0,i=0;this.isPaginated?(e=Math.floor(t.left/this.layout.delta)*this.layout.delta)+this.layout.delta>this.container.scrollWidth&&(e=this.container.scrollWidth-this.layout.delta):i=t.top,this.scrollTo(e,i,!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(f.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(f.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(f.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(f.c.VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),i.display(this.request)}prepend(t,e){var i=this.createView(t,e);return i.on(f.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(f.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(f.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;let e=this.settings.direction;if(this.views.length){if(!this.isPaginated||"horizontal"!==this.settings.axis||e&&"ltr"!==e)if(this.isPaginated&&"horizontal"===this.settings.axis&&"rtl"===e)this.scrollLeft=this.container.scrollLeft,"default"===this.settings.rtlScrollType?this.container.scrollLeft>0?this.scrollBy(this.layout.delta,0,!0):t=this.views.last().section.next():this.container.scrollLeft+-1*this.layout.delta>-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,this.container.scrollTop+this.container.offsetHeight<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,this.container.scrollLeft+this.container.offsetWidth+this.layout.delta<=this.container.scrollWidth?this.scrollBy(this.layout.delta,0,!0):t=this.views.last().section.next();if(t){this.clear();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;let e=this.settings.direction;if(this.views.length){if(!this.isPaginated||"horizontal"!==this.settings.axis||e&&"ltr"!==e)if(this.isPaginated&&"horizontal"===this.settings.axis&&"rtl"===e)this.scrollLeft=this.container.scrollLeft,"default"===this.settings.rtlScrollType?this.container.scrollLeft+this.container.offsetWidth<this.container.scrollWidth?this.scrollBy(-this.layout.delta,0,!0):t=this.views.first().section.prev():this.container.scrollLeft<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,this.container.scrollTop>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,this.container.scrollLeft>0?this.scrollBy(-this.layout.delta,0,!0):t=this.views.first().section.prev();if(t){this.clear();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()))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.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,o=(this.settings.direction,0);return this.settings.fullsize&&(o=r?window.scrollY:window.scrollX),t.map(t=>{let s,a,l,c,{index:h,href:u}=t.section,d=t.position(),f=t.width(),p=t.height();r?(s=o+e.top-d.top+0,a=s+i-0,c=this.layout.count(p,i).pages,l=i):(s=o+e.left-d.left+0,a=s+n-0,c=this.layout.count(f,n).pages,l=n);let g=Math.ceil(s/l),m=[],v=Math.ceil(a/l);if("rtl"===this.settings.direction&&!r){let t=g;g=c-v,v=c-t}m=[];for(var y=g;y<=v;y++){let t=y+1;m.push(t)}return{index:h,href:u,pages:m,totalPages:c,mapping:this.mapping.page(t.contents,t.section.cfiBase,s,a)}})}paginatedLocation(){let t=this.visible(),e=this.container.getBoundingClientRect(),i=0,n=0;return this.settings.fullsize&&(i=window.scrollX),t.map(t=>{let r,o,s,a,{index:l,href:c}=t.section,h=t.position(),u=t.width();"rtl"===this.settings.direction?(r=e.right-i,a=Math.min(Math.abs(r-h.left),this.layout.width)-n,s=h.width-(h.right-r)-n,o=s-a):(r=e.left+i,a=Math.min(h.right-r,this.layout.width)-n,o=r-h.left+n,s=o+a),n+=a;let d=this.mapping.page(t.contents,t.section.cfiBase,o,s),f=this.layout.count(u).pages,p=Math.floor(o/this.layout.pageWidth),g=[],m=Math.floor(s/this.layout.pageWidth);if(p<0&&(p=0,m+=1),"rtl"===this.settings.direction){let t=p;p=f-m,m=f-t}for(var v=p+1;v<=m;v++){let t=v;g.push(t)}return{index:l,href:c,pages:g,totalPages:f,mapping:d}})}isVisible(t,e,i,n){var r=t.position(),o=n||this.bounds();return"horizontal"===this.settings.axis&&r.right>o.left-e&&r.left<o.right+i||"vertical"===this.settings.axis&&r.bottom>o.top-e&&r.top<o.bottom+i}visible(){for(var t,e=this.bounds(),i=this.views.displayed(),n=i.length,r=[],o=0;o<n;o++)t=i[o],!0===this.isVisible(t,0,0,e)&&r.push(t);return r}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(f.c.MANAGERS.SCROLL,{top:t,left:e}),clearTimeout(this.afterScrolled),this.afterScrolled=setTimeout(function(){this.emit(f.c.MANAGERS.SCROLLED,{top:this.scrollTop,left:this.scrollLeft})}.bind(this),20))}bounds(){return this.stage.bounds()}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 a.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 a.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()(p.prototype);e.a=p},function(t,e,i){"use strict";var n=i(2),r=i(0);e.a=class{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);return this.rangeListToCfiList(t.section.cfiBase,e)}page(t,e,i,r){var o,s=!(!t||!t.document)&&t.document.body;if(s){if(o=this.rangePairToCfiPair(e,{start:this.findStart(s,i,r),end:this.findEnd(s,i,r)}),!0===this._dev){let e=t.document,i=new n.a(o.start).toRange(e),r=new n.a(o.end).toRange(e),s=e.defaultView.getSelection(),a=e.createRange();s.removeAllRanges(),a.setStart(i.startContainer,i.startOffset),a.setEnd(r.endContainer,r.endOffset),s.addRange(a)}return o}}walk(t,e){if(!t||t.nodeType!==Node.TEXT_NODE){var i=function(t){return t.data.trim().length>0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},n=i;n.acceptNode=i;for(var r,o,s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,n,!1);(r=s.nextNode())&&!(o=e(r)););return o}}findRanges(t){for(var e,i,n=[],r=t.contents.scrollWidth(),o=Math.ceil(r/this.layout.spreadWidth)*this.layout.divisor,s=this.layout.columnWidth,a=this.layout.gap,l=0;l<o.pages;l++)e=(s+a)*l,i=s*(l+1)+a*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){for(var n,o,s=[t],a=t;s.length;)if(n=s.shift(),o=this.walk(n,t=>{var n,o,l,c,h;if(h=Object(r.nodeBounds)(t),this.horizontal&&"ltr"===this.direction){if(n=this.horizontal?h.left:h.top,o=this.horizontal?h.right:h.bottom,n>=e&&n<=i)return t;if(o>e)return t;a=t,s.push(t)}else if(this.horizontal&&"rtl"===this.direction){if(n=h.left,(o=h.right)<=i&&o>=e)return t;if(n<i)return t;a=t,s.push(t)}else{if(l=h.top,c=h.bottom,l>=e&&l<=i)return t;if(c>e)return t;a=t,s.push(t)}}))return this.findTextStartRange(o,e,i);return this.findTextStartRange(a,e,i)}findEnd(t,e,i){for(var n,o,s=[t],a=t;s.length;)if(n=s.shift(),o=this.walk(n,t=>{var n,o,l,c,h;if(h=Object(r.nodeBounds)(t),this.horizontal&&"ltr"===this.direction){if(n=Math.round(h.left),o=Math.round(h.right),n>i&&a)return a;if(o>i)return t;a=t,s.push(t)}else if(this.horizontal&&"rtl"===this.direction){if(n=Math.round(this.horizontal?h.left:h.top),(o=Math.round(this.horizontal?h.right:h.bottom))<e&&a)return a;if(n<e)return t;a=t,s.push(t)}else{if(l=Math.round(h.top),c=Math.round(h.bottom),l>i&&a)return a;if(c>i)return t;a=t,s.push(t)}}))return this.findTextEndRange(o,e,i);return this.findTextEndRange(a,e,i)}findTextStartRange(t,e,i){for(var n,r,o=this.splitTextNodeIntoRanges(t),s=0;s<o.length;s++)if(r=(n=o[s]).getBoundingClientRect(),this.horizontal&&"ltr"===this.direction){if(r.left>=e)return n}else if(this.horizontal&&"rtl"===this.direction){if(r.right<=i)return n}else if(r.top>=e)return n;return o[0]}findTextEndRange(t,e,i){for(var n,r,o,s,a,l,c,h=this.splitTextNodeIntoRanges(t),u=0;u<h.length;u++){if(o=(r=h[u]).getBoundingClientRect(),this.horizontal&&"ltr"===this.direction){if(s=o.left,a=o.right,s>i&&n)return n;if(a>i)return r}else if(this.horizontal&&"rtl"===this.direction){if(s=o.left,(a=o.right)<e&&n)return n;if(s<e)return r}else{if(l=o.top,c=o.bottom,l>i&&n)return n;if(c>i)return r}n=r}return h[h.length-1]}splitTextNodeIntoRanges(t,e){var i,n=[],r=(t.textContent||"").trim(),o=t.ownerDocument,s=e||" ",a=r.indexOf(s);if(-1===a||t.nodeType!=Node.TEXT_NODE)return(i=o.createRange()).selectNodeContents(t),[i];for((i=o.createRange()).setStart(t,0),i.setEnd(t,a),n.push(i),i=!1;-1!=a;)(a=r.indexOf(s,a+1))>0&&(i&&(i.setEnd(t,a),n.push(i)),(i=o.createRange()).setStart(t,a+1));return i&&(i.setEnd(t,r.length),n.push(i)),n}rangePairToCfiPair(t,e){var i=e.start,r=e.end;return i.collapse(!0),r.collapse(!1),{start:new n.a(i,t).toString(),end:new n.a(r,t).toString()}}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}}},function(t,e,i){"use strict";var n=i(87),r=i(13),o=i(36),s=i(46),a=i(35),l=i(33),c=i(100),h=i(101),u=Math.max,d=Math.min,f=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,g=/\$([$&'`]|\d\d?)/g;n("replace",2,(function(t,e,i,n){var m=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=n.REPLACE_KEEPS_$0,y=m?"$":"$0";return[function(i,n){var r=l(this),o=null==i?void 0:i[t];return void 0!==o?o.call(i,r,n):e.call(String(r),i,n)},function(t,n){if(!m&&v||"string"==typeof n&&-1===n.indexOf(y)){var o=i(e,t,this,n);if(o.done)return o.value}var l=r(t),f=String(this),p="function"==typeof n;p||(n=String(n));var g=l.global;if(g){var w=l.unicode;l.lastIndex=0}for(var x=[];;){var _=h(l,f);if(null===_)break;if(x.push(_),!g)break;""===String(_[0])&&(l.lastIndex=c(f,s(l.lastIndex),w))}for(var k,E="",S=0,T=0;T<x.length;T++){_=x[T];for(var C=String(_[0]),O=u(d(a(_.index),f.length),0),A=[],N=1;N<_.length;N++)A.push(void 0===(k=_[N])?k:String(k));var I=_.groups;if(p){var R=[C].concat(A,O,f);void 0!==I&&R.push(I);var j=String(n.apply(void 0,R))}else j=b(C,f,O,A,I,n);O>=S&&(E+=f.slice(S,O)+j,S=O+C.length)}return E+f.slice(S)}];function b(t,i,n,r,s,a){var l=n+t.length,c=r.length,h=g;return void 0!==s&&(s=o(s),h=p),e.call(a,h,(function(e,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return i.slice(0,n);case"'":return i.slice(l);case"<":a=s[o.slice(1,-1)];break;default:var h=+o;if(0===h)return e;if(h>c){var u=f(h/10);return 0===u?e:u<=c?void 0===r[u-1]?o.charAt(1):r[u-1]+o.charAt(1):e}a=r[h-1]}return void 0===a?"":a}))}}))},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,i){var n,r,o,s=i(89),a=i(7),l=i(17),c=i(15),h=i(10),u=i(43),d=i(44),f=a.WeakMap;if(s){var p=new f,g=p.get,m=p.has,v=p.set;n=function(t,e){return v.call(p,t,e),e},r=function(t){return g.call(p,t)||{}},o=function(t){return m.call(p,t)}}else{var y=u("state");d[y]=!0,n=function(t,e){return c(t,y,e),e},r=function(t){return h(t,y)?t[y]:{}},o=function(t){return h(t,y)}}t.exports={set:n,get:r,has:o,enforce:function(t){return o(t)?r(t):n(t,{})},getterFor:function(t){return function(e){var i;if(!l(e)||(i=r(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}}},function(t,e){t.exports={}},function(t,e,i){"use strict";var n=i(3),r=i.n(n),o=i(0),s=i(2),a=i(23),l=i(11),c=i(1);const h="undefined"!=typeof navigator,u=h&&/Chrome/.test(navigator.userAgent),d=h&&!u&&/AppleWebKit/.test(navigator.userAgent);class f{constructor(t,e,i,n){this.epubcfi=new s.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",c.b),this.called=0,this.active=!0,this.listeners()}static get listenedEvents(){return c.a}width(t){var e=this.content;return t&&Object(o.isNumber)(t)&&(t+="px"),t&&(e.style.width=t),parseInt(this.window.getComputedStyle(e).width)}height(t){var e=this.content;return t&&Object(o.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(o.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(o.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(o.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(){return this.documentElement.scrollWidth}scrollHeight(){return this.documentElement.scrollHeight}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,i=this.document.querySelector("meta[name='viewport']"),n={width:void 0,height:void 0,scale:void 0,minimum:void 0,maximum:void 0,scalable:void 0},r=[];if(i&&i.hasAttribute("content")){let t=i.getAttribute("content"),e=t.match(/width\s*=\s*([^,]*)/),r=t.match(/height\s*=\s*([^,]*)/),o=t.match(/initial-scale\s*=\s*([^,]*)/),s=t.match(/minimum-scale\s*=\s*([^,]*)/),a=t.match(/maximum-scale\s*=\s*([^,]*)/),l=t.match(/user-scalable\s*=\s*([^,]*)/);e&&e.length&&void 0!==e[1]&&(n.width=e[1]),r&&r.length&&void 0!==r[1]&&(n.height=r[1]),o&&o.length&&void 0!==o[1]&&(n.scale=o[1]),s&&s.length&&void 0!==s[1]&&(n.minimum=s[1]),a&&a.length&&void 0!==a[1]&&(n.maximum=a[1]),l&&l.length&&void 0!==l[1]&&(n.scalable=l[1])}return e=Object(o.defaults)(t||{},n),t&&(e.width&&r.push("width="+e.width),e.height&&r.push("height="+e.height),e.scale&&r.push("initial-scale="+e.scale),"no"===e.scalable?(r.push("minimum-scale="+e.scale),r.push("maximum-scale="+e.scale),r.push("user-scalable="+e.scalable)):(e.scalable&&r.push("user-scalable="+e.scalable),e.minimum&&r.push("minimum-scale="+e.minimum),e.maximum&&r.push("minimum-scale="+e.maximum)),i||((i=this.document.createElement("meta")).setAttribute("name","viewport"),this.document.querySelector("head").appendChild(i)),i.setAttribute("content",r.join(", ")),this.window.scrollTo(0,0)),e}expand(){this.emit(c.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(c.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(t){return}if(!n)return;for(var r=0;r<n.length;r+=1){if(n[r].media)this.window.matchMedia(n[r].media.mediaText).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()});this.observer.observe(this.document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}imageLoadListeners(){for(var t,e=this.document.querySelectorAll("img"),i=0;i<e.length;i++)void 0!==(t=e[i]).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 r=new s.a(t).toRange(this.document,e);if(r){try{if(!r.endContainer||r.startContainer==r.endContainer&&r.startOffset==r.endOffset){let t=r.startContainer.textContent.indexOf(" ",r.startOffset);-1==t&&(t=r.startContainer.textContent.length),r.setEnd(r.startContainer,t)}}catch(t){console.error("setting end offset to start container length failed",t)}if(r.startContainer.nodeType===Node.ELEMENT_NODE)i=r.startContainer.getBoundingClientRect(),n.left=i.left,n.top=i.top;else if(d){let t=r.startContainer,e=new Range;try{1===t.nodeType?i=t.getBoundingClientRect():r.startOffset+2<t.length?(e.setStart(t,r.startOffset),e.setEnd(t,r.startOffset+2),i=e.getBoundingClientRect()):r.startOffset-2>0?(e.setStart(t,r.startOffset-2),e.setEnd(t,r.startOffset),i=e.getBoundingClientRect()):i=t.parentNode.getBoundingClientRect()}catch(t){console.error(t,t.stack)}}else i=r.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+"']"))?e(!0):((n=this.document.createElement("link")).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=this.document.createElement("style")).id=t,this.document.head.appendChild(e)),e)}addStylesheetCss(t,e){return!(!this.document||!t)&&(this._getStylesheetNode(e).innerHTML=t,!0)}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 o=1,s=t[n],a=t[n][0],l="";"[object Array]"===Object.prototype.toString.call(s[1][0])&&(s=s[1],o=0);for(var c=s.length;o<c;o++){var h=s[o];l+=h[0]+":"+h[1]+(h[2]?" !important":"")+";\n"}i.insertRule(a+"{"+l+"}",i.cssRules.length)}else{Object.keys(t).forEach(e=>{const n=t[e];if(Array.isArray(n))n.forEach(t=>{const n=Object.keys(t).map(e=>`${e}:${t[e]}`).join(";");i.insertRule(`${e}{${n}}`,i.cssRules.length)});else{const t=Object.keys(n).map(t=>`${t}:${n[t]}`).join(";");i.insertRule(`${e}{${t}}`,i.cssRules.length)}})}}addScript(t){return new Promise(function(e,i){var n,r=!1;this.document?((n=this.document.createElement("script")).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.classList.add(t)}removeClass(t){var e;this.document&&(e=this.content||this.document.body)&&e.classList.remove(t)}addEventListeners(){this.document&&(this._triggerEvent=this.triggerEvent.bind(this),c.a.forEach((function(t){this.document.addEventListener(t,this._triggerEvent,{passive:!0})}),this))}removeEventListeners(){this.document&&(c.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)).collapsed||(i=new s.a(e,this.cfiBase).toString(),this.emit(c.c.CONTENTS.SELECTED,i),this.emit(c.c.CONTENTS.SELECTED_RANGE,e)))}range(t,e){return new s.a(t).toRange(this.document,e)}cfiFromRange(t,e){return new s.a(t,this.cfiBase,e).toString()}cfiFromNode(t,e){return new s.a(t,this.cfiBase,e).toString()}map(t){return new a.a(t).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 s=Object(o.prefixed)("column-axis"),a=Object(o.prefixed)("column-gap"),l=Object(o.prefixed)("column-width"),c=Object(o.prefixed)("column-fill"),h=0===this.writingMode().indexOf("vertical")?"vertical":"horizontal";this.layoutStyle("paginated"),"rtl"===r&&"horizontal"===h&&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"===h?(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(s,"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(s,"horizontal")),this.css("box-sizing","border-box"),this.css("max-width","inherit"),this.css(c,"auto"),this.css(a,n+"px"),this.css(l,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),o=parseInt(n.height),s=t/r,a=e/o,l=s<a?s:a;if(this.layoutStyle("paginated"),this.width(r),this.height(o),this.overflow("hidden"),this.scaler(l,0,0),this.css("background-size",r*l+"px "+o*l+"px"),this.css("background-color","transparent"),i&&i.properties.includes("page-spread-left")){var c=t-r*l;this.css("margin-left",c+"px")}}direction(t){this.documentElement&&(this.documentElement.style.direction=t)}mapPage(t,e,i,n,r){return new a.a(e,r).page(this,t,i,n)}linksHandler(){Object(l.c)(this.content,t=>{this.emit(c.c.CONTENTS.LINK_CLICKED,t)})}writingMode(t){let e=Object(o.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":case"layout-changes":case"touch-events":case"mouse-events":case"keyboard-events":return!0;case"spine-scripting":default:return!1}}},navigator.epubReadingSystem}destroy(){this.removeListeners()}}r()(f.prototype),e.a=f},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(){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}}(),r=s(i(135)),o=s(i(136));function s(t){return t&&t.__esModule?t:{default:t}}function a(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 l(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 c(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;c(this,t),this.target=e,this.element=r.default.createElement("svg"),this.marks=[],this.element.style.position="absolute",this.element.setAttribute("pointer-events","none"),o.default.proxyMouse(this.target,this.marks),this.container=i,this.container.appendChild(this.element),this.render()}return n(t,[{key:"addMark",value:function(t){var e=r.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(){var t,e,i,n;!function(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")}(this.element,(t=this.target,e=this.container,i=e.getBoundingClientRect(),n=t.getBoundingClientRect(),{top:n.top-i.top,left:n.left-i.left,height:t.scrollHeight,width:t.scrollWidth}));var r=!0,o=!1,s=void 0;try{for(var a,l=this.marks[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){a.value.render()}}catch(t){o=!0,s=t}finally{try{!r&&l.return&&l.return()}finally{if(o)throw s}}}}]),t}();var h=e.Mark=function(){function t(){c(this,t),this.element=null}return n(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(){for(var t=[],e=this.element.firstChild;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;if(n=t[i],(r=e).right<=n.right&&r.left>=n.left&&r.top>=n.top&&r.bottom<=n.bottom)return!1}var n,r;return!0}))}}]),t}(),u=e.Highlight=function(t){function e(t,i,n,r){c(this,e);var o=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return o.range=t,o.className=i,o.data=n||{},o.attributes=r||{},o}return l(e,t),n(e,[{key:"bind",value:function(t,i){for(var n in function t(e,i,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,i);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,n)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(n):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"bind",this).call(this,t,i),this.data)this.data.hasOwnProperty(n)&&(this.element.dataset[n]=this.data[n]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&this.element.setAttribute(n,this.attributes[n]);this.className&&this.element.classList.add(this.className)}},{key:"render",value:function(){for(;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(),o=0,s=e.length;o<s;o++){var a=e[o],l=r.default.createElement("rect");l.setAttribute("x",a.left-i.left+n.left),l.setAttribute("y",a.top-i.top+n.top),l.setAttribute("height",a.height),l.setAttribute("width",a.width),t.appendChild(l)}this.element.appendChild(t)}}]),e}(h);e.Underline=function(t){function e(t,i,n,r){return c(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,i,n,r))}return l(e,t),n(e,[{key:"render",value:function(){for(;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(),o=0,s=e.length;o<s;o++){var a=e[o],l=r.default.createElement("rect");l.setAttribute("x",a.left-i.left+n.left),l.setAttribute("y",a.top-i.top+n.top),l.setAttribute("height",a.height),l.setAttribute("width",a.width),l.setAttribute("fill","none");var c=r.default.createElement("line");c.setAttribute("x1",a.left-i.left+n.left),c.setAttribute("x2",a.left-i.left+n.left+a.width),c.setAttribute("y1",a.top-i.top+n.top+a.height-1),c.setAttribute("y2",a.top-i.top+n.top+a.height-1),c.setAttribute("stroke-width",1),c.setAttribute("stroke","black"),c.setAttribute("stroke-linecap","square"),t.appendChild(l),t.appendChild(c)}this.element.appendChild(t)}}]),e}(u)},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){var n=i(7),r=i(59).f,o=i(15),s=i(19),a=i(42),l=i(90),c=i(96);t.exports=function(t,e){var i,h,u,d,f,p=t.target,g=t.global,m=t.stat;if(i=g?n:m?n[p]||a(p,{}):(n[p]||{}).prototype)for(h in e){if(d=e[h],u=t.noTargetGet?(f=r(i,h))&&f.value:i[h],!c(g?h:p+(m?".":"#")+h,t.forced)&&void 0!==u){if(typeof d==typeof u)continue;l(d,u)}(t.sham||u&&u.sham)&&o(d,"sham",!0),s(i,h,d,t)}}},function(t,e,i){var n=i(61),r=i(33);t.exports=function(t){return n(r(t))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!1},function(t,e){var i=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:i)(t)}},function(t,e,i){var n=i(33);t.exports=function(t){return Object(n(t))}},function(t,e,i){var n=i(18).f,r=i(10),o=i(8)("toStringTag");t.exports=function(t,e,i){t&&!r(t=i?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},function(e,i){e.exports=t},function(t,e,i){"use strict";var n=i(3),r=i.n(n),o=i(0),s=i(6),a=i(2),l=i(21),c=i(1);class h{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 void 0!==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,o,s,a=1,l=i||0,c=t,h=e,u=Math.floor(c/12);a=this._spread&&c>=this._minSpreadWidth?2:1,"reflowable"!==this.name||"paginated"!==this._flow||i>=0||(l=u%2==0?u:u-1),"pre-paginated"===this.name&&(l=0),a>1?o=(n=c/a-l)+l:(n=c,o=c),"pre-paginated"===this.name&&a>1&&(c=n),r=n*a+l,s=c,this.width=c,this.height=h,this.spreadWidth=r,this.pageWidth=o,this.delta=s,this.columnWidth=n,this.gap=l,this.divisor=a,this.update({width:c,height:h,spreadWidth:r,pageWidth:o,delta:s,columnWidth:n,gap:l,divisor:a})}format(t,e,i){return"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)}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(o.extend)(this.props,t);this.emit(c.c.LAYOUT.UPDATED,e,t)}}}r()(h.prototype);var u=h,d=i(5);var f=class{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 d.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=this._current;this._current=t,this.update(t),this.rendition.getContents().forEach(i=>{i.removeClass(e),i.addClass(t)})}update(t){this.rendition.getContents().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]).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}};i(28);class p{constructor({type:t,cfiRange:e,data:i,sectionIndex:n,cb:r,className:o,styles:s}){this.type=t,this.cfiRange=e,this.data=i,this.sectionIndex=n,this.mark=void 0,this.cb=r,this.className=o,this.styles=s}update(t){this.data=t}attach(t){let e,{cfiRange:i,data:n,type:r,mark:o,cb:s,className:a,styles:l}=this;return"highlight"===r?e=t.highlight(i,n,s,a,l):"underline"===r?e=t.underline(i,n,s,a,l):"mark"===r&&(e=t.mark(i,n,s)),this.mark=e,this.emit(c.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(c.c.ANNOTATION.DETACH,e),e}text(){}}r()(p.prototype);var g=class{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,o){let s=encodeURI(e+t),l=new a.a(e).spinePos,c=new p({type:t,cfiRange:e,data:i,sectionIndex:l,cb:n,className:r,styles:o});return this._annotations[s]=c,l in this._annotationsBySectionIndex?this._annotationsBySectionIndex[l].push(s):this._annotationsBySectionIndex[l]=[s],this.rendition.views().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;this.rendition.views().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){this._annotationsBySectionIndex[e].forEach(e=>{this._annotations[e].attach(t)})}}clear(t){let e=t.index;if(e in this._annotationsBySectionIndex){this._annotationsBySectionIndex[e].forEach(e=>{this._annotations[e].detach(t)})}}show(){}hide(){}},m=i(54),v=i(22),y=i(56);class b{constructor(t,e){this.settings=Object(o.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"}),Object(o.extend)(this.settings,e),"object"==typeof this.settings.manager&&(this.manager=this.settings.manager),this.book=t,this.hooks={},this.hooks.display=new s.a(this),this.hooks.serialize=new s.a(this),this.hooks.content=new s.a(this),this.hooks.unloaded=new s.a(this),this.hooks.layout=new s.a(this),this.hooks.render=new s.a(this),this.hooks.show=new s.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 f(this),this.annotations=new g(this),this.epubcfi=new a.a,this.q=new l.a(this),this.location=void 0,this.q.enqueue(this.book.opened),this.starting=new o.defer,this.started=this.starting.promise,this.q.enqueue(this.start)}setManager(t){this.manager=t}requireManager(t){return"string"==typeof t&&"default"===t?v.a:"string"==typeof t&&"continuous"===t?y.a:t}requireView(t){return"string"==typeof t&&"iframe"===t?m.a:t}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}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(c.c.MANAGERS.ADDED,this.afterDisplayed.bind(this)),this.manager.on(c.c.MANAGERS.REMOVED,this.afterRemoved.bind(this)),this.manager.on(c.c.MANAGERS.RESIZED,this.onResized.bind(this)),this.manager.on(c.c.MANAGERS.ORIENTATION_CHANGE,this.onOrientationChange.bind(this)),this.manager.on(c.c.MANAGERS.SCROLLED,this.reportLocation.bind(this)),this.emit(c.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(c.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 o.defer,n=i.promise;return this.displaying=i,this.book.locations.length()&&Object(o.isFloat)(t)&&(t=this.book.locations.cfiFromPercentage(parseFloat(t))),(e=this.book.spine.get(t))?(this.manager.display(e,t).then(()=>{i.resolve(e),this.displaying=void 0,this.emit(c.c.RENDITION.DISPLAYED,e),this.reportLocation()},t=>{this.emit(c.c.RENDITION.DISPLAY_ERROR,t)}),n):(i.reject(new Error("No Section Found")),n)}}afterDisplayed(t){t.on(c.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(c.c.RENDITION.RENDERED,t.section,t)}):this.emit(c.c.RENDITION.RENDERED,t.section,t)})}afterRemoved(t){this.hooks.unloaded.trigger(t,this).then(()=>{this.emit(c.c.RENDITION.REMOVED,t.section,t)})}onResized(t,e){this.emit(c.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(c.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=this.settings.layout||t.layout||"reflowable",i=this.settings.spread||t.spread||"auto",n=this.settings.orientation||t.orientation||"auto",r=this.settings.flow||t.flow||"auto",o=t.viewport||"",s=this.settings.minSpreadWidth||t.minSpreadWidth||800,a=this.settings.direction||t.direction||"ltr";return(0===this.settings.width||this.settings.width>0)&&(0===this.settings.height||this.settings.height),{layout:e,spread:i,orientation:n,flow:r,viewport:o,minSpreadWidth:s,direction:a}}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 u(t),this._layout.spread(t.spread,this.settings.minSpreadWidth),this._layout.on(c.c.LAYOUT.UPDATED,(t,e)=>{this.emit(c.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(c.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(c.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(c.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(c.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){return this.located(t)}.bind(this));else if(t){return this.located(t)}}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),o=this.book.locations.locationFromCfi(i.mapping.end);null!=r&&(n.start.location=r,n.start.percentage=this.book.locations.percentageFromLocation(r)),null!=o&&(n.end.location=o,n.end.percentage=this.book.locations.percentageFromLocation(o));let s=this.book.pageList.pageFromCfi(e.mapping.start),a=this.book.pageList.pageFromCfi(i.mapping.end);return-1!=s&&(n.start.page=s),-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){c.a.forEach(e=>{t.on(e,e=>this.triggerViewEvent(e,t))}),t.on(c.c.CONTENTS.SELECTED,e=>this.triggerSelectedEvent(e,t))}triggerViewEvent(t,e){this.emit(t.type,t,e)}triggerSelectedEvent(t,e){this.emit(c.c.RENDITION.SELECTED,t,e)}triggerMarkEvent(t,e,i){this.emit(c.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(){return(this.manager?this.manager.views:void 0)||[]}handleLinks(t){t&&t.on(c.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},function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},function(t,e,i){var n=i(17);t.exports=function(t,e){if(!n(t))return t;var i,r;if(e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!n(r=i.call(t)))return r;if(!e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e,i){var n=i(7),r=i(15);t.exports=function(t,e){try{r(n,t,e)}catch(i){n[t]=e}return e}},function(t,e,i){var n=i(66),r=i(67),o=n("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},function(t,e){t.exports={}},function(t,e,i){var n=i(92),r=i(7),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t])||o(r[t]):n[t]&&n[t][e]||r[t]&&r[t][e]}},function(t,e,i){var n=i(35),r=Math.min;t.exports=function(t){return t>0?r(n(t),9007199254740991):0}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,i){"use strict";var n,r,o=i(97),s=i(98),a=RegExp.prototype.exec,l=String.prototype.replace,c=a,h=(n=/a/,r=/b*/g,a.call(n,"a"),a.call(r,"a"),0!==n.lastIndex||0!==r.lastIndex),u=s.UNSUPPORTED_Y||s.BROKEN_CARET,d=void 0!==/()??/.exec("")[1];(h||d||u)&&(c=function(t){var e,i,n,r,s=this,c=u&&s.sticky,f=o.call(s),p=s.source,g=0,m=t;return c&&(-1===(f=f.replace("y","")).indexOf("g")&&(f+="g"),m=String(t).slice(s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==t[s.lastIndex-1])&&(p="(?: "+p+")",m=" "+m,g++),i=new RegExp("^(?:"+p+")",f)),d&&(i=new RegExp("^"+p+"$(?!\\s)",f)),h&&(e=s.lastIndex),n=a.call(c?i:s,m),c?n?(n.input=n.input.slice(g),n[0]=n[0].slice(g),n.index=s.lastIndex,s.lastIndex+=n[0].length):s.lastIndex=0:h&&n&&(s.lastIndex=s.global?n.index+n[0].length:e),d&&n&&n.length>1&&l.call(n[0],i,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(n[r]=void 0)})),n}),t.exports=c},function(t,e,i){var n=i(35),r=i(33),o=function(t){return function(e,i){var o,s,a=String(r(e)),l=n(i),c=a.length;return l<0||l>=c?t?"":void 0:(o=a.charCodeAt(l))<55296||o>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?t?a.charAt(l):o:t?a.slice(l,l+2):s-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},function(t,e,i){var n,r=i(13),o=i(72),s=i(47),a=i(44),l=i(104),c=i(63),h=i(43),u=h("IE_PROTO"),d=function(){},f=function(t){return"<script>"+t+"<\/script>"},p=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;p=n?function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e}(n):((e=c("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F);for(var i=s.length;i--;)delete p.prototype[s[i]];return p()};a[u]=!0,t.exports=Object.create||function(t,e){var i;return null!==t?(d.prototype=r(t),i=new d,d.prototype=null,i[u]=t):i=p(),void 0===e?i:o(i,e)}},function(t,e,i){"use strict";var n=i(115)();t.exports=function(t){return t!==n&&null!==t}},function(t,e,i){var n=i(81),r=i(27),o=i(8)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||r[n(t)]}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,i){"use strict";var n=i(3),r=i.n(n),o=i(0),s=i(2),a=i(28),l=i(1),c=i(29);class h{constructor(t,e){this.settings=Object(o.extend)({ignoreClass:"",axis:void 0,direction:void 0,width:0,height:0,layout:void 0,globalLayoutProperties:{},method:void 0,forceRight:!1},e||{}),this.id="epubjs-view-"+Object(o.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 s.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.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(o.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(l.c.VIEWS.AXIS,t),this.setWritingMode(e),this.emit(l.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(l.c.VIEWS.LOAD_ERROR,t),new Promise((e,i)=>{i(t)})}.bind(this)).then(function(){this.emit(l.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(o.borders)(this.element);n=this.iframe?Object(o.borders)(this.iframe):{width:0,height:0},"width"==t&&Object(o.isNumber)(e)&&(this.lockedWidth=e-r.width-n.width),"height"==t&&Object(o.isNumber)(i)&&(this.lockedHeight=i-r.height-n.height),"both"===t&&Object(o.isNumber)(e)&&Object(o.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())%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(o.isNumber)(t)&&(this.element.style.width=t+"px",this.iframe.style.width=t+"px",this._width=t),Object(o.isNumber)(e)&&(this.element.style.height=e+"px",this.iframe.style.height=e+"px",this._height=e),i={width:t,height:e,widthDelta:this.prevBounds?t-this.prevBounds.width:t,heightDelta:this.prevBounds?e-this.prevBounds.height:e},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(l.c.VIEWS.RESIZED,i),this.prevBounds=i,this.elementBounds=Object(o.bounds)(this.element)}load(t){var e=new o.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(o.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")).setAttribute("rel","canonical"),i.setAttribute("href",this.section.canonical),this.document.querySelector("head").appendChild(i)),this.contents.on(l.c.CONTENTS.EXPAND,()=>{this.displayed&&this.iframe&&(this.expand(),this.contents&&this.layout.format(this.contents))}),this.contents.on(l.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 o.defer;return this.displayed?e.resolve(this):this.render(t).then(function(){this.emit(l.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(l.c.VIEWS.SHOWN,this)}hide(){this.element.style.visibility="hidden",this.iframe.style.visibility="hidden",this.stopExpanding=!0,this.emit(l.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(o.bounds)(this.element)),this.elementBounds}highlight(t,e={},i,n="epubjs-hl",r={}){if(!this.contents)return;const o=Object.assign({fill:"yellow","fill-opacity":"0.3","mix-blend-mode":"multiply"},r);let s=this.contents.range(t),a=()=>{this.emit(l.c.VIEWS.MARK_CLICKED,t,e)};e.epubcfi=t,this.pane||(this.pane=new c.Pane(this.iframe,this.element));let h=new c.Highlight(s,n,e,o),u=this.pane.addMark(h);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 o=Object.assign({stroke:"black","stroke-opacity":"0.3","mix-blend-mode":"multiply"},r);let s=this.contents.range(t),a=()=>{this.emit(l.c.VIEWS.MARK_CLICKED,t,e)};e.epubcfi=t,this.pane||(this.pane=new c.Pane(this.iframe,this.element));let h=new c.Underline(s,n,e,o),u=this.pane.addMark(h);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){return this.marks[t]}let n=this.contents.range(t);if(!n)return;let r=n.commonAncestorContainer,o=1===r.nodeType?r:r.parentNode,s=i=>{this.emit(l.c.VIEWS.MARK_CLICKED,t,e)};n.collapsed&&1===r.nodeType?(n=new Range,n.selectNodeContents(r)):n.collapsed&&(n=new Range,n.selectNodeContents(o));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",s),a.addEventListener("touchstart",s),this.placeMark(a,n),this.element.appendChild(a),this.marks[t]={element:a,range:n,listeners:[s,i]},o}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,s=e.getClientRects();for(var o=0;o!=s.length;o++)t=s[o],(!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(o.revokeBlobUrl)(this.blobUrl),this.displayed&&(this.displayed=!1,this.removeListeners(),this.contents.destroy(),this.stopExpanding=!0,this.element.removeChild(this.iframe),this.iframe=void 0,this.contents=void 0,this._textWidth=null,this._textHeight=null,this._width=null,this._height=null)}}r()(h.prototype),e.a=h},function(t,e,i){var n=i(53),r=i(137),o=i(139),s=Math.max,a=Math.min;t.exports=function(t,e,i){var l,c,h,u,d,f,p=0,g=!1,m=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var i=l,n=c;return l=c=void 0,p=e,u=t.apply(n,i)}function b(t){return p=t,d=setTimeout(x,e),g?y(t):u}function w(t){var i=t-f;return void 0===f||i>=e||i<0||m&&t-p>=h}function x(){var t=r();if(w(t))return _(t);d=setTimeout(x,function(t){var i=e-(t-f);return m?a(i,h-(t-p)):i}(t))}function _(t){return d=void 0,v&&l?y(t):(l=c=void 0,u)}function k(){var t=r(),i=w(t);if(l=arguments,c=this,f=t,i){if(void 0===d)return b(f);if(m)return clearTimeout(d),d=setTimeout(x,e),y(f)}return void 0===d&&(d=setTimeout(x,e)),u}return e=o(e)||0,n(i)&&(g=!!i.leading,h=(m="maxWait"in i)?s(o(i.maxWait)||0,e):h,v="trailing"in i?!!i.trailing:v),k.cancel=function(){void 0!==d&&clearTimeout(d),p=0,l=f=c=d=void 0},k.flush=function(){return void 0===d?u:_(r())},k}},function(t,e,i){"use strict";i(14);var n=i(0),r=i(22),o=i(1),s=i(3),a=i.n(s);const l=Math.PI/2,c={easeOutSine:function(t){return Math.sin(t*l)},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 h{constructor(t,e){this.settings=Object(n.extend)({duration:80,minVelocity:.2,minDistance:10,easing:c.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(o.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(o.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=e/(this.endTime-this.startTime),r=this.settings.minVelocity;return i<=this.settings.minDistance||i>=t?0:n>r?-1:n<-r?1:void 0}needsSnap(){return this.scrollLeft%(this.layout.pageWidth*this.layout.divisor)!=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(),o=this.settings.duration,s=this.settings.easing;return this.snapping=!0,function n(){const a=this.now(),l=Math.min(1,(a-r)/o);if(s(l),this.touchCanceler||this.resizeCanceler)return this.resizeCanceler=!1,this.snapping=!1,void e.resolve();l<1?(window.requestAnimationFrame(n.bind(this)),this.scrollTo(i+(t-i)*l,0)):(this.scrollTo(t,0),this.snapping=!1,e.resolve())}.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()(h.prototype);var u=h,d=i(55),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}),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},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(o.c.MANAGERS.RESIZE,t.section)}removeShownListeners(t){t.onDisplayed=function(){}}add(t){var e=this.createView(t);return this.views.append(e),e.on(o.c.VIEWS.RESIZED,t=>{e.expanded=!0}),e.on(o.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(o.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(o.c.VIEWS.RESIZED,t=>{e.expanded=!0}),e.on(o.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(o.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(o.c.VIEWS.RESIZED,t=>{this.counter(t),e.expanded=!0}),e.on(o.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(o.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=this.bounds(),r=this.views.all(),o=r.length,s=[],a=void 0!==t?t:this.settings.offset||0,l=new n.defer,c=[],h=0;h<o;h++)if(e=r[h],!0===this.isVisible(e,a,a,i)){if(e.displayed)e.show();else{let t=e.display(this.request).then((function(t){t.show()}),t=>{e.hide()});c.push(t)}s.push(e)}else this.q.enqueue(e.destroy.bind(e)),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=[],o="horizontal"===this.settings.axis,s=this.settings.offset||0;t&&o&&(s=t),e&&!o&&(s=e);var a=this._bounds;let l=o?this.scrollLeft:this.scrollTop,c=o?Math.floor(a.width):a.height,h=o?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?(o&&f&&"negative"===d||!o&&f&&"default"===d)&&(l*=-1):(f&&"default"===d&&"horizontal"===u&&(l=h-c-l),f&&"negative"===d&&"horizontal"===u&&(l*=-1));let p=()=>{let t=this.views.first(),e=t&&t.section.prev();e&&r.push(this.prepend(e))},g=l-s;l+c+s>=h&&(()=>{let t=this.views.last(),e=t&&t.section.next();e&&r.push(this.append(e))})(),g<0&&p();let m=r.map(t=>t.display(this.request));return r.length?Promise.all(m).then(()=>this.check()).then(()=>this.update(s),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],o=this.views.indexOf(i),s=this.views.indexOf(r),a=this.views.slice(0,o),l=this.views.slice(s+1),c=0;c<a.length-1;c++)this.erase(a[c],a);for(var h=1;h<l.length;h++)this.erase(l[h]);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(){(this.settings.fullsize?window:this.container).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(o.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(o.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},function(t,e,i){(function(e){t.exports=function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[s]={exports:{}};e[s][0].call(c.exports,(function(t){var i=e[s][1][t];return r(i||t)}),c,c.exports,t,e,i,n)}return i[s].exports}for(var o=!1,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,i,n){(function(t){"use strict";var e,n,r=t.MutationObserver||t.WebKitMutationObserver;if(r){var o=0,s=new r(h),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),e=function(){a.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)e="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){h(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(h,0)};else{var l=new t.MessageChannel;l.port1.onmessage=h,e=function(){l.port2.postMessage(0)}}var c=[];function h(){var t,e;n=!0;for(var i=c.length;i;){for(e=c,c=[],t=-1;++t<i;)e[t]();i=c.length}n=!1}i.exports=function(t){1!==c.push(t)||n||e()}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,i){"use strict";var n=t(1);function r(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,t!==r&&f(this,t)}function h(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(e){return o.reject(t,e)}n===t?o.reject(t,new TypeError("Cannot resolve promise with itself")):o.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,o.reject(t,e))}function r(e){i||(i=!0,o.resolve(t,e))}var s=p((function(){e(r,n)}));"error"===s.status&&n(s.value)}function p(t,e){var i={};try{i.value=t(e),i.status="success"}catch(t){i.status="error",i.value=t}return i}e.exports=c,c.prototype.catch=function(t){return this.then(null,t)},c.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var i=new this.constructor(r);return this.state!==l?u(i,this.state===a?t:e,this.outcome):this.queue.push(new h(i,t,e)),i},h.prototype.callFulfilled=function(t){o.resolve(this.promise,t)},h.prototype.otherCallFulfilled=function(t){u(this.promise,this.onFulfilled,t)},h.prototype.callRejected=function(t){o.reject(this.promise,t)},h.prototype.otherCallRejected=function(t){u(this.promise,this.onRejected,t)},o.resolve=function(t,e){var i=p(d,e);if("error"===i.status)return o.reject(t,i.value);var n=i.value;if(n)f(t,n);else{t.state=a,t.outcome=e;for(var r=-1,s=t.queue.length;++r<s;)t.queue[r].callFulfilled(e)}return t},o.reject=function(t,e){t.state=s,t.outcome=e;for(var i=-1,n=t.queue.length;++i<n;)t.queue[i].callRejected(e);return t},c.resolve=function(t){return t instanceof this?t:o.resolve(new this(r),t)},c.reject=function(t){var e=new this(r);return o.reject(e,t)},c.all=function(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([]);for(var s=new Array(i),a=0,l=-1,c=new this(r);++l<i;)h(t[l],l);return c;function h(t,r){e.resolve(t).then((function(t){s[r]=t,++a!==i||n||(n=!0,o.resolve(c,s))}),(function(t){n||(n=!0,o.reject(c,t))}))}},c.race=function(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([]);for(var s,a=-1,l=new this(r);++a<i;)s=t[a],e.resolve(s).then((function(t){n||(n=!0,o.resolve(l,t))}),(function(t){n||(n=!0,o.reject(l,t))}));return l}},{1:1}],3:[function(t,i,n){(function(e){"use strict";"function"!=typeof e.Promise&&(e.Promise=t(2))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(t,e,i){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(t){return}}();function o(t,e){t=t||[],e=e||{};try{return new Blob(t,e)}catch(r){if("TypeError"!==r.name)throw r;for(var i=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<t.length;n+=1)i.append(t[n]);return i.getBlob(e.type)}}"undefined"==typeof Promise&&t(3);var s=Promise;function a(t,e){e&&t.then((function(t){e(null,t)}),(function(t){e(t)}))}function l(t,e,i){"function"==typeof e&&t.then(e),"function"==typeof i&&t.catch(i)}function c(t){return"string"!=typeof t&&(console.warn(t+" used as a key, but it is not a string."),t=String(t)),t}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var u=void 0,d={},f=Object.prototype.toString;function p(t){return"boolean"==typeof u?s.resolve(u):function(t){return new s((function(e){var i=t.transaction("local-forage-detect-blob-support","readwrite"),n=o([""]);i.objectStore("local-forage-detect-blob-support").put(n,"key"),i.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},i.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/),i=navigator.userAgent.match(/Edge\//);e(i||!t||parseInt(t[1],10)>=43)}})).catch((function(){return!1}))}(t).then((function(t){return u=t}))}function g(t){var e=d[t.name],i={};i.promise=new s((function(t,e){i.resolve=t,i.reject=e})),e.deferredOperations.push(i),e.dbReady?e.dbReady=e.dbReady.then((function(){return i.promise})):e.dbReady=i.promise}function m(t){var e=d[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function v(t,e){var i=d[t.name].deferredOperations.pop();if(i)return i.reject(e),i.promise}function y(t,e){return new s((function(i,n){if(d[t.name]=d[t.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},t.db){if(!e)return i(t.db);g(t),t.db.close()}var o=[t.name];e&&o.push(t.version);var s=r.open.apply(r,o);e&&(s.onupgradeneeded=function(e){var i=s.result;try{i.createObjectStore(t.storeName),e.oldVersion<=1&&i.createObjectStore("local-forage-detect-blob-support")}catch(i){if("ConstraintError"!==i.name)throw i;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),s.onerror=function(t){t.preventDefault(),n(s.error)},s.onsuccess=function(){i(s.result),m(t)}}))}function b(t){return y(t,!1)}function w(t){return y(t,!0)}function x(t,e){if(!t.db)return!0;var i=!t.db.objectStoreNames.contains(t.storeName),n=t.version<t.db.version,r=t.version>t.db.version;if(n&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),r||i){if(i){var o=t.db.version+1;o>t.version&&(t.version=o)}return!0}return!1}function _(t){return o([function(t){for(var e=t.length,i=new ArrayBuffer(e),n=new Uint8Array(i),r=0;r<e;r++)n[r]=t.charCodeAt(r);return i}(atob(t.data))],{type:t.type})}function k(t){return t&&t.__local_forage_encoded_blob}function E(t){var e=this,i=e._initReady().then((function(){var t=d[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady}));return l(i,t,t),i}function S(t,e,i,n){void 0===n&&(n=1);try{var r=t.db.transaction(t.storeName,e);i(null,r)}catch(r){if(n>0&&(!t.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return s.resolve().then((function(){if(!t.db||"NotFoundError"===r.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),w(t)})).then((function(){return function(t){g(t);for(var e=d[t.name],i=e.forages,n=0;n<i.length;n++){var r=i[n];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return t.db=null,b(t).then((function(e){return t.db=e,x(t)?w(t):e})).then((function(n){t.db=e.db=n;for(var r=0;r<i.length;r++)i[r]._dbInfo.db=n})).catch((function(e){throw v(t,e),e}))}(t).then((function(){S(t,e,i,n-1)}))})).catch(i);i(r)}}var T={_driver:"asyncStorage",_initStorage:function(t){var e=this,i={db:null};if(t)for(var n in t)i[n]=t[n];var r=d[i.name];r||(r={forages:[],db:null,dbReady:null,deferredOperations:[]},d[i.name]=r),r.forages.push(e),e._initReady||(e._initReady=e.ready,e.ready=E);var o=[];function a(){return s.resolve()}for(var l=0;l<r.forages.length;l++){var c=r.forages[l];c!==e&&o.push(c._initReady().catch(a))}var h=r.forages.slice(0);return s.all(o).then((function(){return i.db=r.db,b(i)})).then((function(t){return i.db=t,x(i,e._defaultConfig.version)?w(i):t})).then((function(t){i.db=r.db=t,e._dbInfo=i;for(var n=0;n<h.length;n++){var o=h[n];o!==e&&(o._dbInfo.db=i.db,o._dbInfo.version=i.version)}}))},_support:function(){try{if(!r)return!1;var t="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),e="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!t||e)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(t){return!1}}(),iterate:function(t,e){var i=this,n=new s((function(e,n){i.ready().then((function(){S(i._dbInfo,"readonly",(function(r,o){if(r)return n(r);try{var s=o.objectStore(i._dbInfo.storeName).openCursor(),a=1;s.onsuccess=function(){var i=s.result;if(i){var n=i.value;k(n)&&(n=_(n));var r=t(n,i.key,a++);void 0!==r?e(r):i.continue()}else e()},s.onerror=function(){n(s.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},getItem:function(t,e){var i=this;t=c(t);var n=new s((function(e,n){i.ready().then((function(){S(i._dbInfo,"readonly",(function(r,o){if(r)return n(r);try{var s=o.objectStore(i._dbInfo.storeName).get(t);s.onsuccess=function(){var t=s.result;void 0===t&&(t=null),k(t)&&(t=_(t)),e(t)},s.onerror=function(){n(s.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},setItem:function(t,e,i){var n=this;t=c(t);var r=new s((function(i,r){var o;n.ready().then((function(){return o=n._dbInfo,"[object Blob]"===f.call(e)?p(o.db).then((function(t){return t?e:(i=e,new s((function(t,e){var n=new FileReader;n.onerror=e,n.onloadend=function(e){var n=btoa(e.target.result||"");t({__local_forage_encoded_blob:!0,data:n,type:i.type})},n.readAsBinaryString(i)})));var i})):e})).then((function(e){S(n._dbInfo,"readwrite",(function(o,s){if(o)return r(o);try{var a=s.objectStore(n._dbInfo.storeName);null===e&&(e=void 0);var l=a.put(e,t);s.oncomplete=function(){void 0===e&&(e=null),i(e)},s.onabort=s.onerror=function(){var t=l.error?l.error:l.transaction.error;r(t)}}catch(t){r(t)}}))})).catch(r)}));return a(r,i),r},removeItem:function(t,e){var i=this;t=c(t);var n=new s((function(e,n){i.ready().then((function(){S(i._dbInfo,"readwrite",(function(r,o){if(r)return n(r);try{var s=o.objectStore(i._dbInfo.storeName).delete(t);o.oncomplete=function(){e()},o.onerror=function(){n(s.error)},o.onabort=function(){var t=s.error?s.error:s.transaction.error;n(t)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},clear:function(t){var e=this,i=new s((function(t,i){e.ready().then((function(){S(e._dbInfo,"readwrite",(function(n,r){if(n)return i(n);try{var o=r.objectStore(e._dbInfo.storeName).clear();r.oncomplete=function(){t()},r.onabort=r.onerror=function(){var t=o.error?o.error:o.transaction.error;i(t)}}catch(t){i(t)}}))})).catch(i)}));return a(i,t),i},length:function(t){var e=this,i=new s((function(t,i){e.ready().then((function(){S(e._dbInfo,"readonly",(function(n,r){if(n)return i(n);try{var o=r.objectStore(e._dbInfo.storeName).count();o.onsuccess=function(){t(o.result)},o.onerror=function(){i(o.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,t),i},key:function(t,e){var i=this,n=new s((function(e,n){t<0?e(null):i.ready().then((function(){S(i._dbInfo,"readonly",(function(r,o){if(r)return n(r);try{var s=o.objectStore(i._dbInfo.storeName),a=!1,l=s.openCursor();l.onsuccess=function(){var i=l.result;i?0===t||a?e(i.key):(a=!0,i.advance(t)):e(null)},l.onerror=function(){n(l.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},keys:function(t){var e=this,i=new s((function(t,i){e.ready().then((function(){S(e._dbInfo,"readonly",(function(n,r){if(n)return i(n);try{var o=r.objectStore(e._dbInfo.storeName).openCursor(),s=[];o.onsuccess=function(){var e=o.result;e?(s.push(e.key),e.continue()):t(s)},o.onerror=function(){i(o.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,t),i},dropInstance:function(t,e){e=h.apply(this,arguments);var i=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||i.name,t.storeName=t.storeName||i.storeName);var n,o=this;if(t.name){var l=t.name===i.name&&o._dbInfo.db,c=l?s.resolve(o._dbInfo.db):b(t).then((function(e){var i=d[t.name],n=i.forages;i.db=e;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=e;return e}));n=t.storeName?c.then((function(e){if(e.objectStoreNames.contains(t.storeName)){var i=e.version+1;g(t);var n=d[t.name],o=n.forages;e.close();for(var a=0;a<o.length;a++){var l=o[a];l._dbInfo.db=null,l._dbInfo.version=i}return new s((function(e,n){var o=r.open(t.name,i);o.onerror=function(t){o.result.close(),n(t)},o.onupgradeneeded=function(){o.result.deleteObjectStore(t.storeName)},o.onsuccess=function(){var t=o.result;t.close(),e(t)}})).then((function(t){n.db=t;for(var e=0;e<o.length;e++){var i=o[e];i._dbInfo.db=t,m(i._dbInfo)}})).catch((function(e){throw(v(t,e)||s.resolve()).catch((function(){})),e}))}})):c.then((function(e){g(t);var i=d[t.name],n=i.forages;e.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new s((function(e,i){var n=r.deleteDatabase(t.name);n.onerror=n.onblocked=function(t){var e=n.result;e&&e.close(),i(t)},n.onsuccess=function(){var t=n.result;t&&t.close(),e(t)}})).then((function(t){i.db=t;for(var e=0;e<n.length;e++)m(n[e]._dbInfo)})).catch((function(e){throw(v(t,e)||s.resolve()).catch((function(){})),e}))}))}else n=s.reject("Invalid arguments");return a(n,e),n}},C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O=/^~~local_forage_type~([^~]+)~/,A="__lfsc__:".length,N=A+"arbf".length,I=Object.prototype.toString;function R(t){var e,i,n,r,o,s=.75*t.length,a=t.length,l=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var c=new ArrayBuffer(s),h=new Uint8Array(c);for(e=0;e<a;e+=4)i=C.indexOf(t[e]),n=C.indexOf(t[e+1]),r=C.indexOf(t[e+2]),o=C.indexOf(t[e+3]),h[l++]=i<<2|n>>4,h[l++]=(15&n)<<4|r>>2,h[l++]=(3&r)<<6|63&o;return c}function j(t){var e,i=new Uint8Array(t),n="";for(e=0;e<i.length;e+=3)n+=C[i[e]>>2],n+=C[(3&i[e])<<4|i[e+1]>>4],n+=C[(15&i[e+1])<<2|i[e+2]>>6],n+=C[63&i[e+2]];return i.length%3==2?n=n.substring(0,n.length-1)+"=":i.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var L={serialize:function(t,e){var i="";if(t&&(i=I.call(t)),t&&("[object ArrayBuffer]"===i||t.buffer&&"[object ArrayBuffer]"===I.call(t.buffer))){var n,r="__lfsc__:";t instanceof ArrayBuffer?(n=t,r+="arbf"):(n=t.buffer,"[object Int8Array]"===i?r+="si08":"[object Uint8Array]"===i?r+="ui08":"[object Uint8ClampedArray]"===i?r+="uic8":"[object Int16Array]"===i?r+="si16":"[object Uint16Array]"===i?r+="ur16":"[object Int32Array]"===i?r+="si32":"[object Uint32Array]"===i?r+="ui32":"[object Float32Array]"===i?r+="fl32":"[object Float64Array]"===i?r+="fl64":e(new Error("Failed to get type for BinaryArray"))),e(r+j(n))}else if("[object Blob]"===i){var o=new FileReader;o.onload=function(){var i="~~local_forage_type~"+t.type+"~"+j(this.result);e("__lfsc__:blob"+i)},o.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(i){console.error("Couldn't convert value into a JSON string: ",t),e(null,i)}},deserialize:function(t){if("__lfsc__:"!==t.substring(0,A))return JSON.parse(t);var e,i=t.substring(N),n=t.substring(A,N);if("blob"===n&&O.test(i)){var r=i.match(O);e=r[1],i=i.substring(r[0].length)}var s=R(i);switch(n){case"arbf":return s;case"blob":return o([s],{type:e});case"si08":return new Int8Array(s);case"ui08":return new Uint8Array(s);case"uic8":return new Uint8ClampedArray(s);case"si16":return new Int16Array(s);case"ur16":return new Uint16Array(s);case"si32":return new Int32Array(s);case"ui32":return new Uint32Array(s);case"fl32":return new Float32Array(s);case"fl64":return new Float64Array(s);default:throw new Error("Unkown type: "+n)}},stringToBuffer:R,bufferToString:j};function z(t,e,i,n){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],i,n)}function D(t,e,i,n,r,o){t.executeSql(i,n,r,(function(t,s){s.code===s.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,a){a.rows.length?o(t,s):z(t,e,(function(){t.executeSql(i,n,r,o)}),o)}),o):o(t,s)}),o)}function P(t,e,i,n){var r=this;t=c(t);var o=new s((function(o,s){r.ready().then((function(){void 0===e&&(e=null);var a=e,l=r._dbInfo;l.serializer.serialize(e,(function(e,c){c?s(c):l.db.transaction((function(i){D(i,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[t,e],(function(){o(a)}),(function(t,e){s(e)}))}),(function(e){if(e.code===e.QUOTA_ERR){if(n>0)return void o(P.apply(r,[t,a,i,n-1]));s(e)}}))}))})).catch(s)}));return a(o,i),o}function B(t){return new s((function(e,i){t.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(i,n){for(var r=[],o=0;o<n.rows.length;o++)r.push(n.rows.item(o).name);e({db:t,storeNames:r})}),(function(t,e){i(e)}))}),(function(t){i(t)}))}))}var M={_driver:"webSQLStorage",_initStorage:function(t){var e=this,i={db:null};if(t)for(var n in t)i[n]="string"!=typeof t[n]?t[n].toString():t[n];var r=new s((function(t,n){try{i.db=openDatabase(i.name,String(i.version),i.description,i.size)}catch(t){return n(t)}i.db.transaction((function(r){z(r,i,(function(){e._dbInfo=i,t()}),(function(t,e){n(e)}))}),n)}));return i.serializer=L,r},_support:"function"==typeof openDatabase,iterate:function(t,e){var i=this,n=new s((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){D(i,r,"SELECT * FROM "+r.storeName,[],(function(i,n){for(var o=n.rows,s=o.length,a=0;a<s;a++){var l=o.item(a),c=l.value;if(c&&(c=r.serializer.deserialize(c)),void 0!==(c=t(c,l.key,a+1)))return void e(c)}e()}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},getItem:function(t,e){var i=this;t=c(t);var n=new s((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){D(i,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[t],(function(t,i){var n=i.rows.length?i.rows.item(0).value:null;n&&(n=r.serializer.deserialize(n)),e(n)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},setItem:function(t,e,i){return P.apply(this,[t,e,i,1])},removeItem:function(t,e){var i=this;t=c(t);var n=new s((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){D(i,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[t],(function(){e()}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},clear:function(t){var e=this,i=new s((function(t,i){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){D(e,n,"DELETE FROM "+n.storeName,[],(function(){t()}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,t),i},length:function(t){var e=this,i=new s((function(t,i){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){D(e,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(e,i){var n=i.rows.item(0).c;t(n)}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,t),i},key:function(t,e){var i=this,n=new s((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){D(i,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[t+1],(function(t,i){var n=i.rows.length?i.rows.item(0).key:null;e(n)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},keys:function(t){var e=this,i=new s((function(t,i){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){D(e,n,"SELECT key FROM "+n.storeName,[],(function(e,i){for(var n=[],r=0;r<i.rows.length;r++)n.push(i.rows.item(r).key);t(n)}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,t),i},dropInstance:function(t,e){e=h.apply(this,arguments);var i=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||i.name,t.storeName=t.storeName||i.storeName);var n,r=this;return a(n=t.name?new s((function(e){var n;n=t.name===i.name?r._dbInfo.db:openDatabase(t.name,"","",0),t.storeName?e({db:n,storeNames:[t.storeName]}):e(B(n))})).then((function(t){return new s((function(e,i){t.db.transaction((function(n){function r(t){return new s((function(e,i){n.executeSql("DROP TABLE IF EXISTS "+t,[],(function(){e()}),(function(t,e){i(e)}))}))}for(var o=[],a=0,l=t.storeNames.length;a<l;a++)o.push(r(t.storeNames[a]));s.all(o).then((function(){e()})).catch((function(t){i(t)}))}),(function(t){i(t)}))}))})):s.reject("Invalid arguments"),e),n}};function F(t,e){var i=t.name+"/";return t.storeName!==e.storeName&&(i+=t.storeName+"/"),i}function q(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(t){return!0}}()||localStorage.length>0}var U={_driver:"localStorageWrapper",_initStorage:function(t){var e={};if(t)for(var i in t)e[i]=t[i];return e.keyPrefix=F(t,this._defaultConfig),q()?(this._dbInfo=e,e.serializer=L,s.resolve()):s.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}(),iterate:function(t,e){var i=this,n=i.ready().then((function(){for(var e=i._dbInfo,n=e.keyPrefix,r=n.length,o=localStorage.length,s=1,a=0;a<o;a++){var l=localStorage.key(a);if(0===l.indexOf(n)){var c=localStorage.getItem(l);if(c&&(c=e.serializer.deserialize(c)),void 0!==(c=t(c,l.substring(r),s++)))return c}}}));return a(n,e),n},getItem:function(t,e){var i=this;t=c(t);var n=i.ready().then((function(){var e=i._dbInfo,n=localStorage.getItem(e.keyPrefix+t);return n&&(n=e.serializer.deserialize(n)),n}));return a(n,e),n},setItem:function(t,e,i){var n=this;t=c(t);var r=n.ready().then((function(){void 0===e&&(e=null);var i=e;return new s((function(r,o){var s=n._dbInfo;s.serializer.serialize(e,(function(e,n){if(n)o(n);else try{localStorage.setItem(s.keyPrefix+t,e),r(i)}catch(t){"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||o(t),o(t)}}))}))}));return a(r,i),r},removeItem:function(t,e){var i=this;t=c(t);var n=i.ready().then((function(){var e=i._dbInfo;localStorage.removeItem(e.keyPrefix+t)}));return a(n,e),n},clear:function(t){var e=this,i=e.ready().then((function(){for(var t=e._dbInfo.keyPrefix,i=localStorage.length-1;i>=0;i--){var n=localStorage.key(i);0===n.indexOf(t)&&localStorage.removeItem(n)}}));return a(i,t),i},length:function(t){var e=this.keys().then((function(t){return t.length}));return a(e,t),e},key:function(t,e){var i=this,n=i.ready().then((function(){var e,n=i._dbInfo;try{e=localStorage.key(t)}catch(t){e=null}return e&&(e=e.substring(n.keyPrefix.length)),e}));return a(n,e),n},keys:function(t){var e=this,i=e.ready().then((function(){for(var t=e._dbInfo,i=localStorage.length,n=[],r=0;r<i;r++){var o=localStorage.key(r);0===o.indexOf(t.keyPrefix)&&n.push(o.substring(t.keyPrefix.length))}return n}));return a(i,t),i},dropInstance:function(t,e){if(e=h.apply(this,arguments),!(t="function"!=typeof t&&t||{}).name){var i=this.config();t.name=t.name||i.name,t.storeName=t.storeName||i.storeName}var n,r=this;return a(n=t.name?new s((function(e){t.storeName?e(F(t,r._defaultConfig)):e(t.name+"/")})).then((function(t){for(var e=localStorage.length-1;e>=0;e--){var i=localStorage.key(e);0===i.indexOf(t)&&localStorage.removeItem(i)}})):s.reject("Invalid arguments"),e),n}},W=function(t,e){for(var i,n,r=t.length,o=0;o<r;){if((i=t[o])===(n=e)||"number"==typeof i&&"number"==typeof n&&isNaN(i)&&isNaN(n))return!0;o++}return!1},$=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},H={},X={},Y={INDEXEDDB:T,WEBSQL:M,LOCALSTORAGE:U},V=[Y.INDEXEDDB._driver,Y.WEBSQL._driver,Y.LOCALSTORAGE._driver],Z=["dropInstance"],G=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Z),K={description:"",driver:V.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function J(t,e){t[e]=function(){var i=arguments;return t.ready().then((function(){return t[e].apply(t,i)}))}}function Q(){for(var t=1;t<arguments.length;t++){var e=arguments[t];if(e)for(var i in e)e.hasOwnProperty(i)&&($(e[i])?arguments[0][i]=e[i].slice():arguments[0][i]=e[i])}return arguments[0]}var tt=new(function(){function t(e){for(var i in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Y)if(Y.hasOwnProperty(i)){var n=Y[i],r=n._driver;this[i]=r,H[r]||this.defineDriver(n)}this._defaultConfig=Q({},K),this._config=Q({},this._defaultConfig,e),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return t.prototype.config=function(t){if("object"===(void 0===t?"undefined":n(t))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var e in t){if("storeName"===e&&(t[e]=t[e].replace(/\W/g,"_")),"version"===e&&"number"!=typeof t[e])return new Error("Database version must be a number.");this._config[e]=t[e]}return!("driver"in t)||!t.driver||this.setDriver(this._config.driver)}return"string"==typeof t?this._config[t]:this._config},t.prototype.defineDriver=function(t,e,i){var n=new s((function(e,i){try{var n=t._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver)return void i(r);for(var o=G.concat("_initStorage"),l=0,c=o.length;l<c;l++){var h=o[l];if((!W(Z,h)||t[h])&&"function"!=typeof t[h])return void i(r)}!function(){for(var e=function(t){return function(){var e=new Error("Method "+t+" is not implemented by the current driver"),i=s.reject(e);return a(i,arguments[arguments.length-1]),i}},i=0,n=Z.length;i<n;i++){var r=Z[i];t[r]||(t[r]=e(r))}}();var u=function(i){H[n]&&console.info("Redefining LocalForage driver: "+n),H[n]=t,X[n]=i,e()};"_support"in t?t._support&&"function"==typeof t._support?t._support().then(u,i):u(!!t._support):u(!0)}catch(t){i(t)}}));return l(n,e,i),n},t.prototype.driver=function(){return this._driver||null},t.prototype.getDriver=function(t,e,i){var n=H[t]?s.resolve(H[t]):s.reject(new Error("Driver not found."));return l(n,e,i),n},t.prototype.getSerializer=function(t){var e=s.resolve(L);return l(e,t),e},t.prototype.ready=function(t){var e=this,i=e._driverSet.then((function(){return null===e._ready&&(e._ready=e._initDriver()),e._ready}));return l(i,t,t),i},t.prototype.setDriver=function(t,e,i){var n=this;$(t)||(t=[t]);var r=this._getSupportedDrivers(t);function o(){n._config.driver=n.driver()}function a(t){return n._extend(t),o(),n._ready=n._initStorage(n._config),n._ready}var c=null!==this._driverSet?this._driverSet.catch((function(){return s.resolve()})):s.resolve();return this._driverSet=c.then((function(){var t=r[0];return n._dbInfo=null,n._ready=null,n.getDriver(t).then((function(t){n._driver=t._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(t){return function(){var e=0;return function i(){for(;e<t.length;){var r=t[e];return e++,n._dbInfo=null,n._ready=null,n.getDriver(r).then(a).catch(i)}o();var l=new Error("No available storage method found.");return n._driverSet=s.reject(l),n._driverSet}()}}(r)}))})).catch((function(){o();var t=new Error("No available storage method found.");return n._driverSet=s.reject(t),n._driverSet})),l(this._driverSet,e,i),this._driverSet},t.prototype.supports=function(t){return!!X[t]},t.prototype._extend=function(t){Q(this,t)},t.prototype._getSupportedDrivers=function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];this.supports(r)&&e.push(r)}return e},t.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,e=G.length;t<e;t++)J(this,G[t])},t.prototype.createInstance=function(e){return new t(e)},t}());e.exports=tt},{3:3}]},{},[4])(4)}).call(this,i(30))},function(t,e,i){"use strict";i(24),i(14);var n=i(3),r=i.n(n),o=i(0),s=i(5),a=i(4),l=i(2),c=i(6),h=i(11);i(20);var u=function(t,e,i,n){var r,s="undefined"!=typeof window&&window.URL,l=s?"blob":"arraybuffer",c=new o.defer,h=new XMLHttpRequest,u=XMLHttpRequest.prototype;for(r in"overrideMimeType"in u||Object.defineProperty(u,"overrideMimeType",{value:function(){}}),i&&(h.withCredentials=!0),h.onreadystatechange=function(){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 c.reject({status:this.status,message:"Empty Response",stack:(new Error).stack}),c.promise;if(403===this.status)return c.reject({status:this.status,response:this.response,message:"Forbidden",stack:(new Error).stack}),c.promise;i=t?this.responseXML:Object(o.isXml)(e)?Object(o.parse)(this.response,"text/xml"):"xhtml"==e?Object(o.parse)(this.response,"application/xhtml+xml"):"html"==e||"htm"==e?Object(o.parse)(this.response,"text/html"):"json"==e?JSON.parse(this.response):"blob"==e?s?this.response:new Blob([this.response]):this.response,c.resolve(i)}else c.reject({status:this.status,message:this.response,stack:(new Error).stack})}},h.onerror=function(t){c.reject(t)},h.open("GET",t,!0),n)h.setRequestHeader(r,n[r]);return"json"==e&&h.setRequestHeader("Accept","application/json"),e||(e=new a.a(t).extension),"blob"==e&&(h.responseType=l),Object(o.isXml)(e)&&h.overrideMimeType("text/xml"),"binary"==e&&(h.responseType="arraybuffer"),h.send(),c.promise},d=i(38);var f=class{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 c.a(this),this.hooks.content=new c.a(this)),this.document=void 0,this.contents=void 0,this.output=void 0}load(t){var e=t||this.request||u,i=new o.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(h.a)(this.document,this)}render(t){var e=new o.defer,i=e.promise;return this.output,this.load(t).then(function(t){var e=("undefined"!=typeof navigator&&navigator.userAgent||"").indexOf("Trident")>=0,i=new("undefined"==typeof XMLSerializer||e?d.XMLDOMParser:XMLSerializer);return this.output=i.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();return Object(o.sprint)(e.document,(function(t){!function(t){for(var r,o,s,a=t.textContent.toLowerCase(),l=e.document.createRange(),c=-1;-1!=o;)-1!=(o=a.indexOf(n,c+1))&&((l=e.document.createRange()).setStart(t,o),l.setEnd(t,o+n.length),r=e.cfiFromRange(l),s=t.textContent.length<150?t.textContent:"..."+(s=t.textContent.substring(o-75,o+75))+"...",i.push({cfi:r,excerpt:s})),c=o}(t)})),i}search(t,e=5){if(void 0===document.createTreeWalker)return this.find(t);let i=[];const n=this,r=t.toLowerCase(),o=function(t){const e=t.reduce((t,e)=>t+e.textContent,"").toLowerCase().indexOf(r);if(-1!=e){const o=0,s=e+r.length;let a=0,l=0;if(e<t[o].length){let r;for(;a<t.length-1&&(l+=t[a].length,!(s<=l));)a+=1;let c=t[o],h=t[a],u=n.document.createRange();u.setStart(c,e);let d=t.slice(0,a).reduce((t,e)=>t+e.textContent.length,0);u.setEnd(h,d>s?s:s-d),r=n.cfiFromRange(u);let f=t.slice(0,a+1).reduce((t,e)=>t+e.textContent,"");f.length>150&&(f=f.substring(e-75,e+75),f="..."+f+"..."),i.push({cfi:r,excerpt:f})}}},s=document.createTreeWalker(n.document,NodeFilter.SHOW_TEXT,null,!1);let a,l=[];for(;a=s.nextNode();)l.push(a),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:",""),o=r.indexOf("-");-1!=o&&(i=r.slice(0,o),n=r.slice(o+1),e[i]=n)})),e}cfiFromRange(t){return new l.a(t,this.cfiBase).toString()}cfiFromElement(t){return new l.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 p=class{constructor(){this.spineItems=[],this.spineByHref={},this.spineById={},this.hooks={},this.hooks.serialize=new c.a,this.hooks.content=new c.a,this.hooks.content.register(h.a),this.hooks.content.register(h.b),this.hooks.content.register(h.d),this.epubcfi=new l.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,o=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)),o&&(t.href=o.href,t.url=e(t.href,!0),t.canonical=i(t.href),o.properties.length&&t.properties.push.apply(t.properties,o.properties)),"yes"===t.linear?(t.prev=function(){let e=t.index;for(;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;for(;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 f(t,this.hooks),this.append(r)}),this.loaded=!0}get(t){var e=0;if(void 0===t)for(;e<this.spineItems.length;){let t=this.spineItems[e];if(t&&t.linear)break;e+=1}else if(this.epubcfi.isCfiString(t)){e=new l.a(t).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}},g=i(21),m=i(1);class v{constructor(t,e,i){this.spine=t,this.request=e,this.pause=i||100,this.q=new g.a(this),this.epubcfi=new l.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 o.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,s=[],a=t.ownerDocument,c=Object(o.qs)(a,"body"),h=0,u=i||this.break;if(Object(o.sprint)(c,function(t){var i,o=t.length,a=0;if(0===t.textContent.trim().length)return!1;for(0==h&&((n=this.createRange()).startContainer=t,n.startOffset=0),(i=u-h)>o&&(h+=o,a=o);a<o;)if(i=u-h,0===h&&(a+=1,(n=this.createRange()).startContainer=t,n.startOffset=a),a+i>=o)h+=o-a,a=o;else{a+=i,n.endContainer=t,n.endOffset=a;let r=new l.a(n,e).toString();s.push(r),h=0}r=t}.bind(this)),n&&n.startContainer&&r){n.endContainer=r,n.endOffset=r.length;let t=new l.a(n,e).toString();s.push(t),h=0}return s}generateFromWords(t,e,i){var n=t?new l.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 s=new o.defer,a=this.parseWords(r,t,e,i),l=n-this._locationsWords.length;return this._locationsWords=this._locationsWords.concat(a.length>=n?a.slice(0,l):a),t.unload(),this.processingTimeout=setTimeout(()=>s.resolve(a),this.pause),s.promise}.bind(this))}countWords(t){return(t=(t=(t=t.replace(/(^\s*)|(\s*$)/gi,"")).replace(/[ ]{2,}/gi," ")).replace(/\n /,"\n")).split(" ").length}parseWords(t,e,i,n){var r,s=e.cfiBase,a=[],c=t.ownerDocument,h=Object(o.qs)(c,"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));return Object(o.sprint)(h,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;for((e=u-this._wordCounter)>i&&(this._wordCounter+=i,n=i);n<i;)if(n+(e=u-this._wordCounter)>=i)this._wordCounter+=i-n,n=i;else{n+=e;let i=new l.a(t,s);a.push({cfi:i.toString(),wordCount:this._wordCounter}),this._wordCounter=0}t}.bind(this)),a}locationFromCfi(t){let e;return l.a.prototype.isCfiString(t)&&(t=new l.a(t)),0===this._locations.length?-1:(e=Object(o.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 l.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(m.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()(v.prototype);var y=v,b=i(9),w=i.n(b);var x=class{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(o.qs)(t,"rootfile")))throw new Error("No RootFile Found");this.packagePath=e.getAttribute("full-path"),this.directory=w.a.dirname(this.packagePath),this.encoding=t.xmlEncoding}destroy(){this.packagePath=void 0,this.directory=void 0,this.encoding=void 0}};var _=class{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(o.qs)(t,"metadata")))throw new Error("No Metadata Found");if(!(i=Object(o.qs)(t,"manifest")))throw new Error("No Manifest Found");if(!(n=Object(o.qs)(t,"spine")))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(o.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(o.qsa)(t,"item");return Array.prototype.slice.call(i).forEach((function(t){var i=t.getAttribute("id"),n=t.getAttribute("href")||"",r=t.getAttribute("media-type")||"",o=t.getAttribute("media-overlay")||"",s=t.getAttribute("properties")||"";e[i]={href:n,type:r,overlay:o,properties:s.length?s.split(" "):[]}})),e}parseSpine(t,e){var i=[],n=Object(o.qsa)(t,"itemref");return Array.prototype.slice.call(n).forEach((function(t,e){var n=t.getAttribute("idref"),r=t.getAttribute("properties")||"",o=r.length?r.split(" "):[],s={idref:n,linear:t.getAttribute("linear")||"yes",properties:o,index:e};i.push(s)})),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(o.qsp)(t,"item",{properties:"nav"});return!!e&&e.getAttribute("href")}findNcxPath(t,e){var i,n=Object(o.qsp)(t,"item",{"media-type":"application/x-dtbncx+xml"});return n||(i=e.getAttribute("toc"))&&(n=t.querySelector("#"+i)),!!n&&n.getAttribute("href")}findCoverPath(t){Object(o.qs)(t,"package").getAttribute("version");var e=Object(o.qsp)(t,"item",{properties:"cover-image"});if(e)return e.getAttribute("href");var i=Object(o.qsp)(t,"meta",{name:"cover"});if(i){var n=i.getAttribute("content"),r=t.getElementById(n);return r?r.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]).childNodes.length?i.childNodes[0].nodeValue:""}getPropertyText(t,e){var i=Object(o.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 k=class{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(o.qs)(t,"html"),i=Object(o.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]).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&&(n=this.getByIndex(t,e,i[r].subitems),!n);++r);return n}return n}landmark(t){var e;return t?(e=this.landmarksByType[t],this.landmarks[e]):this.landmarks}parseNav(t){var e,i,n=Object(o.querySelectorByType)(t,"nav","toc"),r=n?Object(o.qsa)(n,"li"):[],s=r.length,a={},l=[];if(!r||0===s)return l;for(e=0;e<s;++e)(i=this.navItem(r[e]))&&(a[i.id]=i,i.parent?a[i.parent].subitems.push(i):l.push(i));return l}navItem(t){let e=t.getAttribute("id")||void 0,i=Object(o.filterChildren)(t,"a",!0);if(!i)return;let n=i.getAttribute("href")||"";e||(e=n);let r,s=i.textContent||"",a=Object(o.getParentByTagName)(t,"li");if(a&&(r=a.getAttribute("id"),!r)){const t=Object(o.filterChildren)(a,"a",!0);r=t&&t.getAttribute("href")}for(;!r&&a;)if(a=Object(o.getParentByTagName)(a,"li"),a&&(r=a.getAttribute("id"),!r)){const t=Object(o.filterChildren)(a,"a",!0);r=t&&t.getAttribute("href")}return{id:e,href:n,label:s,subitems:[],parent:r}}parseLandmarks(t){var e,i,n=Object(o.querySelectorByType)(t,"nav","landmarks"),r=n?Object(o.qsa)(n,"li"):[],s=r.length,a=[];if(!r||0===s)return a;for(e=0;e<s;++e)(i=this.landmarkItem(r[e]))&&(a.push(i),this.landmarksByType[i.type]=e);return a}landmarkItem(t){let e=Object(o.filterChildren)(t,"a",!0);if(!e)return;let i=e.getAttributeNS("http://www.idpf.org/2007/ops","type")||void 0;return{href:e.getAttribute("href")||"",label:e.textContent||"",type:i}}parseNcx(t){var e,i,n=Object(o.qsa)(t,"navPoint"),r=n.length,s={},a=[];if(!n||0===r)return a;for(e=0;e<r;++e)s[(i=this.ncxItem(n[e])).id]=i,i.parent?s[i.parent].subitems.push(i):a.push(i);return a}ncxItem(t){var e,i=t.getAttribute("id")||!1,n=Object(o.qs)(t,"content").getAttribute("src"),r=Object(o.qs)(t,"navLabel"),s=r.textContent?r.textContent:"",a=t.parentNode;return!a||"navPoint"!==a.nodeName&&"navPoint"!==a.nodeName.split(":").slice(-1)[0]||(e=a.getAttribute("id")),{id:i,href:n,label:s,subitems:[],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)}},E={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"}},S=function(){var t,e,i,n,r={};for(t in E)if(E.hasOwnProperty(t))for(e in E[t])if(E[t].hasOwnProperty(e))if("string"==typeof(i=E[t][e]))r[i]=t+"/"+e;else for(n=0;n<i.length;n++)r[i[n]]=t+"/"+e;return r}();var T={lookup:function(t){return t&&S[t.split(".").pop().toLowerCase()]||"text/plain"}};var C=class{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 s.a(t),i=T.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(o.blob2base64)(t)).then(t=>Object(o.createBase64Url)(t,i)):this.settings.request(t,"blob").then(t=>Object(o.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){if(w.a.isAbsolute(t))return new Promise((function(t){t()}));var e,i=this.settings.resolver(t);e=this.settings.archive?this.settings.archive.getText(i):this.settings.request(i,"text");var n=this.urls.map(t=>{var e=this.settings.resolver(t);return new a.a(i).relative(e)});return e?e.then(t=>(t=Object(h.e)(t,n,this.replacementUrls),"base64"===this.settings.replacements?Object(o.createBase64Url)(t,"text/css"):Object(o.createBlobUrl)(t,"text/css")),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);return new a.a(t).relative(n)}.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(h.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 O=class{constructor(t){this.pages=[],this.locations=[],this.epubcfi=new l.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(o.qs)(t,"html"),i=Object(o.qs)(t,"ncx");return e?this.parseNav(t):i?this.parseNcx(t):void 0}parseNav(t){var e,i,n=Object(o.querySelectorByType)(t,"nav","page-list"),r=n?Object(o.qsa)(n,"li"):[],s=r.length,a=[];if(!r||0===s)return a;for(e=0;e<s;++e)i=this.item(r[e]),a.push(i);return a}parseNcx(t){var e,i,n,r,s=[],a=0;if(!(i=Object(o.qs)(t,"pageList")))return s;if(r=(n=Object(o.qsa)(i,"pageTarget")).length,!n||0===n.length)return s;for(a=0;a<r;++a)e=this.ncxItem(n[a]),s.push(e);return s}ncxItem(t){var e=Object(o.qs)(t,"navLabel"),i=Object(o.qs)(e,"text").textContent;return{href:Object(o.qs)(t,"content").getAttribute("src"),page:parseInt(i,10)}}item(t){var e,i,n=Object(o.qs)(t,"a"),r=n.getAttribute("href")||"",s=n.textContent||"",a=parseInt(s);return-1!=r.indexOf("epubcfi")?(i=(e=r.split("#"))[0],{cfi:e.length>1&&e[1],href:r,packageUrl:i,page:a}):{href:r,page:a}}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(o.indexOfSorted)(t,this.locations,this.epubcfi.compare);return-1!=i?e=this.pages[i]:void 0!==(e=(i=Object(o.locationOf)(t,this.locations,this.epubcfi.compare))-1>=0?this.pages[i-1]:this.pages[0])||(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){return Math.round(this.totalPages*t)}percentageFromPage(t){var e=(t-this.firstPage)/this.totalPages;return Math.round(1e3*e)/1e3}percentageFromCfi(t){var e=this.pageFromCfi(t);return this.percentageFromPage(e)}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}},A=i(39),N=i(85),I=i.n(N);var R=class{constructor(){this.zip=void 0,this.urlCache={},this.checkRequirements()}checkRequirements(){try{this.zip=new I.a}catch(t){throw new Error("JSZip lib not loaded")}}open(t,e){return this.zip.loadAsync(t,{base64:e})}openUrl(t,e){return u(t,"binary").then(function(t){return this.zip.loadAsync(t,{base64:e})}.bind(this))}request(t,e){var i,n=new o.defer,r=new a.a(t);return e||(e=r.extension),(i="blob"==e?this.getBlob(t):this.getText(t))?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){return"json"==e?JSON.parse(t):Object(o.isXml)(e)?Object(o.parse)(t,"text/xml"):"xhtml"==e?Object(o.parse)(t,"application/xhtml+xml"):"html"==e||"htm"==e?Object(o.parse)(t,"text/html"):t}getBlob(t,e){var i=window.decodeURIComponent(t.substr(1)),n=this.zip.file(i);if(n)return e=e||T.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||T.lookup(n.name),n.async("base64").then((function(t){return"data:"+e+";base64,"+t}))}createUrl(t,e){var i,n,r=new o.defer,s=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.then(function(e){this.urlCache[t]=e,r.resolve(e)}.bind(this)):(n=this.getBlob(t))&&n.then(function(e){i=s.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={}}},j=i(57),L=i.n(j);class z{constructor(t,e,i){this.urlCache={},this.storage=void 0,this.name=t,this.requester=e||u,this.resolver=i,this.online=!0,this.checkRequirements(),this.addListeners()}checkRequirements(){try{let t;void 0===L.a&&(t=L.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 o.defer;var i=new a.a(t);return e||(e=i.extension),("blob"==e?this.getBlob(t):this.getText(t)).then(i=>{var n,r=new o.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){return"json"==e?JSON.parse(t):Object(o.isXml)(e)?Object(o.parse)(t,"text/xml"):"xhtml"==e?Object(o.parse)(t,"application/xhtml+xml"):"html"==e||"htm"==e?Object(o.parse)(t,"text/html"):t}getBlob(t,e){let i=window.encodeURIComponent(t);return this.storage.getItem(i).then((function(i){if(i)return e=e||T.lookup(t),new Blob([i],{type:e})}))}getText(t,e){let i=window.encodeURIComponent(t);return e=e||T.lookup(t),this.storage.getItem(i).then((function(t){var i,n=new o.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||T.lookup(t),this.storage.getItem(i).then(t=>{var i,n=new o.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 o.defer,s=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.then(function(e){this.urlCache[t]=e,r.resolve(e)}.bind(this)):(n=this.getBlob(t))&&n.then(function(e){i=s.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()(z.prototype);var D=z;var P=class{constructor(t){this.interactive="",this.fixedLayout="",this.openToSpread="",this.orientationLock="",t&&this.parse(t)}parse(t){if(!t)return this;const e=Object(o.qs)(t,"display_options");if(!e)return this;return Object(o.qsa)(e,"option").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}}),this}destroy(){this.interactive=void 0,this.fixedLayout=void 0,this.openToSpread=void 0,this.orientationLock=void 0}};const B="binary",M="base64",F="epub",q="opf",U="json",W="directory";class ${constructor(t,e){void 0===e&&"string"!=typeof t&&t instanceof Blob==!1&&t instanceof ArrayBuffer==!1&&(e=t,t=void 0),this.settings=Object(o.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(o.extend)(this.settings,e),this.opening=new o.defer,this.opened=this.opening.promise,this.isOpen=!1,this.loading={manifest:new o.defer,spine:new o.defer,metadata:new o.defer,cover:new o.defer,navigation:new o.defer,pageList:new o.defer,resources:new o.defer,displayOptions:new o.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||u,this.spine=new p,this.locations=new y(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(m.c.BOOK.OPEN_FAILED,i)})}open(t,e){var i,n=e||this.determineType(t);return n===B?(this.archived=!0,this.url=new s.a("/",""),i=this.openEpub(t)):n===M?(this.archived=!0,this.url=new s.a("/",""),i=this.openEpub(t,n)):n===F?(this.archived=!0,this.url=new s.a("/",""),i=this.request(t,"binary",this.settings.requestCredentials,this.settings.requestHeaders).then(this.openEpub.bind(this))):n==q?(this.url=new s.a(t),i=this.openPackaging(this.url.Path.toString())):n==U?(this.url=new s.a(t),i=this.openManifest(this.url.Path.toString())):(this.url=new s.a(t),i=this.openContainer("META-INF/container.xml").then(this.openPackaging.bind(this))),i}openEpub(t,e){return this.unarchive(t,e||this.settings.encoding).then(()=>this.openContainer("META-INF/container.xml")).then(t=>this.openPackaging(t))}openContainer(t){return this.load(t).then(t=>(this.container=new x(t),this.resolve(this.container.packagePath)))}openPackaging(t){return this.path=new a.a(t),this.load(t).then(t=>(this.packaging=new _(t),this.unpack(this.packaging)))}openManifest(t){return this.path=new a.a(t),this.load(t).then(t=>(this.packaging=new _,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;return t.indexOf("://")>-1?t:(this.path&&(i=this.path.resolve(t)),0!=e&&this.url&&(i=this.url.resolve(i)),i)}}canonical(t){return t?this.settings.canonical?this.settings.canonical(t):this.resolve(t,!0):""}determineType(t){var e;return"base64"===this.settings.encoding?M:"string"!=typeof t?B:((e=new s.a(t).path().extension)&&(e=e.replace(/\?.*$/,"")),e?"epub"===e?F:"opf"===e?q:"json"===e?U:void 0:W)}unpack(t){this.package=t,""===this.packaging.metadata.layout?this.load(this.url.resolve("META-INF/com.apple.ibooks.display-options.xml")).then(t=>{this.displayOptions=new P(t),this.loading.displayOptions.resolve(this.displayOptions)}).catch(t=>{this.displayOptions=new P,this.loading.displayOptions.resolve(this.displayOptions)}):(this.displayOptions=new P,this.loading.displayOptions.resolve(this.displayOptions)),this.spine.unpack(this.packaging,this.resolve.bind(this),this.canonical.bind(this)),this.resources=new C(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 k(i),t.pageList&&(this.pageList=new O(t.pageList)),e(this.navigation)}):e?this.load(e,"xml").then(t=>(this.navigation=new k(t),this.pageList=new O(t),this.navigation)):new Promise((t,e)=>{this.navigation=new k,this.pageList=new O,t(this.navigation)})}section(t){return this.spine.get(t)}renderTo(t,e){return this.rendition=new A.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 R,this.archive.open(t,e)}store(t){let e=this.settings.replacements&&"none"!==this.settings.replacements,i=this.url,n=this.settings.requestMethod||u.bind(this);return this.storage=new D(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 s.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 l.a(t),i=this.spine.get(e.spinePos),n=this.load.bind(this);return i?i.load(n).then((function(t){return e.toRange(i.document)})):new Promise((t,e)=>{e("CFI could not be found")})}key(t){var e=t||this.packaging.metadata.identifier||this.url.filename;return`epubjs:${m.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()($.prototype);e.a=$},function(t,e,i){var n=i(16),r=i(60),o=i(25),s=i(32),a=i(41),l=i(10),c=i(62),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=s(t),e=a(e,!0),c)try{return h(t,e)}catch(t){}if(l(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,i){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},function(t,e,i){var n=i(12),r=i(40),o="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==r(t)?o.call(t,""):Object(t)}:Object},function(t,e,i){var n=i(16),r=i(12),o=i(63);t.exports=!n&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,i){var n=i(7),r=i(17),o=n.document,s=r(o)&&r(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},function(t,e,i){var n=i(65),r=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return r.call(t)}),t.exports=n.inspectSource},function(t,e,i){var n=i(7),r=i(42),o=n["__core-js_shared__"]||r("__core-js_shared__",{});t.exports=o},function(t,e,i){var n=i(34),r=i(65);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){var i=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++i+n).toString(36)}},function(t,e,i){var n=i(10),r=i(32),o=i(94).indexOf,s=i(44);t.exports=function(t,e){var i,a=r(t),l=0,c=[];for(i in a)!n(s,i)&&n(a,i)&&c.push(i);for(;e.length>l;)n(a,i=e[l++])&&(~o(c,i)||c.push(i));return c}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,i){var n=i(12);t.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},function(t,e,i){"use strict";var n=i(32),r=i(103),o=i(27),s=i(26),a=i(74),l=s.set,c=s.getterFor("Array Iterator");t.exports=a(Array,"Array",(function(t,e){l(this,{type:"Array Iterator",target:n(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,i=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,i){var n=i(16),r=i(18),o=i(13),s=i(73);t.exports=n?Object.defineProperties:function(t,e){o(t);for(var i,n=s(e),a=n.length,l=0;a>l;)r.f(t,i=n[l++],e[i]);return t}},function(t,e,i){var n=i(68),r=i(47);t.exports=Object.keys||function(t){return n(t,r)}},function(t,e,i){"use strict";var n=i(31),r=i(75),o=i(77),s=i(106),a=i(37),l=i(15),c=i(19),h=i(8),u=i(34),d=i(27),f=i(76),p=f.IteratorPrototype,g=f.BUGGY_SAFARI_ITERATORS,m=h("iterator"),v=function(){return this};t.exports=function(t,e,i,h,f,y,b){r(i,e,h);var w,x,_,k=function(t){if(t===f&&O)return O;if(!g&&t in T)return T[t];switch(t){case"keys":case"values":case"entries":return function(){return new i(this,t)}}return function(){return new i(this)}},E=e+" Iterator",S=!1,T=t.prototype,C=T[m]||T["@@iterator"]||f&&T[f],O=!g&&C||k(f),A="Array"==e&&T.entries||C;if(A&&(w=o(A.call(new t)),p!==Object.prototype&&w.next&&(u||o(w)===p||(s?s(w,p):"function"!=typeof w[m]&&l(w,m,v)),a(w,E,!0,!0),u&&(d[E]=v))),"values"==f&&C&&"values"!==C.name&&(S=!0,O=function(){return C.call(this)}),u&&!b||T[m]===O||l(T,m,O),d[e]=O,f)if(x={values:k("values"),keys:y?O:k("keys"),entries:k("entries")},b)for(_ in x)(g||S||!(_ in T))&&c(T,_,x[_]);else n({target:e,proto:!0,forced:g||S},x);return x}},function(t,e,i){"use strict";var n=i(76).IteratorPrototype,r=i(50),o=i(25),s=i(37),a=i(27),l=function(){return this};t.exports=function(t,e,i){var c=e+" Iterator";return t.prototype=r(n,{next:o(1,i)}),s(t,c,!1,!0),a[c]=l,t}},function(t,e,i){"use strict";var n,r,o,s=i(77),a=i(15),l=i(10),c=i(8),h=i(34),u=c("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(r=s(s(o)))!==Object.prototype&&(n=r):d=!0),null==n&&(n={}),h||l(n,u)||a(n,u,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:d}},function(t,e,i){var n=i(10),r=i(36),o=i(43),s=i(105),a=o("IE_PROTO"),l=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=r(t),n(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},function(t,e,i){var n=i(12),r=i(8),o=i(34),s=r("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,i="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),i+=n+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host}))},function(t,e){t.exports=function(t,e,i){if(!(t instanceof e))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return t}},function(t,e,i){var n=i(126);t.exports=function(t,e,i){if(n(t),void 0===e)return t;switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,r){return t.call(e,i,n,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,i){var n=i(130),r=i(40),o=i(8)("toStringTag"),s="Arguments"==r(function(){return arguments}());t.exports=n?r:function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?i:s?r(e):"Object"==(n=r(e))&&"function"==typeof e.callee?"Arguments":n}},function(t,e,i){var n=i(138),r="object"==typeof self&&self&&self.Object===Object&&self,o=n||r||Function("return this")();t.exports=o},function(t,e,i){var n=i(82).Symbol;t.exports=n},function(t,e,i){var n=i(55),r=i(53);t.exports=function(t,e,i){var o=!0,s=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return r(i)&&(o="leading"in i?!!i.leading:o,s="trailing"in i?!!i.trailing:s),n(t,e,{leading:o,maxWait:e,trailing:s})}},function(t,i){t.exports=e},function(t,e,i){"use strict";i.r(e),function(t){var n=i(58),r=i(39),o=i(2),s=i(28),a=i(0),l=i(1);i(54),i(22),i(56);function c(t,e){return new n.a(t,e)}c.VERSION=l.b,void 0!==t&&(t.EPUBJS_VERSION=l.b),c.Book=n.a,c.Rendition=r.a,c.Contents=s.a,c.CFI=o.a,c.utils=a,e.default=c}.call(this,i(30))},function(t,e,i){"use strict";i(88);var n=i(19),r=i(12),o=i(8),s=i(48),a=i(15),l=o("species"),c=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),h="$0"==="a".replace(/./,"$0"),u=o("replace"),d=!!/./[u]&&""===/./[u]("a","$0"),f=!r((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}));t.exports=function(t,e,i,u){var p=o(t),g=!r((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),m=g&&!r((function(){var e=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[l]=function(){return i},i.flags="",i[p]=/./[p]),i.exec=function(){return e=!0,null},i[p](""),!e}));if(!g||!m||"replace"===t&&(!c||!h||d)||"split"===t&&!f){var v=/./[p],y=i(p,""[t],(function(t,e,i,n,r){return e.exec===s?g&&!r?{done:!0,value:v.call(e,i,n)}:{done:!0,value:t.call(i,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:h,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),b=y[0],w=y[1];n(String.prototype,t,b),n(RegExp.prototype,p,2==e?function(t,e){return w.call(t,this,e)}:function(t){return w.call(t,this)})}u&&a(RegExp.prototype[p],"sham",!0)}},function(t,e,i){"use strict";var n=i(31),r=i(48);n({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(t,e,i){var n=i(7),r=i(64),o=n.WeakMap;t.exports="function"==typeof o&&/native code/.test(r(o))},function(t,e,i){var n=i(10),r=i(91),o=i(59),s=i(18);t.exports=function(t,e){for(var i=r(e),a=s.f,l=o.f,c=0;c<i.length;c++){var h=i[c];n(t,h)||a(t,h,l(e,h))}}},function(t,e,i){var n=i(45),r=i(93),o=i(69),s=i(13);t.exports=n("Reflect","ownKeys")||function(t){var e=r.f(s(t)),i=o.f;return i?e.concat(i(t)):e}},function(t,e,i){var n=i(7);t.exports=n},function(t,e,i){var n=i(68),r=i(47).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,r)}},function(t,e,i){var n=i(32),r=i(46),o=i(95),s=function(t){return function(e,i,s){var a,l=n(e),c=r(l.length),h=o(s,c);if(t&&i!=i){for(;c>h;)if((a=l[h++])!=a)return!0}else for(;c>h;h++)if((t||h in l)&&l[h]===i)return t||h||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},function(t,e,i){var n=i(35),r=Math.max,o=Math.min;t.exports=function(t,e){var i=n(t);return i<0?r(i+e,0):o(i,e)}},function(t,e,i){var n=i(12),r=/#|\.prototype\./,o=function(t,e){var i=a[s(t)];return i==c||i!=l&&("function"==typeof e?n(e):!!e)},s=o.normalize=function(t){return String(t).replace(r,".").toLowerCase()},a=o.data={},l=o.NATIVE="N",c=o.POLYFILL="P";t.exports=o},function(t,e,i){"use strict";var n=i(13);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,i){"use strict";var n=i(12);function r(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=n((function(){var t=r("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=n((function(){var t=r("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,i){var n=i(70);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,i){"use strict";var n=i(49).charAt;t.exports=function(t,e,i){return e+(i?n(t,e).length:1)}},function(t,e,i){var n=i(40),r=i(48);t.exports=function(t,e){var i=t.exec;if("function"==typeof i){var o=i.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==n(t))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(t,e)}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,i){var n=i(8),r=i(50),o=i(18),s=n("unscopables"),a=Array.prototype;null==a[s]&&o.f(a,s,{configurable:!0,value:r(null)}),t.exports=function(t){a[s][t]=!0}},function(t,e,i){var n=i(45);t.exports=n("document","documentElement")},function(t,e,i){var n=i(12);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,i){var n=i(13),r=i(107);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),e=i instanceof Array}catch(t){}return function(i,o){return n(i),r(o),e?t.call(i,o):i.__proto__=o,i}}():void 0)},function(t,e,i){var n=i(17);t.exports=function(t){if(!n(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,i){"use strict";var n=i(109),r=i(117),o=i(118),s=i(119);(t.exports=function(t,e){var i,o,a,l,c;return arguments.length<2||"string"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(i=a=!0,o=!1):(i=s.call(t,"c"),o=s.call(t,"e"),a=s.call(t,"w")),c={value:e,configurable:i,enumerable:o,writable:a},l?n(r(l),c):c}).gs=function(t,e,i){var a,l,c,h;return"string"!=typeof t?(c=i,i=e,e=t,t=null):c=arguments[3],null==e?e=void 0:o(e)?null==i?i=void 0:o(i)||(c=i,i=void 0):(c=e,e=i=void 0),null==t?(a=!0,l=!1):(a=s.call(t,"c"),l=s.call(t,"e")),h={get:e,set:i,configurable:a,enumerable:l},c?n(r(c),h):h}},function(t,e,i){"use strict";t.exports=i(110)()?Object.assign:i(111)},function(t,e,i){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,i){"use strict";var n=i(112),r=i(116),o=Math.max;t.exports=function(t,e){var i,s,a,l=o(arguments.length,2);for(t=Object(r(t)),a=function(n){try{t[n]=e[n]}catch(t){i||(i=t)}},s=1;s<l;++s)n(e=arguments[s]).forEach(a);if(void 0!==i)throw i;return t}},function(t,e,i){"use strict";t.exports=i(113)()?Object.keys:i(114)},function(t,e,i){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e,i){"use strict";var n=i(51),r=Object.keys;t.exports=function(t){return r(n(t)?Object(t):t)}},function(t,e,i){"use strict";t.exports=function(){}},function(t,e,i){"use strict";var n=i(51);t.exports=function(t){if(!n(t))throw new TypeError("Cannot use null or undefined");return t}},function(t,e,i){"use strict";var n=i(51),r=Array.prototype.forEach,o=Object.create,s=function(t,e){var i;for(i in t)e[i]=t[i]};t.exports=function(t){var e=o(null);return r.call(arguments,(function(t){n(t)&&s(Object(t),e)})),e}},function(t,e,i){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,i){"use strict";t.exports=i(120)()?String.prototype.contains:i(121)},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"))}},function(t,e,i){"use strict";var n=String.prototype.indexOf;t.exports=function(t){return n.call(this,t,arguments[1])>-1}},function(t,e,i){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,i){"use strict";var n=i(49).charAt,r=i(26),o=i(74),s=r.set,a=r.getterFor("String Iterator");o(String,"String",(function(t){s(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=a(this),i=e.string,r=e.index;return r>=i.length?{value:void 0,done:!0}:(t=n(i,r),e.index+=t.length,{value:t,done:!1})}))},function(t,e,i){"use strict";var n=i(16),r=i(12),o=i(73),s=i(69),a=i(60),l=i(36),c=i(61),h=Object.assign,u=Object.defineProperty;t.exports=!h||r((function(){if(n&&1!==h({b:1},h(u({},"a",{enumerable:!0,get:function(){u(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},i=Symbol();return t[i]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=h({},t)[i]||"abcdefghijklmnopqrst"!=o(h({},e)).join("")}))?function(t,e){for(var i=l(t),r=arguments.length,h=1,u=s.f,d=a.f;r>h;)for(var f,p=c(arguments[h++]),g=u?o(p).concat(u(p)):o(p),m=g.length,v=0;m>v;)f=g[v++],n&&!d.call(p,f)||(i[f]=p[f]);return i}:h},function(t,e,i){"use strict";var n=i(80),r=i(36),o=i(127),s=i(128),a=i(46),l=i(129),c=i(52);t.exports=function(t){var e,i,h,u,d,f,p=r(t),g="function"==typeof this?this:Array,m=arguments.length,v=m>1?arguments[1]:void 0,y=void 0!==v,b=c(p),w=0;if(y&&(v=n(v,m>2?arguments[2]:void 0,2)),null==b||g==Array&&s(b))for(i=new g(e=a(p.length));e>w;w++)f=y?v(p[w],w):p[w],l(i,w,f);else for(d=(u=b.call(p)).next,i=new g;!(h=d.call(u)).done;w++)f=y?o(u,v,[h.value,w],!0):h.value,l(i,w,f);return i.length=w,i}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,i){var n=i(13);t.exports=function(t,e,i,r){try{return r?e(n(i)[0],i[1]):e(i)}catch(e){var o=t.return;throw void 0!==o&&n(o.call(t)),e}}},function(t,e,i){var n=i(8),r=i(27),o=n("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||s[o]===t)}},function(t,e,i){"use strict";var n=i(41),r=i(18),o=i(25);t.exports=function(t,e,i){var s=n(e);s in t?r.f(t,s,o(0,i)):t[s]=i}},function(t,e,i){var n={};n[i(8)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,i){"use strict";var n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,o="Overflow: input needs wider integers to process",s=Math.floor,a=String.fromCharCode,l=function(t){return t+22+75*(t<26)},c=function(t,e,i){var n=0;for(t=i?s(t/700):t>>1,t+=s(t/e);t>455;n+=36)t=s(t/35);return s(n+36*t/(t+38))},h=function(t){var e,i,n=[],r=(t=function(t){for(var e=[],i=0,n=t.length;i<n;){var r=t.charCodeAt(i++);if(r>=55296&&r<=56319&&i<n){var o=t.charCodeAt(i++);56320==(64512&o)?e.push(((1023&r)<<10)+(1023&o)+65536):(e.push(r),i--)}else e.push(r)}return e}(t)).length,h=128,u=0,d=72;for(e=0;e<t.length;e++)(i=t[e])<128&&n.push(a(i));var f=n.length,p=f;for(f&&n.push("-");p<r;){var g=2147483647;for(e=0;e<t.length;e++)(i=t[e])>=h&&i<g&&(g=i);var m=p+1;if(g-h>s((2147483647-u)/m))throw RangeError(o);for(u+=(g-h)*m,h=g,e=0;e<t.length;e++){if((i=t[e])<h&&++u>2147483647)throw RangeError(o);if(i==h){for(var v=u,y=36;;y+=36){var b=y<=d?1:y>=d+26?26:y-d;if(v<b)break;var w=v-b,x=36-b;n.push(a(l(b+w%x))),v=s(w/x)}n.push(a(l(v))),d=c(u,m,p==f),u=0,++p}}++u,++h}return n.join("")};t.exports=function(t){var e,i,o=[],s=t.toLowerCase().replace(r,".").split(".");for(e=0;e<s.length;e++)i=s[e],o.push(n.test(i)?"xn--"+h(i):i);return o.join(".")}},function(t,e,i){"use strict";i(71);var n=i(31),r=i(45),o=i(78),s=i(19),a=i(133),l=i(37),c=i(75),h=i(26),u=i(79),d=i(10),f=i(80),p=i(81),g=i(13),m=i(17),v=i(50),y=i(25),b=i(134),w=i(52),x=i(8),_=r("fetch"),k=r("Headers"),E=x("iterator"),S=h.set,T=h.getterFor("URLSearchParams"),C=h.getterFor("URLSearchParamsIterator"),O=/\+/g,A=Array(4),N=function(t){return A[t-1]||(A[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},I=function(t){try{return decodeURIComponent(t)}catch(e){return t}},R=function(t){var e=t.replace(O," "),i=4;try{return decodeURIComponent(e)}catch(t){for(;i;)e=e.replace(N(i--),I);return e}},j=/[!'()~]|%20/g,L={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},z=function(t){return L[t]},D=function(t){return encodeURIComponent(t).replace(j,z)},P=function(t,e){if(e)for(var i,n,r=e.split("&"),o=0;o<r.length;)(i=r[o++]).length&&(n=i.split("="),t.push({key:R(n.shift()),value:R(n.join("="))}))},B=function(t){this.entries.length=0,P(this.entries,t)},M=function(t,e){if(t<e)throw TypeError("Not enough arguments")},F=c((function(t,e){S(this,{type:"URLSearchParamsIterator",iterator:b(T(t).entries),kind:e})}),"Iterator",(function(){var t=C(this),e=t.kind,i=t.iterator.next(),n=i.value;return i.done||(i.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),i})),q=function(){u(this,q,"URLSearchParams");var t,e,i,n,r,o,s,a,l,c=arguments.length>0?arguments[0]:void 0,h=this,f=[];if(S(h,{type:"URLSearchParams",entries:f,updateURL:function(){},updateSearchParams:B}),void 0!==c)if(m(c))if("function"==typeof(t=w(c)))for(i=(e=t.call(c)).next;!(n=i.call(e)).done;){if((s=(o=(r=b(g(n.value))).next).call(r)).done||(a=o.call(r)).done||!o.call(r).done)throw TypeError("Expected sequence with length 2");f.push({key:s.value+"",value:a.value+""})}else for(l in c)d(c,l)&&f.push({key:l,value:c[l]+""});else P(f,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},U=q.prototype;a(U,{append:function(t,e){M(arguments.length,2);var i=T(this);i.entries.push({key:t+"",value:e+""}),i.updateURL()},delete:function(t){M(arguments.length,1);for(var e=T(this),i=e.entries,n=t+"",r=0;r<i.length;)i[r].key===n?i.splice(r,1):r++;e.updateURL()},get:function(t){M(arguments.length,1);for(var e=T(this).entries,i=t+"",n=0;n<e.length;n++)if(e[n].key===i)return e[n].value;return null},getAll:function(t){M(arguments.length,1);for(var e=T(this).entries,i=t+"",n=[],r=0;r<e.length;r++)e[r].key===i&&n.push(e[r].value);return n},has:function(t){M(arguments.length,1);for(var e=T(this).entries,i=t+"",n=0;n<e.length;)if(e[n++].key===i)return!0;return!1},set:function(t,e){M(arguments.length,1);for(var i,n=T(this),r=n.entries,o=!1,s=t+"",a=e+"",l=0;l<r.length;l++)(i=r[l]).key===s&&(o?r.splice(l--,1):(o=!0,i.value=a));o||r.push({key:s,value:a}),n.updateURL()},sort:function(){var t,e,i,n=T(this),r=n.entries,o=r.slice();for(r.length=0,i=0;i<o.length;i++){for(t=o[i],e=0;e<i;e++)if(r[e].key>t.key){r.splice(e,0,t);break}e===i&&r.push(t)}n.updateURL()},forEach:function(t){for(var e,i=T(this).entries,n=f(t,arguments.length>1?arguments[1]:void 0,3),r=0;r<i.length;)n((e=i[r++]).value,e.key,this)},keys:function(){return new F(this,"keys")},values:function(){return new F(this,"values")},entries:function(){return new F(this,"entries")}},{enumerable:!0}),s(U,E,U.entries),s(U,"toString",(function(){for(var t,e=T(this).entries,i=[],n=0;n<e.length;)t=e[n++],i.push(D(t.key)+"="+D(t.value));return i.join("&")}),{enumerable:!0}),l(q,"URLSearchParams"),n({global:!0,forced:!o},{URLSearchParams:q}),o||"function"!=typeof _||"function"!=typeof k||n({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,i,n,r=[t];return arguments.length>1&&(m(e=arguments[1])&&(i=e.body,"URLSearchParams"===p(i)&&((n=e.headers?new k(e.headers):new k).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=v(e,{body:y(0,String(i)),headers:y(0,n)}))),r.push(e)),_.apply(this,r)}}),t.exports={URLSearchParams:q,getState:T}},function(t,e,i){var n=i(19);t.exports=function(t,e,i){for(var r in e)n(t,r,e[r],i);return t}},function(t,e,i){var n=i(13),r=i(52);t.exports=function(t){var e=r(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return n(e.call(t))}},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}},function(t,e,i){"use strict";function n(t,e){function i(i){for(var n=e.length-1;n>=0;n--){var s=e[n],a=i.clientX,l=i.clientY;if(i.touches&&i.touches.length&&(a=i.touches[0].clientX,l=i.touches[0].clientY),o(s,t,a,l)){s.dispatchEvent(r(i));break}}}if("iframe"===t.nodeName||"IFRAME"===t.nodeName)try{this.target=t.contentDocument}catch(e){this.target=t}else this.target=t;for(var n=["mouseup","mousedown","click","touchstart"],s=0;s<n.length;s++){var a=n[s];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 o(t,e,i,n){var r=e.getBoundingClientRect();function o(t,e,i){var n=t.top-r.top,o=t.left-r.left,s=n+t.height,a=o+t.width;return n<=i&&o<=e&&s>i&&a>e}if(!o(t.getBoundingClientRect(),i,n))return!1;for(var s=t.getClientRects(),a=0,l=s.length;a<l;a++)if(o(s[a],i,n))return!0;return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.proxyMouse=n,e.clone=r,e.default={proxyMouse:n}},function(t,e,i){var n=i(82);t.exports=function(){return n.Date.now()}},function(t,e,i){(function(e){var i="object"==typeof e&&e&&e.Object===Object&&e;t.exports=i}).call(this,i(30))},function(t,e,i){var n=i(53),r=i(140),o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return NaN;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var i=a.test(t);return i||l.test(t)?c(t.slice(2),i?2:8):s.test(t)?NaN:+t}},function(t,e,i){var n=i(141),r=i(144);t.exports=function(t){return"symbol"==typeof t||r(t)&&"[object Symbol]"==n(t)}},function(t,e,i){var n=i(83),r=i(142),o=i(143),s=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?r(t):o(t)}},function(t,e,i){var n=i(83),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),i=t[a];try{t[a]=void 0;var n=!0}catch(t){}var r=s.call(t);return n&&(e?t[a]=i:delete t[a]),r}},function(t,e){var i=Object.prototype.toString;t.exports=function(t){return i.call(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}}]).default})),
+function(t,e){var i,n,r,o,s,a,l,c,h,u,d,f,p,g,m,y,b,w="sizzle"+-new Date,x=t.document,_={},k=0,E=0,S=tt(),T=tt(),C=tt(),O=[],A=O.pop,N=O.push,I=O.slice,R=O.indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(this[e]===t)return e;return-1},j="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",z=L.replace("w","w#"),D="\\["+j+"*("+L+")"+j+"*(?:([*^$|!~]?=)"+j+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+z+")|)|)"+j+"*\\]",P=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+D.replace(3,8)+")*)|.*)\\)|)",B=new RegExp("^"+j+"+|((?:^|[^\\\\])(?:\\\\.)*)"+j+"+$","g"),M=new RegExp("^"+j+"*,"+j+"*"),F=new RegExp("^"+j+"*([\\x20\\t\\r\\n\\f>+~])"+j+"*"),q=new RegExp(P),U=new RegExp("^"+z+"$"),W={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),NAME:new RegExp("^\\[name=['\"]?("+L+")['\"]?\\]"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+D),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},$=/[\x20\t\r\n\f]*[+~]/,H=/^[^{]+\{\s*\[native code/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,Z=/'|\\/g,G=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,K=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,J=function(t,e){var i="0x"+e-65536;return i!=i?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{I.call(x.documentElement.childNodes,0)[0].nodeType}catch(t){I=function(t){for(var e,i=[];e=this[t++];)i.push(e);return i}}function Q(t){return H.test(t+"")}function tt(){var t,e=[];return t=function(i,n){return e.push(i+=" ")>r.cacheLength&&delete t[e.shift()],t[i]=n}}function et(t){return t[w]=!0,t}function it(t){var e=u.createElement("div");try{return t(e)}catch(t){return!1}finally{e=null}}function nt(t,e,i,n){var o,s,l,c,d,g,m,v,b,k;if((e?e.ownerDocument||e:x)!==u&&h(e),i=i||[],!t||"string"!=typeof t)return i;if(1!==(c=(e=e||u).nodeType)&&9!==c)return[];if(!f&&!n){if(o=X.exec(t))if(l=o[1]){if(9===c){if(!(s=e.getElementById(l))||!s.parentNode)return i;if(s.id===l)return i.push(s),i}else if(e.ownerDocument&&(s=e.ownerDocument.getElementById(l))&&y(e,s)&&s.id===l)return i.push(s),i}else{if(o[2])return N.apply(i,I.call(e.getElementsByTagName(t),0)),i;if((l=o[3])&&_.getByClassName&&e.getElementsByClassName)return N.apply(i,I.call(e.getElementsByClassName(l),0)),i}if(_.qsa&&!p.test(t)){if(m=!0,v=w,b=e,k=9===c&&t,1===c&&"object"!==e.nodeName.toLowerCase()){for(g=lt(t),(m=e.getAttribute("id"))?v=m.replace(Z,"\\$&"):e.setAttribute("id",v),v="[id='"+v+"'] ",d=g.length;d--;)g[d]=v+ct(g[d]);b=$.test(t)&&e.parentNode||e,k=g.join(",")}if(k)try{return N.apply(i,I.call(b.querySelectorAll(k),0)),i}catch(t){}finally{m||e.removeAttribute("id")}}}return function(t,e,i,n){var o,s,l,c,h,u=lt(t);if(!n&&1===u.length){if((s=u[0]=u[0].slice(0)).length>2&&"ID"===(l=s[0]).type&&9===e.nodeType&&!f&&r.relative[s[1].type]){if(!(e=r.find.ID(l.matches[0].replace(K,J),e)[0]))return i;t=t.slice(s.shift().value.length)}for(o=W.needsContext.test(t)?0:s.length;o--&&(l=s[o],!r.relative[c=l.type]);)if((h=r.find[c])&&(n=h(l.matches[0].replace(K,J),$.test(s[0].type)&&e.parentNode||e))){if(s.splice(o,1),!(t=n.length&&ct(s)))return N.apply(i,I.call(n,0)),i;break}}return a(t,u)(n,e,f,i,$.test(t)),i}(t.replace(B,"$1"),e,i,n)}function rt(t,e){var i=e&&t,n=i&&(~e.sourceIndex||1<<31)-(~t.sourceIndex||1<<31);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function ot(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function st(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function at(t){return et((function(e){return e=+e,et((function(i,n){for(var r,o=t([],i.length,e),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))}))}))}for(i in s=nt.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},h=nt.setDocument=function(t){var e=t?t.ownerDocument||t:x;return e!==u&&9===e.nodeType&&e.documentElement?(u=e,d=e.documentElement,f=s(e),_.tagNameNoComments=it((function(t){return t.appendChild(e.createComment("")),!t.getElementsByTagName("*").length})),_.attributes=it((function(t){t.innerHTML="<select></select>";var e=typeof t.lastChild.getAttribute("multiple");return"boolean"!==e&&"string"!==e})),_.getByClassName=it((function(t){return t.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!(!t.getElementsByClassName||!t.getElementsByClassName("e").length)&&(t.lastChild.className="e",2===t.getElementsByClassName("e").length)})),_.getByName=it((function(t){t.id=w+0,t.innerHTML="<a name='"+w+"'></a><div name='"+w+"'></div>",d.insertBefore(t,d.firstChild);var i=e.getElementsByName&&e.getElementsByName(w).length===2+e.getElementsByName(w+0).length;return _.getIdNotName=!e.getElementById(w),d.removeChild(t),i})),r.attrHandle=it((function(t){return t.innerHTML="<a href='#'></a>",t.firstChild&&void 0!==t.firstChild.getAttribute&&"#"===t.firstChild.getAttribute("href")}))?{}:{href:function(t){return t.getAttribute("href",2)},type:function(t){return t.getAttribute("type")}},_.getIdNotName?(r.find.ID=function(t,e){if(void 0!==e.getElementById&&!f){var i=e.getElementById(t);return i&&i.parentNode?[i]:[]}},r.filter.ID=function(t){var e=t.replace(K,J);return function(t){return t.getAttribute("id")===e}}):(r.find.ID=function(t,e){if(void 0!==e.getElementById&&!f){var i=e.getElementById(t);return i?i.id===t||void 0!==i.getAttributeNode&&i.getAttributeNode("id").value===t?[i]:void 0:[]}},r.filter.ID=function(t){var e=t.replace(K,J);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}}),r.find.TAG=_.tagNameNoComments?function(t,e){if(void 0!==e.getElementsByTagName)return e.getElementsByTagName(t)}:function(t,e){var i,n=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},r.find.NAME=_.getByName&&function(t,e){if(void 0!==e.getElementsByName)return e.getElementsByName(name)},r.find.CLASS=_.getByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&!f)return e.getElementsByClassName(t)},g=[],p=[":focus"],(_.qsa=Q(e.querySelectorAll))&&(it((function(t){t.innerHTML="<select><option selected=''></option></select>",t.querySelectorAll("[selected]").length||p.push("\\["+j+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),t.querySelectorAll(":checked").length||p.push(":checked")})),it((function(t){t.innerHTML="<input type='hidden' i=''/>",t.querySelectorAll("[i^='']").length&&p.push("[*^$]="+j+"*(?:\"\"|'')"),t.querySelectorAll(":enabled").length||p.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),p.push(",.*:")}))),(_.matchesSelector=Q(m=d.matchesSelector||d.mozMatchesSelector||d.webkitMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&it((function(t){_.disconnectedMatch=m.call(t,"div"),m.call(t,"[s!='']:x"),g.push("!=",P)})),p=new RegExp(p.join("|")),g=new RegExp(g.join("|")),y=Q(d.contains)||d.compareDocumentPosition?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},b=d.compareDocumentPosition?function(t,i){var n;return t===i?(l=!0,0):(n=i.compareDocumentPosition&&t.compareDocumentPosition&&t.compareDocumentPosition(i))?1&n||t.parentNode&&11===t.parentNode.nodeType?t===e||y(x,t)?-1:i===e||y(x,i)?1:0:4&n?-1:1:t.compareDocumentPosition?-1:1}:function(t,i){var n,r=0,o=t.parentNode,s=i.parentNode,a=[t],c=[i];if(t===i)return l=!0,0;if(!o||!s)return t===e?-1:i===e?1:o?-1:s?1:0;if(o===s)return rt(t,i);for(n=t;n=n.parentNode;)a.unshift(n);for(n=i;n=n.parentNode;)c.unshift(n);for(;a[r]===c[r];)r++;return r?rt(a[r],c[r]):a[r]===x?-1:c[r]===x?1:0},l=!1,[0,0].sort(b),_.detectDuplicates=l,u):u},nt.matches=function(t,e){return nt(t,null,null,e)},nt.matchesSelector=function(t,e){if((t.ownerDocument||t)!==u&&h(t),e=e.replace(G,"='$1']"),_.matchesSelector&&!f&&(!g||!g.test(e))&&!p.test(e))try{var i=m.call(t,e);if(i||_.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return nt(e,u,null,[t]).length>0},nt.contains=function(t,e){return(t.ownerDocument||t)!==u&&h(t),y(t,e)},nt.attr=function(t,e){var i;return(t.ownerDocument||t)!==u&&h(t),f||(e=e.toLowerCase()),(i=r.attrHandle[e])?i(t):f||_.attributes?t.getAttribute(e):((i=t.getAttributeNode(e))||t.getAttribute(e))&&!0===t[e]?e:i&&i.specified?i.value:null},nt.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},nt.uniqueSort=function(t){var e,i=[],n=1,r=0;if(l=!_.detectDuplicates,t.sort(b),l){for(;e=t[n];n++)e===t[n-1]&&(r=i.push(n));for(;r--;)t.splice(i[r],1)}return t},o=nt.getText=function(t){var e,i="",n=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=o(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[n];n++)i+=o(e);return i},r=nt.selectors={cacheLength:50,createPseudo:et,match:W,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(K,J),t[3]=(t[4]||t[5]||"").replace(K,J),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||nt.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&nt.error(t[0]),t},PSEUDO:function(t){var e,i=!t[5]&&t[2];return W.CHILD.test(t[0])?null:(t[4]?t[2]=t[4]:i&&q.test(i)&&(e=lt(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){return"*"===t?function(){return!0}:(t=t.replace(K,J).toLowerCase(),function(e){return e.nodeName&&e.nodeName.toLowerCase()===t})},CLASS:function(t){var e=S[t+" "];return e||(e=new RegExp("(^|"+j+")"+t+"("+j+"|$)"))&&S(t,(function(t){return e.test(t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,i){return function(n){var r=nt.attr(n,t);return null==r?"!="===e:!e||(r+="","="===e?r===i:"!="===e?r!==i:"^="===e?i&&0===r.indexOf(i):"*="===e?i&&r.indexOf(i)>-1:"$="===e?i&&r.slice(-i.length)===i:"~="===e?(" "+r+" ").indexOf(i)>-1:"|="===e&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===r?function(t){return!!t.parentNode}:function(e,i,l){var c,h,u,d,f,p,g=o!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a;if(m){if(o){for(;g;){for(u=e;u=u[g];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&y){for(f=(c=(h=m[w]||(m[w]={}))[t]||[])[0]===k&&c[1],d=c[0]===k&&c[2],u=f&&m.childNodes[f];u=++f&&u&&u[g]||(d=f=0)||p.pop();)if(1===u.nodeType&&++d&&u===e){h[t]=[k,f,d];break}}else if(y&&(c=(e[w]||(e[w]={}))[t])&&c[0]===k)d=c[1];else for(;(u=++f&&u&&u[g]||(d=f=0)||p.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++d||(y&&((u[w]||(u[w]={}))[t]=[k,d]),u!==e)););return(d-=r)===n||d%n==0&&d/n>=0}}},PSEUDO:function(t,e){var i,n=r.pseudos[t]||r.setFilters[t.toLowerCase()]||nt.error("unsupported pseudo: "+t);return n[w]?n(e):n.length>1?(i=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,i){for(var r,o=n(t,e),s=o.length;s--;)t[r=R.call(t,o[s])]=!(i[r]=o[s])})):function(t){return n(t,0,i)}):n}},pseudos:{not:et((function(t){var e=[],i=[],n=a(t.replace(B,"$1"));return n[w]?et((function(t,e,i,r){for(var o,s=n(t,null,r,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))})):function(t,r,o){return e[0]=t,n(e,null,o,i),!i.pop()}})),has:et((function(t){return function(e){return nt(t,e).length>0}})),contains:et((function(t){return function(e){return(e.textContent||e.innerText||o(e)).indexOf(t)>-1}})),lang:et((function(t){return U.test(t||"")||nt.error("unsupported lang: "+t),t=t.replace(K,J).toLowerCase(),function(e){var i;do{if(i=f?e.getAttribute("xml:lang")||e.getAttribute("lang"):e.lang)return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===d},focus:function(t){return t===u.activeElement&&(!u.hasFocus||u.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeName>"@"||3===t.nodeType||4===t.nodeType)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return V.test(t.nodeName)},input:function(t){return Y.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||e.toLowerCase()===t.type)},first:at((function(){return[0]})),last:at((function(t,e){return[e-1]})),eq:at((function(t,e,i){return[i<0?i+e:i]})),even:at((function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t})),odd:at((function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t})),lt:at((function(t,e,i){for(var n=i<0?i+e:i;--n>=0;)t.push(n);return t})),gt:at((function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t}))}},{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[i]=ot(i);for(i in{submit:!0,reset:!0})r.pseudos[i]=st(i);function lt(t,e){var i,n,o,s,a,l,c,h=T[t+" "];if(h)return e?0:h.slice(0);for(a=t,l=[],c=r.preFilter;a;){for(s in i&&!(n=M.exec(a))||(n&&(a=a.slice(n[0].length)||a),l.push(o=[])),i=!1,(n=F.exec(a))&&(i=n.shift(),o.push({value:i,type:n[0].replace(B," ")}),a=a.slice(i.length)),r.filter)!(n=W[s].exec(a))||c[s]&&!(n=c[s](n))||(i=n.shift(),o.push({value:i,type:s,matches:n}),a=a.slice(i.length));if(!i)break}return e?a.length:a?nt.error(t):T(t,l).slice(0)}function ct(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function ht(t,e,i){var r=e.dir,o=i&&"parentNode"===r,s=E++;return e.first?function(e,i,n){for(;e=e[r];)if(1===e.nodeType||o)return t(e,i,n)}:function(e,i,a){var l,c,h,u=k+" "+s;if(a){for(;e=e[r];)if((1===e.nodeType||o)&&t(e,i,a))return!0}else for(;e=e[r];)if(1===e.nodeType||o)if((c=(h=e[w]||(e[w]={}))[r])&&c[0]===u){if(!0===(l=c[1])||l===n)return!0===l}else if((c=h[r]=[u])[1]=t(e,i,a)||n,!0===c[1])return!0}}function ut(t){return t.length>1?function(e,i,n){for(var r=t.length;r--;)if(!t[r](e,i,n))return!1;return!0}:t[0]}function dt(t,e,i,n,r){for(var o,s=[],a=0,l=t.length,c=null!=e;a<l;a++)(o=t[a])&&(i&&!i(o,n,r)||(s.push(o),c&&e.push(a)));return s}function ft(t,e,i,n,r,o){return n&&!n[w]&&(n=ft(n)),r&&!r[w]&&(r=ft(r,o)),et((function(o,s,a,l){var c,h,u,d=[],f=[],p=s.length,g=o||function(t,e,i){for(var n=0,r=e.length;n<r;n++)nt(t,e[n],i);return i}(e||"*",a.nodeType?[a]:a,[]),m=!t||!o&&e?g:dt(g,d,t,a,l),v=i?r||(o?t:p||n)?[]:s:m;if(i&&i(m,v,a,l),n)for(c=dt(v,f),n(c,[],a,l),h=c.length;h--;)(u=c[h])&&(v[f[h]]=!(m[f[h]]=u));if(o){if(r||t){if(r){for(c=[],h=v.length;h--;)(u=v[h])&&c.push(m[h]=u);r(null,v=[],c,l)}for(h=v.length;h--;)(u=v[h])&&(c=r?R.call(o,u):d[h])>-1&&(o[c]=!(s[c]=u))}}else v=dt(v===s?v.splice(p,v.length):v),r?r(null,s,v,l):N.apply(s,v)}))}function pt(t){for(var e,i,n,o=t.length,s=r.relative[t[0].type],a=s||r.relative[" "],l=s?1:0,h=ht((function(t){return t===e}),a,!0),u=ht((function(t){return R.call(e,t)>-1}),a,!0),d=[function(t,i,n){return!s&&(n||i!==c)||((e=i).nodeType?h(t,i,n):u(t,i,n))}];l<o;l++)if(i=r.relative[t[l].type])d=[ht(ut(d),i)];else{if((i=r.filter[t[l].type].apply(null,t[l].matches))[w]){for(n=++l;n<o&&!r.relative[t[n].type];n++);return ft(l>1&&ut(d),l>1&&ct(t.slice(0,l-1)).replace(B,"$1"),i,l<n&&pt(t.slice(l,n)),n<o&&pt(t=t.slice(n)),n<o&&ct(t))}d.push(i)}return ut(d)}function gt(){}a=nt.compile=function(t,e){var i,o=[],s=[],a=C[t+" "];if(!a){for(e||(e=lt(t)),i=e.length;i--;)(a=pt(e[i]))[w]?o.push(a):s.push(a);a=C(t,function(t,e){var i=0,o=e.length>0,s=t.length>0,a=function(a,l,h,d,f){var p,g,m,v=[],y=0,b="0",w=a&&[],x=null!=f,_=c,E=a||s&&r.find.TAG("*",f&&l.parentNode||l),S=k+=null==_?1:Math.random()||.1;for(x&&(c=l!==u&&l,n=i);null!=(p=E[b]);b++){if(s&&p){for(g=0;m=t[g++];)if(m(p,l,h)){d.push(p);break}x&&(k=S,n=++i)}o&&((p=!m&&p)&&y--,a&&w.push(p))}if(y+=b,o&&b!==y){for(g=0;m=e[g++];)m(w,v,l,h);if(a){if(y>0)for(;b--;)w[b]||v[b]||(v[b]=A.call(d));v=dt(v)}N.apply(d,v),x&&!a&&v.length>0&&y+e.length>1&&nt.uniqueSort(d)}return x&&(k=S,c=_),w};return o?et(a):a}(s,o))}return a},r.pseudos.nth=r.pseudos.eq,r.filters=gt.prototype=r.pseudos,r.setFilters=new gt,h(),nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(t);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,ot=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,at={children:!0,contents:!0,next:!0,prev:!0};function lt(t,e){do{t=t[e]}while(t&&1!==t.nodeType);return t}function ct(t,e,i){if(e=e||0,v.isFunction(e))return v.grep(t,(function(t,n){return!!e.call(t,n,t)===i}));if(e.nodeType)return v.grep(t,(function(t){return t===e===i}));if("string"==typeof e){var n=v.grep(t,(function(t){return 1===t.nodeType}));if(ot.test(e))return v.filter(e,n,!i);e=v.filter(e,n)}return v.grep(t,(function(t){return v.inArray(t,e)>=0===i}))}function ht(t){var e=ut.split("|"),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}v.fn.extend({find:function(t){var e,i,n,r=this.length;if("string"!=typeof t)return n=this,this.pushStack(v(t).filter((function(){for(e=0;e<r;e++)if(v.contains(n[e],this))return!0})));for(i=[],e=0;e<r;e++)v.find(t,this[e],i);return(i=this.pushStack(r>1?v.unique(i):i)).selector=(this.selector?this.selector+" ":"")+t,i},has:function(t){var e,i=v(t,this),n=i.length;return this.filter((function(){for(e=0;e<n;e++)if(v.contains(this,i[e]))return!0}))},not:function(t){return this.pushStack(ct(this,t,!1))},filter:function(t){return this.pushStack(ct(this,t,!0))},is:function(t){return!!t&&("string"==typeof t?st.test(t)?v(t,this.context).index(this[0])>=0:v.filter(t,this).length>0:this.filter(t).length>0)},closest:function(t,e){for(var i,n=0,r=this.length,o=[],s=st.test(t)||"string"!=typeof t?v(t,e||this.context):0;n<r;n++)for(i=this[n];i&&i.ownerDocument&&i!==e&&11!==i.nodeType;){if(s?s.index(i)>-1:v.find.matchesSelector(i,t)){o.push(i);break}i=i.parentNode}return this.pushStack(o.length>1?v.unique(o):o)},index:function(t){return t?"string"==typeof t?v.inArray(this[0],v(t)):v.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){var i="string"==typeof t?v(t,e):v.makeArray(t&&t.nodeType?[t]:t),n=v.merge(this.get(),i);return this.pushStack(v.unique(n))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return v.dir(t,"parentNode")},parentsUntil:function(t,e,i){return v.dir(t,"parentNode",i)},next:function(t){return lt(t,"nextSibling")},prev:function(t){return lt(t,"previousSibling")},nextAll:function(t){return v.dir(t,"nextSibling")},prevAll:function(t){return v.dir(t,"previousSibling")},nextUntil:function(t,e,i){return v.dir(t,"nextSibling",i)},prevUntil:function(t,e,i){return v.dir(t,"previousSibling",i)},siblings:function(t){return v.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return v.sibling(t.firstChild)},contents:function(t){return v.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:v.merge([],t.childNodes)}},(function(t,e){v.fn[t]=function(i,n){var r=v.map(this,e,i);return nt.test(t)||(n=i),n&&"string"==typeof n&&(r=v.filter(n,r)),r=this.length>1&&!at[t]?v.unique(r):r,this.length>1&&rt.test(t)&&(r=r.reverse()),this.pushStack(r)}})),v.extend({filter:function(t,e,i){return i&&(t=":not("+t+")"),1===e.length?v.find.matchesSelector(e[0],t)?[e[0]]:[]:v.find.matches(t,e)},dir:function(t,e,i){for(var n=[],r=t[e];r&&9!==r.nodeType&&(void 0===i||1!==r.nodeType||!v(r).is(i));)1===r.nodeType&&n.push(r),r=r[e];return n},sibling:function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}});var ut="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",dt=/ jQuery\d+="(?:null|\d+)"/g,ft=new RegExp("<(?:"+ut+")[\\s/>]","i"),pt=/^\s+/,gt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,mt=/<([\w:]+)/,vt=/<tbody/i,yt=/<|&#?\w+;/,bt=/<(?:script|style|link)/i,wt=/^(?:checkbox|radio)$/i,xt=/checked\s*(?:[^=]|=\s*.checked.)/i,_t=/^$|\/(?:java|ecma)script/i,kt=/^true\/(.*)/,Et=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,St={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:v.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Tt=ht(r).appendChild(r.createElement("div"));function Ct(t){var e=t.getAttributeNode("type");return t.type=(e&&e.specified)+"/"+t.type,t}function Ot(t){var e=kt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function At(t,e){for(var i,n=0;null!=(i=t[n]);n++)v._data(i,"globalEval",!e||v._data(e[n],"globalEval"))}function Nt(t,e){if(1===e.nodeType&&v.hasData(t)){var i,n,r,o=v._data(t),s=v._data(e,o),a=o.events;if(a)for(i in delete s.handle,s.events={},a)for(n=0,r=a[i].length;n<r;n++)v.event.add(e,i,a[i][n]);s.data&&(s.data=v.extend({},s.data))}}function It(t,e){var i,n,r;if(1===e.nodeType){if(i=e.nodeName.toLowerCase(),!v.support.noCloneEvent&&e[v.expando]){for(n in(r=v._data(e)).events)v.removeEvent(e,n,r.handle);e.removeAttribute(v.expando)}"script"===i&&e.text!==t.text?(Ct(e).text=t.text,Ot(e)):"object"===i?(e.parentNode&&(e.outerHTML=t.outerHTML),v.support.html5Clone&&t.innerHTML&&!v.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===i&&wt.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===i?e.defaultSelected=e.selected=t.defaultSelected:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}}function Rt(t,e){var i,n,r=0,o=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],i=t.childNodes||t;null!=(n=i[r]);r++)!e||v.nodeName(n,e)?o.push(n):v.merge(o,Rt(n,e));return void 0===e||e&&v.nodeName(t,e)?v.merge([t],o):o}function jt(t){wt.test(t.type)&&(t.defaultChecked=t.checked)}St.optgroup=St.option,St.tbody=St.tfoot=St.colgroup=St.caption=St.thead,St.th=St.td,v.fn.extend({text:function(t){return v.access(this,(function(t){return void 0===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(t))}),null,t,arguments.length)},wrapAll:function(t){if(v.isFunction(t))return this.each((function(e){v(this).wrapAll(t.call(this,e))}));if(this[0]){var e=v(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t})).append(this)}return this},wrapInner:function(t){return v.isFunction(t)?this.each((function(e){v(this).wrapInner(t.call(this,e))})):this.each((function(){var e=v(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)}))},wrap:function(t){var e=v.isFunction(t);return this.each((function(i){v(this).wrapAll(e?t.call(this,i):t)}))},unwrap:function(){return this.parent().each((function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)})).end()},append:function(){return this.domManip(arguments,!0,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(t)}))},prepend:function(){return this.domManip(arguments,!0,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(t,this.firstChild)}))},before:function(){return this.domManip(arguments,!1,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return this.domManip(arguments,!1,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},remove:function(t,e){for(var i,n=0;null!=(i=this[n]);n++)(!t||v.filter(t,[i]).length>0)&&(e||1!==i.nodeType||v.cleanData(Rt(i)),i.parentNode&&(e&&v.contains(i.ownerDocument,i)&&At(Rt(i,"script")),i.parentNode.removeChild(i)));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&v.cleanData(Rt(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&v.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return v.clone(this,t,e)}))},html:function(t){return v.access(this,(function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(dt,""):void 0;if("string"==typeof t&&!bt.test(t)&&(v.support.htmlSerialize||!ft.test(t))&&(v.support.leadingWhitespace||!pt.test(t))&&!St[(mt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(gt,"<$1></$2>");try{for(;i<n;i++)1===(e=this[i]||{}).nodeType&&(v.cleanData(Rt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(t){return v.isFunction(t)||"string"==typeof t||(t=v(t).not(this).detach()),this.domManip([t],!0,(function(t){var e=this.nextSibling,i=this.parentNode;i&&(v(this).remove(),i.insertBefore(t,e))}))},detach:function(t){return this.remove(t,!0)},domManip:function(t,e,i){t=h.apply([],t);var n,r,o,s,a,l,c,u,d=0,f=this.length,p=this,g=f-1,m=t[0],y=v.isFunction(m);if(y||!(f<=1||"string"!=typeof m||v.support.checkClone)&&xt.test(m))return this.each((function(n){var r=p.eq(n);y&&(t[0]=m.call(this,n,e?r.html():void 0)),r.domManip(t,e,i)}));if(f&&(n=(l=v.buildFragment(t,this[0].ownerDocument,!1,this)).firstChild,1===l.childNodes.length&&(l=n),n)){for(e=e&&v.nodeName(n,"tr"),o=(s=v.map(Rt(l,"script"),Ct)).length;d<f;d++)r=l,d!==g&&(r=v.clone(r,!0,!0),o&&v.merge(s,Rt(r,"script"))),i.call(e&&v.nodeName(this[d],"table")?(c=this[d],u="tbody",c.getElementsByTagName(u)[0]||c.appendChild(c.ownerDocument.createElement(u))):this[d],r,d);if(o)for(a=s[s.length-1].ownerDocument,v.map(s,Ot),d=0;d<o;d++)r=s[d],_t.test(r.type||"")&&!v._data(r,"globalEval")&&v.contains(a,r)&&(r.src?v.ajax({url:r.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):v.globalEval((r.text||r.textContent||r.innerHTML||"").replace(Et,"")));l=n=null}return this}}),v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){v.fn[t]=function(t){for(var i,n=0,r=[],o=v(t),s=o.length-1;n<=s;n++)i=n===s?this:this.clone(!0),v(o[n])[e](i),u.apply(r,i.get());return this.pushStack(r)}})),v.extend({clone:function(t,e,i){var n,r,o,s,a,l=v.contains(t.ownerDocument,t);if(v.support.html5Clone||v.isXMLDoc(t)||!ft.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(Tt.innerHTML=t.outerHTML,Tt.removeChild(o=Tt.firstChild)),!(v.support.noCloneEvent&&v.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||v.isXMLDoc(t)))for(n=Rt(o),a=Rt(t),s=0;null!=(r=a[s]);++s)n[s]&&It(r,n[s]);if(e)if(i)for(a=a||Rt(t),n=n||Rt(o),s=0;null!=(r=a[s]);s++)Nt(r,n[s]);else Nt(t,o);return(n=Rt(o,"script")).length>0&&At(n,!l&&Rt(t,"script")),n=a=r=null,o},buildFragment:function(t,e,i,n){for(var r,o,s,a,l,c,h,u=t.length,d=ht(e),f=[],p=0;p<u;p++)if((o=t[p])||0===o)if("object"===v.type(o))v.merge(f,o.nodeType?[o]:o);else if(yt.test(o)){for(a=a||d.appendChild(e.createElement("div")),l=(mt.exec(o)||["",""])[1].toLowerCase(),h=St[l]||St._default,a.innerHTML=h[1]+o.replace(gt,"<$1></$2>")+h[2],r=h[0];r--;)a=a.lastChild;if(!v.support.leadingWhitespace&&pt.test(o)&&f.push(e.createTextNode(pt.exec(o)[0])),!v.support.tbody)for(r=(o="table"!==l||vt.test(o)?"<table>"!==h[1]||vt.test(o)?0:a:a.firstChild)&&o.childNodes.length;r--;)v.nodeName(c=o.childNodes[r],"tbody")&&!c.childNodes.length&&o.removeChild(c);for(v.merge(f,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=d.lastChild}else f.push(e.createTextNode(o));for(a&&d.removeChild(a),v.support.appendChecked||v.grep(Rt(f,"input"),jt),p=0;o=f[p++];)if((!n||-1===v.inArray(o,n))&&(s=v.contains(o.ownerDocument,o),a=Rt(d.appendChild(o),"script"),s&&At(a),i))for(r=0;o=a[r++];)_t.test(o.type||"")&&i.push(o);return a=null,d},cleanData:function(t,e){for(var i,n,r,o,s=0,a=v.expando,l=v.cache,h=v.support.deleteExpando,u=v.event.special;null!=(i=t[s]);s++)if((e||v.acceptData(i))&&(o=(r=i[a])&&l[r])){if(o.events)for(n in o.events)u[n]?v.event.remove(i,n):v.removeEvent(i,n,o.handle);l[r]&&(delete l[r],h?delete i[a]:void 0!==i.removeAttribute?i.removeAttribute(a):i[a]=null,c.push(r))}}});var Lt,zt,Dt,Pt=/alpha\([^)]*\)/i,Bt=/opacity\s*=\s*([^)]*)/,Mt=/^(top|right|bottom|left)$/,Ft=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Ut=new RegExp("^("+y+")(.*)$","i"),Wt=new RegExp("^("+y+")(?!px)[a-z%]+$","i"),$t=new RegExp("^([+-])=("+y+")","i"),Ht={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Yt={letterSpacing:0,fontWeight:400},Vt=["Top","Right","Bottom","Left"],Zt=["Webkit","O","Moz","ms"];function Gt(t,e){if(e in t)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),n=e,r=Zt.length;r--;)if((e=Zt[r]+i)in t)return e;return n}function Kt(t,e){return t=e||t,"none"===v.css(t,"display")||!v.contains(t.ownerDocument,t)}function Jt(t,e){for(var i,n,r,o=[],s=0,a=t.length;s<a;s++)(n=t[s]).style&&(o[s]=v._data(n,"olddisplay"),i=n.style.display,e?(o[s]||"none"!==i||(n.style.display=""),""===n.style.display&&Kt(n)&&(o[s]=v._data(n,"olddisplay",ie(n.nodeName)))):o[s]||(r=Kt(n),(i&&"none"!==i||!r)&&v._data(n,"olddisplay",r?i:v.css(n,"display"))));for(s=0;s<a;s++)(n=t[s]).style&&(e&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=e?o[s]||"":"none"));return t}function Qt(t,e,i){var n=Ut.exec(e);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):e}function te(t,e,i,n,r){for(var o=i===(n?"border":"content")?4:"width"===e?1:0,s=0;o<4;o+=2)"margin"===i&&(s+=v.css(t,i+Vt[o],!0,r)),n?("content"===i&&(s-=v.css(t,"padding"+Vt[o],!0,r)),"margin"!==i&&(s-=v.css(t,"border"+Vt[o]+"Width",!0,r))):(s+=v.css(t,"padding"+Vt[o],!0,r),"padding"!==i&&(s+=v.css(t,"border"+Vt[o]+"Width",!0,r)));return s}function ee(t,e,i){var n=!0,r="width"===e?t.offsetWidth:t.offsetHeight,o=zt(t),s=v.support.boxSizing&&"border-box"===v.css(t,"boxSizing",!1,o);if(r<=0||null==r){if(((r=Dt(t,e,o))<0||null==r)&&(r=t.style[e]),Wt.test(r))return r;n=s&&(v.support.boxSizingReliable||r===t.style[e]),r=parseFloat(r)||0}return r+te(t,e,i||(s?"border":"content"),n,o)+"px"}function ie(t){var e=r,i=Ht[t];return i||("none"!==(i=ne(t,e))&&i||((e=((Lt=(Lt||v("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(e.documentElement))[0].contentWindow||Lt[0].contentDocument).document).write("<!doctype html><html><body>"),e.close(),i=ne(t,e),Lt.detach()),Ht[t]=i),i}function ne(t,e){var i=v(e.createElement(t)).appendTo(e.body),n=v.css(i[0],"display");return i.remove(),n}v.fn.extend({css:function(t,e){return v.access(this,(function(t,e,i){var n,r,o={},s=0;if(v.isArray(e)){for(r=zt(t),n=e.length;s<n;s++)o[e[s]]=v.css(t,e[s],!1,r);return o}return void 0!==i?v.style(t,e,i):v.css(t,e)}),t,e,arguments.length>1)},show:function(){return Jt(this,!0)},hide:function(){return Jt(this)},toggle:function(t){var e="boolean"==typeof t;return this.each((function(){(e?t:Kt(this))?v(this).show():v(this).hide()}))}}),v.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Dt(t,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:v.support.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=v.camelCase(e),l=t.style;if(e=v.cssProps[a]||(v.cssProps[a]=Gt(l,a)),s=v.cssHooks[e]||v.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(r=s.get(t,!1,n))?r:l[e];if(!("string"===(o=typeof i)&&(r=$t.exec(i))&&(i=(r[1]+1)*r[2]+parseFloat(v.css(t,e)),o="number"),null==i||"number"===o&&isNaN(i)||("number"!==o||v.cssNumber[a]||(i+="px"),v.support.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&void 0===(i=s.set(t,i,n)))))try{l[e]=i}catch(t){}}},css:function(t,e,i,n){var r,o,s,a=v.camelCase(e);return e=v.cssProps[a]||(v.cssProps[a]=Gt(t.style,a)),(s=v.cssHooks[e]||v.cssHooks[a])&&"get"in s&&(o=s.get(t,!0,i)),void 0===o&&(o=Dt(t,e,n)),"normal"===o&&e in Yt&&(o=Yt[e]),""===i||i?(r=parseFloat(o),!0===i||v.isNumeric(r)?r||0:o):o},swap:function(t,e,i,n){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];for(o in r=i.apply(t,n||[]),e)t.style[o]=s[o];return r}}),t.getComputedStyle?(zt=function(e){return t.getComputedStyle(e,null)},Dt=function(t,e,i){var n,r,o,s=i||zt(t),a=s?s.getPropertyValue(e)||s[e]:void 0,l=t.style;return s&&(""!==a||v.contains(t.ownerDocument,t)||(a=v.style(t,e)),Wt.test(a)&&qt.test(e)&&(n=l.width,r=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=s.width,l.width=n,l.minWidth=r,l.maxWidth=o)),a}):r.documentElement.currentStyle&&(zt=function(t){return t.currentStyle},Dt=function(t,e,i){var n,r,o,s=i||zt(t),a=s?s[e]:void 0,l=t.style;return null==a&&l&&l[e]&&(a=l[e]),Wt.test(a)&&!Mt.test(e)&&(n=l.left,(o=(r=t.runtimeStyle)&&r.left)&&(r.left=t.currentStyle.left),l.left="fontSize"===e?"1em":a,a=l.pixelLeft+"px",l.left=n,o&&(r.left=o)),""===a?"auto":a}),v.each(["height","width"],(function(t,e){v.cssHooks[e]={get:function(t,i,n){if(i)return 0===t.offsetWidth&&Ft.test(v.css(t,"display"))?v.swap(t,Xt,(function(){return ee(t,e,n)})):ee(t,e,n)},set:function(t,i,n){var r=n&&zt(t);return Qt(0,i,n?te(t,e,n,v.support.boxSizing&&"border-box"===v.css(t,"boxSizing",!1,r),r):0)}}})),v.support.opacity||(v.cssHooks.opacity={get:function(t,e){return Bt.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,r=v.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=n&&n.filter||i.filter||"";i.zoom=1,(e>=1||""===e)&&""===v.trim(o.replace(Pt,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===e||n&&!n.filter)||(i.filter=Pt.test(o)?o.replace(Pt,r):o+" "+r)}}),v((function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(t,e){if(e)return v.swap(t,{display:"inline-block"},Dt,[t,"marginRight"])}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],(function(t,e){v.cssHooks[e]={get:function(t,i){if(i)return i=Dt(t,e),Wt.test(i)?v(t).position()[e]+"px":i}}}))})),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!v.support.reliableHiddenOffsets&&"none"===(t.style&&t.style.display||v.css(t,"display"))},v.expr.filters.visible=function(t){return!v.expr.filters.hidden(t)}),v.each({margin:"",padding:"",border:"Width"},(function(t,e){v.cssHooks[t+e]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];n<4;n++)r[t+Vt[n]+e]=o[n]||o[n-2]||o[0];return r}},qt.test(t)||(v.cssHooks[t+e].set=Qt)}));var re=/%20/g,oe=/\[\]$/,se=/\r?\n/g,ae=/^(?:submit|button|image|reset|file)$/i,le=/^(?:input|select|textarea|keygen)/i;function ce(t,e,i,n){var r;if(v.isArray(e))v.each(e,(function(e,r){i||oe.test(t)?n(t,r):ce(t+"["+("object"==typeof r?e:"")+"]",r,i,n)}));else if(i||"object"!==v.type(e))n(t,e);else for(r in e)ce(t+"["+r+"]",e[r],i,n)}v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=v.prop(this,"elements");return t?v.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!v(this).is(":disabled")&&le.test(this.nodeName)&&!ae.test(t)&&(this.checked||!wt.test(t))})).map((function(t,e){var i=v(this).val();return null==i?null:v.isArray(i)?v.map(i,(function(t){return{name:e.name,value:t.replace(se,"\r\n")}})):{name:e.name,value:i.replace(se,"\r\n")}})).get()}}),v.param=function(t,e){var i,n=[],r=function(t,e){e=v.isFunction(e)?e():null==e?"":e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=v.ajaxSettings&&v.ajaxSettings.traditional),v.isArray(t)||t.jquery&&!v.isPlainObject(t))v.each(t,(function(){r(this.name,this.value)}));else for(i in t)ce(i,t[i],e,r);return n.join("&").replace(re,"+")},v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),(function(t,e){v.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}})),v.fn.hover=function(t,e){return this.mouseenter(t).mouseleave(e||t)};var he,ue,de=v.now(),fe=/\?/,pe=/#.*$/,ge=/([?&])_=[^&]*/,me=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,ve=/^(?:GET|HEAD)$/,ye=/^\/\//,be=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,we=v.fn.load,xe={},_e={},ke="*/".concat("*");try{ue=o.href}catch(t){(ue=r.createElement("a")).href="",ue=ue.href}function Ee(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,r=0,o=e.toLowerCase().match(b)||[];if(v.isFunction(i))for(;n=o[r++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function Se(t,e,i,n){var r={},o=t===_e;function s(a){var l;return r[a]=!0,v.each(t[a]||[],(function(t,a){var c=a(e,i,n);return"string"!=typeof c||o||r[c]?o?!(l=c):void 0:(e.dataTypes.unshift(c),s(c),!1)})),l}return s(e.dataTypes[0])||!r["*"]&&s("*")}function Te(t,e){var i,n,r=v.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&v.extend(!0,t,i),t}he=be.exec(ue.toLowerCase())||[],v.fn.load=function(t,e,i){if("string"!=typeof t&&we)return we.apply(this,arguments);var n,r,o,s=this,a=t.indexOf(" ");return a>=0&&(n=t.slice(a,t.length),t=t.slice(0,a)),v.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&v.ajax({url:t,type:o,dataType:"html",data:e}).done((function(t){r=arguments,s.html(n?v("<div>").append(v.parseHTML(t)).find(n):t)})).complete(i&&function(t,e){s.each(i,r||[t.responseText,e,t])}),this},v.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){v.fn[e]=function(t){return this.on(e,t)}})),v.each(["get","post"],(function(t,e){v[e]=function(t,i,n,r){return v.isFunction(i)&&(r=r||n,n=i,i=void 0),v.ajax({url:t,type:e,dataType:r,data:i,success:n})}})),v.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ue,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(he[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ke,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":t.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Te(Te(t,v.ajaxSettings),e):Te(v.ajaxSettings,t)},ajaxPrefilter:Ee(xe),ajaxTransport:Ee(_e),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,n,r,o,s,a,l,c,h=v.ajaxSetup({},e),u=h.context||h,d=h.context&&(u.nodeType||u.jquery)?v(u):v.event,f=v.Deferred(),p=v.Callbacks("once memory"),g=h.statusCode||{},m={},y={},w=0,x="canceled",_={readyState:0,getResponseHeader:function(t){var e;if(2===w){if(!c)for(c={};e=me.exec(o);)c[e[1].toLowerCase()]=e[2];e=c[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===w?o:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return w||(t=y[i]=y[i]||t,m[t]=e),this},overrideMimeType:function(t){return w||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(w<2)for(e in t)g[e]=[g[e],t[e]];else _.always(t[_.status]);return this},abort:function(t){var e=t||x;return l&&l.abort(e),k(0,e),this}};if(f.promise(_).complete=p.add,_.success=_.done,_.error=_.fail,h.url=((t||h.url||ue)+"").replace(pe,"").replace(ye,he[1]+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=v.trim(h.dataType||"*").toLowerCase().match(b)||[""],null==h.crossDomain&&(i=be.exec(h.url.toLowerCase()),h.crossDomain=!(!i||i[1]===he[1]&&i[2]===he[2]&&(i[3]||("http:"===i[1]?80:443))==(he[3]||("http:"===he[1]?80:443)))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=v.param(h.data,h.traditional)),Se(xe,h,e,_),2===w)return _;for(n in(a=h.global)&&0==v.active++&&v.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!ve.test(h.type),r=h.url,h.hasContent||(h.data&&(r=h.url+=(fe.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=ge.test(r)?r.replace(ge,"$1_="+de++):r+(fe.test(r)?"&":"?")+"_="+de++)),h.ifModified&&(v.lastModified[r]&&_.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&_.setRequestHeader("If-None-Match",v.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&_.setRequestHeader("Content-Type",h.contentType),_.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+ke+"; q=0.01":""):h.accepts["*"]),h.headers)_.setRequestHeader(n,h.headers[n]);if(h.beforeSend&&(!1===h.beforeSend.call(u,_,h)||2===w))return _.abort();for(n in x="abort",{success:1,error:1,complete:1})_[n](h[n]);if(l=Se(_e,h,e,_)){_.readyState=1,a&&d.trigger("ajaxSend",[_,h]),h.async&&h.timeout>0&&(s=setTimeout((function(){_.abort("timeout")}),h.timeout));try{w=1,l.send(m,k)}catch(t){if(!(w<2))throw t;k(-1,t)}}else k(-1,"No Transport");function k(t,e,i,n){var c,m,y,b,x,k=e;2!==w&&(w=2,s&&clearTimeout(s),l=void 0,o=n||"",_.readyState=t>0?4:0,i&&(b=function(t,e,i){var n,r,o,s,a=t.contents,l=t.dataTypes,c=t.responseFields;for(s in c)s in i&&(e[c[s]]=i[s]);for(;"*"===l[0];)l.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(s in a)if(a[s]&&a[s].test(r)){l.unshift(s);break}if(l[0]in i)o=l[0];else{for(s in i){if(!l[0]||t.converters[s+" "+l[0]]){o=s;break}n||(n=s)}o=o||n}if(o)return o!==l[0]&&l.unshift(o),i[o]}(h,_,i)),t>=200&&t<300||304===t?(h.ifModified&&((x=_.getResponseHeader("Last-Modified"))&&(v.lastModified[r]=x),(x=_.getResponseHeader("etag"))&&(v.etag[r]=x)),204===t?(c=!0,k="nocontent"):304===t?(c=!0,k="notmodified"):(k=(c=function(t,e){var i,n,r,o,s={},a=0,l=t.dataTypes.slice(),c=l[0];t.dataFilter&&(e=t.dataFilter(e,t.dataType));if(l[1])for(r in t.converters)s[r.toLowerCase()]=t.converters[r];for(;n=l[++a];)if("*"!==n){if("*"!==c&&c!==n){if(!(r=s[c+" "+n]||s["* "+n]))for(i in s)if((o=i.split(" "))[1]===n&&(r=s[c+" "+o[0]]||s["* "+o[0]])){!0===r?r=s[i]:!0!==s[i]&&(n=o[0],l.splice(a--,0,n));break}if(!0!==r)if(r&&t.throws)e=r(e);else try{e=r(e)}catch(t){return{state:"parsererror",error:r?t:"No conversion from "+c+" to "+n}}}c=n}return{state:"success",data:e}}(h,b)).state,m=c.data,c=!(y=c.error))):(y=k,!t&&k||(k="error",t<0&&(t=0))),_.status=t,_.statusText=(e||k)+"",c?f.resolveWith(u,[m,k,_]):f.rejectWith(u,[_,k,y]),_.statusCode(g),g=void 0,a&&d.trigger(c?"ajaxSuccess":"ajaxError",[_,h,c?m:y]),p.fireWith(u,[_,k]),a&&(d.trigger("ajaxComplete",[_,h]),--v.active||v.event.trigger("ajaxStop")))}return _},getScript:function(t,e){return v.get(t,void 0,e,"script")},getJSON:function(t,e,i){return v.get(t,e,i,"json")}}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return v.globalEval(t),t}}}),v.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)})),v.ajaxTransport("script",(function(t){if(t.crossDomain){var e,i=r.head||v("head")[0]||r.documentElement;return{send:function(n,o){(e=r.createElement("script")).async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,i){(i||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,i||o(200,"success"))},i.insertBefore(e,i.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}}));var Ce=[],Oe=/(=)\?(?=&|$)|\?\?/;v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ce.pop()||v.expando+"_"+de++;return this[t]=!0,t}}),v.ajaxPrefilter("json jsonp",(function(e,i,n){var r,o,s,a=!1!==e.jsonp&&(Oe.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Oe.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Oe,"$1"+r):!1!==e.jsonp&&(e.url+=(fe.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||v.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){s=arguments},n.always((function(){t[r]=o,e[r]&&(e.jsonpCallback=i.jsonpCallback,Ce.push(r)),s&&v.isFunction(o)&&o(s[0]),s=o=void 0})),"script"}));var Ae,Ne,Ie=0,Re=t.ActiveXObject&&function(){var t;for(t in Ae)Ae[t](void 0,!0)};function je(){try{return new t.XMLHttpRequest}catch(t){}}v.ajaxSettings.xhr=t.ActiveXObject?function(){return!this.isLocal&&je()||function(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}()}:je,Ne=v.ajaxSettings.xhr(),v.support.cors=!!Ne&&"withCredentials"in Ne,(Ne=v.support.ajax=!!Ne)&&v.ajaxTransport((function(e){var i;if(!e.crossDomain||v.support.cors)return{send:function(n,r){var o,s,a=e.xhr();if(e.username?a.open(e.type,e.url,e.async,e.username,e.password):a.open(e.type,e.url,e.async),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");try{for(s in n)a.setRequestHeader(s,n[s])}catch(t){}a.send(e.hasContent&&e.data||null),i=function(t,n){var s,l,c,h;try{if(i&&(n||4===a.readyState))if(i=void 0,o&&(a.onreadystatechange=v.noop,Re&&delete Ae[o]),n)4!==a.readyState&&a.abort();else{h={},s=a.status,l=a.getAllResponseHeaders(),"string"==typeof a.responseText&&(h.text=a.responseText);try{c=a.statusText}catch(t){c=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=h.text?200:404}}catch(t){n||r(-1,t)}h&&r(s,c,h,l)},e.async?4===a.readyState?setTimeout(i):(o=++Ie,Re&&(Ae||(Ae={},v(t).unload(Re)),Ae[o]=i),a.onreadystatechange=i):i()},abort:function(){i&&i(void 0,!0)}}}));var Le,ze,De=/^(?:toggle|show|hide)$/,Pe=new RegExp("^(?:([+-])=|)("+y+")([a-z%]*)$","i"),Be=/queueHooks$/,Me=[function(t,e,i){var n,r,o,s,a,l,c,h,u,d=this,f=t.style,p={},g=[],m=t.nodeType&&Kt(t);i.queue||(null==(h=v._queueHooks(t,"fx")).unqueued&&(h.unqueued=0,u=h.empty.fire,h.empty.fire=function(){h.unqueued||u()}),h.unqueued++,d.always((function(){d.always((function(){h.unqueued--,v.queue(t,"fx").length||h.empty.fire()}))})));1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===v.css(t,"display")&&"none"===v.css(t,"float")&&(v.support.inlineBlockNeedsLayout&&"inline"!==ie(t.nodeName)?f.zoom=1:f.display="inline-block"));i.overflow&&(f.overflow="hidden",v.support.shrinkWrapBlocks||d.always((function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]})));for(r in e)if(s=e[r],De.exec(s)){if(delete e[r],l=l||"toggle"===s,s===(m?"hide":"show"))continue;g.push(r)}if(o=g.length){"hidden"in(a=v._data(t,"fxshow")||v._data(t,"fxshow",{}))&&(m=a.hidden),l&&(a.hidden=!m),m?v(t).show():d.done((function(){v(t).hide()})),d.done((function(){var e;for(e in v._removeData(t,"fxshow"),p)v.style(t,e,p[e])}));for(r=0;r<o;r++)n=g[r],c=d.createTween(n,m?a[n]:0),p[n]=a[n]||v.style(t,n),n in a||(a[n]=c.start,m&&(c.end=c.start,c.start="width"===n||"height"===n?1:0))}}],Fe={"*":[function(t,e){var i,n,r=this.createTween(t,e),o=Pe.exec(e),s=r.cur(),a=+s||0,l=1,c=20;if(o){if(i=+o[2],"px"!==(n=o[3]||(v.cssNumber[t]?"":"px"))&&a){a=v.css(r.elem,t,!0)||i||1;do{a/=l=l||".5",v.style(r.elem,t,a+n)}while(l!==(l=r.cur()/s)&&1!==l&&--c)}r.unit=n,r.start=a,r.end=o[1]?a+(o[1]+1)*i:i}return r}]};function qe(){return setTimeout((function(){Le=void 0})),Le=v.now()}function Ue(t,e,i){var n,r,o=0,s=Me.length,a=v.Deferred().always((function(){delete l.elem})),l=function(){if(r)return!1;for(var e=Le||qe(),i=Math.max(0,c.startTime+c.duration-e),n=1-(i/c.duration||0),o=0,s=c.tweens.length;o<s;o++)c.tweens[o].run(n);return a.notifyWith(t,[c,n,i]),n<1&&s?i:(a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:v.extend({},e),opts:v.extend(!0,{specialEasing:{}},i),originalProperties:e,originalOptions:i,startTime:Le||qe(),duration:i.duration,tweens:[],createTween:function(e,i){var n=v.Tween(t,c.opts,e,i,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var i=0,n=e?c.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)c.tweens[i].run(1);return e?a.resolveWith(t,[c,e]):a.rejectWith(t,[c,e]),this}}),h=c.props;for(!function(t,e){var i,n,r,o,s;for(r in t)if(n=v.camelCase(r),o=e[n],i=t[r],v.isArray(i)&&(o=i[1],i=t[r]=i[0]),r!==n&&(t[n]=i,delete t[r]),(s=v.cssHooks[n])&&"expand"in s)for(r in i=s.expand(i),delete t[n],i)r in t||(t[r]=i[r],e[r]=o);else e[n]=o}(h,c.opts.specialEasing);o<s;o++)if(n=Me[o].call(c,t,h,c.opts))return n;return function(t,e){v.each(e,(function(e,i){for(var n=(Fe[e]||[]).concat(Fe["*"]),r=0,o=n.length;r<o;r++)if(n[r].call(t,e,i))return}))}(c,h),v.isFunction(c.opts.start)&&c.opts.start.call(t,c),v.fx.timer(v.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function We(t,e,i,n,r){return new We.prototype.init(t,e,i,n,r)}function $e(t,e){var i,n={height:t},r=0;for(e=e?1:0;r<4;r+=2-e)n["margin"+(i=Vt[r])]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function He(t){return v.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}v.Animation=v.extend(Ue,{tweener:function(t,e){v.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var i,n=0,r=t.length;n<r;n++)i=t[n],Fe[i]=Fe[i]||[],Fe[i].unshift(e)},prefilter:function(t,e){e?Me.unshift(t):Me.push(t)}}),v.Tween=We,We.prototype={constructor:We,init:function(t,e,i,n,r,o){this.elem=t,this.prop=i,this.easing=r||"swing",this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(v.cssNumber[i]?"":"px")},cur:function(){var t=We.propHooks[this.prop];return t&&t.get?t.get(this):We.propHooks._default.get(this)},run:function(t){var e,i=We.propHooks[this.prop];return this.options.duration?this.pos=e=v.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):We.propHooks._default.set(this),this}},We.prototype.init.prototype=We.prototype,We.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=v.css(t.elem,t.prop,""))&&"auto"!==e?e:0:t.elem[t.prop]},set:function(t){v.fx.step[t.prop]?v.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[v.cssProps[t.prop]]||v.cssHooks[t.prop])?v.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},We.propHooks.scrollTop=We.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},v.each(["toggle","show","hide"],(function(t,e){var i=v.fn[e];v.fn[e]=function(t,n,r){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate($e(e,!0),t,n,r)}})),v.fn.extend({fadeTo:function(t,e,i,n){return this.filter(Kt).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var r=v.isEmptyObject(t),o=v.speed(e,i,n),s=function(){var e=Ue(this,v.extend({},t),o);s.finish=function(){e.stop(!0)},(r||v._data(this,"finish"))&&e.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each((function(){var e=!0,r=null!=t&&t+"queueHooks",o=v.timers,s=v._data(this);if(r)s[r]&&s[r].stop&&n(s[r]);else for(r in s)s[r]&&s[r].stop&&Be.test(r)&&n(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(i),e=!1,o.splice(r,1));!e&&i||v.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,i=v._data(this),n=i[t+"queue"],r=i[t+"queueHooks"],o=v.timers,s=n?n.length:0;for(i.finish=!0,v.queue(this,t,[]),r&&r.cur&&r.cur.finish&&r.cur.finish.call(this),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish}))}}),v.each({slideDown:$e("show"),slideUp:$e("hide"),slideToggle:$e("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){v.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}})),v.speed=function(t,e,i){var n=t&&"object"==typeof t?v.extend({},t):{complete:i||!i&&e||v.isFunction(t)&&t,duration:t,easing:i&&e||e&&!v.isFunction(e)&&e};return n.duration=v.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in v.fx.speeds?v.fx.speeds[n.duration]:v.fx.speeds._default,null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){v.isFunction(n.old)&&n.old.call(this),n.queue&&v.dequeue(this,n.queue)},n},v.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},v.timers=[],v.fx=We.prototype.init,v.fx.tick=function(){var t,e=v.timers,i=0;for(Le=v.now();i<e.length;i++)(t=e[i])()||e[i]!==t||e.splice(i--,1);e.length||v.fx.stop(),Le=void 0},v.fx.timer=function(t){t()&&v.timers.push(t)&&v.fx.start()},v.fx.interval=13,v.fx.start=function(){ze||(ze=setInterval(v.fx.tick,v.fx.interval))},v.fx.stop=function(){clearInterval(ze),ze=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(t){return v.grep(v.timers,(function(e){return t===e.elem})).length}),v.fn.offset=function(t){if(arguments.length)return void 0===t?this:this.each((function(e){v.offset.setOffset(this,t,e)}));var e,i,n={top:0,left:0},r=this[0],o=r&&r.ownerDocument;return o?(e=o.documentElement,v.contains(e,r)?(void 0!==r.getBoundingClientRect&&(n=r.getBoundingClientRect()),i=He(o),{top:n.top+(i.pageYOffset||e.scrollTop)-(e.clientTop||0),left:n.left+(i.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):n):void 0},v.offset={setOffset:function(t,e,i){var n=v.css(t,"position");"static"===n&&(t.style.position="relative");var r,o,s=v(t),a=s.offset(),l=v.css(t,"top"),c=v.css(t,"left"),h={},u={};("absolute"===n||"fixed"===n)&&v.inArray("auto",[l,c])>-1?(r=(u=s.position()).top,o=u.left):(r=parseFloat(l)||0,o=parseFloat(c)||0),v.isFunction(e)&&(e=e.call(t,i,a)),null!=e.top&&(h.top=e.top-a.top+r),null!=e.left&&(h.left=e.left-a.left+o),"using"in e?e.using.call(t,h):s.css(h)}},v.fn.extend({position:function(){if(this[0]){var t,e,i={top:0,left:0},n=this[0];return"fixed"===v.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),v.nodeName(t[0],"html")||(i=t.offset()),i.top+=v.css(t[0],"borderTopWidth",!0),i.left+=v.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-v.css(n,"marginTop",!0),left:e.left-i.left-v.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||r.documentElement;t&&!v.nodeName(t,"html")&&"static"===v.css(t,"position");)t=t.offsetParent;return t||r.documentElement}))}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var i=/Y/.test(e);v.fn[t]=function(n){return v.access(this,(function(t,n,r){var o=He(t);if(void 0===r)return o?e in o?o[e]:o.document.documentElement[n]:t[n];o?o.scrollTo(i?v(o).scrollLeft():r,i?r:v(o).scrollTop()):t[n]=r}),t,n,arguments.length,null)}})),v.each({Height:"height",Width:"width"},(function(t,e){v.each({padding:"inner"+t,content:e,"":"outer"+t},(function(i,n){v.fn[n]=function(n,r){var o=arguments.length&&(i||"boolean"!=typeof n),s=i||(!0===n||!0===r?"margin":"border");return v.access(this,(function(e,i,n){var r;return v.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===n?v.css(e,i,s):v.style(e,i,n,s)}),e,o?n:void 0,o,null)}}))})),t.jQuery=t.$=v,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],(function(){return v}))}(window),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(),function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",(function(){i=!0}));return setTimeout((function(){i||t(n).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})}))}(jQuery),function(t){"use strict";var e='[data-dismiss="alert"]',i=function(i){t(i).on("click",e,this.close)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){s.detach().trigger("closed.bs.alert").remove()}var r=t(this),o=r.attr("data-target");o||(o=(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]*$)/,""));var s=t(o);e&&e.preventDefault(),s.length||(s=r.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var n=t.fn.alert;t.fn.alert=function(e){return this.each((function(){var n=t(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof e&&r[e].call(n)}))},t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",e,i.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.button"),o="object"==typeof e&&e;r||n.data("bs.button",r=new i(this,o)),"toggle"==e?r.toggle():e&&r.setState(e)}))}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.3.5",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,r=n.is("input")?"val":"html",o=n.data();e+="Text",null==o.resetText&&n.data("resetText",n[r]()),setTimeout(t.proxy((function(){n[r](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i))}),this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(i){var n=t(i.target);n.hasClass("btn")||(n=n.closest(".btn")),e.call(n,"toggle"),t(i.target).is('input[type="radio"]')||t(i.target).is('input[type="checkbox"]')||i.preventDefault()})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))}))}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.carousel"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),s="string"==typeof e?e:o.slide;r||n.data("bs.carousel",r=new i(this,o)),"number"==typeof e?r.to(e):s?r[s]():o.interval&&r.pause().cycle()}))}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.5",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var n=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(n)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",(function(){e.to(t)})):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,n){var r=this.$element.find(".item.active"),o=n||this.getItemForDirection(e,r),s=this.interval,a="next"==e?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],h=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(h),!h.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(o)]);u&&u.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(e),o[0].offsetWidth,r.addClass(a),o.addClass(a),r.one("bsTransitionEnd",(function(){o.removeClass([e,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout((function(){l.$element.trigger(d)}),0)})).emulateTransitionEnd(i.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),s&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var r=function(i){var n,r=t(this),o=t(r.attr("data-target")||(n=r.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var s=t.extend({},o.data(),r.data()),a=r.attr("data-slide-to");a&&(s.interval=!1),e.call(o,s),a&&o.data("bs.carousel").to(a),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),t(window).on("load",(function(){t('[data-ride="carousel"]').each((function(){var i=t(this);e.call(i,i.data())}))}))}(jQuery),function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function i(e){return this.each((function(){var i=t(this),r=i.data("bs.collapse"),o=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e);!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||i.data("bs.collapse",r=new n(this,o)),"string"==typeof e&&r[e]()}))}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.5",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(e=r.data("bs.collapse"),e&&e.transitioning))){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(i.call(r,"hide"),e||r.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[s](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(n.TRANSITION_DURATION):r.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy((function(i,n){var r=t(n);this.addAriaAndCollapsedClass(e(r),r)}),this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var r=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=r,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(n){var r=t(this);r.attr("data-target")||n.preventDefault();var o=e(r),s=o.data("bs.collapse")?"toggle":r.data();i.call(o,s)}))}(jQuery),function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=(i=e.attr("href"))&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}function i(i){i&&3===i.which||(t(n).remove(),t(r).each((function(){var n=t(this),r=e(n),o={relatedTarget:this};r.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(r[0],i.target)||(r.trigger(i=t.Event("hide.bs.dropdown",o)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),r.removeClass("open").trigger("hidden.bs.dropdown",o))))})))}var n=".dropdown-backdrop",r='[data-toggle="dropdown"]',o=function(e){t(e).on("click.bs.dropdown",this.toggle)};o.VERSION="3.3.5",o.prototype.toggle=function(n){var r=t(this);if(!r.is(".disabled, :disabled")){var o=e(r),s=o.hasClass("open");if(i(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(o.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},o.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),s=o.hasClass("open");if(!s&&27!=i.which||s&&27==i.which)return 27==i.which&&o.find(r).trigger("focus"),n.trigger("click");var a=o.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var l=a.index(i.target);38==i.which&&l>0&&l--,40==i.which&&l<a.length-1&&l++,~l||(l=0),a.eq(l).trigger("focus")}}}};var s=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new o(this)),"string"==typeof e&&n[e].call(i)}))},t.fn.dropdown.Constructor=o,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=s,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r,o.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",o.prototype.keydown)}(jQuery),function(t){"use strict";function e(e,n){return this.each((function(){var r=t(this),o=r.data("bs.modal"),s=t.extend({},i.DEFAULTS,r.data(),"object"==typeof e&&e);o||r.data("bs.modal",o=new i(this,s)),"string"==typeof e?o[e](n):s.show&&o.show(n)}))}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};i.VERSION="3.3.5",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var n=this,r=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",(function(){n.$element.one("mouseup.dismiss.bs.modal",(function(e){t(e.target).is(n.$element)&&(n.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var r=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),n.adjustDialog(),r&&n.$element[0].offsetWidth,n.$element.addClass("in"),n.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:e});r?n.$dialog.one("bsTransitionEnd",(function(){n.$element.trigger("focus").trigger(o)})).emulateTransitionEnd(i.TRANSITION_DURATION):n.$element.trigger("focus").trigger(o)})))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy((function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}),this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy((function(t){27==t.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop((function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")}))},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&r;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy((function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))}),this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;o?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):s()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(i){var n=t(this),r=n.attr("href"),o=t(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=o.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},o.data(),n.data());n.is("a")&&i.preventDefault(),o.one("show.bs.modal",(function(t){t.isDefaultPrevented()||o.one("hidden.bs.modal",(function(){n.is(":visible")&&n.trigger("focus")}))})),e.call(o,s,this)}))}(jQuery),function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};e.VERSION="3.3.5",e.TRANSITION_DURATION=150,e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},e.prototype.init=function(e,i,n){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var s=r[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return(e=t.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,(function(t,n){i[t]!=n&&(e[t]=n)})),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout((function(){"in"==i.hoverState&&i.show()}),i.options.delay.show)):i.show())},e.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout((function(){"out"==i.hoverState&&i.hide()}),i.options.delay.hide)):i.hide())},e.prototype.show=function(){var i=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(i);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(i.isDefaultPrevented()||!n)return;var r=this,o=this.tip(),s=this.getUID(this.type);this.setContent(),o.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&o.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var h=this.getPosition(),u=o[0].offsetWidth,d=o[0].offsetHeight;if(c){var f=a,p=this.getPosition(this.$viewport);a="bottom"==a&&h.bottom+d>p.bottom?"top":"top"==a&&h.top-d<p.top?"bottom":"right"==a&&h.right+u>p.width?"left":"left"==a&&h.left-u<p.left?"right":a,o.removeClass(f).addClass(a)}var g=this.getCalculatedOffset(a,h,u,d);this.applyPlacement(g,a);var m=function(){var t=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==t&&r.leave(r)};t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",m).emulateTransitionEnd(e.TRANSITION_DURATION):m()}},e.prototype.applyPlacement=function(e,i){var n=this.tip(),r=n[0].offsetWidth,o=n[0].offsetHeight,s=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(n[0],t.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),n.addClass("in");var l=n[0].offsetWidth,c=n[0].offsetHeight;"top"==i&&c!=o&&(e.top=e.top+o-c);var h=this.getViewportAdjustedDelta(i,e,l,c);h.left?e.left+=h.left:e.top+=h.top;var u=/top|bottom/.test(i),d=u?2*h.left-r+l:2*h.top-o+c,f=u?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(d,n[0][f],u)},e.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},e.prototype.hide=function(i){function n(){"in"!=r.hoverState&&o.detach(),r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),i&&i()}var r=this,o=t(this.$tip),s=t.Event("hide.bs."+this.type);return this.$element.trigger(s),s.isDefaultPrevented()?void 0:(o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(e.TRANSITION_DURATION):n(),this.hoverState=null,this)},e.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},e.prototype.hasContent=function(){return this.getTitle()},e.prototype.getPosition=function(e){var i=(e=e||this.$element)[0],n="BODY"==i.tagName,r=i.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=n?{top:0,left:0}:e.offset(),s={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},a=n?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,s,a,o)},e.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},e.prototype.getViewportAdjustedDelta=function(t,e,i,n){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-s.scroll,l=e.top+o-s.scroll+n;a<s.top?r.top=s.top-a:l>s.top+s.height&&(r.top=s.top+s.height-l)}else{var c=e.left-o,h=e.left+o+i;c<s.left?r.left=s.left-c:h>s.right&&(r.left=s.left+s.width-h)}return r},e.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},e.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},e.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.toggleEnabled=function(){this.enabled=!this.enabled},e.prototype.toggle=function(e){var i=this;e&&((i=t(e.currentTarget).data("bs."+this.type))||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},e.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null}))};var i=t.fn.tooltip;t.fn.tooltip=function(i){return this.each((function(){var n=t(this),r=n.data("bs.tooltip"),o="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||n.data("bs.tooltip",r=new e(this,o)),"string"==typeof i&&r[i]())}))},t.fn.tooltip.Constructor=e,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery),function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");e.VERSION="3.3.5",e.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=function(i){return this.each((function(){var n=t(this),r=n.data("bs.popover"),o="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||n.data("bs.popover",r=new e(this,o)),"string"==typeof i&&r[i]())}))},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery),function(t){"use strict";function e(i,n){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each((function(){var n=t(this),r=n.data("bs.scrollspy"),o="object"==typeof i&&i;r||n.data("bs.scrollspy",r=new e(this,o)),"string"==typeof i&&r[i]()}))}e.VERSION="3.3.5",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var e=t(this),r=e.data("target")||e.attr("href"),o=/^#./.test(r)&&t(r);return o&&o.length&&o.is(":visible")&&[[o[i]().top+n,r]]||null})).sort((function(t,e){return t[0]-e[0]})).each((function(){e.offsets.push(this[0]),e.targets.push(this[1])}))},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return s!=(t=o[o.length-1])&&this.activate(t);if(s&&e<r[0])return this.activeTarget=null,this.clear();for(t=r.length;t--;)s!=o[t]&&e>=r[t]&&(void 0===r[t+1]||e<r[t+1])&&this.activate(o[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=t(i).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var n=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=n,this},t(window).on("load.bs.scrollspy.data-api",(function(){t('[data-spy="scroll"]').each((function(){var e=t(this);i.call(e,e.data())}))}))}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.tab");r||n.data("bs.tab",r=new i(this)),"string"==typeof e&&r[e]()}))}var i=function(e){this.element=t(e)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var r=i.find(".active:last a"),o=t.Event("hide.bs.tab",{relatedTarget:e[0]}),s=t.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(o),e.trigger(s),!s.isDefaultPrevented()&&!o.isDefaultPrevented()){var a=t(n);this.activate(e.closest("li"),i),this.activate(a,a.parent(),(function(){r.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}}},i.prototype.activate=function(e,n,r){function o(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var s=n.find("> .active"),a=r&&t.support.transition&&(s.length&&s.hasClass("fade")||!!n.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",o).emulateTransitionEnd(i.TRANSITION_DURATION):o(),s.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var r=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.affix"),o="object"==typeof e&&e;r||n.data("bs.affix",r=new i(this,o)),"string"==typeof e&&r[e]()}))}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.5",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,n){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=i&&"top"==this.affixed)return i>r&&"top";if("bottom"==this.affixed)return null!=i?!(r+this.unpin<=o.top)&&"bottom":!(t-n>=r+s)&&"bottom";var a=null==this.affixed,l=a?r:o.top;return null!=i&&i>=r?"top":null!=n&&l+(a?s:e)>=t-n&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,r=n.top,o=n.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(o=r=n),"function"==typeof r&&(r=n.top(this.$element)),"function"==typeof o&&(o=n.bottom(this.$element));var a=this.getState(s,e,r,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-o})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)}))}))}(jQuery),function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[s]={exports:{}};e[s][0].call(h.exports,(function(t){return r(e[s][1][t]||t)}),h,h.exports,t,e,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,i){"use strict";var n=t("./utils"),r=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(t){for(var e,i,r,s,a,l,c,h=[],u=0,d=t.length,f=d,p="string"!==n.getTypeOf(t);u<t.length;)f=d-u,r=p?(e=t[u++],i=u<d?t[u++]:0,u<d?t[u++]:0):(e=t.charCodeAt(u++),i=u<d?t.charCodeAt(u++):0,u<d?t.charCodeAt(u++):0),s=e>>2,a=(3&e)<<4|i>>4,l=1<f?(15&i)<<2|r>>6:64,c=2<f?63&r:64,h.push(o.charAt(s)+o.charAt(a)+o.charAt(l)+o.charAt(c));return h.join("")},i.decode=function(t){var e,i,n,s,a,l,c=0,h=0,u="data:";if(t.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&f--,t.charAt(t.length-2)===o.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=r.uint8array?new Uint8Array(0|f):new Array(0|f);c<t.length;)e=o.indexOf(t.charAt(c++))<<2|(s=o.indexOf(t.charAt(c++)))>>4,i=(15&s)<<4|(a=o.indexOf(t.charAt(c++)))>>2,n=(3&a)<<6|(l=o.indexOf(t.charAt(c++))),d[h++]=e,64!==a&&(d[h++]=i),64!==l&&(d[h++]=n);return d}},{"./support":30,"./utils":32}],2:[function(t,e,i){"use strict";var n=t("./external"),r=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),s=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 s("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 o).pipe(new s("uncompressedSize")).pipe(e.compressWorker(i)).pipe(new s("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"),r=function(){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}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,i,n){var o=r,s=0+i;t^=-1;for(var a=0;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}(0|e,t,t.length):function(t,e,i,n){var o=r,s=0+i;t^=-1;for(var a=0;a<s;a++)t=t>>>8^o[255&(t^e.charCodeAt(a))];return-1^t}(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;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"),o=t("./utils"),s=t("./stream/GenericWorker"),a=n?"uint8array":"array";function l(t,e){s.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}i.magic="\b\0",o.inherits(l,s),l.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,t.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.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 l("Deflate",t)},i.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,i){"use strict";function n(t,e){var i,n="";for(i=0;i<e;i++)n+=String.fromCharCode(255&t),t>>>=8;return n}function r(t,e,i,r,s,h){var u,d,f=t.file,p=t.compression,g=h!==a.utf8encode,m=o.transformTo("string",h(f.name)),v=o.transformTo("string",a.utf8encode(f.name)),y=f.comment,b=o.transformTo("string",h(y)),w=o.transformTo("string",a.utf8encode(y)),x=v.length!==f.name.length,_=w.length!==y.length,k="",E="",S="",T=f.dir,C=f.date,O={crc32:0,compressedSize:0,uncompressedSize:0};e&&!i||(O.crc32=t.crc32,O.compressedSize=t.compressedSize,O.uncompressedSize=t.uncompressedSize);var A=0;e&&(A|=8),g||!x&&!_||(A|=2048);var N=0,I=0;T&&(N|=16),"UNIX"===s?(I=798,N|=function(t,e){var i=t;return t||(i=e?16893:33204),(65535&i)<<16}(f.unixPermissions,T)):(I=20,N|=function(t){return 63&(t||0)}(f.dosPermissions)),u=C.getUTCHours(),u<<=6,u|=C.getUTCMinutes(),u<<=5,u|=C.getUTCSeconds()/2,d=C.getUTCFullYear()-1980,d<<=4,d|=C.getUTCMonth()+1,d<<=5,d|=C.getUTCDate(),x&&(E=n(1,1)+n(l(m),4)+v,k+="up"+n(E.length,2)+E),_&&(S=n(1,1)+n(l(b),4)+w,k+="uc"+n(S.length,2)+S);var R="";return R+="\n\0",R+=n(A,2),R+=p.magic,R+=n(u,2),R+=n(d,2),R+=n(O.crc32,4),R+=n(O.compressedSize,4),R+=n(O.uncompressedSize,4),R+=n(m.length,2),R+=n(k.length,2),{fileRecord:c.LOCAL_FILE_HEADER+R+m+k,dirRecord:c.CENTRAL_FILE_HEADER+n(I,2)+R+n(b.length,2)+"\0\0\0\0"+n(N,4)+n(r,4)+m+k+b}}var o=t("../utils"),s=t("../stream/GenericWorker"),a=t("../utf8"),l=t("../crc32"),c=t("../signature");function h(t,e,i,n){s.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=[]}o.inherits(h,s),h.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,s.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:i?(e+100*(i-n-1))/i:100}}))},h.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var i=r(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:i.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,i=r(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(i.dirRecord),e)this.push({data:function(t){return c.DATA_DESCRIPTOR+n(t.crc32,4)+n(t.compressedSize,4)+n(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:i.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.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,r=function(t,e,i,r,s){var a=o.transformTo("string",s(r));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(t,2)+n(t,2)+n(e,4)+n(i,4)+n(a.length,2)+a}(this.dirRecords.length,i,t,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.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},h.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(t){var e=this._sources;if(!s.prototype.error.call(this,t))return!1;for(var i=0;i<e.length;i++)try{e[i].error(t)}catch(t){}return!0},h.prototype.lock=function(){s.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=h},{"../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");i.generateWorker=function(t,e,i){var o=new r(e.streamFiles,i,e.platform,e.encodeFileName),s=0;try{t.forEach((function(t,i){s++;var r=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.options.compression,e.compression),a=i.options.compressionOptions||e.compressionOptions||{},l=i.dir,c=i.date;i._compressWorker(r,a).withStreamInfo("file",{name:t,dir:l,date:c,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(o)})),o.entriesCount=s}catch(t){o.error(t)}return o}},{"../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")).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"),o=t("./utf8"),s=t("./zipEntries"),a=t("./stream/Crc32Probe"),l=t("./nodejsUtils");function c(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:o.utf8decode}),l.isNode&&l.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 s(e);return i.load(t),i})).then((function(t){var i=[r.Promise.resolve(t)],n=t.files;if(e.checkCRC32)for(var o=0;o<n.length;o++)i.push(c(n[o]));return r.Promise.all(i)})).then((function(t){for(var n=t.shift(),r=n.files,o=0;o<r.length;o++){var s=r[o];i.file(s.fileNameStr,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.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 o(t,e){r.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}n.inherits(o,r),o.prototype._bindStream=function(t){var e=this;(this._stream=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()}))},o.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,i){"use strict";var n=t("readable-stream").Readable;function r(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)}))}t("../utils").inherits(r,n),r.prototype._read=function(){this._helper.resume()},e.exports=r},{"../utils":32,"readable-stream":16}],14:[function(t,e,i){"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return Buffer.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";function n(t,e,i){var n,r=o.getTypeOf(e),a=o.extend(i||{},l);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(t=g(t)),a.createFolders&&(n=p(t))&&m.call(this,n,!0);var u="string"===r&&!1===a.binary&&!1===a.base64;i&&void 0!==i.binary||(a.binary=!u),(e instanceof c&&0===e.uncompressedSize||a.dir||!e||0===e.length)&&(a.base64=!1,a.binary=!0,e="",a.compression="STORE",r="string");var v;v=e instanceof c||e instanceof s?e:d.isNode&&d.isStream(e)?new f(t,e):o.prepareContent(t,e,a.binary,a.optimizedBinaryString,a.base64);var y=new h(t,v,a);this.files[t]=y}var r=t("./utf8"),o=t("./utils"),s=t("./stream/GenericWorker"),a=t("./stream/StreamHelper"),l=t("./defaults"),c=t("./compressedObject"),h=t("./zipObject"),u=t("./generate"),d=t("./nodejsUtils"),f=t("./nodejs/NodejsStreamInputAdapter"),p=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return 0<e?t.substring(0,e):""},g=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},m=function(t,e){return e=void 0!==e?e:l.createFolders,t=g(t),this.files[t]||n.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function v(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var y={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))&&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)return t=this.root+t,n.call(this,t,e,i),this;if(v(t)){var r=t;return this.filter((function(t,e){return!e.dir&&r.test(t)}))}var o=this.files[this.root+t];return o&&!o.dir?o:null},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=m.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=o.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:r.utf8encode})).type=i.type.toLowerCase(),i.compression=i.compression.toUpperCase(),"binarystring"===i.type&&(i.type="string"),!i.type)throw new Error("No output type specified.");o.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 n=i.comment||this.comment||"";e=u.generateWorker(this,i,n)}catch(t){(e=new s("error")).error(t)}return new a(e,i.type||"string",i.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=y},{"./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");function r(t){n.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}t("../utils").inherits(r,n),r.prototype.byteAt=function(t){return this.data[this.zero+t]},r.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),i=t.charCodeAt(1),n=t.charCodeAt(2),r=t.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===e&&this.data[o+1]===i&&this.data[o+2]===n&&this.data[o+3]===r)return o-this.zero;return-1},r.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),i=t.charCodeAt(1),n=t.charCodeAt(2),r=t.charCodeAt(3),o=this.readData(4);return e===o[0]&&i===o[1]&&n===o[2]&&r===o[3]},r.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=r},{"../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");function r(t){n.call(this,t)}t("../utils").inherits(r,n),r.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=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,i){"use strict";var n=t("./DataReader");function r(t){n.call(this,t)}t("../utils").inherits(r,n),r.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},r.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},r.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},r.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=r},{"../utils":32,"./DataReader":18}],21:[function(t,e,i){"use strict";var n=t("./ArrayReader");function r(t){n.call(this,t)}t("../utils").inherits(r,n),r.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=r},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,i){"use strict";var n=t("../utils"),r=t("../support"),o=t("./ArrayReader"),s=t("./StringReader"),a=t("./NodeBufferReader"),l=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 l(n.transformTo("uint8array",t)):new o(n.transformTo("array",t)):new s(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 o(t){n.call(this,"ConvertWorker to "+t),this.destType=t}r.inherits(o,n),o.prototype.processChunk=function(t){this.push({data:r.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,i){"use strict";var n=t("./GenericWorker"),r=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").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 o(t){r.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(o,r),o.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=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,i){"use strict";var n=t("../utils"),r=t("./GenericWorker");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=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,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;var t=this.isPaused=!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,e,i){"use strict";var n=t("../utils"),r=t("./ConvertWorker"),o=t("./GenericWorker"),s=t("../base64"),a=t("../support"),l=t("../external"),c=null;if(a.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function h(t,e,i){var s=e;switch(e){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=e,this._mimeType=i,n.checkSupport(s),this._worker=t.pipe(new r(s)),t.lock()}catch(t){this._worker=new o("error"),this._worker.error(t)}}h.prototype={accumulate:function(t){return function(t,e){return new l.Promise((function(i,r){var o=[],a=t._internalType,l=t._outputType,c=t._mimeType;t.on("data",(function(t,i){o.push(t),e&&e(i)})).on("error",(function(t){o=[],r(t)})).on("end",(function(){try{var t=function(t,e,i){switch(t){case"blob":return n.newBlob(n.transformTo("arraybuffer",e),i);case"base64":return s.encode(e);default:return n.transformTo(t,e)}}(l,function(t,e){var i,n=0,r=null,o=0;for(i=0;i<e.length;i++)o+=e[i].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(r=new Uint8Array(o),i=0;i<e.length;i++)r.set(e[i],n),n+=e[i].length;return r;case"nodebuffer":return Buffer.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}(a,o),c);i(t)}catch(t){r(t)}o=[]})).resume()}))}(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(){n.delay(e,arguments,i)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(n.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)}},e.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,i){"use strict";if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,i.nodebuffer="undefined"!=typeof Buffer,i.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)i.blob=!1;else{var n=new ArrayBuffer(0);try{i.blob=0===new Blob([n],{type:"application/zip"}).size}catch(t){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),i.blob=0===r.getBlob("application/zip").size}catch(t){i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch(t){i.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,i){"use strict";for(var n=t("./utils"),r=t("./support"),o=t("./nodejsUtils"),s=t("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(){s.call(this,"utf-8 decode"),this.leftOver=null}function h(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,i.utf8encode=function(t){return r.nodebuffer?o.newBufferFrom(t,"utf-8"):function(t){var e,i,n,o,s,a=t.length,l=0;for(o=0;o<a;o++)55296==(64512&(i=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(n-56320),o++),l+=i<128?1:i<2048?2:i<65536?3:4;for(e=r.uint8array?new Uint8Array(l):new Array(l),o=s=0;s<l;o++)55296==(64512&(i=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(n-56320),o++),i<128?e[s++]=i:(i<2048?e[s++]=192|i>>>6:(i<65536?e[s++]=224|i>>>12:(e[s++]=240|i>>>18,e[s++]=128|i>>>12&63),e[s++]=128|i>>>6&63),e[s++]=128|63&i);return e}(t)},i.utf8decode=function(t){return r.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,i,r,o,s=t.length,l=new Array(2*s);for(e=i=0;e<s;)if((r=t[e++])<128)l[i++]=r;else if(4<(o=a[r]))l[i++]=65533,e+=o-1;else{for(r&=2===o?31:3===o?15:7;1<o&&e<s;)r=r<<6|63&t[e++],o--;1<o?l[i++]=65533:r<65536?l[i++]=r:(r-=65536,l[i++]=55296|r>>10&1023,l[i++]=56320|1023&r)}return l.length!==i&&(l.subarray?l=l.subarray(0,i):l.length=i),n.applyFromCharCode(l)}(t=n.transformTo(r.uint8array?"uint8array":"array",t))},n.inherits(c,s),c.prototype.processChunk=function(t){var e=n.transformTo(r.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var s=function(t,e){var i;for((e=e||t.length)>t.length&&(e=t.length),i=e-1;0<=i&&128==(192&t[i]);)i--;return i<0||0===i?e:i+a[t[i]]>e?i:e}(e),l=e;s!==e.length&&(r.uint8array?(l=e.subarray(0,s),this.leftOver=e.subarray(s,e.length)):(l=e.slice(0,s),this.leftOver=e.slice(s,e.length))),this.push({data:i.utf8decode(l),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=c,n.inherits(h,s),h.prototype.processChunk=function(t){this.push({data:i.utf8encode(t.data),meta:t.meta})},i.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,i){"use strict";var n=t("./support"),r=t("./base64"),o=t("./nodejsUtils"),s=t("set-immediate-shim"),a=t("./external");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(i){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(e)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var h={stringifyByChunk:function(t,e,i){var n=[],r=0,o=t.length;if(o<=i)return String.fromCharCode.apply(null,t);for(;r<o;)"array"===e||"nodebuffer"===e?n.push(String.fromCharCode.apply(null,t.slice(r,Math.min(r+i,o)))):n.push(String.fromCharCode.apply(null,t.subarray(r,Math.min(r+i,o)))),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,o.allocBuffer(1)).length}catch(t){return!1}}()}};function u(t){var e=65536,n=i.getTypeOf(t),r=!0;if("uint8array"===n?r=h.applyCanBeUsed.uint8array:"nodebuffer"===n&&(r=h.applyCanBeUsed.nodebuffer),r)for(;1<e;)try{return h.stringifyByChunk(t,n,e)}catch(t){e=Math.floor(e/2)}return h.stringifyByChar(t)}function d(t,e){for(var i=0;i<t.length;i++)e[i]=t[i];return e}i.applyFromCharCode=u;var f={};f.string={string:l,array:function(t){return c(t,new Array(t.length))},arraybuffer:function(t){return f.string.uint8array(t).buffer},uint8array:function(t){return c(t,new Uint8Array(t.length))},nodebuffer:function(t){return c(t,o.allocBuffer(t.length))}},f.array={string:u,array:l,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(t)}},f.arraybuffer={string:function(t){return u(new Uint8Array(t))},array:function(t){return d(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:l,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(new Uint8Array(t))}},f.uint8array={string:u,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:l,nodebuffer:function(t){return o.newBufferFrom(t)}},f.nodebuffer={string:u,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return f.nodebuffer.uint8array(t).buffer},uint8array:function(t){return d(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);return f[n][t](e)},i.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":n.nodebuffer&&o.isBuffer(t)?"nodebuffer":n.uint8array&&t instanceof Uint8Array?"uint8array":n.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(t){if(!n[t.toLowerCase()])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++)n+="\\x"+((e=t.charCodeAt(i))<16?"0":"")+e.toString(16).toUpperCase();return n},i.delay=function(t,e,i){s((function(){t.apply(i||null,e||[])}))},i.inherits=function(t,e){function i(){}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)&&void 0===i[e]&&(i[e]=arguments[t][e]);return i},i.prepareContent=function(t,e,o,s,l){return a.Promise.resolve(e).then((function(t){return n.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"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})).then((function(e){var h=i.getTypeOf(e);return h?("arraybuffer"===h?e=i.transformTo("uint8array",e):"string"===h&&(l?e=r.decode(e):o&&!0!==s&&(e=function(t){return c(t,n.uint8array?new Uint8Array(t.length):new Array(t.length))}(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"),o=t("./signature"),s=t("./zipEntry"),a=(t("./utf8"),t("./support"));function l(t){this.files=[],this.loadOptions=t}l.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)===e;return this.reader.setIndex(i),n},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={};for(var t,e,i,n=this.zip64EndOfCentralSize-44;0<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),1<this.disksCount)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(o.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(t=new s({zip64:this.zip64},this.loadOptions)).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(o.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):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");this.reader.setIndex(t);var e=t;if(this.checkSignature(o.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(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.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(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var n=e-i;if(0<n)this.isSignature(e,o.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(t){this.reader=n(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=l},{"./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"),o=t("./compressedObject"),s=t("./crc32"),a=t("./utf8"),l=t("./compressions"),c=t("./support");function h(t,e){this.options=t,this.loadOptions=e}h.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(null===(e=function(t){for(var e in l)if(l.hasOwnProperty(e)&&l[e].magic===t)return l[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+r.pretty(this.compressionMethod)+" unknown (inner file : "+r.transformTo("string",this.fileName)+")");this.decompressed=new o(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),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(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;for(this.extraFields||(this.extraFields={});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=c.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 o=r.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=n(t.value);return 1!==e.readInt(1)||s(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)||s(this.fileComment)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null}},e.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,i){"use strict";function n(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}}var r=t("./stream/StreamHelper"),o=t("./stream/DataWorker"),s=t("./utf8"),a=t("./compressedObject"),l=t("./stream/GenericWorker");n.prototype={internalStream:function(t){var e=null,i="string";try{if(!t)throw new Error("No output type specified.");var n="string"===(i=t.toLowerCase())||"text"===i;"binarystring"!==i&&"text"!==i||(i="string"),e=this._decompressWorker();var o=!this._dataBinary;o&&!n&&(e=e.pipe(new s.Utf8EncodeWorker)),!o&&n&&(e=e.pipe(new s.Utf8DecodeWorker))}catch(t){(e=new l("error")).error(t)}return new r(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 a&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var i=this._decompressWorker();return this._dataBinary||(i=i.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(i,t,e)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new o(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<c.length;u++)n.prototype[c[u]]=h;e.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,e,i){(function(t){"use strict";var i,n,r=t.MutationObserver||t.WebKitMutationObserver;if(r){var o=0,s=new r(h),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),i=function(){a.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)i="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){h(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(h,0)};else{var l=new t.MessageChannel;l.port1.onmessage=h,i=function(){l.port2.postMessage(0)}}var c=[];function h(){var t,e;n=!0;for(var i=c.length;i;){for(e=c,c=[],t=-1;++t<i;)e[t]();i=c.length}n=!1}e.exports=function(t){1!==c.push(t)||n||i()}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,e,i){"use strict";var n=t("immediate");function r(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,t!==r&&f(this,t)}function h(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(n){return o.reject(t,n)}n===t?o.reject(t,new TypeError("Cannot resolve promise with itself")):o.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,o.reject(t,e))}function r(e){i||(i=!0,o.resolve(t,e))}var s=p((function(){e(r,n)}));"error"===s.status&&n(s.value)}function p(t,e){var i={};try{i.value=t(e),i.status="success"}catch(t){i.status="error",i.value=t}return i}(e.exports=c).prototype.finally=function(t){if("function"!=typeof t)return this;var e=this.constructor;return this.then((function(i){return e.resolve(t()).then((function(){return i}))}),(function(i){return e.resolve(t()).then((function(){throw i}))}))},c.prototype.catch=function(t){return this.then(null,t)},c.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var i=new this.constructor(r);return this.state!==l?u(i,this.state===a?t:e,this.outcome):this.queue.push(new h(i,t,e)),i},h.prototype.callFulfilled=function(t){o.resolve(this.promise,t)},h.prototype.otherCallFulfilled=function(t){u(this.promise,this.onFulfilled,t)},h.prototype.callRejected=function(t){o.reject(this.promise,t)},h.prototype.otherCallRejected=function(t){u(this.promise,this.onRejected,t)},o.resolve=function(t,e){var i=p(d,e);if("error"===i.status)return o.reject(t,i.value);var n=i.value;if(n)f(t,n);else{t.state=a,t.outcome=e;for(var r=-1,s=t.queue.length;++r<s;)t.queue[r].callFulfilled(e)}return t},o.reject=function(t,e){t.state=s,t.outcome=e;for(var i=-1,n=t.queue.length;++i<n;)t.queue[i].callRejected(e);return t},c.resolve=function(t){return t instanceof this?t:o.resolve(new this(r),t)},c.reject=function(t){var e=new this(r);return o.reject(e,t)},c.all=function(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([]);for(var s=new Array(i),a=0,l=-1,c=new this(r);++l<i;)h(t[l],l);return c;function h(t,r){e.resolve(t).then((function(t){s[r]=t,++a!==i||n||(n=!0,o.resolve(c,s))}),(function(t){n||(n=!0,o.reject(c,t))}))}},c.race=function(t){if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var e=t.length,i=!1;if(!e)return this.resolve([]);for(var n,s=-1,a=new this(r);++s<e;)n=t[s],this.resolve(n).then((function(t){i||(i=!0,o.resolve(a,t))}),(function(t){i||(i=!0,o.reject(a,t))}));return a}},{immediate:36}],38:[function(t,e,i){"use strict";var n={};(0,t("./lib/utils/common").assign)(n,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=n},{"./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"),o=t("./utils/strings"),s=t("./zlib/messages"),a=t("./zlib/zstream"),l=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=r.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&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(0!==i)throw new Error(s[i]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var h;if(h="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(i=n.deflateSetDictionary(this.strm,h)))throw new Error(s[i]);this._dict_set=!0}}function h(t,e){var i=new c(e);if(i.push(t,!0),i.err)throw i.msg||s[i.err];return i.result}c.prototype.push=function(t,e){var i,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof t?a.input=o.string2buf(t):"[object ArrayBuffer]"===l.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(c),a.next_out=0,a.avail_out=c),1!==(i=n.deflate(a,s))&&0!==i)return this.onEnd(i),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(r.shrinkBuf(a.output,a.next_out))):this.onData(r.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==i);return 4===s?(i=n.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,0===i):2!==s||(this.onEnd(0),!(a.avail_out=0))},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){0===t&&("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=c,i.deflate=h,i.deflateRaw=function(t,e){return(e=e||{}).raw=!0,h(t,e)},i.gzip=function(t,e){return(e=e||{}).gzip=!0,h(t,e)}},{"./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"),o=t("./utils/strings"),s=t("./zlib/constants"),a=t("./zlib/messages"),l=t("./zlib/zstream"),c=t("./zlib/gzheader"),h=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&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,e.windowBits);if(i!==s.Z_OK)throw new Error(a[i]);this.header=new c,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}u.prototype.push=function(t,e){var i,a,l,c,u,d,f=this.strm,p=this.options.chunkSize,g=this.options.dictionary,m=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof t?f.input=o.binstring2buf(t):"[object ArrayBuffer]"===h.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,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&g&&(d="string"==typeof g?o.string2buf(g):"[object ArrayBuffer]"===h.call(g)?new Uint8Array(g):g,i=n.inflateSetDictionary(this.strm,d)),i===s.Z_BUF_ERROR&&!0===m&&(i=s.Z_OK,m=!1),i!==s.Z_STREAM_END&&i!==s.Z_OK)return this.onEnd(i),!(this.ended=!0);f.next_out&&(0!==f.avail_out&&i!==s.Z_STREAM_END&&(0!==f.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(f.output,f.next_out),c=f.next_out-l,u=o.buf2string(f.output,l),f.next_out=c,f.avail_out=p-c,c&&r.arraySet(f.output,f.output,l,c,0),this.onData(u)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((0<f.avail_in||0===f.avail_out)&&i!==s.Z_STREAM_END);return i===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(f.avail_out=0))},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){t===s.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=function(t,e){return(e=e||{}).raw=!0,d(t,e)},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){for(var e=Array.prototype.slice.call(arguments,1);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 o=0;o<n;o++)t[r+o]=e[i+o]},flattenChunks:function(t){var e,i,n,r,o,s;for(e=n=0,i=t.length;e<i;e++)n+=t[e].length;for(s=new Uint8Array(n),e=r=0,i=t.length;e<i;e++)o=t[e],s.set(o,r),r+=o.length;return s}},o={arraySet:function(t,e,i,n,r){for(var o=0;o<n;o++)t[r+o]=e[i+o]},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,o))},i.setTyped(n)},{}],42:[function(t,e,i){"use strict";var n=t("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(t,e){if(e<65537&&(t.subarray&&o||!t.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var i="",s=0;s<e;s++)i+=String.fromCharCode(t[s]);return i}s[254]=s[254]=1,i.string2buf=function(t){var e,i,r,o,s,a=t.length,l=0;for(o=0;o<a;o++)55296==(64512&(i=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(r=t.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(r-56320),o++),l+=i<128?1:i<2048?2:i<65536?3:4;for(e=new n.Buf8(l),o=s=0;s<l;o++)55296==(64512&(i=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(r=t.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(r-56320),o++),i<128?e[s++]=i:(i<2048?e[s++]=192|i>>>6:(i<65536?e[s++]=224|i>>>12:(e[s++]=240|i>>>18,e[s++]=128|i>>>12&63),e[s++]=128|i>>>6&63),e[s++]=128|63&i);return e},i.buf2binstring=function(t){return l(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,o,a=e||t.length,c=new Array(2*a);for(i=n=0;i<a;)if((r=t[i++])<128)c[n++]=r;else if(4<(o=s[r]))c[n++]=65533,i+=o-1;else{for(r&=2===o?31:3===o?15:7;1<o&&i<a;)r=r<<6|63&t[i++],o--;1<o?c[n++]=65533:r<65536?c[n++]=r:(r-=65536,c[n++]=55296|r>>10&1023,c[n++]=56320|1023&r)}return l(c,n)},i.utf8border=function(t,e){var i;for((e=e||t.length)>t.length&&(e=t.length),i=e-1;0<=i&&128==(192&t[i]);)i--;return i<0||0===i?e:i+s[t[i]]>e?i:e}},{"./common":41}],43:[function(t,e,i){"use strict";e.exports=function(t,e,i,n){for(var r=65535&t|0,o=t>>>16&65535|0,s=0;0!==i;){for(i-=s=2e3<i?2e3:i;o=o+(r=r+e[n++]|0)|0,--s;);r%=65521,o%=65521}return r|o<<16|0}},{}],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";var n=function(){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}();e.exports=function(t,e,i,r){var o=n,s=r+i;t^=-1;for(var a=r;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}},{}],46:[function(t,e,i){"use strict";var n,r=t("../utils/common"),o=t("./trees"),s=t("./adler32"),a=t("./crc32"),l=t("./messages"),c=-2,h=258,u=262,d=113;function f(t,e){return t.msg=l[e],e}function p(t){return(t<<1)-(4<t?9:0)}function g(t){for(var e=t.length;0<=--e;)t[e]=0}function m(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 v(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,m(t.strm)}function y(t,e){t.pending_buf[t.pending++]=e}function b(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function w(t,e){var i,n,r=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,l=t.strstart>t.w_size-u?t.strstart-(t.w_size-u):0,c=t.window,d=t.w_mask,f=t.prev,p=t.strstart+h,g=c[o+s-1],m=c[o+s];t.prev_length>=t.good_match&&(r>>=2),a>t.lookahead&&(a=t.lookahead);do{if(c[(i=e)+s]===m&&c[i+s-1]===g&&c[i]===c[o]&&c[++i]===c[o+1]){o+=2,i++;do{}while(c[++o]===c[++i]&&c[++o]===c[++i]&&c[++o]===c[++i]&&c[++o]===c[++i]&&c[++o]===c[++i]&&c[++o]===c[++i]&&c[++o]===c[++i]&&c[++o]===c[++i]&&o<p);if(n=h-(p-o),o=p-h,s<n){if(t.match_start=e,a<=(s=n))break;g=c[o+s-1],m=c[o+s]}}}while((e=f[e&d])>l&&0!=--r);return s<=t.lookahead?s:t.lookahead}function x(t){var e,i,n,o,l,c,h,d,f,p,g=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=g+(g-u)){for(r.arraySet(t.window,t.window,g,g,0),t.match_start-=g,t.strstart-=g,t.block_start-=g,e=i=t.hash_size;n=t.head[--e],t.head[e]=g<=n?n-g:0,--i;);for(e=i=g;n=t.prev[--e],t.prev[e]=g<=n?n-g:0,--i;);o+=g}if(0===t.strm.avail_in)break;if(c=t.strm,h=t.window,d=t.strstart+t.lookahead,p=void 0,(f=o)<(p=c.avail_in)&&(p=f),i=0===p?0:(c.avail_in-=p,r.arraySet(h,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=s(c.adler,h,p,d):2===c.state.wrap&&(c.adler=a(c.adler,h,p,d)),c.next_in+=p,c.total_in+=p,p),t.lookahead+=i,t.lookahead+t.insert>=3)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<<t.hash_shift^t.window[l+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[l+3-1])&t.hash_mask,t.prev[l&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=l,l++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<u&&0!==t.strm.avail_in)}function _(t,e){for(var i,n;;){if(t.lookahead<u){if(x(t),t.lookahead<u&&0===e)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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=w(t,i)),t.match_length>=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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!=--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=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}function k(t,e){for(var i,n,r;;){if(t.lookahead<u){if(x(t),t.lookahead<u&&0===e)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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=2,0!==i&&t.prev_length<t.max_lazy_match&&t.strstart-i<=t.w_size-u&&(t.match_length=w(t,i),t.match_length<=5&&(1===t.strategy||3===t.match_length&&4096<t.strstart-t.match_start)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){for(r=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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!=--t.prev_length;);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(v(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&v(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}function E(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 S(){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=8,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(1146),this.dyn_dtree=new r.Buf16(122),this.bl_tree=new r.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(16),this.heap=new r.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(573),g(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 T(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:d,t.adler=2===e.wrap?0:1,e.last_flush=0,o._tr_init(e),0):f(t,c)}function C(t){var e=T(t);return 0===e&&function(t){t.window_size=2*t.w_size,g(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=2,t.match_available=0,t.ins_h=0}(t.state),e}function O(t,e,i,n,o,s){if(!t)return c;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),o<1||9<o||8!==i||n<8||15<n||e<0||9<e||s<0||4<s)return f(t,c);8===n&&(n=9);var l=new S;return(t.state=l).strm=t,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=o+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new r.Buf8(2*l.w_size),l.head=new r.Buf16(l.hash_size),l.prev=new r.Buf16(l.w_size),l.lit_bufsize=1<<o+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new r.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=e,l.strategy=s,l.method=i,C(t)}n=[new E(0,0,0,0,(function(t,e){var i=65535;for(i>t.pending_buf_size-5&&(i=t.pending_buf_size-5);;){if(t.lookahead<=1){if(x(t),0===t.lookahead&&0===e)return 1;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,v(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-u&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(v(t,!1),t.strm.avail_out),1)})),new E(4,4,8,4,_),new E(4,5,16,8,_),new E(4,6,32,32,_),new E(4,4,16,16,k),new E(8,16,32,32,k),new E(8,16,128,128,k),new E(8,32,128,256,k),new E(32,128,258,1024,k),new E(32,258,258,4096,k)],i.deflateInit=function(t,e){return O(t,e,8,15,8,0)},i.deflateInit2=O,i.deflateReset=C,i.deflateResetKeep=T,i.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,0):c},i.deflate=function(t,e){var i,r,s,l;if(!t||!t.state||5<e||e<0)return t?f(t,c):c;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||666===r.status&&4!==e)return f(t,0===t.avail_out?-5:c);if(r.strm=t,i=r.last_flush,r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,y(r,31),y(r,139),y(r,8),r.gzhead?(y(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)),y(r,255&r.gzhead.time),y(r,r.gzhead.time>>8&255),y(r,r.gzhead.time>>16&255),y(r,r.gzhead.time>>24&255),y(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),y(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(y(r,255&r.gzhead.extra.length),y(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=69):(y(r,0),y(r,0),y(r,0),y(r,0),y(r,0),y(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),y(r,3),r.status=d);else{var u=8+(r.w_bits-8<<4)<<8;u|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(u|=32),u+=31-u%31,r.status=d,b(r,u),0!==r.strstart&&(b(r,t.adler>>>16),b(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(s=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),m(t),s=r.pending,r.pending!==r.pending_buf_size));)y(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),m(t),s=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,y(r,l)}while(0!==l);r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),0===l&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),m(t),s=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,y(r,l)}while(0!==l);r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),0===l&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&m(t),r.pending+2<=r.pending_buf_size&&(y(r,255&t.adler),y(r,t.adler>>8&255),t.adler=0,r.status=d)):r.status=d),0!==r.pending){if(m(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(i)&&4!==e)return f(t,-5);if(666===r.status&&0!==t.avail_in)return f(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&666!==r.status){var w=2===r.strategy?function(t,e){for(var i;;){if(0===t.lookahead&&(x(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,i=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,i&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var i,n,r,s,a=t.window;;){if(t.lookahead<=h){if(x(t),t.lookahead<=h&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0<t.strstart&&(n=a[r=t.strstart-1])===a[++r]&&n===a[++r]&&n===a[++r]){s=t.strstart+h;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<s);t.match_length=h-(s-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(i=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(i=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),i&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(r,e):n[r.level].func(r,e);if(3!==w&&4!==w||(r.status=666),1===w||3===w)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===w&&(1===e?o._tr_align(r):5!==e&&(o._tr_stored_block(r,0,0,!1),3===e&&(g(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),m(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(y(r,255&t.adler),y(r,t.adler>>8&255),y(r,t.adler>>16&255),y(r,t.adler>>24&255),y(r,255&t.total_in),y(r,t.total_in>>8&255),y(r,t.total_in>>16&255),y(r,t.total_in>>24&255)):(b(r,t.adler>>>16),b(r,65535&t.adler)),m(t),0<r.wrap&&(r.wrap=-r.wrap),0!==r.pending?0:1)},i.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&e!==d&&666!==e?f(t,c):(t.state=null,e===d?f(t,-3):0):c},i.deflateSetDictionary=function(t,e){var i,n,o,a,l,h,u,d,f=e.length;if(!t||!t.state)return c;if(2===(a=(i=t.state).wrap)||1===a&&42!==i.status||i.lookahead)return c;for(1===a&&(t.adler=s(t.adler,e,f,0)),i.wrap=0,f>=i.w_size&&(0===a&&(g(i.head),i.strstart=0,i.block_start=0,i.insert=0),d=new r.Buf8(i.w_size),r.arraySet(d,e,f-i.w_size,i.w_size,0),e=d,f=i.w_size),l=t.avail_in,h=t.next_in,u=t.input,t.avail_in=f,t.next_in=0,t.input=e,x(i);i.lookahead>=3;){for(n=i.strstart,o=i.lookahead-2;i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+3-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++,--o;);i.strstart=n,i.lookahead=2,x(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=h,t.input=u,t.avail_in=l,i.wrap=a,0},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";e.exports=function(){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}},{}],48:[function(t,e,i){"use strict";e.exports=function(t,e){var i,n,r,o,s,a,l,c,h,u,d,f,p,g,m,v,y,b,w,x,_,k,E,S,T;i=t.state,n=t.next_in,S=t.input,r=n+(t.avail_in-5),o=t.next_out,T=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),l=i.dmax,c=i.wsize,h=i.whave,u=i.wnext,d=i.window,f=i.hold,p=i.bits,g=i.lencode,m=i.distcode,v=(1<<i.lenbits)-1,y=(1<<i.distbits)-1;t:do{p<15&&(f+=S[n++]<<p,p+=8,f+=S[n++]<<p,p+=8),b=g[f&v];e:for(;;){if(f>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))T[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=g[(65535&b)+(f&(1<<w)-1)];continue e}if(32&w){i.mode=12;break t}t.msg="invalid literal/length code",i.mode=30;break t}x=65535&b,(w&=15)&&(p<w&&(f+=S[n++]<<p,p+=8),x+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=S[n++]<<p,p+=8,f+=S[n++]<<p,p+=8),b=m[f&y];i:for(;;){if(f>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=m[(65535&b)+(f&(1<<w)-1)];continue i}t.msg="invalid distance code",i.mode=30;break t}if(_=65535&b,p<(w&=15)&&(f+=S[n++]<<p,(p+=8)<w&&(f+=S[n++]<<p,p+=8)),l<(_+=f&(1<<w)-1)){t.msg="invalid distance too far back",i.mode=30;break t}if(f>>>=w,p-=w,(w=o-s)<_){if(h<(w=_-w)&&i.sane){t.msg="invalid distance too far back",i.mode=30;break t}if(E=d,(k=0)===u){if(k+=c-w,w<x){for(x-=w;T[o++]=d[k++],--w;);k=o-_,E=T}}else if(u<w){if(k+=c+u-w,(w-=u)<x){for(x-=w;T[o++]=d[k++],--w;);if(k=0,u<x){for(x-=w=u;T[o++]=d[k++],--w;);k=o-_,E=T}}}else if(k+=u-w,w<x){for(x-=w;T[o++]=d[k++],--w;);k=o-_,E=T}for(;2<x;)T[o++]=E[k++],T[o++]=E[k++],T[o++]=E[k++],x-=3;x&&(T[o++]=E[k++],1<x&&(T[o++]=E[k++]))}else{for(k=o-_;T[o++]=T[k++],T[o++]=T[k++],T[o++]=T[k++],2<(x-=3););x&&(T[o++]=T[k++],1<x&&(T[o++]=T[k++]))}break}}break}}while(n<r&&o<a);n-=x=p>>3,f&=(1<<(p-=x<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n<r?r-n+5:5-(n-r),t.avail_out=o<a?a-o+257:257-(o-a),i.hold=f,i.bits=p}},{}],49:[function(t,e,i){"use strict";var n=t("../utils/common"),r=t("./adler32"),o=t("./crc32"),s=t("./inffast"),a=t("./inftrees"),l=-2;function c(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function h(){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 u(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=1,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(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):l}function d(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,u(t)):l}function f(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||15<e)?l:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=i,n.wbits=e,d(t))):l}function p(t,e){var i,n;return t?(n=new h,(t.state=n).window=null,0!==(i=f(t,e))&&(t.state=null),i):l}var g,m,v=!0;function y(t){if(v){var e;for(g=new n.Buf32(512),m=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,g,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,m,0,t.work,{bits:5}),v=!1}t.lencode=g,t.lenbits=9,t.distcode=m,t.distbits=5}function b(t,e,i,r){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),r>=s.wsize?(n.arraySet(s.window,e,i-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(r<(o=s.wsize-s.wnext)&&(o=r),n.arraySet(s.window,e,i-r,o,s.wnext),(r-=o)?(n.arraySet(s.window,e,i-r,r,0),s.wnext=r,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}i.inflateReset=d,i.inflateReset2=f,i.inflateResetKeep=u,i.inflateInit=function(t){return p(t,15)},i.inflateInit2=p,i.inflate=function(t,e){var i,h,u,d,f,p,g,m,v,w,x,_,k,E,S,T,C,O,A,N,I,R,j,L,z=0,D=new n.Buf8(4),P=[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 l;12===(i=t.state).mode&&(i.mode=13),f=t.next_out,u=t.output,g=t.avail_out,d=t.next_in,h=t.input,p=t.avail_in,m=i.hold,v=i.bits,w=p,x=g,R=0;t:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;v<16;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(2&i.wrap&&35615===m){D[i.check=0]=255&m,D[1]=m>>>8&255,i.check=o(i.check,D,2,0),v=m=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",i.mode=30;break}if(8!=(15&m)){t.msg="unknown compression method",i.mode=30;break}if(v-=4,I=8+(15&(m>>>=4)),0===i.wbits)i.wbits=I;else if(I>i.wbits){t.msg="invalid window size",i.mode=30;break}i.dmax=1<<I,t.adler=i.check=1,i.mode=512&m?10:12,v=m=0;break;case 2:for(;v<16;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(i.flags=m,8!=(255&i.flags)){t.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){t.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=m>>8&1),512&i.flags&&(D[0]=255&m,D[1]=m>>>8&255,i.check=o(i.check,D,2,0)),v=m=0,i.mode=3;case 3:for(;v<32;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}i.head&&(i.head.time=m),512&i.flags&&(D[0]=255&m,D[1]=m>>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,i.check=o(i.check,D,4,0)),v=m=0,i.mode=4;case 4:for(;v<16;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}i.head&&(i.head.xflags=255&m,i.head.os=m>>8),512&i.flags&&(D[0]=255&m,D[1]=m>>>8&255,i.check=o(i.check,D,2,0)),v=m=0,i.mode=5;case 5:if(1024&i.flags){for(;v<16;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}i.length=m,i.head&&(i.head.extra_len=m),512&i.flags&&(D[0]=255&m,D[1]=m>>>8&255,i.check=o(i.check,D,2,0)),v=m=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(p<(_=i.length)&&(_=p),_&&(i.head&&(I=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,h,d,_,I)),512&i.flags&&(i.check=o(i.check,h,_,d)),p-=_,d+=_,i.length-=_),i.length))break t;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===p)break t;for(_=0;I=h[d+_++],i.head&&I&&i.length<65536&&(i.head.name+=String.fromCharCode(I)),I&&_<p;);if(512&i.flags&&(i.check=o(i.check,h,_,d)),p-=_,d+=_,I)break t}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===p)break t;for(_=0;I=h[d+_++],i.head&&I&&i.length<65536&&(i.head.comment+=String.fromCharCode(I)),I&&_<p;);if(512&i.flags&&(i.check=o(i.check,h,_,d)),p-=_,d+=_,I)break t}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;v<16;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(m!==(65535&i.check)){t.msg="header crc mismatch",i.mode=30;break}v=m=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),t.adler=i.check=0,i.mode=12;break;case 10:for(;v<32;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}t.adler=i.check=c(m),v=m=0,i.mode=11;case 11:if(0===i.havedict)return t.next_out=f,t.avail_out=g,t.next_in=d,t.avail_in=p,i.hold=m,i.bits=v,2;t.adler=i.check=1,i.mode=12;case 12:if(5===e||6===e)break t;case 13:if(i.last){m>>>=7&v,v-=7&v,i.mode=27;break}for(;v<3;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}switch(i.last=1&m,v-=1,3&(m>>>=1)){case 0:i.mode=14;break;case 1:if(y(i),i.mode=20,6!==e)break;m>>>=2,v-=2;break t;case 2:i.mode=17;break;case 3:t.msg="invalid block type",i.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){t.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&m,v=m=0,i.mode=15,6===e)break t;case 15:i.mode=16;case 16:if(_=i.length){if(p<_&&(_=p),g<_&&(_=g),0===_)break t;n.arraySet(u,h,d,_,f),p-=_,d+=_,g-=_,f+=_,i.length-=_;break}i.mode=12;break;case 17:for(;v<14;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(i.nlen=257+(31&m),m>>>=5,v-=5,i.ndist=1+(31&m),m>>>=5,v-=5,i.ncode=4+(15&m),m>>>=4,v-=4,286<i.nlen||30<i.ndist){t.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;v<3;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}i.lens[P[i.have++]]=7&m,m>>>=3,v-=3}for(;i.have<19;)i.lens[P[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,j={bits:i.lenbits},R=a(0,i.lens,0,19,i.lencode,0,i.work,j),i.lenbits=j.bits,R){t.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;T=(z=i.lencode[m&(1<<i.lenbits)-1])>>>16&255,C=65535&z,!((S=z>>>24)<=v);){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(C<16)m>>>=S,v-=S,i.lens[i.have++]=C;else{if(16===C){for(L=S+2;v<L;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(m>>>=S,v-=S,0===i.have){t.msg="invalid bit length repeat",i.mode=30;break}I=i.lens[i.have-1],_=3+(3&m),m>>>=2,v-=2}else if(17===C){for(L=S+3;v<L;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}v-=S,I=0,_=3+(7&(m>>>=S)),m>>>=3,v-=3}else{for(L=S+7;v<L;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}v-=S,I=0,_=11+(127&(m>>>=S)),m>>>=7,v-=7}if(i.have+_>i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=30;break}for(;_--;)i.lens[i.have++]=I}}if(30===i.mode)break;if(0===i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,j={bits:i.lenbits},R=a(1,i.lens,0,i.nlen,i.lencode,0,i.work,j),i.lenbits=j.bits,R){t.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,j={bits:i.distbits},R=a(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,j),i.distbits=j.bits,R){t.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===e)break t;case 20:i.mode=21;case 21:if(6<=p&&258<=g){t.next_out=f,t.avail_out=g,t.next_in=d,t.avail_in=p,i.hold=m,i.bits=v,s(t,x),f=t.next_out,u=t.output,g=t.avail_out,d=t.next_in,h=t.input,p=t.avail_in,m=i.hold,v=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;T=(z=i.lencode[m&(1<<i.lenbits)-1])>>>16&255,C=65535&z,!((S=z>>>24)<=v);){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(T&&0==(240&T)){for(O=S,A=T,N=C;T=(z=i.lencode[N+((m&(1<<O+A)-1)>>O)])>>>16&255,C=65535&z,!(O+(S=z>>>24)<=v);){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}m>>>=O,v-=O,i.back+=O}if(m>>>=S,v-=S,i.back+=S,i.length=C,0===T){i.mode=26;break}if(32&T){i.back=-1,i.mode=12;break}if(64&T){t.msg="invalid literal/length code",i.mode=30;break}i.extra=15&T,i.mode=22;case 22:if(i.extra){for(L=i.extra;v<L;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}i.length+=m&(1<<i.extra)-1,m>>>=i.extra,v-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;T=(z=i.distcode[m&(1<<i.distbits)-1])>>>16&255,C=65535&z,!((S=z>>>24)<=v);){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(0==(240&T)){for(O=S,A=T,N=C;T=(z=i.distcode[N+((m&(1<<O+A)-1)>>O)])>>>16&255,C=65535&z,!(O+(S=z>>>24)<=v);){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}m>>>=O,v-=O,i.back+=O}if(m>>>=S,v-=S,i.back+=S,64&T){t.msg="invalid distance code",i.mode=30;break}i.offset=C,i.extra=15&T,i.mode=24;case 24:if(i.extra){for(L=i.extra;v<L;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}i.offset+=m&(1<<i.extra)-1,m>>>=i.extra,v-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){t.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===g)break t;if(_=x-g,i.offset>_){if((_=i.offset-_)>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=30;break}k=_>i.wnext?(_-=i.wnext,i.wsize-_):i.wnext-_,_>i.length&&(_=i.length),E=i.window}else E=u,k=f-i.offset,_=i.length;for(g<_&&(_=g),g-=_,i.length-=_;u[f++]=E[k++],--_;);0===i.length&&(i.mode=21);break;case 26:if(0===g)break t;u[f++]=i.length,g--,i.mode=21;break;case 27:if(i.wrap){for(;v<32;){if(0===p)break t;p--,m|=h[d++]<<v,v+=8}if(x-=g,t.total_out+=x,i.total+=x,x&&(t.adler=i.check=i.flags?o(i.check,u,x,f-x):r(i.check,u,x,f-x)),x=g,(i.flags?m:c(m))!==i.check){t.msg="incorrect data check",i.mode=30;break}v=m=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;v<32;){if(0===p)break t;p--,m+=h[d++]<<v,v+=8}if(m!==(4294967295&i.total)){t.msg="incorrect length check",i.mode=30;break}v=m=0}i.mode=29;case 29:R=1;break t;case 30:R=-3;break t;case 31:return-4;case 32:default:return l}return t.next_out=f,t.avail_out=g,t.next_in=d,t.avail_in=p,i.hold=m,i.bits=v,(i.wsize||x!==t.avail_out&&i.mode<30&&(i.mode<27||4!==e))&&b(t,t.output,t.next_out,x-t.avail_out)?(i.mode=31,-4):(w-=t.avail_in,x-=t.avail_out,t.total_in+=w,t.total_out+=x,i.total+=x,i.wrap&&x&&(t.adler=i.check=i.flags?o(i.check,u,x,t.next_out-x):r(i.check,u,x,t.next_out-x)),t.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0==w&&0===x||4===e)&&0===R&&(R=-5),R)},i.inflateEnd=function(t){if(!t||!t.state)return l;var e=t.state;return e.window&&(e.window=null),t.state=null,0},i.inflateGetHeader=function(t,e){var i;return t&&t.state?0==(2&(i=t.state).wrap)?l:((i.head=e).done=!1,0):l},i.inflateSetDictionary=function(t,e){var i,n=e.length;return t&&t.state?0!==(i=t.state).wrap&&11!==i.mode?l:11===i.mode&&r(1,e,n,0)!==i.check?-3:b(t,e,n,n)?(i.mode=31,-4):(i.havedict=1,0):l},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=[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],o=[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],s=[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],a=[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,l,c,h,u,d){var f,p,g,m,v,y,b,w,x,_=d.bits,k=0,E=0,S=0,T=0,C=0,O=0,A=0,N=0,I=0,R=0,j=null,L=0,z=new n.Buf16(16),D=new n.Buf16(16),P=null,B=0;for(k=0;k<=15;k++)z[k]=0;for(E=0;E<l;E++)z[e[i+E]]++;for(C=_,T=15;1<=T&&0===z[T];T--);if(T<C&&(C=T),0===T)return c[h++]=20971520,c[h++]=20971520,d.bits=1,0;for(S=1;S<T&&0===z[S];S++);for(C<S&&(C=S),k=N=1;k<=15;k++)if(N<<=1,(N-=z[k])<0)return-1;if(0<N&&(0===t||1!==T))return-1;for(D[1]=0,k=1;k<15;k++)D[k+1]=D[k]+z[k];for(E=0;E<l;E++)0!==e[i+E]&&(u[D[e[i+E]]++]=E);if(y=0===t?(j=P=u,19):1===t?(j=r,L-=257,P=o,B-=257,256):(j=s,P=a,-1),k=S,v=h,A=E=R=0,g=-1,m=(I=1<<(O=C))-1,1===t&&852<I||2===t&&592<I)return 1;for(;;){for(b=k-A,x=u[E]<y?(w=0,u[E]):u[E]>y?(w=P[B+u[E]],j[L+u[E]]):(w=96,0),f=1<<k-A,S=p=1<<O;c[v+(R>>A)+(p-=f)]=b<<24|w<<16|x|0,0!==p;);for(f=1<<k-1;R&f;)f>>=1;if(0!==f?(R&=f-1,R+=f):R=0,E++,0==--z[k]){if(k===T)break;k=e[i+u[E]]}if(C<k&&(R&m)!==g){for(0===A&&(A=C),v+=S,N=1<<(O=k-A);O+A<T&&!((N-=z[O+A])<=0);)O++,N<<=1;if(I+=1<<O,1===t&&852<I||2===t&&592<I)return 1;c[g=R&m]=C<<24|O<<16|v-h|0}}return 0!==R&&(c[v+R]=k-A<<24|64<<16|0),d.bits=C,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");function r(t){for(var e=t.length;0<=--e;)t[e]=0}var o=256,s=286,a=30,l=15,c=[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],h=[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],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],d=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576);r(f);var p=new Array(60);r(p);var g=new Array(512);r(g);var m=new Array(256);r(m);var v=new Array(29);r(v);var y,b,w,x=new Array(a);function _(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 k(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function E(t){return t<256?g[t]:g[256+(t>>>7)]}function S(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function T(t,e,i){t.bi_valid>16-i?(t.bi_buf|=e<<t.bi_valid&65535,S(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=i-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=i)}function C(t,e,i){T(t,i[2*e],i[2*e+1])}function O(t,e){for(var i=0;i|=1&t,t>>>=1,i<<=1,0<--e;);return i>>>1}function A(t,e,i){var n,r,o=new Array(16),s=0;for(n=1;n<=l;n++)o[n]=s=s+i[n-1]<<1;for(r=0;r<=e;r++){var a=t[2*r+1];0!==a&&(t[2*r]=O(o[a]++,a))}}function N(t){var e;for(e=0;e<s;e++)t.dyn_ltree[2*e]=0;for(e=0;e<a;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function I(t){8<t.bi_valid?S(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function R(t,e,i,n){var r=2*e,o=2*i;return t[r]<t[o]||t[r]===t[o]&&n[e]<=n[i]}function j(t,e,i){for(var n=t.heap[i],r=i<<1;r<=t.heap_len&&(r<t.heap_len&&R(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!R(e,n,t.heap[r],t.depth));)t.heap[i]=t.heap[r],i=r,r<<=1;t.heap[i]=n}function L(t,e,i){var n,r,s,a,l=0;if(0!==t.last_lit)for(;n=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],r=t.pending_buf[t.l_buf+l],l++,0===n?C(t,r,e):(C(t,(s=m[r])+o+1,e),0!==(a=c[s])&&T(t,r-=v[s],a),C(t,s=E(--n),i),0!==(a=h[s])&&T(t,n-=x[s],a)),l<t.last_lit;);C(t,256,e)}function z(t,e){var i,n,r,o=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,c=e.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=573,i=0;i<c;i++)0!==o[2*i]?(t.heap[++t.heap_len]=h=i,t.depth[i]=0):o[2*i+1]=0;for(;t.heap_len<2;)o[2*(r=t.heap[++t.heap_len]=h<2?++h:0)]=1,t.depth[r]=0,t.opt_len--,a&&(t.static_len-=s[2*r+1]);for(e.max_code=h,i=t.heap_len>>1;1<=i;i--)j(t,o,i);for(r=c;i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],j(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=n,o[2*r]=o[2*i]+o[2*n],t.depth[r]=(t.depth[i]>=t.depth[n]?t.depth[i]:t.depth[n])+1,o[2*i+1]=o[2*n+1]=r,t.heap[1]=r++,j(t,o,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var i,n,r,o,s,a,c=e.dyn_tree,h=e.max_code,u=e.stat_desc.static_tree,d=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,g=e.stat_desc.max_length,m=0;for(o=0;o<=l;o++)t.bl_count[o]=0;for(c[2*t.heap[t.heap_max]+1]=0,i=t.heap_max+1;i<573;i++)g<(o=c[2*c[2*(n=t.heap[i])+1]+1]+1)&&(o=g,m++),c[2*n+1]=o,h<n||(t.bl_count[o]++,s=0,p<=n&&(s=f[n-p]),a=c[2*n],t.opt_len+=a*(o+s),d&&(t.static_len+=a*(u[2*n+1]+s)));if(0!==m){do{for(o=g-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[g]--,m-=2}while(0<m);for(o=g;0!==o;o--)for(n=t.bl_count[o];0!==n;)h<(r=t.heap[--i])||(c[2*r+1]!==o&&(t.opt_len+=(o-c[2*r+1])*c[2*r],c[2*r+1]=o),n--)}}(t,e),A(o,h,t.bl_count)}function D(t,e,i){var n,r,o=-1,s=e[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),e[2*(i+1)+1]=65535,n=0;n<=i;n++)r=s,s=e[2*(n+1)+1],++a<l&&r===s||(a<c?t.bl_tree[2*r]+=a:0!==r?(r!==o&&t.bl_tree[2*r]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=r,c=(a=0)===s?(l=138,3):r===s?(l=6,3):(l=7,4))}function P(t,e,i){var n,r,o=-1,s=e[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),n=0;n<=i;n++)if(r=s,s=e[2*(n+1)+1],!(++a<l&&r===s)){if(a<c)for(;C(t,r,t.bl_tree),0!=--a;);else 0!==r?(r!==o&&(C(t,r,t.bl_tree),a--),C(t,16,t.bl_tree),T(t,a-3,2)):a<=10?(C(t,17,t.bl_tree),T(t,a-3,3)):(C(t,18,t.bl_tree),T(t,a-11,7));o=r,c=(a=0)===s?(l=138,3):r===s?(l=6,3):(l=7,4)}}r(x);var B=!1;function M(t,e,i,r){T(t,0+(r?1:0),3),function(t,e,i,r){I(t),S(t,i),S(t,~i),n.arraySet(t.pending_buf,t.window,e,i,t.pending),t.pending+=i}(t,e,i)}i._tr_init=function(t){B||(function(){var t,e,i,n,r,o=new Array(16);for(n=i=0;n<28;n++)for(v[n]=i,t=0;t<1<<c[n];t++)m[i++]=n;for(m[i-1]=n,n=r=0;n<16;n++)for(x[n]=r,t=0;t<1<<h[n];t++)g[r++]=n;for(r>>=7;n<a;n++)for(x[n]=r<<7,t=0;t<1<<h[n]-7;t++)g[256+r++]=n;for(e=0;e<=l;e++)o[e]=0;for(t=0;t<=143;)f[2*t+1]=8,t++,o[8]++;for(;t<=255;)f[2*t+1]=9,t++,o[9]++;for(;t<=279;)f[2*t+1]=7,t++,o[7]++;for(;t<=287;)f[2*t+1]=8,t++,o[8]++;for(A(f,287,o),t=0;t<a;t++)p[2*t+1]=5,p[2*t]=O(t,5);y=new _(f,c,257,s,l),b=new _(p,h,0,a,l),w=new _(new Array(0),u,0,19,7)}(),B=!0),t.l_desc=new k(t.dyn_ltree,y),t.d_desc=new k(t.dyn_dtree,b),t.bl_desc=new k(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,N(t)},i._tr_stored_block=M,i._tr_flush_block=function(t,e,i,n){var r,s,a=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<o;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),z(t,t.l_desc),z(t,t.d_desc),a=function(t){var e;for(D(t,t.dyn_ltree,t.l_desc.max_code),D(t,t.dyn_dtree,t.d_desc.max_code),z(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*d[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=r&&(r=s)):r=s=i+5,i+4<=r&&-1!==e?M(t,e,i,n):4===t.strategy||s===r?(T(t,2+(n?1:0),3),L(t,f,p)):(T(t,4+(n?1:0),3),function(t,e,i,n){var r;for(T(t,e-257,5),T(t,i-1,5),T(t,n-4,4),r=0;r<n;r++)T(t,t.bl_tree[2*d[r]+1],3);P(t,t.dyn_ltree,e-1),P(t,t.dyn_dtree,i-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),L(t,t.dyn_ltree,t.dyn_dtree)),N(t),n&&I(t)},i._tr_tally=function(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*(m[i]+o+1)]++,t.dyn_dtree[2*E(e)]++),t.last_lit===t.lit_bufsize-1},i._tr_align=function(t){T(t,2,3),C(t,256,f),function(t){16===t.bi_valid?(S(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,i){"use strict";e.exports=function(){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}},{}],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)})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("xmldom"),require("JSZip")):"function"==typeof define&&define.amd?define(["xmldom","JSZip"],e):"object"==typeof exports?exports.ePub=e(require("xmldom"),require("JSZip")):t.ePub=e(t.xmldom,t.JSZip)}(window,(function(t,e){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=86)}([function(t,e,i){"use strict";i.r(e),i.d(e,"requestAnimationFrame",(function(){return r})),i.d(e,"uuid",(function(){return s})),i.d(e,"documentHeight",(function(){return a})),i.d(e,"isElement",(function(){return l})),i.d(e,"isNumber",(function(){return c})),i.d(e,"isFloat",(function(){return h})),i.d(e,"prefixed",(function(){return u})),i.d(e,"defaults",(function(){return d})),i.d(e,"extend",(function(){return f})),i.d(e,"insert",(function(){return p})),i.d(e,"locationOf",(function(){return g})),i.d(e,"indexOfSorted",(function(){return m})),i.d(e,"bounds",(function(){return v})),i.d(e,"borders",(function(){return y})),i.d(e,"nodeBounds",(function(){return b})),i.d(e,"windowBounds",(function(){return w})),i.d(e,"indexOfNode",(function(){return x})),i.d(e,"indexOfTextNode",(function(){return _})),i.d(e,"indexOfElementNode",(function(){return k})),i.d(e,"isXml",(function(){return E})),i.d(e,"createBlob",(function(){return S})),i.d(e,"createBlobUrl",(function(){return T})),i.d(e,"revokeBlobUrl",(function(){return C})),i.d(e,"createBase64Url",(function(){return O})),i.d(e,"type",(function(){return A})),i.d(e,"parse",(function(){return N})),i.d(e,"qs",(function(){return I})),i.d(e,"qsa",(function(){return R})),i.d(e,"qsp",(function(){return j})),i.d(e,"sprint",(function(){return L})),i.d(e,"treeWalker",(function(){return z})),i.d(e,"walk",(function(){return D})),i.d(e,"blob2base64",(function(){return P})),i.d(e,"defer",(function(){return B})),i.d(e,"querySelectorByType",(function(){return M})),i.d(e,"findChildren",(function(){return F})),i.d(e,"parents",(function(){return q})),i.d(e,"filterChildren",(function(){return U})),i.d(e,"getParentByTagName",(function(){return W})),i.d(e,"RangeObject",(function(){return $}));i(24),i(14),i(20);var n=i(38);const r="undefined"!=typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),o="undefined"!=typeof URL?URL:"undefined"!=typeof window?window.URL||window.webkitURL||window.mozURL:void 0;function s(){var t=(new Date).getTime();return"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)}))}function a(){return Math.max(document.documentElement.clientHeight,document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight)}function l(t){return!(!t||1!=t.nodeType)}function c(t){return!isNaN(parseFloat(t))&&isFinite(t)}function h(t){let e=parseFloat(t);return!1!==c(t)&&("string"==typeof t&&t.indexOf(".")>-1||Math.floor(e)!==e)}function u(t){var e=["-webkit-","-webkit-","-moz-","-o-","-ms-"],i=t.toLowerCase(),n=["Webkit","webkit","Moz","O","ms"].length;if("undefined"==typeof document||void 0!==document.body.style[i])return t;for(var r=0;r<n;r++)if(void 0!==document.body.style[e[r]+i])return e[r]+i;return t}function d(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 f(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 p(t,e,i){var n=g(t,e,i);return e.splice(n,0,t),n}function g(t,e,i,n,r){var o,s=n||0,a=r||e.length,l=parseInt(s+(a-s)/2);return i||(i=function(t,e){return t>e?1:t<e?-1:t==e?0:void 0}),a-s<=0?l:(o=i(e[l],t),a-s==1?o>=0?l:l+1:0===o?l:-1===o?g(t,e,i,l,a):g(t,e,i,s,l))}function m(t,e,i,n,r){var o,s=n||0,a=r||e.length,l=parseInt(s+(a-s)/2);return i||(i=function(t,e){return t>e?1:t<e?-1:t==e?0:void 0}),a-s<=0?-1:(o=i(e[l],t),a-s==1?0===o?l:-1:0===o?l:-1===o?m(t,e,i,l,a):m(t,e,i,s,l))}function v(t){var e=window.getComputedStyle(t),i=0,n=0;return["width","paddingRight","paddingLeft","marginRight","marginLeft","borderRightWidth","borderLeftWidth"].forEach((function(t){i+=parseFloat(e[t])||0})),["height","paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"].forEach((function(t){n+=parseFloat(e[t])||0})),{height:n,width:i}}function y(t){var e=window.getComputedStyle(t),i=0,n=0;return["paddingRight","paddingLeft","marginRight","marginLeft","borderRightWidth","borderLeftWidth"].forEach((function(t){i+=parseFloat(e[t])||0})),["paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"].forEach((function(t){n+=parseFloat(e[t])||0})),{height:n,width:i}}function b(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 w(){var t=window.innerWidth,e=window.innerHeight;return{top:0,left:0,right:t,bottom:e,width:t,height:e}}function x(t,e){for(var i,n=t.parentNode.childNodes,r=-1,o=0;o<n.length&&((i=n[o]).nodeType===e&&r++,i!=t);o++);return r}function _(t){return x(t,3)}function k(t){return x(t,1)}function E(t){return["xml","opf","ncx"].indexOf(t)>-1}function S(t,e){return new Blob([t],{type:e})}function T(t,e){var i=S(t,e);return o.createObjectURL(i)}function C(t){return o.revokeObjectURL(t)}function O(t,e){if("string"==typeof t)return"data:"+e+";base64,"+btoa(encodeURIComponent(t))}function A(t){return Object.prototype.toString.call(t).slice(8,-1)}function N(t,e,i){var r;return r="undefined"==typeof DOMParser||i?n.DOMParser:DOMParser,65279===t.charCodeAt(0)&&(t=t.slice(1)),(new r).parseFromString(t,e)}function I(t,e){var i;if(!t)throw new Error("No Element Provided");return void 0!==t.querySelector?t.querySelector(e):(i=t.getElementsByTagName(e)).length?i[0]:void 0}function R(t,e){return void 0!==t.querySelector?t.querySelectorAll(e):t.getElementsByTagName(e)}function j(t,e,i){var n,r;if(void 0!==t.querySelector){for(var o in e+="[",i)e+=o+"~='"+i[o]+"'";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})))return r[0]}function L(t,e){void 0!==(t.ownerDocument||t).createTreeWalker?z(t,e,NodeFilter.SHOW_TEXT):D(t,(function(t){t&&3===t.nodeType&&e(t)}))}function z(t,e,i){var n=document.createTreeWalker(t,i,null,!1);let r;for(;r=n.nextNode();)e(r)}function D(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(D(t,e))return!0;t=t.nextSibling}while(t)}function P(t){return new Promise((function(e,i){var n=new FileReader;n.readAsDataURL(t),n.onloadend=function(){e(n.result)}}))}function B(){this.resolve=null,this.reject=null,this.id=s(),this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e}),Object.freeze(this)}function M(t,e,i){var n;if(void 0!==t.querySelector&&(n=t.querySelector(`${e}[*|type="${i}"]`)),n&&0!==n.length)return n;n=R(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 F(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 U(t,e,i){for(var n=[],r=t.childNodes,o=0;o<r.length;o++){let t=r[o];if(1===t.nodeType&&t.nodeName.toLowerCase()===e){if(i)return t;n.push(t)}}if(!i)return n}function W(t,e){let i;if(null!==t&&""!==e)for(i=t.parentNode;1===i.nodeType;){if(i.tagName.toLowerCase()===e)return i;i=i.parentNode}}class ${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(){}}},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 o}));const n="0.3",r=["keydown","keyup","keypressed","mouseup","mousedown","mousemove","click","touchend","touchstart","touchmove"],o={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"}}},function(t,e,i){"use strict";var n=i(0);class r{constructor(t,e,i){var o;if(this.str="",this.base={},this.spinePos=0,this.range=!1,this.path={},this.start=null,this.end=null,!(this instanceof r))return new r(t,e,i);if("string"==typeof e?this.base=this.parseComponent(e):"object"==typeof e&&e.steps&&(this.base=e),"string"===(o=this.checkType(t)))return this.str=t,Object(n.extend)(this,this.parse(t));if("range"===o)return Object(n.extend)(this,this.fromRange(t,this.base,i));if("node"===o)return Object(n.extend)(this,this.fromNode(t,this.base,i));if("EpubCFI"===o&&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)&&void 0===t.startContainer?t&&"object"==typeof t&&void 0!==t.nodeType?"node":!!(t&&"object"==typeof t&&t instanceof r)&&"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))?(r.base=this.parseComponent(e),i=this.getPathComponent(t),r.path=this.parseComponent(i),(n=this.getRange(t))&&(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,o;if((r=t.match(/\[(.*)\]/))&&r[1]&&(o=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:o||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){return t.split("!")[0]}getPathComponent(t){var e=t.split("!");if(e[1]){return e[1].split(",")[0]}}getRange(t){var e=t.split(",");return 3===e.length&&[e[1],e[2]]}getCharecterOffsetComponent(t){return t.split(":")[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+=")"}compare(t,e){var i,n,o,s;if("string"==typeof t&&(t=new r(t)),"string"==typeof e&&(e=new r(e)),t.spinePos>e.spinePos)return 1;if(t.spinePos<e.spinePos)return-1;t.range?(i=t.path.steps.concat(t.start.steps),o=t.start.terminal):(i=t.path.steps,o=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 a=0;a<i.length;a++){if(!i[a])return-1;if(!n[a])return 1;if(i[a].index>n[a].index)return 1;if(i[a].index<n[a].index)return-1}return i.length<n.length?-1:o.offset>s.offset?1:o.offset<s.offset?-1:0}step(t){var e=3===t.nodeType?"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=3===n.nodeType?"text":"element",{id:n.id,tagName:n.tagName,type:i,index:this.filteredPosition(n,e)}}pathTo(t,e,i){for(var n,r={steps:[],terminal:{offset:null,assertion:null}},o=t;o&&o.parentNode&&9!=o.parentNode.nodeType;)(n=i?this.filteredStep(o,i):this.step(o))&&r.steps.unshift(n),o=o.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,o=t.endContainer,s=t.startOffset,a=t.endOffset,l=!1;if(i&&(l=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)l&&(s=this.patchOffset(r,s,i)),n.path=this.pathTo(r,s,i);else{n.range=!0,l&&(s=this.patchOffset(r,s,i)),n.start=this.pathTo(r,s,i),l&&(a=this.patchOffset(o,a,i)),n.end=this.pathTo(o,a,i),n.path={steps:[],terminal:null};var c,h=n.start.steps.length;for(c=0;c<h&&this.equalStep(n.start.steps[c],n.end.steps[c]);c++)c===h-1?n.start.terminal===n.end.terminal&&(n.path.steps.push(n.start.steps[c]),n.range=!1):n.path.steps.push(n.start.steps[c]);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,s,a=!1;return 3===t.nodeType?(a=!0,r=t.parentNode,i=t.parentNode.classList.contains(e)):(a=!1,i=t.classList.contains(e)),i&&a?(o=r.previousSibling,s=r.nextSibling,o&&3===o.nodeType?n=o:s&&3===s.nodeType&&(n=s),n||t):!(i&&!a)&&t}patchOffset(t,e,i){if(3!=t.nodeType)throw new Error("Anchor must be a text node");var n=t,r=e;for(t.parentNode.classList.contains(i)&&(n=t.parentNode);n.previousSibling;){if(1===n.previousSibling.nodeType){if(!n.previousSibling.classList.contains(i))break;r+=n.previousSibling.textContent.length}else r+=n.previousSibling.textContent.length;n=n.previousSibling}return r}normalizedMap(t,e,i){var n,r,o,s={},a=-1,l=t.length;for(n=0;n<l;n++)1===(r=t[n].nodeType)&&t[n].classList.contains(i)&&(r=3),n>0&&3===r&&3===o?s[n]=a:e===r&&(a+=1,s[n]=a),o=r;return s}position(t){var e,i;return 1===t.nodeType?((e=t.parentNode.children)||(e=Object(n.findChildren)(t.parentNode)),i=Array.prototype.indexOf.call(e,t)):i=(e=this.textNodes(t.parentNode)).indexOf(t),i}filteredPosition(t,e){var i,n;return 1===t.nodeType?(i=t.parentNode.children,n=this.normalizedMap(i,1,e)):(i=t.parentNode.childNodes,t.parentNode.classList.contains(e)&&(i=(t=t.parentNode).parentNode.childNodes),n=this.normalizedMap(i,3,e)),n[Array.prototype.indexOf.call(i,t)]}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 3===t.nodeType||!(!e||!t.classList.contains(e))}))}walkToNode(t,e,i){var r,o,s=e||document,a=s.documentElement,l=t.length;for(o=0;o<l&&("element"===(r=t[o]).type?a=r.id?s.getElementById(r.id):(a.children||Object(n.findChildren)(a))[r.index]:"text"===r.type&&(a=this.textNodes(a,i)[r.index]),a);o++);return a}findNode(t,e,i){var n,r,o=e||document;return i||void 0===o.evaluate?n=i?this.walkToNode(t,o,i):this.walkToNode(t,o):(r=this.stepsToXpath(t),n=o.evaluate(r,o,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue),n}fixMiss(t,e,i,n){var r,o,s=this.findNode(t.slice(0,-1),i,n),a=s.childNodes,l=this.normalizedMap(a,3,n),c=t[t.length-1].index;for(let t in l){if(!l.hasOwnProperty(t))return;if(l[t]===c){if(!(e>(o=(r=a[t]).textContent.length))){s=1===r.nodeType?r.childNodes[0]:r;break}e-=o}}return{container:s,offset:e}}toRange(t,e){var i,r,o,s,a,l,c,h,u=t||document,d=!!e&&null!=u.querySelector("."+e);if(i=void 0!==u.createRange?u.createRange():new n.RangeObject,this.range?(r=this.start,l=this.path.steps.concat(r.steps),s=this.findNode(l,u,d?e:null),o=this.end,c=this.path.steps.concat(o.steps),a=this.findNode(c,u,d?e:null)):(r=this.path,l=this.path.steps,s=this.findNode(this.path.steps,u,d?e:null)),!s)return console.log("No startContainer found for",this.toString()),null;try{null!=r.terminal.offset?i.setStart(s,r.terminal.offset):i.setStart(s,0)}catch(t){h=this.fixMiss(l,r.terminal.offset,u,d?e:null),i.setStart(h.container,h.offset)}if(a)try{null!=o.terminal.offset?i.setEnd(a,o.terminal.offset):i.setEnd(a,0)}catch(t){h=this.fixMiss(c,this.end.terminal.offset,u,d?e:null),i.setEnd(h.container,h.offset)}return i}isCfiString(t){return"string"==typeof t&&0===t.indexOf("epubcfi(")&&")"===t[t.length-1]}generateChapterComponent(t,e,i){var n="/"+2*(t+1)+"/";return n+=2*(parseInt(e)+1),i&&(n+="["+i+"]"),n}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=r},function(t,e,i){"use strict";var n,r,o,s,a,l,c,h=i(108),u=i(122),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,g=Object.defineProperty,m=Object.defineProperties,v=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var i,r;return u(e),r=this,n.call(this,t,i=function(){o.call(r,t,i),d.call(e,this,arguments)}),i.__eeOnceListener__=e,this},a={on:n=function(t,e){var i;return u(e),v.call(this,"__ee__")?i=this.__ee__:(i=y.value=p(null),g(this,"__ee__",y),y.value=null),i[t]?"object"==typeof i[t]?i[t].push(e):i[t]=[i[t],e]:i[t]=e,this},once:r,off:o=function(t,e){var i,n,r,o;if(u(e),!v.call(this,"__ee__"))return this;if(!(i=this.__ee__)[t])return this;if("object"==typeof(n=i[t]))for(o=0;r=n[o];++o)r!==e&&r.__eeOnceListener__!==e||(2===n.length?i[t]=n[o?0:1]:n.splice(o,1));else n!==e&&n.__eeOnceListener__!==e||delete i[t];return this},emit:s=function(t){var e,i,n,r,o;if(v.call(this,"__ee__")&&(r=this.__ee__[t]))if("object"==typeof r){for(i=arguments.length,o=new Array(i-1),e=1;e<i;++e)o[e-1]=arguments[e];for(r=r.slice(),e=0;n=r[e];++e)d.call(n,this,o)}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,o=new Array(i-1),e=1;e<i;++e)o[e-1]=arguments[e];d.call(r,this,o)}}},l={on:h(n),once:h(r),off:h(o),emit:h(s)},c=m({},l),t.exports=e=function(t){return null==t?p(c):m(Object(t),l)},e.methods=a},function(t,e,i){"use strict";i(14),i(20);var n=i(9),r=i.n(n);e.a=class{constructor(t){var e;t.indexOf("://")>-1&&(t=new URL(t).pathname),e=this.parse(t),this.path=t,this.isDirectory(t)?this.directory=t:this.directory=e.dir+"/",this.filename=e.base,this.extension=e.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){return t&&t.indexOf("://")>-1?t:r.a.relative(this.directory,t)}splitPath(t){return this.splitPathRe.exec(t).slice(1)}toString(){return this.path}}},function(t,e,i){"use strict";i(14),i(20);var n=i(4),r=i(9),o=i.n(r);e.a=class{constructor(t,e){var i=t.indexOf("://")>-1,r=t;if(this.Url=void 0,this.href=t,this.protocol="",this.origin="",this.hash="",this.hash="",this.search="",this.base=e,!i&&!1!==e&&"string"!=typeof e&&window&&window.location&&(this.base=window.location.href),i||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,r=this.Url.pathname+(this.Url.search?this.Url.search:"")}catch(t){this.Url=void 0,this.base&&(r=new n.a(this.base).resolve(r))}this.Path=new n.a(r),this.directory=this.Path.directory,this.filename=this.Path.filename,this.extension=this.Path.extension}path(){return this.Path}resolve(t){var e;return t.indexOf("://")>-1?t:(e=o.a.resolve(this.directory,t),this.origin+e)}relative(t){return o.a.relative(t,this.directory)}toString(){return this.href}}},function(t,e,i){"use strict";i(14);e.a=class{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(t){console.log(t)}r&&"function"==typeof r.then&&i.push(r)})),Promise.all(i)}list(){return this.hooks}clear(){return this.hooks=[]}}},function(t,e,i){(function(e){var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||Function("return this")()}).call(this,i(30))},function(t,e,i){var n=i(7),r=i(66),o=i(10),s=i(67),a=i(70),l=i(99),c=r("wks"),h=n.Symbol,u=l?h:h&&h.withoutSetter||s;t.exports=function(t){return o(c,t)||(a&&o(h,t)?c[t]=h[t]:c[t]=u("Symbol."+t)),c[t]}},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 o(t,e){for(var i,n="",r=-1,o=0,s=0;s<=t.length;++s){if(s<t.length)i=t.charCodeAt(s);else{if(47===i)break;i=47}if(47===i){if(r===s-1||1===o);else if(r!==s-1&&2===o){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,l=a;l>=0&&47!==n.charCodeAt(l);--l);if(l!==a){n=-1===l?"":n.slice(0,l),r=s,o=0;continue}}else if(2===n.length||1===n.length){n="",r=s,o=0;continue}e&&(n.length>0?n+="/..":n="..")}else n.length>0?n+="/"+t.slice(r+1,s):n=t.slice(r+1,s);r=s,o=0}else 46===i&&-1!==o?++o:o=-1}return n}var s={resolve:function(){for(var t,e="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a;s>=0?a=arguments[s]:(void 0===t&&(t=n.cwd()),a=t),r(a),0!==a.length&&(e=a+"/"+e,i=47===a.charCodeAt(0))}return e=o(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 0!==(t=o(t,!e)).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?".":s.normalize(t)},relative:function(t,e){if(r(t),r(e),t===e)return"";if((t=s.resolve(t))===(e=s.resolve(e)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var n=t.length,o=n-i,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var l=e.length-a,c=o<l?o:l,h=-1,u=0;u<=c;++u){if(u===c){if(l>c){if(47===e.charCodeAt(a+u))return e.slice(a+u+1);if(0===u)return e.slice(a+u)}else o>c&&(47===t.charCodeAt(i+u)?h=u:0===u&&(h=0));break}var d=t.charCodeAt(i+u);if(d!==e.charCodeAt(a+u))break;47===d&&(h=u)}var f="";for(u=i+h+1;u<=n;++u)u!==n&&47!==t.charCodeAt(u)||(0===f.length?f+="..":f+="/..");return f.length>0?f+e.slice(a+h):(a+=h,47===e.charCodeAt(a)&&++a,e.slice(a))},_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,o=!0,s=t.length-1;s>=1;--s)if(47===(e=t.charCodeAt(s))){if(!o){n=s;break}}else o=!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,o=-1,s=!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,l=-1;for(i=t.length-1;i>=0;--i){var c=t.charCodeAt(i);if(47===c){if(!s){n=i+1;break}}else-1===l&&(s=!1,l=i+1),a>=0&&(c===e.charCodeAt(a)?-1==--a&&(o=i):(a=-1,o=l))}return n===o?o=l:-1===o&&(o=t.length),t.slice(n,o)}for(i=t.length-1;i>=0;--i)if(47===t.charCodeAt(i)){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":t.slice(n,o)},extname:function(t){r(t);for(var e=-1,i=0,n=-1,o=!0,s=0,a=t.length-1;a>=0;--a){var l=t.charCodeAt(a);if(47!==l)-1===n&&(o=!1,n=a+1),46===l?-1===e?e=a:1!==s&&(s=1):-1!==e&&(s=-1);else if(!o){i=a+1;break}}return-1===e||-1===n||0===s||1===s&&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 function(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}("/",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),o=47===n;o?(e.root="/",i=1):i=0;for(var s=-1,a=0,l=-1,c=!0,h=t.length-1,u=0;h>=i;--h)if(47!==(n=t.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===n?-1===s?s=h:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){a=h+1;break}return-1===s||-1===l||0===u||1===u&&s===l-1&&s===a+1?-1!==l&&(e.base=e.name=0===a&&o?t.slice(1,l):t.slice(a,l)):(0===a&&o?(e.name=t.slice(1,s),e.base=t.slice(1,l)):(e.name=t.slice(a,s),e.base=t.slice(a,l)),e.ext=t.slice(s,l)),a>0?e.dir=t.slice(0,a-1):o&&(e.dir="/"),e},sep:"/",delimiter:":",posix:null};t.exports=s},function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e,i){"use strict";i.d(e,"a",(function(){return o})),i.d(e,"b",(function(){return s})),i.d(e,"d",(function(){return a})),i.d(e,"c",(function(){return l})),i.d(e,"e",(function(){return c}));i(24);var n=i(0),r=i(5);i(4);function o(t,e){var i,r,o=e.url,s=o.indexOf("://")>-1;t&&(r=Object(n.qs)(t,"head"),(i=Object(n.qs)(r,"base"))||(i=t.createElement("base"),r.insertBefore(i,r.firstChild)),!s&&window&&window.location&&(o=window.location.origin+o),i.setAttribute("href",o))}function s(t,e){var i,r,o=e.canonical;t&&(i=Object(n.qs)(t,"head"),(r=Object(n.qs)(i,"link[rel='canonical']"))?r.setAttribute("href",o):((r=t.createElement("link")).setAttribute("rel","canonical"),r.setAttribute("href",o),i.appendChild(r)))}function a(t,e){var i,r,o=e.idref;t&&(i=Object(n.qs)(t,"head"),(r=Object(n.qs)(i,"link[property='dc.identifier']"))?r.setAttribute("content",o):((r=t.createElement("meta")).setAttribute("name","dc.identifier"),r.setAttribute("content",o),i.appendChild(r)))}function l(t,e){var i=t.querySelectorAll("a[href]");if(i.length)for(var o=Object(n.qs)(t.ownerDocument,"base"),s=o?o.getAttribute("href"):void 0,a=function(t){var i=t.getAttribute("href");if(0!==i.indexOf("mailto:"))if(i.indexOf("://")>-1)t.setAttribute("target","_blank");else{var n;try{n=new r.a(i,s)}catch(t){}t.onclick=function(){return n&&n.hash?e(n.Path.path+n.hash):e(n?n.Path.path:i),!1}}}.bind(this),l=0;l<i.length;l++)a(i[l])}function c(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}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,i){var n=i(17);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,i){var n=i(7),r=i(102),o=i(71),s=i(15),a=i(8),l=a("iterator"),c=a("toStringTag"),h=o.values;for(var u in r){var d=n[u],f=d&&d.prototype;if(f){if(f[l]!==h)try{s(f,l,h)}catch(t){f[l]=h}if(f[c]||s(f,c,u),r[u])for(var p in o)if(f[p]!==o[p])try{s(f,p,o[p])}catch(t){f[p]=o[p]}}}},function(t,e,i){var n=i(16),r=i(18),o=i(25);t.exports=n?function(t,e,i){return r.f(t,e,o(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e,i){var n=i(12);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,i){var n=i(16),r=i(62),o=i(13),s=i(41),a=Object.defineProperty;e.f=n?a:function(t,e,i){if(o(t),e=s(e,!0),o(i),r)try{return a(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},function(t,e,i){var n=i(7),r=i(15),o=i(10),s=i(42),a=i(64),l=i(26),c=l.get,h=l.enforce,u=String(String).split("String");(t.exports=function(t,e,i,a){var l=!!a&&!!a.unsafe,c=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||o(i,"name")||r(i,"name",e),h(i).source=u.join("string"==typeof e?e:"")),t!==n?(l?!d&&t[e]&&(c=!0):delete t[e],c?t[e]=i:r(t,e,i)):c?t[e]=i:s(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||a(this)}))},function(t,e,i){"use strict";i(123);var n,r=i(31),o=i(16),s=i(78),a=i(7),l=i(72),c=i(19),h=i(79),u=i(10),d=i(124),f=i(125),p=i(49).codeAt,g=i(131),m=i(37),v=i(132),y=i(26),b=a.URL,w=v.URLSearchParams,x=v.getState,_=y.set,k=y.getterFor("URL"),E=Math.floor,S=Math.pow,T=/[A-Za-z]/,C=/[\d+-.A-Za-z]/,O=/\d/,A=/^(0x|0X)/,N=/^[0-7]+$/,I=/^\d+$/,R=/^[\dA-Fa-f]+$/,j=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,L=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,z=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,D=/[\u0009\u000A\u000D]/g,P=function(t,e){var i,n,r;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return"Invalid host";if(!(i=M(e.slice(1,-1))))return"Invalid host";t.host=i}else if(Y(t)){if(e=g(e),j.test(e))return"Invalid host";if(null===(i=B(e)))return"Invalid host";t.host=i}else{if(L.test(e))return"Invalid host";for(i="",n=f(e),r=0;r<n.length;r++)i+=H(n[r],q);t.host=i}},B=function(t){var e,i,n,r,o,s,a,l=t.split(".");if(l.length&&""==l[l.length-1]&&l.pop(),(e=l.length)>4)return t;for(i=[],n=0;n<e;n++){if(""==(r=l[n]))return t;if(o=10,r.length>1&&"0"==r.charAt(0)&&(o=A.test(r)?16:8,r=r.slice(8==o?1:2)),""===r)s=0;else{if(!(10==o?I:8==o?N:R).test(r))return t;s=parseInt(r,o)}i.push(s)}for(n=0;n<e;n++)if(s=i[n],n==e-1){if(s>=S(256,5-e))return null}else if(s>255)return null;for(a=i.pop(),n=0;n<i.length;n++)a+=i[n]*S(256,3-n);return a},M=function(t){var e,i,n,r,o,s,a,l=[0,0,0,0,0,0,0,0],c=0,h=null,u=0,d=function(){return t.charAt(u)};if(":"==d()){if(":"!=t.charAt(1))return;u+=2,h=++c}for(;d();){if(8==c)return;if(":"!=d()){for(e=i=0;i<4&&R.test(d());)e=16*e+parseInt(d(),16),u++,i++;if("."==d()){if(0==i)return;if(u-=i,c>6)return;for(n=0;d();){if(r=null,n>0){if(!("."==d()&&n<4))return;u++}if(!O.test(d()))return;for(;O.test(d());){if(o=parseInt(d(),10),null===r)r=o;else{if(0==r)return;r=10*r+o}if(r>255)return;u++}l[c]=256*l[c]+r,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==d()){if(u++,!d())return}else if(d())return;l[c++]=e}else{if(null!==h)return;u++,h=++c}}if(null!==h)for(s=c-h,c=7;0!=c&&s>0;)a=l[c],l[c--]=l[h+s-1],l[h+--s]=a;else if(8!=c)return;return l},F=function(t){var e,i,n,r;if("number"==typeof t){for(e=[],i=0;i<4;i++)e.unshift(t%256),t=E(t/256);return e.join(".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,i=1,n=null,r=0,o=0;o<8;o++)0!==t[o]?(r>i&&(e=n,i=r),n=null,r=0):(null===n&&(n=o),++r);return r>i&&(e=n,i=r),e}(t),i=0;i<8;i++)r&&0===t[i]||(r&&(r=!1),n===i?(e+=i?":":"::",r=!0):(e+=t[i].toString(16),i<7&&(e+=":")));return"["+e+"]"}return t},q={},U=d({},q,{" ":1,'"':1,"<":1,">":1,"`":1}),W=d({},U,{"#":1,"?":1,"{":1,"}":1}),$=d({},W,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),H=function(t,e){var i=p(t,0);return i>32&&i<127&&!u(e,t)?t:encodeURIComponent(t)},X={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Y=function(t){return u(X,t.scheme)},V=function(t){return""!=t.username||""!=t.password},Z=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},G=function(t,e){var i;return 2==t.length&&T.test(t.charAt(0))&&(":"==(i=t.charAt(1))||!e&&"|"==i)},K=function(t){var e;return t.length>1&&G(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},J=function(t){var e=t.path,i=e.length;!i||"file"==t.scheme&&1==i&&G(e[0],!0)||e.pop()},Q=function(t){return"."===t||"%2e"===t.toLowerCase()},tt={},et={},it={},nt={},rt={},ot={},st={},at={},lt={},ct={},ht={},ut={},dt={},ft={},pt={},gt={},mt={},vt={},yt={},bt={},wt={},xt=function(t,e,i,r){var o,s,a,l,c,h=i||tt,d=0,p="",g=!1,m=!1,v=!1;for(i||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(z,"")),e=e.replace(D,""),o=f(e);d<=o.length;){switch(s=o[d],h){case tt:if(!s||!T.test(s)){if(i)return"Invalid scheme";h=it;continue}p+=s.toLowerCase(),h=et;break;case et:if(s&&(C.test(s)||"+"==s||"-"==s||"."==s))p+=s.toLowerCase();else{if(":"!=s){if(i)return"Invalid scheme";p="",h=it,d=0;continue}if(i&&(Y(t)!=u(X,p)||"file"==p&&(V(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=p,i)return void(Y(t)&&X[t.scheme]==t.port&&(t.port=null));p="","file"==t.scheme?h=ft:Y(t)&&r&&r.scheme==t.scheme?h=nt:Y(t)?h=at:"/"==o[d+1]?(h=rt,d++):(t.cannotBeABaseURL=!0,t.path.push(""),h=yt)}break;case it:if(!r||r.cannotBeABaseURL&&"#"!=s)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==s){t.scheme=r.scheme,t.path=r.path.slice(),t.query=r.query,t.fragment="",t.cannotBeABaseURL=!0,h=wt;break}h="file"==r.scheme?ft:ot;continue;case nt:if("/"!=s||"/"!=o[d+1]){h=ot;continue}h=lt,d++;break;case rt:if("/"==s){h=ct;break}h=vt;continue;case ot:if(t.scheme=r.scheme,s==n)t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query=r.query;else if("/"==s||"\\"==s&&Y(t))h=st;else if("?"==s)t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query="",h=bt;else{if("#"!=s){t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.path.pop(),h=vt;continue}t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query=r.query,t.fragment="",h=wt}break;case st:if(!Y(t)||"/"!=s&&"\\"!=s){if("/"!=s){t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,h=vt;continue}h=ct}else h=lt;break;case at:if(h=lt,"/"!=s||"/"!=p.charAt(d+1))continue;d++;break;case lt:if("/"!=s&&"\\"!=s){h=ct;continue}break;case ct:if("@"==s){g&&(p="%40"+p),g=!0,a=f(p);for(var y=0;y<a.length;y++){var b=a[y];if(":"!=b||v){var w=H(b,$);v?t.password+=w:t.username+=w}else v=!0}p=""}else if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&Y(t)){if(g&&""==p)return"Invalid authority";d-=f(p).length+1,p="",h=ht}else p+=s;break;case ht:case ut:if(i&&"file"==t.scheme){h=gt;continue}if(":"!=s||m){if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&Y(t)){if(Y(t)&&""==p)return"Invalid host";if(i&&""==p&&(V(t)||null!==t.port))return;if(l=P(t,p))return l;if(p="",h=mt,i)return;continue}"["==s?m=!0:"]"==s&&(m=!1),p+=s}else{if(""==p)return"Invalid host";if(l=P(t,p))return l;if(p="",h=dt,i==ut)return}break;case dt:if(!O.test(s)){if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&Y(t)||i){if(""!=p){var x=parseInt(p,10);if(x>65535)return"Invalid port";t.port=Y(t)&&x===X[t.scheme]?null:x,p=""}if(i)return;h=mt;continue}return"Invalid port"}p+=s;break;case ft:if(t.scheme="file","/"==s||"\\"==s)h=pt;else{if(!r||"file"!=r.scheme){h=vt;continue}if(s==n)t.host=r.host,t.path=r.path.slice(),t.query=r.query;else if("?"==s)t.host=r.host,t.path=r.path.slice(),t.query="",h=bt;else{if("#"!=s){K(o.slice(d).join(""))||(t.host=r.host,t.path=r.path.slice(),J(t)),h=vt;continue}t.host=r.host,t.path=r.path.slice(),t.query=r.query,t.fragment="",h=wt}}break;case pt:if("/"==s||"\\"==s){h=gt;break}r&&"file"==r.scheme&&!K(o.slice(d).join(""))&&(G(r.path[0],!0)?t.path.push(r.path[0]):t.host=r.host),h=vt;continue;case gt:if(s==n||"/"==s||"\\"==s||"?"==s||"#"==s){if(!i&&G(p))h=vt;else if(""==p){if(t.host="",i)return;h=mt}else{if(l=P(t,p))return l;if("localhost"==t.host&&(t.host=""),i)return;p="",h=mt}continue}p+=s;break;case mt:if(Y(t)){if(h=vt,"/"!=s&&"\\"!=s)continue}else if(i||"?"!=s)if(i||"#"!=s){if(s!=n&&(h=vt,"/"!=s))continue}else t.fragment="",h=wt;else t.query="",h=bt;break;case vt:if(s==n||"/"==s||"\\"==s&&Y(t)||!i&&("?"==s||"#"==s)){if(".."===(c=(c=p).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(J(t),"/"==s||"\\"==s&&Y(t)||t.path.push("")):Q(p)?"/"==s||"\\"==s&&Y(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&G(p)&&(t.host&&(t.host=""),p=p.charAt(0)+":"),t.path.push(p)),p="","file"==t.scheme&&(s==n||"?"==s||"#"==s))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==s?(t.query="",h=bt):"#"==s&&(t.fragment="",h=wt)}else p+=H(s,W);break;case yt:"?"==s?(t.query="",h=bt):"#"==s?(t.fragment="",h=wt):s!=n&&(t.path[0]+=H(s,q));break;case bt:i||"#"!=s?s!=n&&("'"==s&&Y(t)?t.query+="%27":t.query+="#"==s?"%23":H(s,q)):(t.fragment="",h=wt);break;case wt:s!=n&&(t.fragment+=H(s,U))}d++}},_t=function(t){var e,i,n=h(this,_t,"URL"),r=arguments.length>1?arguments[1]:void 0,s=String(t),a=_(n,{type:"URL"});if(void 0!==r)if(r instanceof _t)e=k(r);else if(i=xt(e={},String(r)))throw TypeError(i);if(i=xt(a,s,null,e))throw TypeError(i);var l=a.searchParams=new w,c=x(l);c.updateSearchParams(a.query),c.updateURL=function(){a.query=String(l)||null},o||(n.href=Et.call(n),n.origin=St.call(n),n.protocol=Tt.call(n),n.username=Ct.call(n),n.password=Ot.call(n),n.host=At.call(n),n.hostname=Nt.call(n),n.port=It.call(n),n.pathname=Rt.call(n),n.search=jt.call(n),n.searchParams=Lt.call(n),n.hash=zt.call(n))},kt=_t.prototype,Et=function(){var t=k(this),e=t.scheme,i=t.username,n=t.password,r=t.host,o=t.port,s=t.path,a=t.query,l=t.fragment,c=e+":";return null!==r?(c+="//",V(t)&&(c+=i+(n?":"+n:"")+"@"),c+=F(r),null!==o&&(c+=":"+o)):"file"==e&&(c+="//"),c+=t.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==a&&(c+="?"+a),null!==l&&(c+="#"+l),c},St=function(){var t=k(this),e=t.scheme,i=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&Y(t)?e+"://"+F(t.host)+(null!==i?":"+i:""):"null"},Tt=function(){return k(this).scheme+":"},Ct=function(){return k(this).username},Ot=function(){return k(this).password},At=function(){var t=k(this),e=t.host,i=t.port;return null===e?"":null===i?F(e):F(e)+":"+i},Nt=function(){var t=k(this).host;return null===t?"":F(t)},It=function(){var t=k(this).port;return null===t?"":String(t)},Rt=function(){var t=k(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},jt=function(){var t=k(this).query;return t?"?"+t:""},Lt=function(){return k(this).searchParams},zt=function(){var t=k(this).fragment;return t?"#"+t:""},Dt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(o&&l(kt,{href:Dt(Et,(function(t){var e=k(this),i=String(t),n=xt(e,i);if(n)throw TypeError(n);x(e.searchParams).updateSearchParams(e.query)})),origin:Dt(St),protocol:Dt(Tt,(function(t){var e=k(this);xt(e,String(t)+":",tt)})),username:Dt(Ct,(function(t){var e=k(this),i=f(String(t));if(!Z(e)){e.username="";for(var n=0;n<i.length;n++)e.username+=H(i[n],$)}})),password:Dt(Ot,(function(t){var e=k(this),i=f(String(t));if(!Z(e)){e.password="";for(var n=0;n<i.length;n++)e.password+=H(i[n],$)}})),host:Dt(At,(function(t){var e=k(this);e.cannotBeABaseURL||xt(e,String(t),ht)})),hostname:Dt(Nt,(function(t){var e=k(this);e.cannotBeABaseURL||xt(e,String(t),ut)})),port:Dt(It,(function(t){var e=k(this);Z(e)||(""==(t=String(t))?e.port=null:xt(e,t,dt))})),pathname:Dt(Rt,(function(t){var e=k(this);e.cannotBeABaseURL||(e.path=[],xt(e,t+"",mt))})),search:Dt(jt,(function(t){var e=k(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",xt(e,t,bt)),x(e.searchParams).updateSearchParams(e.query)})),searchParams:Dt(Lt),hash:Dt(zt,(function(t){var e=k(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",xt(e,t,wt)):e.fragment=null}))}),c(kt,"toJSON",(function(){return Et.call(this)}),{enumerable:!0}),c(kt,"toString",(function(){return Et.call(this)}),{enumerable:!0}),b){var Pt=b.createObjectURL,Bt=b.revokeObjectURL;Pt&&c(_t,"createObjectURL",(function(t){return Pt.apply(b,arguments)})),Bt&&c(_t,"revokeObjectURL",(function(t){return Bt.apply(b,arguments)}))}m(_t,"URL"),r({global:!0,forced:!s,sham:!o},{URL:_t})},function(t,e,i){"use strict";var n=i(0);e.a=class{constructor(t){this._q=[],this.context=t,this.tick=n.requestAnimationFrame,this.running=!1,this.paused=!1}enqueue(){var t,e,i=[].shift.call(arguments),r=arguments;if(!i)throw new Error("No Task Provided");return e="function"==typeof i?{task:i,args:r,deferred:t=new n.defer,promise:t.promise}:{promise:i},this._q.push(e),0!=this.paused||this.running||this.run(),e.promise}dequeue(){var t,e,i;return!this._q.length||this.paused?((t=new n.defer).deferred.resolve(),t.promise):(e=(t=this._q.shift()).task)?(i=e.apply(this.context,t.args))&&"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(){for(;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}}},function(t,e,i){"use strict";var n=i(3),r=i.n(n),o=i(0);function s(){var t="reverse",e=function(){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}();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}var a=i(23),l=i(21),c=i(84),h=i.n(c);var u=class{constructor(t){this.settings=t||{},this.id="epubjs-container-"+Object(o.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",s=t.direction;Object(o.extend)(this.settings,t),t.height&&Object(o.isNumber)(t.height)&&(e=t.height+"px"),t.width&&Object(o.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),s&&(a.dir=s,a.style.direction=s),s&&this.settings.fullsize&&(document.body.style.direction=s),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(o.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(o.isNumber)(this.settings.width)&&Object(o.isNumber)(this.settings.height)||(this.resizeFunc=h()(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()).width&&(t=Math.floor(i.width),this.container.style.width=t+"px"):Object(o.isNumber)(t)?this.container.style.width=t+"px":this.container.style.width=t,null===e?(i=i||this.element.getBoundingClientRect()).height&&(e=i.height,this.container.style.height=e+"px"):Object(o.isNumber)(e)?this.container.style.height=e+"px":this.container.style.height=e,Object(o.isNumber)(t)||(t=this.container.clientWidth),Object(o.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 s=Object(o.windowBounds)(),a=window.getComputedStyle(document.body),l=parseFloat(a["padding-left"])||0,c=parseFloat(a["padding-right"])||0,h=parseFloat(a["padding-top"])||0,u=parseFloat(a["padding-bottom"])||0;return n||(t=s.width-l-c),(this.settings.fullsize&&!r||!r)&&(e=s.height-h-u),{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(o.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 d=class{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]).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]).displayed&&e.push(t);return e}show(){for(var t,e=this.length,i=0;i<e;i++)(t=this._views[i]).displayed&&t.show();this.hidden=!1}hide(){for(var t,e=this.length,i=0;i<e;i++)(t=this._views[i]).displayed&&t.hide();this.hidden=!0}},f=i(1);class p{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(o.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}),Object(o.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},this.rendered=!1}render(t,e){let i=t.tagName;void 0!==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=s(),this.stage=new u({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 d(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(){(this.settings.fullsize?window:this.container).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(f.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(o.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(f.c.MANAGERS.RESIZED,{width:this._stageSize.width,height:this._stageSize.height},i))}createView(t,e){return new this.View(t,Object(o.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 o.defer,n=i.promise;(e===t.href||Object(o.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 s=!1;return"pre-paginated"===this.layout.name&&2===this.layout.divisor&&t.properties.includes("page-spread-right")&&(s=!0),this.add(t,s).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(s,t,this.add)}.bind(this)).then(function(){this.views.show(),i.resolve()}.bind(this)),n}afterDisplayed(t){this.emit(f.c.MANAGERS.ADDED,t)}afterResized(t){this.emit(f.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)+this.layout.delta>this.container.scrollWidth&&(i=this.container.scrollWidth-this.layout.delta),(n=Math.floor(t.top/this.layout.delta)*this.layout.delta)+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(f.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(f.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(f.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(f.c.VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),i.display(this.request)}prepend(t,e){var i=this.createView(t,e);return i.on(f.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(f.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(f.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;let e=this.settings.direction;if(this.views.length){if(!this.isPaginated||"horizontal"!==this.settings.axis||e&&"ltr"!==e)if(this.isPaginated&&"horizontal"===this.settings.axis&&"rtl"===e)this.scrollLeft=this.container.scrollLeft,"default"===this.settings.rtlScrollType?this.container.scrollLeft>0?this.scrollBy(this.layout.delta,0,!0):t=this.views.last().section.next():this.container.scrollLeft+-1*this.layout.delta>-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,this.container.scrollTop+this.container.offsetHeight<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,this.container.scrollLeft+this.container.offsetWidth+this.layout.delta<=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;let e=this.settings.direction;if(this.views.length){if(!this.isPaginated||"horizontal"!==this.settings.axis||e&&"ltr"!==e)if(this.isPaginated&&"horizontal"===this.settings.axis&&"rtl"===e)this.scrollLeft=this.container.scrollLeft,"default"===this.settings.rtlScrollType?this.container.scrollLeft+this.container.offsetWidth<this.container.scrollWidth?this.scrollBy(-this.layout.delta,0,!0):t=this.views.first().section.prev():this.container.scrollLeft<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,this.container.scrollTop>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,this.container.scrollLeft>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()))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,o=(this.settings.direction,0);return this.settings.fullsize&&(o=r?window.scrollY:window.scrollX),t.map(t=>{let s,a,l,c,{index:h,href:u}=t.section,d=t.position(),f=t.width(),p=t.height();r?(s=o+e.top-d.top+0,a=s+i-0,c=this.layout.count(p,i).pages,l=i):(s=o+e.left-d.left+0,a=s+n-0,c=this.layout.count(f,n).pages,l=n);let g=Math.ceil(s/l),m=[],v=Math.ceil(a/l);if("rtl"===this.settings.direction&&!r){let t=g;g=c-v,v=c-t}m=[];for(var y=g;y<=v;y++){let t=y+1;m.push(t)}return{index:h,href:u,pages:m,totalPages:c,mapping:this.mapping.page(t.contents,t.section.cfiBase,s,a)}})}paginatedLocation(){let t=this.visible(),e=this.container.getBoundingClientRect(),i=0,n=0;return this.settings.fullsize&&(i=window.scrollX),t.map(t=>{let r,o,s,a,{index:l,href:c}=t.section,h=t.position(),u=t.width();"rtl"===this.settings.direction?(r=e.right-i,a=Math.min(Math.abs(r-h.left),this.layout.width)-n,s=h.width-(h.right-r)-n,o=s-a):(r=e.left+i,a=Math.min(h.right-r,this.layout.width)-n,o=r-h.left+n,s=o+a),n+=a;let d=this.mapping.page(t.contents,t.section.cfiBase,o,s),f=this.layout.count(u).pages,p=Math.floor(o/this.layout.pageWidth),g=[],m=Math.floor(s/this.layout.pageWidth);if(p<0&&(p=0,m+=1),"rtl"===this.settings.direction){let t=p;p=f-m,m=f-t}for(var v=p+1;v<=m;v++){let t=v;g.push(t)}return{index:l,href:c,pages:g,totalPages:f,mapping:d}})}isVisible(t,e,i,n){var r=t.position(),o=n||this.bounds();return"horizontal"===this.settings.axis&&r.right>o.left-e&&r.left<o.right+i||"vertical"===this.settings.axis&&r.bottom>o.top-e&&r.top<o.bottom+i}visible(){for(var t,e=this.bounds(),i=this.views.displayed(),n=i.length,r=[],o=0;o<n;o++)t=i[o],!0===this.isVisible(t,0,0,e)&&r.push(t);return r}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(f.c.MANAGERS.SCROLL,{top:t,left:e}),clearTimeout(this.afterScrolled),this.afterScrolled=setTimeout(function(){this.emit(f.c.MANAGERS.SCROLLED,{top:this.scrollTop,left:this.scrollLeft})}.bind(this),20))}bounds(){return this.stage.bounds()}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 a.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 a.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()(p.prototype);e.a=p},function(t,e,i){"use strict";var n=i(2),r=i(0);e.a=class{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);return this.rangeListToCfiList(t.section.cfiBase,e)}page(t,e,i,r){var o,s=!(!t||!t.document)&&t.document.body;if(s){if(o=this.rangePairToCfiPair(e,{start:this.findStart(s,i,r),end:this.findEnd(s,i,r)}),!0===this._dev){let e=t.document,i=new n.a(o.start).toRange(e),r=new n.a(o.end).toRange(e),s=e.defaultView.getSelection(),a=e.createRange();s.removeAllRanges(),a.setStart(i.startContainer,i.startOffset),a.setEnd(r.endContainer,r.endOffset),s.addRange(a)}return o}}walk(t,e){if(!t||t.nodeType!==Node.TEXT_NODE){var i=function(t){return t.data.trim().length>0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},n=i;n.acceptNode=i;for(var r,o,s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,n,!1);(r=s.nextNode())&&!(o=e(r)););return o}}findRanges(t){for(var e,i,n=[],r=t.contents.scrollWidth(),o=Math.ceil(r/this.layout.spreadWidth)*this.layout.divisor,s=this.layout.columnWidth,a=this.layout.gap,l=0;l<o.pages;l++)e=(s+a)*l,i=s*(l+1)+a*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){for(var n,o,s=[t],a=t;s.length;)if(n=s.shift(),o=this.walk(n,t=>{var n,o,l,c,h;if(h=Object(r.nodeBounds)(t),this.horizontal&&"ltr"===this.direction){if(n=this.horizontal?h.left:h.top,o=this.horizontal?h.right:h.bottom,n>=e&&n<=i)return t;if(o>e)return t;a=t,s.push(t)}else if(this.horizontal&&"rtl"===this.direction){if(n=h.left,(o=h.right)<=i&&o>=e)return t;if(n<i)return t;a=t,s.push(t)}else{if(l=h.top,c=h.bottom,l>=e&&l<=i)return t;if(c>e)return t;a=t,s.push(t)}}))return this.findTextStartRange(o,e,i);return this.findTextStartRange(a,e,i)}findEnd(t,e,i){for(var n,o,s=[t],a=t;s.length;)if(n=s.shift(),o=this.walk(n,t=>{var n,o,l,c,h;if(h=Object(r.nodeBounds)(t),this.horizontal&&"ltr"===this.direction){if(n=Math.round(h.left),o=Math.round(h.right),n>i&&a)return a;if(o>i)return t;a=t,s.push(t)}else if(this.horizontal&&"rtl"===this.direction){if(n=Math.round(this.horizontal?h.left:h.top),(o=Math.round(this.horizontal?h.right:h.bottom))<e&&a)return a;if(n<e)return t;a=t,s.push(t)}else{if(l=Math.round(h.top),c=Math.round(h.bottom),l>i&&a)return a;if(c>i)return t;a=t,s.push(t)}}))return this.findTextEndRange(o,e,i);return this.findTextEndRange(a,e,i)}findTextStartRange(t,e,i){for(var n,r,o=this.splitTextNodeIntoRanges(t),s=0;s<o.length;s++)if(r=(n=o[s]).getBoundingClientRect(),this.horizontal&&"ltr"===this.direction){if(r.left>=e)return n}else if(this.horizontal&&"rtl"===this.direction){if(r.right<=i)return n}else if(r.top>=e)return n;return o[0]}findTextEndRange(t,e,i){for(var n,r,o,s,a,l,c,h=this.splitTextNodeIntoRanges(t),u=0;u<h.length;u++){if(o=(r=h[u]).getBoundingClientRect(),this.horizontal&&"ltr"===this.direction){if(s=o.left,a=o.right,s>i&&n)return n;if(a>i)return r}else if(this.horizontal&&"rtl"===this.direction){if(s=o.left,(a=o.right)<e&&n)return n;if(s<e)return r}else{if(l=o.top,c=o.bottom,l>i&&n)return n;if(c>i)return r}n=r}return h[h.length-1]}splitTextNodeIntoRanges(t,e){var i,n=[],r=(t.textContent||"").trim(),o=t.ownerDocument,s=e||" ",a=r.indexOf(s);if(-1===a||t.nodeType!=Node.TEXT_NODE)return(i=o.createRange()).selectNodeContents(t),[i];for((i=o.createRange()).setStart(t,0),i.setEnd(t,a),n.push(i),i=!1;-1!=a;)(a=r.indexOf(s,a+1))>0&&(i&&(i.setEnd(t,a),n.push(i)),(i=o.createRange()).setStart(t,a+1));return i&&(i.setEnd(t,r.length),n.push(i)),n}rangePairToCfiPair(t,e){var i=e.start,r=e.end;return i.collapse(!0),r.collapse(!1),{start:new n.a(i,t).toString(),end:new n.a(r,t).toString()}}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}}},function(t,e,i){"use strict";var n=i(87),r=i(13),o=i(36),s=i(46),a=i(35),l=i(33),c=i(100),h=i(101),u=Math.max,d=Math.min,f=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,g=/\$([$&'`]|\d\d?)/g;n("replace",2,(function(t,e,i,n){var m=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=n.REPLACE_KEEPS_$0,y=m?"$":"$0";return[function(i,n){var r=l(this),o=null==i?void 0:i[t];return void 0!==o?o.call(i,r,n):e.call(String(r),i,n)},function(t,n){if(!m&&v||"string"==typeof n&&-1===n.indexOf(y)){var o=i(e,t,this,n);if(o.done)return o.value}var l=r(t),f=String(this),p="function"==typeof n;p||(n=String(n));var g=l.global;if(g){var w=l.unicode;l.lastIndex=0}for(var x=[];;){var _=h(l,f);if(null===_)break;if(x.push(_),!g)break;""===String(_[0])&&(l.lastIndex=c(f,s(l.lastIndex),w))}for(var k,E="",S=0,T=0;T<x.length;T++){_=x[T];for(var C=String(_[0]),O=u(d(a(_.index),f.length),0),A=[],N=1;N<_.length;N++)A.push(void 0===(k=_[N])?k:String(k));var I=_.groups;if(p){var R=[C].concat(A,O,f);void 0!==I&&R.push(I);var j=String(n.apply(void 0,R))}else j=b(C,f,O,A,I,n);O>=S&&(E+=f.slice(S,O)+j,S=O+C.length)}return E+f.slice(S)}];function b(t,i,n,r,s,a){var l=n+t.length,c=r.length,h=g;return void 0!==s&&(s=o(s),h=p),e.call(a,h,(function(e,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return i.slice(0,n);case"'":return i.slice(l);case"<":a=s[o.slice(1,-1)];break;default:var h=+o;if(0===h)return e;if(h>c){var u=f(h/10);return 0===u?e:u<=c?void 0===r[u-1]?o.charAt(1):r[u-1]+o.charAt(1):e}a=r[h-1]}return void 0===a?"":a}))}}))},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,i){var n,r,o,s=i(89),a=i(7),l=i(17),c=i(15),h=i(10),u=i(43),d=i(44),f=a.WeakMap;if(s){var p=new f,g=p.get,m=p.has,v=p.set;n=function(t,e){return v.call(p,t,e),e},r=function(t){return g.call(p,t)||{}},o=function(t){return m.call(p,t)}}else{var y=u("state");d[y]=!0,n=function(t,e){return c(t,y,e),e},r=function(t){return h(t,y)?t[y]:{}},o=function(t){return h(t,y)}}t.exports={set:n,get:r,has:o,enforce:function(t){return o(t)?r(t):n(t,{})},getterFor:function(t){return function(e){var i;if(!l(e)||(i=r(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}}},function(t,e){t.exports={}},function(t,e,i){"use strict";var n=i(3),r=i.n(n),o=i(0),s=i(2),a=i(23),l=i(11),c=i(1);const h="undefined"!=typeof navigator,u=h&&/Chrome/.test(navigator.userAgent),d=h&&!u&&/AppleWebKit/.test(navigator.userAgent);class f{constructor(t,e,i,n){this.epubcfi=new s.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",c.b),this.called=0,this.active=!0,this.listeners()}static get listenedEvents(){return c.a}width(t){var e=this.content;return t&&Object(o.isNumber)(t)&&(t+="px"),t&&(e.style.width=t),parseInt(this.window.getComputedStyle(e).width)}height(t){var e=this.content;return t&&Object(o.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(o.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(o.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(o.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(){return this.documentElement.scrollWidth}scrollHeight(){return this.documentElement.scrollHeight}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,i=this.document.querySelector("meta[name='viewport']"),n={width:void 0,height:void 0,scale:void 0,minimum:void 0,maximum:void 0,scalable:void 0},r=[];if(i&&i.hasAttribute("content")){let t=i.getAttribute("content"),e=t.match(/width\s*=\s*([^,]*)/),r=t.match(/height\s*=\s*([^,]*)/),o=t.match(/initial-scale\s*=\s*([^,]*)/),s=t.match(/minimum-scale\s*=\s*([^,]*)/),a=t.match(/maximum-scale\s*=\s*([^,]*)/),l=t.match(/user-scalable\s*=\s*([^,]*)/);e&&e.length&&void 0!==e[1]&&(n.width=e[1]),r&&r.length&&void 0!==r[1]&&(n.height=r[1]),o&&o.length&&void 0!==o[1]&&(n.scale=o[1]),s&&s.length&&void 0!==s[1]&&(n.minimum=s[1]),a&&a.length&&void 0!==a[1]&&(n.maximum=a[1]),l&&l.length&&void 0!==l[1]&&(n.scalable=l[1])}return e=Object(o.defaults)(t||{},n),t&&(e.width&&r.push("width="+e.width),e.height&&r.push("height="+e.height),e.scale&&r.push("initial-scale="+e.scale),"no"===e.scalable?(r.push("minimum-scale="+e.scale),r.push("maximum-scale="+e.scale),r.push("user-scalable="+e.scalable)):(e.scalable&&r.push("user-scalable="+e.scalable),e.minimum&&r.push("minimum-scale="+e.minimum),e.maximum&&r.push("minimum-scale="+e.maximum)),i||((i=this.document.createElement("meta")).setAttribute("name","viewport"),this.document.querySelector("head").appendChild(i)),i.setAttribute("content",r.join(", ")),this.window.scrollTo(0,0)),e}expand(){this.emit(c.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(c.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(t){return}if(!n)return;for(var r=0;r<n.length;r+=1){if(n[r].media)this.window.matchMedia(n[r].media.mediaText).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()});this.observer.observe(this.document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}imageLoadListeners(){for(var t,e=this.document.querySelectorAll("img"),i=0;i<e.length;i++)void 0!==(t=e[i]).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 r=new s.a(t).toRange(this.document,e);if(r){try{if(!r.endContainer||r.startContainer==r.endContainer&&r.startOffset==r.endOffset){let t=r.startContainer.textContent.indexOf(" ",r.startOffset);-1==t&&(t=r.startContainer.textContent.length),r.setEnd(r.startContainer,t)}}catch(t){console.error("setting end offset to start container length failed",t)}if(r.startContainer.nodeType===Node.ELEMENT_NODE)i=r.startContainer.getBoundingClientRect(),n.left=i.left,n.top=i.top;else if(d){let t=r.startContainer,e=new Range;try{1===t.nodeType?i=t.getBoundingClientRect():r.startOffset+2<t.length?(e.setStart(t,r.startOffset),e.setEnd(t,r.startOffset+2),i=e.getBoundingClientRect()):r.startOffset-2>0?(e.setStart(t,r.startOffset-2),e.setEnd(t,r.startOffset),i=e.getBoundingClientRect()):i=t.parentNode.getBoundingClientRect()}catch(t){console.error(t,t.stack)}}else i=r.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+"']"))?e(!0):((n=this.document.createElement("link")).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=this.document.createElement("style")).id=t,this.document.head.appendChild(e)),e)}addStylesheetCss(t,e){return!(!this.document||!t)&&(this._getStylesheetNode(e).innerHTML=t,!0)}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 o=1,s=t[n],a=t[n][0],l="";"[object Array]"===Object.prototype.toString.call(s[1][0])&&(s=s[1],o=0);for(var c=s.length;o<c;o++){var h=s[o];l+=h[0]+":"+h[1]+(h[2]?" !important":"")+";\n"}i.insertRule(a+"{"+l+"}",i.cssRules.length)}else{Object.keys(t).forEach(e=>{const n=t[e];if(Array.isArray(n))n.forEach(t=>{const n=Object.keys(t).map(e=>`${e}:${t[e]}`).join(";");i.insertRule(`${e}{${n}}`,i.cssRules.length)});else{const t=Object.keys(n).map(t=>`${t}:${n[t]}`).join(";");i.insertRule(`${e}{${t}}`,i.cssRules.length)}})}}addScript(t){return new Promise(function(e,i){var n,r=!1;this.document?((n=this.document.createElement("script")).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.classList.add(t)}removeClass(t){var e;this.document&&(e=this.content||this.document.body)&&e.classList.remove(t)}addEventListeners(){this.document&&(this._triggerEvent=this.triggerEvent.bind(this),c.a.forEach((function(t){this.document.addEventListener(t,this._triggerEvent,{passive:!0})}),this))}removeEventListeners(){this.document&&(c.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)).collapsed||(i=new s.a(e,this.cfiBase).toString(),this.emit(c.c.CONTENTS.SELECTED,i),this.emit(c.c.CONTENTS.SELECTED_RANGE,e)))}range(t,e){return new s.a(t).toRange(this.document,e)}cfiFromRange(t,e){return new s.a(t,this.cfiBase,e).toString()}cfiFromNode(t,e){return new s.a(t,this.cfiBase,e).toString()}map(t){return new a.a(t).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 s=Object(o.prefixed)("column-axis"),a=Object(o.prefixed)("column-gap"),l=Object(o.prefixed)("column-width"),c=Object(o.prefixed)("column-fill"),h=0===this.writingMode().indexOf("vertical")?"vertical":"horizontal";this.layoutStyle("paginated"),"rtl"===r&&"horizontal"===h&&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"===h?(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(s,"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(s,"horizontal")),this.css("box-sizing","border-box"),this.css("max-width","inherit"),this.css(c,"auto"),this.css(a,n+"px"),this.css(l,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),o=parseInt(n.height),s=t/r,a=e/o,l=s<a?s:a;if(this.layoutStyle("paginated"),this.width(r),this.height(o),this.overflow("hidden"),this.scaler(l,0,0),this.css("background-size",r*l+"px "+o*l+"px"),this.css("background-color","transparent"),i&&i.properties.includes("page-spread-left")){var c=t-r*l;this.css("margin-left",c+"px")}}direction(t){this.documentElement&&(this.documentElement.style.direction=t)}mapPage(t,e,i,n,r){return new a.a(e,r).page(this,t,i,n)}linksHandler(){Object(l.c)(this.content,t=>{this.emit(c.c.CONTENTS.LINK_CLICKED,t)})}writingMode(t){let e=Object(o.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":case"layout-changes":case"touch-events":case"mouse-events":case"keyboard-events":return!0;case"spine-scripting":default:return!1}}},navigator.epubReadingSystem}destroy(){this.removeListeners()}}r()(f.prototype),e.a=f},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(){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}}(),r=s(i(135)),o=s(i(136));function s(t){return t&&t.__esModule?t:{default:t}}function a(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 l(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 c(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;c(this,t),this.target=e,this.element=r.default.createElement("svg"),this.marks=[],this.element.style.position="absolute",this.element.setAttribute("pointer-events","none"),o.default.proxyMouse(this.target,this.marks),this.container=i,this.container.appendChild(this.element),this.render()}return n(t,[{key:"addMark",value:function(t){var e=r.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(){var t,e,i,n;!function(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")}(this.element,(t=this.target,e=this.container,i=e.getBoundingClientRect(),n=t.getBoundingClientRect(),{top:n.top-i.top,left:n.left-i.left,height:t.scrollHeight,width:t.scrollWidth}));var r=!0,o=!1,s=void 0;try{for(var a,l=this.marks[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){a.value.render()}}catch(t){o=!0,s=t}finally{try{!r&&l.return&&l.return()}finally{if(o)throw s}}}}]),t}();var h=e.Mark=function(){function t(){c(this,t),this.element=null}return n(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(){for(var t=[],e=this.element.firstChild;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;if(n=t[i],(r=e).right<=n.right&&r.left>=n.left&&r.top>=n.top&&r.bottom<=n.bottom)return!1}var n,r;return!0}))}}]),t}(),u=e.Highlight=function(t){function e(t,i,n,r){c(this,e);var o=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return o.range=t,o.className=i,o.data=n||{},o.attributes=r||{},o}return l(e,t),n(e,[{key:"bind",value:function(t,i){for(var n in function t(e,i,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,i);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,n)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(n):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"bind",this).call(this,t,i),this.data)this.data.hasOwnProperty(n)&&(this.element.dataset[n]=this.data[n]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&this.element.setAttribute(n,this.attributes[n]);this.className&&this.element.classList.add(this.className)}},{key:"render",value:function(){for(;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(),o=0,s=e.length;o<s;o++){var a=e[o],l=r.default.createElement("rect");l.setAttribute("x",a.left-i.left+n.left),l.setAttribute("y",a.top-i.top+n.top),l.setAttribute("height",a.height),l.setAttribute("width",a.width),t.appendChild(l)}this.element.appendChild(t)}}]),e}(h);e.Underline=function(t){function e(t,i,n,r){return c(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,i,n,r))}return l(e,t),n(e,[{key:"render",value:function(){for(;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(),o=0,s=e.length;o<s;o++){var a=e[o],l=r.default.createElement("rect");l.setAttribute("x",a.left-i.left+n.left),l.setAttribute("y",a.top-i.top+n.top),l.setAttribute("height",a.height),l.setAttribute("width",a.width),l.setAttribute("fill","none");var c=r.default.createElement("line");c.setAttribute("x1",a.left-i.left+n.left),c.setAttribute("x2",a.left-i.left+n.left+a.width),c.setAttribute("y1",a.top-i.top+n.top+a.height-1),c.setAttribute("y2",a.top-i.top+n.top+a.height-1),c.setAttribute("stroke-width",1),c.setAttribute("stroke","black"),c.setAttribute("stroke-linecap","square"),t.appendChild(l),t.appendChild(c)}this.element.appendChild(t)}}]),e}(u)},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){var n=i(7),r=i(59).f,o=i(15),s=i(19),a=i(42),l=i(90),c=i(96);t.exports=function(t,e){var i,h,u,d,f,p=t.target,g=t.global,m=t.stat;if(i=g?n:m?n[p]||a(p,{}):(n[p]||{}).prototype)for(h in e){if(d=e[h],u=t.noTargetGet?(f=r(i,h))&&f.value:i[h],!c(g?h:p+(m?".":"#")+h,t.forced)&&void 0!==u){if(typeof d==typeof u)continue;l(d,u)}(t.sham||u&&u.sham)&&o(d,"sham",!0),s(i,h,d,t)}}},function(t,e,i){var n=i(61),r=i(33);t.exports=function(t){return n(r(t))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!1},function(t,e){var i=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:i)(t)}},function(t,e,i){var n=i(33);t.exports=function(t){return Object(n(t))}},function(t,e,i){var n=i(18).f,r=i(10),o=i(8)("toStringTag");t.exports=function(t,e,i){t&&!r(t=i?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},function(e,i){e.exports=t},function(t,e,i){"use strict";var n=i(3),r=i.n(n),o=i(0),s=i(6),a=i(2),l=i(21),c=i(1);class h{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 void 0!==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,o,s,a=1,l=i||0,c=t,h=e,u=Math.floor(c/12);a=this._spread&&c>=this._minSpreadWidth?2:1,"reflowable"!==this.name||"paginated"!==this._flow||i>=0||(l=u%2==0?u:u-1),"pre-paginated"===this.name&&(l=0),a>1?o=(n=c/a-l)+l:(n=c,o=c),"pre-paginated"===this.name&&a>1&&(c=n),r=n*a+l,s=c,this.width=c,this.height=h,this.spreadWidth=r,this.pageWidth=o,this.delta=s,this.columnWidth=n,this.gap=l,this.divisor=a,this.update({width:c,height:h,spreadWidth:r,pageWidth:o,delta:s,columnWidth:n,gap:l,divisor:a})}format(t,e,i){return"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)}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(o.extend)(this.props,t);this.emit(c.c.LAYOUT.UPDATED,e,t)}}}r()(h.prototype);var u=h,d=i(5);var f=class{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 d.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=this._current;this._current=t,this.update(t),this.rendition.getContents().forEach(i=>{i.removeClass(e),i.addClass(t)})}update(t){this.rendition.getContents().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]).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}};i(28);class p{constructor({type:t,cfiRange:e,data:i,sectionIndex:n,cb:r,className:o,styles:s}){this.type=t,this.cfiRange=e,this.data=i,this.sectionIndex=n,this.mark=void 0,this.cb=r,this.className=o,this.styles=s}update(t){this.data=t}attach(t){let e,{cfiRange:i,data:n,type:r,mark:o,cb:s,className:a,styles:l}=this;return"highlight"===r?e=t.highlight(i,n,s,a,l):"underline"===r?e=t.underline(i,n,s,a,l):"mark"===r&&(e=t.mark(i,n,s)),this.mark=e,this.emit(c.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(c.c.ANNOTATION.DETACH,e),e}text(){}}r()(p.prototype);var g=class{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,o){let s=encodeURI(e+t),l=new a.a(e).spinePos,c=new p({type:t,cfiRange:e,data:i,sectionIndex:l,cb:n,className:r,styles:o});return this._annotations[s]=c,l in this._annotationsBySectionIndex?this._annotationsBySectionIndex[l].push(s):this._annotationsBySectionIndex[l]=[s],this.rendition.views().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;this.rendition.views().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){this._annotationsBySectionIndex[e].forEach(e=>{this._annotations[e].attach(t)})}}clear(t){let e=t.index;if(e in this._annotationsBySectionIndex){this._annotationsBySectionIndex[e].forEach(e=>{this._annotations[e].detach(t)})}}show(){}hide(){}},m=i(54),v=i(22),y=i(56);class b{constructor(t,e){this.settings=Object(o.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"}),Object(o.extend)(this.settings,e),"object"==typeof this.settings.manager&&(this.manager=this.settings.manager),this.book=t,this.hooks={},this.hooks.display=new s.a(this),this.hooks.serialize=new s.a(this),this.hooks.content=new s.a(this),this.hooks.unloaded=new s.a(this),this.hooks.layout=new s.a(this),this.hooks.render=new s.a(this),this.hooks.show=new s.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 f(this),this.annotations=new g(this),this.epubcfi=new a.a,this.q=new l.a(this),this.location=void 0,this.q.enqueue(this.book.opened),this.starting=new o.defer,this.started=this.starting.promise,this.q.enqueue(this.start)}setManager(t){this.manager=t}requireManager(t){return"string"==typeof t&&"default"===t?v.a:"string"==typeof t&&"continuous"===t?y.a:t}requireView(t){return"string"==typeof t&&"iframe"===t?m.a:t}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}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(c.c.MANAGERS.ADDED,this.afterDisplayed.bind(this)),this.manager.on(c.c.MANAGERS.REMOVED,this.afterRemoved.bind(this)),this.manager.on(c.c.MANAGERS.RESIZED,this.onResized.bind(this)),this.manager.on(c.c.MANAGERS.ORIENTATION_CHANGE,this.onOrientationChange.bind(this)),this.manager.on(c.c.MANAGERS.SCROLLED,this.reportLocation.bind(this)),this.emit(c.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(c.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 o.defer,n=i.promise;return this.displaying=i,this.book.locations.length()&&Object(o.isFloat)(t)&&(t=this.book.locations.cfiFromPercentage(parseFloat(t))),(e=this.book.spine.get(t))?(this.manager.display(e,t).then(()=>{i.resolve(e),this.displaying=void 0,this.emit(c.c.RENDITION.DISPLAYED,e),this.reportLocation()},t=>{this.emit(c.c.RENDITION.DISPLAY_ERROR,t)}),n):(i.reject(new Error("No Section Found")),n)}}afterDisplayed(t){t.on(c.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(c.c.RENDITION.RENDERED,t.section,t)}):this.emit(c.c.RENDITION.RENDERED,t.section,t)})}afterRemoved(t){this.hooks.unloaded.trigger(t,this).then(()=>{this.emit(c.c.RENDITION.REMOVED,t.section,t)})}onResized(t,e){this.emit(c.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(c.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=this.settings.layout||t.layout||"reflowable",i=this.settings.spread||t.spread||"auto",n=this.settings.orientation||t.orientation||"auto",r=this.settings.flow||t.flow||"auto",o=t.viewport||"",s=this.settings.minSpreadWidth||t.minSpreadWidth||800,a=this.settings.direction||t.direction||"ltr";return(0===this.settings.width||this.settings.width>0)&&(0===this.settings.height||this.settings.height),{layout:e,spread:i,orientation:n,flow:r,viewport:o,minSpreadWidth:s,direction:a}}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 u(t),this._layout.spread(t.spread,this.settings.minSpreadWidth),this._layout.on(c.c.LAYOUT.UPDATED,(t,e)=>{this.emit(c.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(c.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(c.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(c.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(c.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){return this.located(t)}.bind(this));else if(t){return this.located(t)}}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),o=this.book.locations.locationFromCfi(i.mapping.end);null!=r&&(n.start.location=r,n.start.percentage=this.book.locations.percentageFromLocation(r)),null!=o&&(n.end.location=o,n.end.percentage=this.book.locations.percentageFromLocation(o));let s=this.book.pageList.pageFromCfi(e.mapping.start),a=this.book.pageList.pageFromCfi(i.mapping.end);return-1!=s&&(n.start.page=s),-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){c.a.forEach(e=>{t.on(e,e=>this.triggerViewEvent(e,t))}),t.on(c.c.CONTENTS.SELECTED,e=>this.triggerSelectedEvent(e,t))}triggerViewEvent(t,e){this.emit(t.type,t,e)}triggerSelectedEvent(t,e){this.emit(c.c.RENDITION.SELECTED,t,e)}triggerMarkEvent(t,e,i){this.emit(c.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(){return(this.manager?this.manager.views:void 0)||[]}handleLinks(t){t&&t.on(c.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},function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},function(t,e,i){var n=i(17);t.exports=function(t,e){if(!n(t))return t;var i,r;if(e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!n(r=i.call(t)))return r;if(!e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e,i){var n=i(7),r=i(15);t.exports=function(t,e){try{r(n,t,e)}catch(i){n[t]=e}return e}},function(t,e,i){var n=i(66),r=i(67),o=n("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},function(t,e){t.exports={}},function(t,e,i){var n=i(92),r=i(7),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t])||o(r[t]):n[t]&&n[t][e]||r[t]&&r[t][e]}},function(t,e,i){var n=i(35),r=Math.min;t.exports=function(t){return t>0?r(n(t),9007199254740991):0}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,i){"use strict";var n,r,o=i(97),s=i(98),a=RegExp.prototype.exec,l=String.prototype.replace,c=a,h=(n=/a/,r=/b*/g,a.call(n,"a"),a.call(r,"a"),0!==n.lastIndex||0!==r.lastIndex),u=s.UNSUPPORTED_Y||s.BROKEN_CARET,d=void 0!==/()??/.exec("")[1];(h||d||u)&&(c=function(t){var e,i,n,r,s=this,c=u&&s.sticky,f=o.call(s),p=s.source,g=0,m=t;return c&&(-1===(f=f.replace("y","")).indexOf("g")&&(f+="g"),m=String(t).slice(s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==t[s.lastIndex-1])&&(p="(?: "+p+")",m=" "+m,g++),i=new RegExp("^(?:"+p+")",f)),d&&(i=new RegExp("^"+p+"$(?!\\s)",f)),h&&(e=s.lastIndex),n=a.call(c?i:s,m),c?n?(n.input=n.input.slice(g),n[0]=n[0].slice(g),n.index=s.lastIndex,s.lastIndex+=n[0].length):s.lastIndex=0:h&&n&&(s.lastIndex=s.global?n.index+n[0].length:e),d&&n&&n.length>1&&l.call(n[0],i,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(n[r]=void 0)})),n}),t.exports=c},function(t,e,i){var n=i(35),r=i(33),o=function(t){return function(e,i){var o,s,a=String(r(e)),l=n(i),c=a.length;return l<0||l>=c?t?"":void 0:(o=a.charCodeAt(l))<55296||o>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?t?a.charAt(l):o:t?a.slice(l,l+2):s-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},function(t,e,i){var n,r=i(13),o=i(72),s=i(47),a=i(44),l=i(104),c=i(63),h=i(43),u=h("IE_PROTO"),d=function(){},f=function(t){return"<script>"+t+"<\/script>"},p=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;p=n?function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e}(n):((e=c("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F);for(var i=s.length;i--;)delete p.prototype[s[i]];return p()};a[u]=!0,t.exports=Object.create||function(t,e){var i;return null!==t?(d.prototype=r(t),i=new d,d.prototype=null,i[u]=t):i=p(),void 0===e?i:o(i,e)}},function(t,e,i){"use strict";var n=i(115)();t.exports=function(t){return t!==n&&null!==t}},function(t,e,i){var n=i(81),r=i(27),o=i(8)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||r[n(t)]}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,i){"use strict";var n=i(3),r=i.n(n),o=i(0),s=i(2),a=i(28),l=i(1),c=i(29);class h{constructor(t,e){this.settings=Object(o.extend)({ignoreClass:"",axis:void 0,direction:void 0,width:0,height:0,layout:void 0,globalLayoutProperties:{},method:void 0,forceRight:!1},e||{}),this.id="epubjs-view-"+Object(o.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 s.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.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(o.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(l.c.VIEWS.AXIS,t),this.setWritingMode(e),this.emit(l.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(l.c.VIEWS.LOAD_ERROR,t),new Promise((e,i)=>{i(t)})}.bind(this)).then(function(){this.emit(l.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(o.borders)(this.element);n=this.iframe?Object(o.borders)(this.iframe):{width:0,height:0},"width"==t&&Object(o.isNumber)(e)&&(this.lockedWidth=e-r.width-n.width),"height"==t&&Object(o.isNumber)(i)&&(this.lockedHeight=i-r.height-n.height),"both"===t&&Object(o.isNumber)(e)&&Object(o.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())%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(o.isNumber)(t)&&(this.element.style.width=t+"px",this.iframe.style.width=t+"px",this._width=t),Object(o.isNumber)(e)&&(this.element.style.height=e+"px",this.iframe.style.height=e+"px",this._height=e),i={width:t,height:e,widthDelta:this.prevBounds?t-this.prevBounds.width:t,heightDelta:this.prevBounds?e-this.prevBounds.height:e},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(l.c.VIEWS.RESIZED,i),this.prevBounds=i,this.elementBounds=Object(o.bounds)(this.element)}load(t){var e=new o.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(o.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")).setAttribute("rel","canonical"),i.setAttribute("href",this.section.canonical),this.document.querySelector("head").appendChild(i)),this.contents.on(l.c.CONTENTS.EXPAND,()=>{this.displayed&&this.iframe&&(this.expand(),this.contents&&this.layout.format(this.contents))}),this.contents.on(l.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 o.defer;return this.displayed?e.resolve(this):this.render(t).then(function(){this.emit(l.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(l.c.VIEWS.SHOWN,this)}hide(){this.element.style.visibility="hidden",this.iframe.style.visibility="hidden",this.stopExpanding=!0,this.emit(l.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(o.bounds)(this.element)),this.elementBounds}highlight(t,e={},i,n="epubjs-hl",r={}){if(!this.contents)return;const o=Object.assign({fill:"yellow","fill-opacity":"0.3","mix-blend-mode":"multiply"},r);let s=this.contents.range(t),a=()=>{this.emit(l.c.VIEWS.MARK_CLICKED,t,e)};e.epubcfi=t,this.pane||(this.pane=new c.Pane(this.iframe,this.element));let h=new c.Highlight(s,n,e,o),u=this.pane.addMark(h);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 o=Object.assign({stroke:"black","stroke-opacity":"0.3","mix-blend-mode":"multiply"},r);let s=this.contents.range(t),a=()=>{this.emit(l.c.VIEWS.MARK_CLICKED,t,e)};e.epubcfi=t,this.pane||(this.pane=new c.Pane(this.iframe,this.element));let h=new c.Underline(s,n,e,o),u=this.pane.addMark(h);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){return this.marks[t]}let n=this.contents.range(t);if(!n)return;let r=n.commonAncestorContainer,o=1===r.nodeType?r:r.parentNode,s=i=>{this.emit(l.c.VIEWS.MARK_CLICKED,t,e)};n.collapsed&&1===r.nodeType?(n=new Range,n.selectNodeContents(r)):n.collapsed&&(n=new Range,n.selectNodeContents(o));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",s),a.addEventListener("touchstart",s),this.placeMark(a,n),this.element.appendChild(a),this.marks[t]={element:a,range:n,listeners:[s,i]},o}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,s=e.getClientRects();for(var o=0;o!=s.length;o++)t=s[o],(!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(o.revokeBlobUrl)(this.blobUrl),this.displayed&&(this.displayed=!1,this.removeListeners(),this.contents.destroy(),this.stopExpanding=!0,this.element.removeChild(this.iframe),this.iframe=void 0,this.contents=void 0,this._textWidth=null,this._textHeight=null,this._width=null,this._height=null)}}r()(h.prototype),e.a=h},function(t,e,i){var n=i(53),r=i(137),o=i(139),s=Math.max,a=Math.min;t.exports=function(t,e,i){var l,c,h,u,d,f,p=0,g=!1,m=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var i=l,n=c;return l=c=void 0,p=e,u=t.apply(n,i)}function b(t){return p=t,d=setTimeout(x,e),g?y(t):u}function w(t){var i=t-f;return void 0===f||i>=e||i<0||m&&t-p>=h}function x(){var t=r();if(w(t))return _(t);d=setTimeout(x,function(t){var i=e-(t-f);return m?a(i,h-(t-p)):i}(t))}function _(t){return d=void 0,v&&l?y(t):(l=c=void 0,u)}function k(){var t=r(),i=w(t);if(l=arguments,c=this,f=t,i){if(void 0===d)return b(f);if(m)return clearTimeout(d),d=setTimeout(x,e),y(f)}return void 0===d&&(d=setTimeout(x,e)),u}return e=o(e)||0,n(i)&&(g=!!i.leading,h=(m="maxWait"in i)?s(o(i.maxWait)||0,e):h,v="trailing"in i?!!i.trailing:v),k.cancel=function(){void 0!==d&&clearTimeout(d),p=0,l=f=c=d=void 0},k.flush=function(){return void 0===d?u:_(r())},k}},function(t,e,i){"use strict";i(14);var n=i(0),r=i(22),o=i(1),s=i(3),a=i.n(s);const l=Math.PI/2,c={easeOutSine:function(t){return Math.sin(t*l)},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 h{constructor(t,e){this.settings=Object(n.extend)({duration:80,minVelocity:.2,minDistance:10,easing:c.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(o.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(o.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=e/(this.endTime-this.startTime),r=this.settings.minVelocity;return i<=this.settings.minDistance||i>=t?0:n>r?-1:n<-r?1:void 0}needsSnap(){return this.scrollLeft%(this.layout.pageWidth*this.layout.divisor)!=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(),o=this.settings.duration,s=this.settings.easing;return this.snapping=!0,function n(){const a=this.now(),l=Math.min(1,(a-r)/o);if(s(l),this.touchCanceler||this.resizeCanceler)return this.resizeCanceler=!1,this.snapping=!1,void e.resolve();l<1?(window.requestAnimationFrame(n.bind(this)),this.scrollTo(i+(t-i)*l,0)):(this.scrollTo(t,0),this.snapping=!1,e.resolve())}.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()(h.prototype);var u=h,d=i(55),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}),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},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(o.c.MANAGERS.RESIZE,t.section)}removeShownListeners(t){t.onDisplayed=function(){}}add(t){var e=this.createView(t);return this.views.append(e),e.on(o.c.VIEWS.RESIZED,t=>{e.expanded=!0}),e.on(o.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(o.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(o.c.VIEWS.RESIZED,t=>{e.expanded=!0}),e.on(o.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(o.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(o.c.VIEWS.RESIZED,t=>{this.counter(t),e.expanded=!0}),e.on(o.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(o.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=this.bounds(),r=this.views.all(),o=r.length,s=[],a=void 0!==t?t:this.settings.offset||0,l=new n.defer,c=[],h=0;h<o;h++)if(e=r[h],!0===this.isVisible(e,a,a,i)){if(e.displayed)e.show();else{let t=e.display(this.request).then((function(t){t.show()}),t=>{e.hide()});c.push(t)}s.push(e)}else this.q.enqueue(e.destroy.bind(e)),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=[],o="horizontal"===this.settings.axis,s=this.settings.offset||0;t&&o&&(s=t),e&&!o&&(s=e);var a=this._bounds;let l=o?this.scrollLeft:this.scrollTop,c=o?Math.floor(a.width):a.height,h=o?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?(o&&f&&"negative"===d||!o&&f&&"default"===d)&&(l*=-1):(f&&"default"===d&&"horizontal"===u&&(l=h-c-l),f&&"negative"===d&&"horizontal"===u&&(l*=-1));let p=()=>{let t=this.views.first(),e=t&&t.section.prev();e&&r.push(this.prepend(e))},g=l-s;l+c+s>=h&&(()=>{let t=this.views.last(),e=t&&t.section.next();e&&r.push(this.append(e))})(),g<0&&p();let m=r.map(t=>t.display(this.request));return r.length?Promise.all(m).then(()=>this.check()).then(()=>this.update(s),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],o=this.views.indexOf(i),s=this.views.indexOf(r),a=this.views.slice(0,o),l=this.views.slice(s+1),c=0;c<a.length-1;c++)this.erase(a[c],a);for(var h=1;h<l.length;h++)this.erase(l[h]);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(){(this.settings.fullsize?window:this.container).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(o.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(o.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},function(t,e,i){(function(e){t.exports=function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[s]={exports:{}};e[s][0].call(c.exports,(function(t){var i=e[s][1][t];return r(i||t)}),c,c.exports,t,e,i,n)}return i[s].exports}for(var o=!1,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,i,n){(function(t){"use strict";var e,n,r=t.MutationObserver||t.WebKitMutationObserver;if(r){var o=0,s=new r(h),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),e=function(){a.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)e="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){h(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(h,0)};else{var l=new t.MessageChannel;l.port1.onmessage=h,e=function(){l.port2.postMessage(0)}}var c=[];function h(){var t,e;n=!0;for(var i=c.length;i;){for(e=c,c=[],t=-1;++t<i;)e[t]();i=c.length}n=!1}i.exports=function(t){1!==c.push(t)||n||e()}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,i){"use strict";var n=t(1);function r(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,t!==r&&f(this,t)}function h(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(e){return o.reject(t,e)}n===t?o.reject(t,new TypeError("Cannot resolve promise with itself")):o.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,o.reject(t,e))}function r(e){i||(i=!0,o.resolve(t,e))}var s=p((function(){e(r,n)}));"error"===s.status&&n(s.value)}function p(t,e){var i={};try{i.value=t(e),i.status="success"}catch(t){i.status="error",i.value=t}return i}e.exports=c,c.prototype.catch=function(t){return this.then(null,t)},c.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var i=new this.constructor(r);return this.state!==l?u(i,this.state===a?t:e,this.outcome):this.queue.push(new h(i,t,e)),i},h.prototype.callFulfilled=function(t){o.resolve(this.promise,t)},h.prototype.otherCallFulfilled=function(t){u(this.promise,this.onFulfilled,t)},h.prototype.callRejected=function(t){o.reject(this.promise,t)},h.prototype.otherCallRejected=function(t){u(this.promise,this.onRejected,t)},o.resolve=function(t,e){var i=p(d,e);if("error"===i.status)return o.reject(t,i.value);var n=i.value;if(n)f(t,n);else{t.state=a,t.outcome=e;for(var r=-1,s=t.queue.length;++r<s;)t.queue[r].callFulfilled(e)}return t},o.reject=function(t,e){t.state=s,t.outcome=e;for(var i=-1,n=t.queue.length;++i<n;)t.queue[i].callRejected(e);return t},c.resolve=function(t){return t instanceof this?t:o.resolve(new this(r),t)},c.reject=function(t){var e=new this(r);return o.reject(e,t)},c.all=function(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([]);for(var s=new Array(i),a=0,l=-1,c=new this(r);++l<i;)h(t[l],l);return c;function h(t,r){e.resolve(t).then((function(t){s[r]=t,++a!==i||n||(n=!0,o.resolve(c,s))}),(function(t){n||(n=!0,o.reject(c,t))}))}},c.race=function(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([]);for(var s,a=-1,l=new this(r);++a<i;)s=t[a],e.resolve(s).then((function(t){n||(n=!0,o.resolve(l,t))}),(function(t){n||(n=!0,o.reject(l,t))}));return l}},{1:1}],3:[function(t,i,n){(function(e){"use strict";"function"!=typeof e.Promise&&(e.Promise=t(2))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(t,e,i){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(t){return}}();function o(t,e){t=t||[],e=e||{};try{return new Blob(t,e)}catch(r){if("TypeError"!==r.name)throw r;for(var i=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<t.length;n+=1)i.append(t[n]);return i.getBlob(e.type)}}"undefined"==typeof Promise&&t(3);var s=Promise;function a(t,e){e&&t.then((function(t){e(null,t)}),(function(t){e(t)}))}function l(t,e,i){"function"==typeof e&&t.then(e),"function"==typeof i&&t.catch(i)}function c(t){return"string"!=typeof t&&(console.warn(t+" used as a key, but it is not a string."),t=String(t)),t}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var u=void 0,d={},f=Object.prototype.toString;function p(t){return"boolean"==typeof u?s.resolve(u):function(t){return new s((function(e){var i=t.transaction("local-forage-detect-blob-support","readwrite"),n=o([""]);i.objectStore("local-forage-detect-blob-support").put(n,"key"),i.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},i.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/),i=navigator.userAgent.match(/Edge\//);e(i||!t||parseInt(t[1],10)>=43)}})).catch((function(){return!1}))}(t).then((function(t){return u=t}))}function g(t){var e=d[t.name],i={};i.promise=new s((function(t,e){i.resolve=t,i.reject=e})),e.deferredOperations.push(i),e.dbReady?e.dbReady=e.dbReady.then((function(){return i.promise})):e.dbReady=i.promise}function m(t){var e=d[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function v(t,e){var i=d[t.name].deferredOperations.pop();if(i)return i.reject(e),i.promise}function y(t,e){return new s((function(i,n){if(d[t.name]=d[t.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},t.db){if(!e)return i(t.db);g(t),t.db.close()}var o=[t.name];e&&o.push(t.version);var s=r.open.apply(r,o);e&&(s.onupgradeneeded=function(e){var i=s.result;try{i.createObjectStore(t.storeName),e.oldVersion<=1&&i.createObjectStore("local-forage-detect-blob-support")}catch(i){if("ConstraintError"!==i.name)throw i;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),s.onerror=function(t){t.preventDefault(),n(s.error)},s.onsuccess=function(){i(s.result),m(t)}}))}function b(t){return y(t,!1)}function w(t){return y(t,!0)}function x(t,e){if(!t.db)return!0;var i=!t.db.objectStoreNames.contains(t.storeName),n=t.version<t.db.version,r=t.version>t.db.version;if(n&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),r||i){if(i){var o=t.db.version+1;o>t.version&&(t.version=o)}return!0}return!1}function _(t){return o([function(t){for(var e=t.length,i=new ArrayBuffer(e),n=new Uint8Array(i),r=0;r<e;r++)n[r]=t.charCodeAt(r);return i}(atob(t.data))],{type:t.type})}function k(t){return t&&t.__local_forage_encoded_blob}function E(t){var e=this,i=e._initReady().then((function(){var t=d[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady}));return l(i,t,t),i}function S(t,e,i,n){void 0===n&&(n=1);try{var r=t.db.transaction(t.storeName,e);i(null,r)}catch(r){if(n>0&&(!t.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return s.resolve().then((function(){if(!t.db||"NotFoundError"===r.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),w(t)})).then((function(){return function(t){g(t);for(var e=d[t.name],i=e.forages,n=0;n<i.length;n++){var r=i[n];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return t.db=null,b(t).then((function(e){return t.db=e,x(t)?w(t):e})).then((function(n){t.db=e.db=n;for(var r=0;r<i.length;r++)i[r]._dbInfo.db=n})).catch((function(e){throw v(t,e),e}))}(t).then((function(){S(t,e,i,n-1)}))})).catch(i);i(r)}}var T={_driver:"asyncStorage",_initStorage:function(t){var e=this,i={db:null};if(t)for(var n in t)i[n]=t[n];var r=d[i.name];r||(r={forages:[],db:null,dbReady:null,deferredOperations:[]},d[i.name]=r),r.forages.push(e),e._initReady||(e._initReady=e.ready,e.ready=E);var o=[];function a(){return s.resolve()}for(var l=0;l<r.forages.length;l++){var c=r.forages[l];c!==e&&o.push(c._initReady().catch(a))}var h=r.forages.slice(0);return s.all(o).then((function(){return i.db=r.db,b(i)})).then((function(t){return i.db=t,x(i,e._defaultConfig.version)?w(i):t})).then((function(t){i.db=r.db=t,e._dbInfo=i;for(var n=0;n<h.length;n++){var o=h[n];o!==e&&(o._dbInfo.db=i.db,o._dbInfo.version=i.version)}}))},_support:function(){try{if(!r)return!1;var t="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),e="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!t||e)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(t){return!1}}(),iterate:function(t,e){var i=this,n=new s((function(e,n){i.ready().then((function(){S(i._dbInfo,"readonly",(function(r,o){if(r)return n(r);try{var s=o.objectStore(i._dbInfo.storeName).openCursor(),a=1;s.onsuccess=function(){var i=s.result;if(i){var n=i.value;k(n)&&(n=_(n));var r=t(n,i.key,a++);void 0!==r?e(r):i.continue()}else e()},s.onerror=function(){n(s.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},getItem:function(t,e){var i=this;t=c(t);var n=new s((function(e,n){i.ready().then((function(){S(i._dbInfo,"readonly",(function(r,o){if(r)return n(r);try{var s=o.objectStore(i._dbInfo.storeName).get(t);s.onsuccess=function(){var t=s.result;void 0===t&&(t=null),k(t)&&(t=_(t)),e(t)},s.onerror=function(){n(s.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},setItem:function(t,e,i){var n=this;t=c(t);var r=new s((function(i,r){var o;n.ready().then((function(){return o=n._dbInfo,"[object Blob]"===f.call(e)?p(o.db).then((function(t){return t?e:(i=e,new s((function(t,e){var n=new FileReader;n.onerror=e,n.onloadend=function(e){var n=btoa(e.target.result||"");t({__local_forage_encoded_blob:!0,data:n,type:i.type})},n.readAsBinaryString(i)})));var i})):e})).then((function(e){S(n._dbInfo,"readwrite",(function(o,s){if(o)return r(o);try{var a=s.objectStore(n._dbInfo.storeName);null===e&&(e=void 0);var l=a.put(e,t);s.oncomplete=function(){void 0===e&&(e=null),i(e)},s.onabort=s.onerror=function(){var t=l.error?l.error:l.transaction.error;r(t)}}catch(t){r(t)}}))})).catch(r)}));return a(r,i),r},removeItem:function(t,e){var i=this;t=c(t);var n=new s((function(e,n){i.ready().then((function(){S(i._dbInfo,"readwrite",(function(r,o){if(r)return n(r);try{var s=o.objectStore(i._dbInfo.storeName).delete(t);o.oncomplete=function(){e()},o.onerror=function(){n(s.error)},o.onabort=function(){var t=s.error?s.error:s.transaction.error;n(t)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},clear:function(t){var e=this,i=new s((function(t,i){e.ready().then((function(){S(e._dbInfo,"readwrite",(function(n,r){if(n)return i(n);try{var o=r.objectStore(e._dbInfo.storeName).clear();r.oncomplete=function(){t()},r.onabort=r.onerror=function(){var t=o.error?o.error:o.transaction.error;i(t)}}catch(t){i(t)}}))})).catch(i)}));return a(i,t),i},length:function(t){var e=this,i=new s((function(t,i){e.ready().then((function(){S(e._dbInfo,"readonly",(function(n,r){if(n)return i(n);try{var o=r.objectStore(e._dbInfo.storeName).count();o.onsuccess=function(){t(o.result)},o.onerror=function(){i(o.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,t),i},key:function(t,e){var i=this,n=new s((function(e,n){t<0?e(null):i.ready().then((function(){S(i._dbInfo,"readonly",(function(r,o){if(r)return n(r);try{var s=o.objectStore(i._dbInfo.storeName),a=!1,l=s.openCursor();l.onsuccess=function(){var i=l.result;i?0===t||a?e(i.key):(a=!0,i.advance(t)):e(null)},l.onerror=function(){n(l.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},keys:function(t){var e=this,i=new s((function(t,i){e.ready().then((function(){S(e._dbInfo,"readonly",(function(n,r){if(n)return i(n);try{var o=r.objectStore(e._dbInfo.storeName).openCursor(),s=[];o.onsuccess=function(){var e=o.result;e?(s.push(e.key),e.continue()):t(s)},o.onerror=function(){i(o.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,t),i},dropInstance:function(t,e){e=h.apply(this,arguments);var i=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||i.name,t.storeName=t.storeName||i.storeName);var n,o=this;if(t.name){var l=t.name===i.name&&o._dbInfo.db,c=l?s.resolve(o._dbInfo.db):b(t).then((function(e){var i=d[t.name],n=i.forages;i.db=e;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=e;return e}));n=t.storeName?c.then((function(e){if(e.objectStoreNames.contains(t.storeName)){var i=e.version+1;g(t);var n=d[t.name],o=n.forages;e.close();for(var a=0;a<o.length;a++){var l=o[a];l._dbInfo.db=null,l._dbInfo.version=i}return new s((function(e,n){var o=r.open(t.name,i);o.onerror=function(t){o.result.close(),n(t)},o.onupgradeneeded=function(){o.result.deleteObjectStore(t.storeName)},o.onsuccess=function(){var t=o.result;t.close(),e(t)}})).then((function(t){n.db=t;for(var e=0;e<o.length;e++){var i=o[e];i._dbInfo.db=t,m(i._dbInfo)}})).catch((function(e){throw(v(t,e)||s.resolve()).catch((function(){})),e}))}})):c.then((function(e){g(t);var i=d[t.name],n=i.forages;e.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new s((function(e,i){var n=r.deleteDatabase(t.name);n.onerror=n.onblocked=function(t){var e=n.result;e&&e.close(),i(t)},n.onsuccess=function(){var t=n.result;t&&t.close(),e(t)}})).then((function(t){i.db=t;for(var e=0;e<n.length;e++)m(n[e]._dbInfo)})).catch((function(e){throw(v(t,e)||s.resolve()).catch((function(){})),e}))}))}else n=s.reject("Invalid arguments");return a(n,e),n}},C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O=/^~~local_forage_type~([^~]+)~/,A="__lfsc__:".length,N=A+"arbf".length,I=Object.prototype.toString;function R(t){var e,i,n,r,o,s=.75*t.length,a=t.length,l=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var c=new ArrayBuffer(s),h=new Uint8Array(c);for(e=0;e<a;e+=4)i=C.indexOf(t[e]),n=C.indexOf(t[e+1]),r=C.indexOf(t[e+2]),o=C.indexOf(t[e+3]),h[l++]=i<<2|n>>4,h[l++]=(15&n)<<4|r>>2,h[l++]=(3&r)<<6|63&o;return c}function j(t){var e,i=new Uint8Array(t),n="";for(e=0;e<i.length;e+=3)n+=C[i[e]>>2],n+=C[(3&i[e])<<4|i[e+1]>>4],n+=C[(15&i[e+1])<<2|i[e+2]>>6],n+=C[63&i[e+2]];return i.length%3==2?n=n.substring(0,n.length-1)+"=":i.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var L={serialize:function(t,e){var i="";if(t&&(i=I.call(t)),t&&("[object ArrayBuffer]"===i||t.buffer&&"[object ArrayBuffer]"===I.call(t.buffer))){var n,r="__lfsc__:";t instanceof ArrayBuffer?(n=t,r+="arbf"):(n=t.buffer,"[object Int8Array]"===i?r+="si08":"[object Uint8Array]"===i?r+="ui08":"[object Uint8ClampedArray]"===i?r+="uic8":"[object Int16Array]"===i?r+="si16":"[object Uint16Array]"===i?r+="ur16":"[object Int32Array]"===i?r+="si32":"[object Uint32Array]"===i?r+="ui32":"[object Float32Array]"===i?r+="fl32":"[object Float64Array]"===i?r+="fl64":e(new Error("Failed to get type for BinaryArray"))),e(r+j(n))}else if("[object Blob]"===i){var o=new FileReader;o.onload=function(){var i="~~local_forage_type~"+t.type+"~"+j(this.result);e("__lfsc__:blob"+i)},o.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(i){console.error("Couldn't convert value into a JSON string: ",t),e(null,i)}},deserialize:function(t){if("__lfsc__:"!==t.substring(0,A))return JSON.parse(t);var e,i=t.substring(N),n=t.substring(A,N);if("blob"===n&&O.test(i)){var r=i.match(O);e=r[1],i=i.substring(r[0].length)}var s=R(i);switch(n){case"arbf":return s;case"blob":return o([s],{type:e});case"si08":return new Int8Array(s);case"ui08":return new Uint8Array(s);case"uic8":return new Uint8ClampedArray(s);case"si16":return new Int16Array(s);case"ur16":return new Uint16Array(s);case"si32":return new Int32Array(s);case"ui32":return new Uint32Array(s);case"fl32":return new Float32Array(s);case"fl64":return new Float64Array(s);default:throw new Error("Unkown type: "+n)}},stringToBuffer:R,bufferToString:j};function z(t,e,i,n){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],i,n)}function D(t,e,i,n,r,o){t.executeSql(i,n,r,(function(t,s){s.code===s.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,a){a.rows.length?o(t,s):z(t,e,(function(){t.executeSql(i,n,r,o)}),o)}),o):o(t,s)}),o)}function P(t,e,i,n){var r=this;t=c(t);var o=new s((function(o,s){r.ready().then((function(){void 0===e&&(e=null);var a=e,l=r._dbInfo;l.serializer.serialize(e,(function(e,c){c?s(c):l.db.transaction((function(i){D(i,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[t,e],(function(){o(a)}),(function(t,e){s(e)}))}),(function(e){if(e.code===e.QUOTA_ERR){if(n>0)return void o(P.apply(r,[t,a,i,n-1]));s(e)}}))}))})).catch(s)}));return a(o,i),o}function B(t){return new s((function(e,i){t.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(i,n){for(var r=[],o=0;o<n.rows.length;o++)r.push(n.rows.item(o).name);e({db:t,storeNames:r})}),(function(t,e){i(e)}))}),(function(t){i(t)}))}))}var M={_driver:"webSQLStorage",_initStorage:function(t){var e=this,i={db:null};if(t)for(var n in t)i[n]="string"!=typeof t[n]?t[n].toString():t[n];var r=new s((function(t,n){try{i.db=openDatabase(i.name,String(i.version),i.description,i.size)}catch(t){return n(t)}i.db.transaction((function(r){z(r,i,(function(){e._dbInfo=i,t()}),(function(t,e){n(e)}))}),n)}));return i.serializer=L,r},_support:"function"==typeof openDatabase,iterate:function(t,e){var i=this,n=new s((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){D(i,r,"SELECT * FROM "+r.storeName,[],(function(i,n){for(var o=n.rows,s=o.length,a=0;a<s;a++){var l=o.item(a),c=l.value;if(c&&(c=r.serializer.deserialize(c)),void 0!==(c=t(c,l.key,a+1)))return void e(c)}e()}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},getItem:function(t,e){var i=this;t=c(t);var n=new s((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){D(i,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[t],(function(t,i){var n=i.rows.length?i.rows.item(0).value:null;n&&(n=r.serializer.deserialize(n)),e(n)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},setItem:function(t,e,i){return P.apply(this,[t,e,i,1])},removeItem:function(t,e){var i=this;t=c(t);var n=new s((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){D(i,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[t],(function(){e()}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},clear:function(t){var e=this,i=new s((function(t,i){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){D(e,n,"DELETE FROM "+n.storeName,[],(function(){t()}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,t),i},length:function(t){var e=this,i=new s((function(t,i){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){D(e,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(e,i){var n=i.rows.item(0).c;t(n)}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,t),i},key:function(t,e){var i=this,n=new s((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){D(i,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[t+1],(function(t,i){var n=i.rows.length?i.rows.item(0).key:null;e(n)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},keys:function(t){var e=this,i=new s((function(t,i){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){D(e,n,"SELECT key FROM "+n.storeName,[],(function(e,i){for(var n=[],r=0;r<i.rows.length;r++)n.push(i.rows.item(r).key);t(n)}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,t),i},dropInstance:function(t,e){e=h.apply(this,arguments);var i=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||i.name,t.storeName=t.storeName||i.storeName);var n,r=this;return a(n=t.name?new s((function(e){var n;n=t.name===i.name?r._dbInfo.db:openDatabase(t.name,"","",0),t.storeName?e({db:n,storeNames:[t.storeName]}):e(B(n))})).then((function(t){return new s((function(e,i){t.db.transaction((function(n){function r(t){return new s((function(e,i){n.executeSql("DROP TABLE IF EXISTS "+t,[],(function(){e()}),(function(t,e){i(e)}))}))}for(var o=[],a=0,l=t.storeNames.length;a<l;a++)o.push(r(t.storeNames[a]));s.all(o).then((function(){e()})).catch((function(t){i(t)}))}),(function(t){i(t)}))}))})):s.reject("Invalid arguments"),e),n}};function F(t,e){var i=t.name+"/";return t.storeName!==e.storeName&&(i+=t.storeName+"/"),i}function q(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(t){return!0}}()||localStorage.length>0}var U={_driver:"localStorageWrapper",_initStorage:function(t){var e={};if(t)for(var i in t)e[i]=t[i];return e.keyPrefix=F(t,this._defaultConfig),q()?(this._dbInfo=e,e.serializer=L,s.resolve()):s.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}(),iterate:function(t,e){var i=this,n=i.ready().then((function(){for(var e=i._dbInfo,n=e.keyPrefix,r=n.length,o=localStorage.length,s=1,a=0;a<o;a++){var l=localStorage.key(a);if(0===l.indexOf(n)){var c=localStorage.getItem(l);if(c&&(c=e.serializer.deserialize(c)),void 0!==(c=t(c,l.substring(r),s++)))return c}}}));return a(n,e),n},getItem:function(t,e){var i=this;t=c(t);var n=i.ready().then((function(){var e=i._dbInfo,n=localStorage.getItem(e.keyPrefix+t);return n&&(n=e.serializer.deserialize(n)),n}));return a(n,e),n},setItem:function(t,e,i){var n=this;t=c(t);var r=n.ready().then((function(){void 0===e&&(e=null);var i=e;return new s((function(r,o){var s=n._dbInfo;s.serializer.serialize(e,(function(e,n){if(n)o(n);else try{localStorage.setItem(s.keyPrefix+t,e),r(i)}catch(t){"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||o(t),o(t)}}))}))}));return a(r,i),r},removeItem:function(t,e){var i=this;t=c(t);var n=i.ready().then((function(){var e=i._dbInfo;localStorage.removeItem(e.keyPrefix+t)}));return a(n,e),n},clear:function(t){var e=this,i=e.ready().then((function(){for(var t=e._dbInfo.keyPrefix,i=localStorage.length-1;i>=0;i--){var n=localStorage.key(i);0===n.indexOf(t)&&localStorage.removeItem(n)}}));return a(i,t),i},length:function(t){var e=this.keys().then((function(t){return t.length}));return a(e,t),e},key:function(t,e){var i=this,n=i.ready().then((function(){var e,n=i._dbInfo;try{e=localStorage.key(t)}catch(t){e=null}return e&&(e=e.substring(n.keyPrefix.length)),e}));return a(n,e),n},keys:function(t){var e=this,i=e.ready().then((function(){for(var t=e._dbInfo,i=localStorage.length,n=[],r=0;r<i;r++){var o=localStorage.key(r);0===o.indexOf(t.keyPrefix)&&n.push(o.substring(t.keyPrefix.length))}return n}));return a(i,t),i},dropInstance:function(t,e){if(e=h.apply(this,arguments),!(t="function"!=typeof t&&t||{}).name){var i=this.config();t.name=t.name||i.name,t.storeName=t.storeName||i.storeName}var n,r=this;return a(n=t.name?new s((function(e){t.storeName?e(F(t,r._defaultConfig)):e(t.name+"/")})).then((function(t){for(var e=localStorage.length-1;e>=0;e--){var i=localStorage.key(e);0===i.indexOf(t)&&localStorage.removeItem(i)}})):s.reject("Invalid arguments"),e),n}},W=function(t,e){for(var i,n,r=t.length,o=0;o<r;){if((i=t[o])===(n=e)||"number"==typeof i&&"number"==typeof n&&isNaN(i)&&isNaN(n))return!0;o++}return!1},$=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},H={},X={},Y={INDEXEDDB:T,WEBSQL:M,LOCALSTORAGE:U},V=[Y.INDEXEDDB._driver,Y.WEBSQL._driver,Y.LOCALSTORAGE._driver],Z=["dropInstance"],G=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Z),K={description:"",driver:V.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function J(t,e){t[e]=function(){var i=arguments;return t.ready().then((function(){return t[e].apply(t,i)}))}}function Q(){for(var t=1;t<arguments.length;t++){var e=arguments[t];if(e)for(var i in e)e.hasOwnProperty(i)&&($(e[i])?arguments[0][i]=e[i].slice():arguments[0][i]=e[i])}return arguments[0]}var tt=new(function(){function t(e){for(var i in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Y)if(Y.hasOwnProperty(i)){var n=Y[i],r=n._driver;this[i]=r,H[r]||this.defineDriver(n)}this._defaultConfig=Q({},K),this._config=Q({},this._defaultConfig,e),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return t.prototype.config=function(t){if("object"===(void 0===t?"undefined":n(t))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var e in t){if("storeName"===e&&(t[e]=t[e].replace(/\W/g,"_")),"version"===e&&"number"!=typeof t[e])return new Error("Database version must be a number.");this._config[e]=t[e]}return!("driver"in t)||!t.driver||this.setDriver(this._config.driver)}return"string"==typeof t?this._config[t]:this._config},t.prototype.defineDriver=function(t,e,i){var n=new s((function(e,i){try{var n=t._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver)return void i(r);for(var o=G.concat("_initStorage"),l=0,c=o.length;l<c;l++){var h=o[l];if((!W(Z,h)||t[h])&&"function"!=typeof t[h])return void i(r)}!function(){for(var e=function(t){return function(){var e=new Error("Method "+t+" is not implemented by the current driver"),i=s.reject(e);return a(i,arguments[arguments.length-1]),i}},i=0,n=Z.length;i<n;i++){var r=Z[i];t[r]||(t[r]=e(r))}}();var u=function(i){H[n]&&console.info("Redefining LocalForage driver: "+n),H[n]=t,X[n]=i,e()};"_support"in t?t._support&&"function"==typeof t._support?t._support().then(u,i):u(!!t._support):u(!0)}catch(t){i(t)}}));return l(n,e,i),n},t.prototype.driver=function(){return this._driver||null},t.prototype.getDriver=function(t,e,i){var n=H[t]?s.resolve(H[t]):s.reject(new Error("Driver not found."));return l(n,e,i),n},t.prototype.getSerializer=function(t){var e=s.resolve(L);return l(e,t),e},t.prototype.ready=function(t){var e=this,i=e._driverSet.then((function(){return null===e._ready&&(e._ready=e._initDriver()),e._ready}));return l(i,t,t),i},t.prototype.setDriver=function(t,e,i){var n=this;$(t)||(t=[t]);var r=this._getSupportedDrivers(t);function o(){n._config.driver=n.driver()}function a(t){return n._extend(t),o(),n._ready=n._initStorage(n._config),n._ready}var c=null!==this._driverSet?this._driverSet.catch((function(){return s.resolve()})):s.resolve();return this._driverSet=c.then((function(){var t=r[0];return n._dbInfo=null,n._ready=null,n.getDriver(t).then((function(t){n._driver=t._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(t){return function(){var e=0;return function i(){for(;e<t.length;){var r=t[e];return e++,n._dbInfo=null,n._ready=null,n.getDriver(r).then(a).catch(i)}o();var l=new Error("No available storage method found.");return n._driverSet=s.reject(l),n._driverSet}()}}(r)}))})).catch((function(){o();var t=new Error("No available storage method found.");return n._driverSet=s.reject(t),n._driverSet})),l(this._driverSet,e,i),this._driverSet},t.prototype.supports=function(t){return!!X[t]},t.prototype._extend=function(t){Q(this,t)},t.prototype._getSupportedDrivers=function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];this.supports(r)&&e.push(r)}return e},t.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,e=G.length;t<e;t++)J(this,G[t])},t.prototype.createInstance=function(e){return new t(e)},t}());e.exports=tt},{3:3}]},{},[4])(4)}).call(this,i(30))},function(t,e,i){"use strict";i(24),i(14);var n=i(3),r=i.n(n),o=i(0),s=i(5),a=i(4),l=i(2),c=i(6),h=i(11);i(20);var u=function(t,e,i,n){var r,s="undefined"!=typeof window&&window.URL,l=s?"blob":"arraybuffer",c=new o.defer,h=new XMLHttpRequest,u=XMLHttpRequest.prototype;for(r in"overrideMimeType"in u||Object.defineProperty(u,"overrideMimeType",{value:function(){}}),i&&(h.withCredentials=!0),h.onreadystatechange=function(){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 c.reject({status:this.status,message:"Empty Response",stack:(new Error).stack}),c.promise;if(403===this.status)return c.reject({status:this.status,response:this.response,message:"Forbidden",stack:(new Error).stack}),c.promise;i=t?this.responseXML:Object(o.isXml)(e)?Object(o.parse)(this.response,"text/xml"):"xhtml"==e?Object(o.parse)(this.response,"application/xhtml+xml"):"html"==e||"htm"==e?Object(o.parse)(this.response,"text/html"):"json"==e?JSON.parse(this.response):"blob"==e?s?this.response:new Blob([this.response]):this.response,c.resolve(i)}else c.reject({status:this.status,message:this.response,stack:(new Error).stack})}},h.onerror=function(t){c.reject(t)},h.open("GET",t,!0),n)h.setRequestHeader(r,n[r]);return"json"==e&&h.setRequestHeader("Accept","application/json"),e||(e=new a.a(t).extension),"blob"==e&&(h.responseType=l),Object(o.isXml)(e)&&h.overrideMimeType("text/xml"),"binary"==e&&(h.responseType="arraybuffer"),h.send(),c.promise},d=i(38);var f=class{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 c.a(this),this.hooks.content=new c.a(this)),this.document=void 0,this.contents=void 0,this.output=void 0}load(t){var e=t||this.request||u,i=new o.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(h.a)(this.document,this)}render(t){var e=new o.defer,i=e.promise;return this.output,this.load(t).then(function(t){var e=("undefined"!=typeof navigator&&navigator.userAgent||"").indexOf("Trident")>=0,i=new("undefined"==typeof XMLSerializer||e?d.XMLDOMParser:XMLSerializer);return this.output=i.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();return Object(o.sprint)(e.document,(function(t){!function(t){for(var r,o,s,a=t.textContent.toLowerCase(),l=e.document.createRange(),c=-1;-1!=o;)-1!=(o=a.indexOf(n,c+1))&&((l=e.document.createRange()).setStart(t,o),l.setEnd(t,o+n.length),r=e.cfiFromRange(l),s=t.textContent.length<150?t.textContent:"..."+(s=t.textContent.substring(o-75,o+75))+"...",i.push({cfi:r,excerpt:s})),c=o}(t)})),i}search(t,e=5){if(void 0===document.createTreeWalker)return this.find(t);let i=[];const n=this,r=t.toLowerCase(),o=function(t){const e=t.reduce((t,e)=>t+e.textContent,"").toLowerCase().indexOf(r);if(-1!=e){const o=0,s=e+r.length;let a=0,l=0;if(e<t[o].length){let r;for(;a<t.length-1&&(l+=t[a].length,!(s<=l));)a+=1;let c=t[o],h=t[a],u=n.document.createRange();u.setStart(c,e);let d=t.slice(0,a).reduce((t,e)=>t+e.textContent.length,0);u.setEnd(h,d>s?s:s-d),r=n.cfiFromRange(u);let f=t.slice(0,a+1).reduce((t,e)=>t+e.textContent,"");f.length>150&&(f=f.substring(e-75,e+75),f="..."+f+"..."),i.push({cfi:r,excerpt:f})}}},s=document.createTreeWalker(n.document,NodeFilter.SHOW_TEXT,null,!1);let a,l=[];for(;a=s.nextNode();)l.push(a),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:",""),o=r.indexOf("-");-1!=o&&(i=r.slice(0,o),n=r.slice(o+1),e[i]=n)})),e}cfiFromRange(t){return new l.a(t,this.cfiBase).toString()}cfiFromElement(t){return new l.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 p=class{constructor(){this.spineItems=[],this.spineByHref={},this.spineById={},this.hooks={},this.hooks.serialize=new c.a,this.hooks.content=new c.a,this.hooks.content.register(h.a),this.hooks.content.register(h.b),this.hooks.content.register(h.d),this.epubcfi=new l.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,o=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)),o&&(t.href=o.href,t.url=e(t.href,!0),t.canonical=i(t.href),o.properties.length&&t.properties.push.apply(t.properties,o.properties)),"yes"===t.linear?(t.prev=function(){let e=t.index;for(;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;for(;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 f(t,this.hooks),this.append(r)}),this.loaded=!0}get(t){var e=0;if(void 0===t)for(;e<this.spineItems.length;){let t=this.spineItems[e];if(t&&t.linear)break;e+=1}else if(this.epubcfi.isCfiString(t)){e=new l.a(t).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}},g=i(21),m=i(1);class v{constructor(t,e,i){this.spine=t,this.request=e,this.pause=i||100,this.q=new g.a(this),this.epubcfi=new l.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 o.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,s=[],a=t.ownerDocument,c=Object(o.qs)(a,"body"),h=0,u=i||this.break;if(Object(o.sprint)(c,function(t){var i,o=t.length,a=0;if(0===t.textContent.trim().length)return!1;for(0==h&&((n=this.createRange()).startContainer=t,n.startOffset=0),(i=u-h)>o&&(h+=o,a=o);a<o;)if(i=u-h,0===h&&(a+=1,(n=this.createRange()).startContainer=t,n.startOffset=a),a+i>=o)h+=o-a,a=o;else{a+=i,n.endContainer=t,n.endOffset=a;let r=new l.a(n,e).toString();s.push(r),h=0}r=t}.bind(this)),n&&n.startContainer&&r){n.endContainer=r,n.endOffset=r.length;let t=new l.a(n,e).toString();s.push(t),h=0}return s}generateFromWords(t,e,i){var n=t?new l.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 s=new o.defer,a=this.parseWords(r,t,e,i),l=n-this._locationsWords.length;return this._locationsWords=this._locationsWords.concat(a.length>=n?a.slice(0,l):a),t.unload(),this.processingTimeout=setTimeout(()=>s.resolve(a),this.pause),s.promise}.bind(this))}countWords(t){return(t=(t=(t=t.replace(/(^\s*)|(\s*$)/gi,"")).replace(/[ ]{2,}/gi," ")).replace(/\n /,"\n")).split(" ").length}parseWords(t,e,i,n){var r,s=e.cfiBase,a=[],c=t.ownerDocument,h=Object(o.qs)(c,"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));return Object(o.sprint)(h,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;for((e=u-this._wordCounter)>i&&(this._wordCounter+=i,n=i);n<i;)if(n+(e=u-this._wordCounter)>=i)this._wordCounter+=i-n,n=i;else{n+=e;let i=new l.a(t,s);a.push({cfi:i.toString(),wordCount:this._wordCounter}),this._wordCounter=0}t}.bind(this)),a}locationFromCfi(t){let e;return l.a.prototype.isCfiString(t)&&(t=new l.a(t)),0===this._locations.length?-1:(e=Object(o.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 l.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(m.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()(v.prototype);var y=v,b=i(9),w=i.n(b);var x=class{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(o.qs)(t,"rootfile")))throw new Error("No RootFile Found");this.packagePath=e.getAttribute("full-path"),this.directory=w.a.dirname(this.packagePath),this.encoding=t.xmlEncoding}destroy(){this.packagePath=void 0,this.directory=void 0,this.encoding=void 0}};var _=class{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(o.qs)(t,"metadata")))throw new Error("No Metadata Found");if(!(i=Object(o.qs)(t,"manifest")))throw new Error("No Manifest Found");if(!(n=Object(o.qs)(t,"spine")))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(o.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(o.qsa)(t,"item");return Array.prototype.slice.call(i).forEach((function(t){var i=t.getAttribute("id"),n=t.getAttribute("href")||"",r=t.getAttribute("media-type")||"",o=t.getAttribute("media-overlay")||"",s=t.getAttribute("properties")||"";e[i]={href:n,type:r,overlay:o,properties:s.length?s.split(" "):[]}})),e}parseSpine(t,e){var i=[],n=Object(o.qsa)(t,"itemref");return Array.prototype.slice.call(n).forEach((function(t,e){var n=t.getAttribute("idref"),r=t.getAttribute("properties")||"",o=r.length?r.split(" "):[],s={idref:n,linear:t.getAttribute("linear")||"yes",properties:o,index:e};i.push(s)})),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(o.qsp)(t,"item",{properties:"nav"});return!!e&&e.getAttribute("href")}findNcxPath(t,e){var i,n=Object(o.qsp)(t,"item",{"media-type":"application/x-dtbncx+xml"});return n||(i=e.getAttribute("toc"))&&(n=t.querySelector("#"+i)),!!n&&n.getAttribute("href")}findCoverPath(t){Object(o.qs)(t,"package").getAttribute("version");var e=Object(o.qsp)(t,"item",{properties:"cover-image"});if(e)return e.getAttribute("href");var i=Object(o.qsp)(t,"meta",{name:"cover"});if(i){var n=i.getAttribute("content"),r=t.getElementById(n);return r?r.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]).childNodes.length?i.childNodes[0].nodeValue:""}getPropertyText(t,e){var i=Object(o.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 k=class{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(o.qs)(t,"html"),i=Object(o.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]).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&&(n=this.getByIndex(t,e,i[r].subitems),!n);++r);return n}return n}landmark(t){var e;return t?(e=this.landmarksByType[t],this.landmarks[e]):this.landmarks}parseNav(t){var e=Object(o.querySelectorByType)(t,"nav","toc"),i=[];if(!e)return i;let n=Object(o.filterChildren)(e,"ol",!0);return n?i=this.parseNavList(n):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(o.filterChildren)(t,"a",!0);if(!n)return;let r=n.getAttribute("href")||"";i||(i=r);let s=n.textContent||"",a=[],l=Object(o.filterChildren)(t,"ol",!0);return l&&(a=this.parseNavList(l,i)),{id:i,href:r,label:s,subitems:a,parent:e}}parseLandmarks(t){var e,i,n=Object(o.querySelectorByType)(t,"nav","landmarks"),r=n?Object(o.qsa)(n,"li"):[],s=r.length,a=[];if(!r||0===s)return a;for(e=0;e<s;++e)(i=this.landmarkItem(r[e]))&&(a.push(i),this.landmarksByType[i.type]=e);return a}landmarkItem(t){let e=Object(o.filterChildren)(t,"a",!0);if(!e)return;let i=e.getAttributeNS("http://www.idpf.org/2007/ops","type")||void 0;return{href:e.getAttribute("href")||"",label:e.textContent||"",type:i}}parseNcx(t){var e,i,n=Object(o.qsa)(t,"navPoint"),r=n.length,s={},a=[];if(!n||0===r)return a;for(e=0;e<r;++e)s[(i=this.ncxItem(n[e])).id]=i,i.parent?s[i.parent].subitems.push(i):a.push(i);return a}ncxItem(t){var e,i=t.getAttribute("id")||!1,n=Object(o.qs)(t,"content").getAttribute("src"),r=Object(o.qs)(t,"navLabel"),s=r.textContent?r.textContent:"",a=t.parentNode;return!a||"navPoint"!==a.nodeName&&"navPoint"!==a.nodeName.split(":").slice(-1)[0]||(e=a.getAttribute("id")),{id:i,href:n,label:s,subitems:[],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)}},E={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"}},S=function(){var t,e,i,n,r={};for(t in E)if(E.hasOwnProperty(t))for(e in E[t])if(E[t].hasOwnProperty(e))if("string"==typeof(i=E[t][e]))r[i]=t+"/"+e;else for(n=0;n<i.length;n++)r[i[n]]=t+"/"+e;return r}();var T={lookup:function(t){return t&&S[t.split(".").pop().toLowerCase()]||"text/plain"}};var C=class{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 s.a(t),i=T.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(o.blob2base64)(t)).then(t=>Object(o.createBase64Url)(t,i)):this.settings.request(t,"blob").then(t=>Object(o.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){if(w.a.isAbsolute(t))return new Promise((function(t){t()}));var e,i=this.settings.resolver(t);e=this.settings.archive?this.settings.archive.getText(i):this.settings.request(i,"text");var n=this.urls.map(t=>{var e=this.settings.resolver(t);return new a.a(i).relative(e)});return e?e.then(t=>(t=Object(h.e)(t,n,this.replacementUrls),"base64"===this.settings.replacements?Object(o.createBase64Url)(t,"text/css"):Object(o.createBlobUrl)(t,"text/css")),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);return new a.a(t).relative(n)}.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(h.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 O=class{constructor(t){this.pages=[],this.locations=[],this.epubcfi=new l.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(o.qs)(t,"html"),i=Object(o.qs)(t,"ncx");return e?this.parseNav(t):i?this.parseNcx(t):void 0}parseNav(t){var e,i,n=Object(o.querySelectorByType)(t,"nav","page-list"),r=n?Object(o.qsa)(n,"li"):[],s=r.length,a=[];if(!r||0===s)return a;for(e=0;e<s;++e)i=this.item(r[e]),a.push(i);return a}parseNcx(t){var e,i,n,r,s=[],a=0;if(!(i=Object(o.qs)(t,"pageList")))return s;if(r=(n=Object(o.qsa)(i,"pageTarget")).length,!n||0===n.length)return s;for(a=0;a<r;++a)e=this.ncxItem(n[a]),s.push(e);return s}ncxItem(t){var e=Object(o.qs)(t,"navLabel"),i=Object(o.qs)(e,"text").textContent;return{href:Object(o.qs)(t,"content").getAttribute("src"),page:parseInt(i,10)}}item(t){var e,i,n=Object(o.qs)(t,"a"),r=n.getAttribute("href")||"",s=n.textContent||"",a=parseInt(s);return-1!=r.indexOf("epubcfi")?(i=(e=r.split("#"))[0],{cfi:e.length>1&&e[1],href:r,packageUrl:i,page:a}):{href:r,page:a}}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(o.indexOfSorted)(t,this.locations,this.epubcfi.compare);return-1!=i?e=this.pages[i]:void 0!==(e=(i=Object(o.locationOf)(t,this.locations,this.epubcfi.compare))-1>=0?this.pages[i-1]:this.pages[0])||(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){return Math.round(this.totalPages*t)}percentageFromPage(t){var e=(t-this.firstPage)/this.totalPages;return Math.round(1e3*e)/1e3}percentageFromCfi(t){var e=this.pageFromCfi(t);return this.percentageFromPage(e)}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}},A=i(39),N=i(85),I=i.n(N);var R=class{constructor(){this.zip=void 0,this.urlCache={},this.checkRequirements()}checkRequirements(){try{this.zip=new I.a}catch(t){throw new Error("JSZip lib not loaded")}}open(t,e){return this.zip.loadAsync(t,{base64:e})}openUrl(t,e){return u(t,"binary").then(function(t){return this.zip.loadAsync(t,{base64:e})}.bind(this))}request(t,e){var i,n=new o.defer,r=new a.a(t);return e||(e=r.extension),(i="blob"==e?this.getBlob(t):this.getText(t))?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){return"json"==e?JSON.parse(t):Object(o.isXml)(e)?Object(o.parse)(t,"text/xml"):"xhtml"==e?Object(o.parse)(t,"application/xhtml+xml"):"html"==e||"htm"==e?Object(o.parse)(t,"text/html"):t}getBlob(t,e){var i=window.decodeURIComponent(t.substr(1)),n=this.zip.file(i);if(n)return e=e||T.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||T.lookup(n.name),n.async("base64").then((function(t){return"data:"+e+";base64,"+t}))}createUrl(t,e){var i,n,r=new o.defer,s=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.then(function(e){this.urlCache[t]=e,r.resolve(e)}.bind(this)):(n=this.getBlob(t))&&n.then(function(e){i=s.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={}}},j=i(57),L=i.n(j);class z{constructor(t,e,i){this.urlCache={},this.storage=void 0,this.name=t,this.requester=e||u,this.resolver=i,this.online=!0,this.checkRequirements(),this.addListeners()}checkRequirements(){try{let t;void 0===L.a&&(t=L.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 o.defer;var i=new a.a(t);return e||(e=i.extension),("blob"==e?this.getBlob(t):this.getText(t)).then(i=>{var n,r=new o.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){return"json"==e?JSON.parse(t):Object(o.isXml)(e)?Object(o.parse)(t,"text/xml"):"xhtml"==e?Object(o.parse)(t,"application/xhtml+xml"):"html"==e||"htm"==e?Object(o.parse)(t,"text/html"):t}getBlob(t,e){let i=window.encodeURIComponent(t);return this.storage.getItem(i).then((function(i){if(i)return e=e||T.lookup(t),new Blob([i],{type:e})}))}getText(t,e){let i=window.encodeURIComponent(t);return e=e||T.lookup(t),this.storage.getItem(i).then((function(t){var i,n=new o.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||T.lookup(t),this.storage.getItem(i).then(t=>{var i,n=new o.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 o.defer,s=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.then(function(e){this.urlCache[t]=e,r.resolve(e)}.bind(this)):(n=this.getBlob(t))&&n.then(function(e){i=s.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()(z.prototype);var D=z;var P=class{constructor(t){this.interactive="",this.fixedLayout="",this.openToSpread="",this.orientationLock="",t&&this.parse(t)}parse(t){if(!t)return this;const e=Object(o.qs)(t,"display_options");if(!e)return this;return Object(o.qsa)(e,"option").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}}),this}destroy(){this.interactive=void 0,this.fixedLayout=void 0,this.openToSpread=void 0,this.orientationLock=void 0}};const B="binary",M="base64",F="epub",q="opf",U="json",W="directory";class ${constructor(t,e){void 0===e&&"string"!=typeof t&&t instanceof Blob==!1&&t instanceof ArrayBuffer==!1&&(e=t,t=void 0),this.settings=Object(o.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(o.extend)(this.settings,e),this.opening=new o.defer,this.opened=this.opening.promise,this.isOpen=!1,this.loading={manifest:new o.defer,spine:new o.defer,metadata:new o.defer,cover:new o.defer,navigation:new o.defer,pageList:new o.defer,resources:new o.defer,displayOptions:new o.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||u,this.spine=new p,this.locations=new y(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(m.c.BOOK.OPEN_FAILED,i)})}open(t,e){var i,n=e||this.determineType(t);return n===B?(this.archived=!0,this.url=new s.a("/",""),i=this.openEpub(t)):n===M?(this.archived=!0,this.url=new s.a("/",""),i=this.openEpub(t,n)):n===F?(this.archived=!0,this.url=new s.a("/",""),i=this.request(t,"binary",this.settings.requestCredentials,this.settings.requestHeaders).then(this.openEpub.bind(this))):n==q?(this.url=new s.a(t),i=this.openPackaging(this.url.Path.toString())):n==U?(this.url=new s.a(t),i=this.openManifest(this.url.Path.toString())):(this.url=new s.a(t),i=this.openContainer("META-INF/container.xml").then(this.openPackaging.bind(this))),i}openEpub(t,e){return this.unarchive(t,e||this.settings.encoding).then(()=>this.openContainer("META-INF/container.xml")).then(t=>this.openPackaging(t))}openContainer(t){return this.load(t).then(t=>(this.container=new x(t),this.resolve(this.container.packagePath)))}openPackaging(t){return this.path=new a.a(t),this.load(t).then(t=>(this.packaging=new _(t),this.unpack(this.packaging)))}openManifest(t){return this.path=new a.a(t),this.load(t).then(t=>(this.packaging=new _,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;return t.indexOf("://")>-1?t:(this.path&&(i=this.path.resolve(t)),0!=e&&this.url&&(i=this.url.resolve(i)),i)}}canonical(t){return t?this.settings.canonical?this.settings.canonical(t):this.resolve(t,!0):""}determineType(t){var e;return"base64"===this.settings.encoding?M:"string"!=typeof t?B:((e=new s.a(t).path().extension)&&(e=e.replace(/\?.*$/,"")),e?"epub"===e?F:"opf"===e?q:"json"===e?U:void 0:W)}unpack(t){this.package=t,""===this.packaging.metadata.layout?this.load(this.url.resolve("META-INF/com.apple.ibooks.display-options.xml")).then(t=>{this.displayOptions=new P(t),this.loading.displayOptions.resolve(this.displayOptions)}).catch(t=>{this.displayOptions=new P,this.loading.displayOptions.resolve(this.displayOptions)}):(this.displayOptions=new P,this.loading.displayOptions.resolve(this.displayOptions)),this.spine.unpack(this.packaging,this.resolve.bind(this),this.canonical.bind(this)),this.resources=new C(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 k(i),t.pageList&&(this.pageList=new O(t.pageList)),e(this.navigation)}):e?this.load(e,"xml").then(t=>(this.navigation=new k(t),this.pageList=new O(t),this.navigation)):new Promise((t,e)=>{this.navigation=new k,this.pageList=new O,t(this.navigation)})}section(t){return this.spine.get(t)}renderTo(t,e){return this.rendition=new A.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 R,this.archive.open(t,e)}store(t){let e=this.settings.replacements&&"none"!==this.settings.replacements,i=this.url,n=this.settings.requestMethod||u.bind(this);return this.storage=new D(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 s.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 l.a(t),i=this.spine.get(e.spinePos),n=this.load.bind(this);return i?i.load(n).then((function(t){return e.toRange(i.document)})):new Promise((t,e)=>{e("CFI could not be found")})}key(t){var e=t||this.packaging.metadata.identifier||this.url.filename;return`epubjs:${m.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()($.prototype);e.a=$},function(t,e,i){var n=i(16),r=i(60),o=i(25),s=i(32),a=i(41),l=i(10),c=i(62),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=s(t),e=a(e,!0),c)try{return h(t,e)}catch(t){}if(l(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,i){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},function(t,e,i){var n=i(12),r=i(40),o="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==r(t)?o.call(t,""):Object(t)}:Object},function(t,e,i){var n=i(16),r=i(12),o=i(63);t.exports=!n&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,i){var n=i(7),r=i(17),o=n.document,s=r(o)&&r(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},function(t,e,i){var n=i(65),r=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return r.call(t)}),t.exports=n.inspectSource},function(t,e,i){var n=i(7),r=i(42),o=n["__core-js_shared__"]||r("__core-js_shared__",{});t.exports=o},function(t,e,i){var n=i(34),r=i(65);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){var i=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++i+n).toString(36)}},function(t,e,i){var n=i(10),r=i(32),o=i(94).indexOf,s=i(44);t.exports=function(t,e){var i,a=r(t),l=0,c=[];for(i in a)!n(s,i)&&n(a,i)&&c.push(i);for(;e.length>l;)n(a,i=e[l++])&&(~o(c,i)||c.push(i));return c}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,i){var n=i(12);t.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},function(t,e,i){"use strict";var n=i(32),r=i(103),o=i(27),s=i(26),a=i(74),l=s.set,c=s.getterFor("Array Iterator");t.exports=a(Array,"Array",(function(t,e){l(this,{type:"Array Iterator",target:n(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,i=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,i){var n=i(16),r=i(18),o=i(13),s=i(73);t.exports=n?Object.defineProperties:function(t,e){o(t);for(var i,n=s(e),a=n.length,l=0;a>l;)r.f(t,i=n[l++],e[i]);return t}},function(t,e,i){var n=i(68),r=i(47);t.exports=Object.keys||function(t){return n(t,r)}},function(t,e,i){"use strict";var n=i(31),r=i(75),o=i(77),s=i(106),a=i(37),l=i(15),c=i(19),h=i(8),u=i(34),d=i(27),f=i(76),p=f.IteratorPrototype,g=f.BUGGY_SAFARI_ITERATORS,m=h("iterator"),v=function(){return this};t.exports=function(t,e,i,h,f,y,b){r(i,e,h);var w,x,_,k=function(t){if(t===f&&O)return O;if(!g&&t in T)return T[t];switch(t){case"keys":case"values":case"entries":return function(){return new i(this,t)}}return function(){return new i(this)}},E=e+" Iterator",S=!1,T=t.prototype,C=T[m]||T["@@iterator"]||f&&T[f],O=!g&&C||k(f),A="Array"==e&&T.entries||C;if(A&&(w=o(A.call(new t)),p!==Object.prototype&&w.next&&(u||o(w)===p||(s?s(w,p):"function"!=typeof w[m]&&l(w,m,v)),a(w,E,!0,!0),u&&(d[E]=v))),"values"==f&&C&&"values"!==C.name&&(S=!0,O=function(){return C.call(this)}),u&&!b||T[m]===O||l(T,m,O),d[e]=O,f)if(x={values:k("values"),keys:y?O:k("keys"),entries:k("entries")},b)for(_ in x)(g||S||!(_ in T))&&c(T,_,x[_]);else n({target:e,proto:!0,forced:g||S},x);return x}},function(t,e,i){"use strict";var n=i(76).IteratorPrototype,r=i(50),o=i(25),s=i(37),a=i(27),l=function(){return this};t.exports=function(t,e,i){var c=e+" Iterator";return t.prototype=r(n,{next:o(1,i)}),s(t,c,!1,!0),a[c]=l,t}},function(t,e,i){"use strict";var n,r,o,s=i(77),a=i(15),l=i(10),c=i(8),h=i(34),u=c("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(r=s(s(o)))!==Object.prototype&&(n=r):d=!0),null==n&&(n={}),h||l(n,u)||a(n,u,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:d}},function(t,e,i){var n=i(10),r=i(36),o=i(43),s=i(105),a=o("IE_PROTO"),l=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=r(t),n(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},function(t,e,i){var n=i(12),r=i(8),o=i(34),s=r("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,i="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),i+=n+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host}))},function(t,e){t.exports=function(t,e,i){if(!(t instanceof e))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return t}},function(t,e,i){var n=i(126);t.exports=function(t,e,i){if(n(t),void 0===e)return t;switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,r){return t.call(e,i,n,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,i){var n=i(130),r=i(40),o=i(8)("toStringTag"),s="Arguments"==r(function(){return arguments}());t.exports=n?r:function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?i:s?r(e):"Object"==(n=r(e))&&"function"==typeof e.callee?"Arguments":n}},function(t,e,i){var n=i(138),r="object"==typeof self&&self&&self.Object===Object&&self,o=n||r||Function("return this")();t.exports=o},function(t,e,i){var n=i(82).Symbol;t.exports=n},function(t,e,i){var n=i(55),r=i(53);t.exports=function(t,e,i){var o=!0,s=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return r(i)&&(o="leading"in i?!!i.leading:o,s="trailing"in i?!!i.trailing:s),n(t,e,{leading:o,maxWait:e,trailing:s})}},function(t,i){t.exports=e},function(t,e,i){"use strict";i.r(e),function(t){var n=i(58),r=i(39),o=i(2),s=i(28),a=i(0),l=i(1);i(54),i(22),i(56);function c(t,e){return new n.a(t,e)}c.VERSION=l.b,void 0!==t&&(t.EPUBJS_VERSION=l.b),c.Book=n.a,c.Rendition=r.a,c.Contents=s.a,c.CFI=o.a,c.utils=a,e.default=c}.call(this,i(30))},function(t,e,i){"use strict";i(88);var n=i(19),r=i(12),o=i(8),s=i(48),a=i(15),l=o("species"),c=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),h="$0"==="a".replace(/./,"$0"),u=o("replace"),d=!!/./[u]&&""===/./[u]("a","$0"),f=!r((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}));t.exports=function(t,e,i,u){var p=o(t),g=!r((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),m=g&&!r((function(){var e=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[l]=function(){return i},i.flags="",i[p]=/./[p]),i.exec=function(){return e=!0,null},i[p](""),!e}));if(!g||!m||"replace"===t&&(!c||!h||d)||"split"===t&&!f){var v=/./[p],y=i(p,""[t],(function(t,e,i,n,r){return e.exec===s?g&&!r?{done:!0,value:v.call(e,i,n)}:{done:!0,value:t.call(i,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:h,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),b=y[0],w=y[1];n(String.prototype,t,b),n(RegExp.prototype,p,2==e?function(t,e){return w.call(t,this,e)}:function(t){return w.call(t,this)})}u&&a(RegExp.prototype[p],"sham",!0)}},function(t,e,i){"use strict";var n=i(31),r=i(48);n({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(t,e,i){var n=i(7),r=i(64),o=n.WeakMap;t.exports="function"==typeof o&&/native code/.test(r(o))},function(t,e,i){var n=i(10),r=i(91),o=i(59),s=i(18);t.exports=function(t,e){for(var i=r(e),a=s.f,l=o.f,c=0;c<i.length;c++){var h=i[c];n(t,h)||a(t,h,l(e,h))}}},function(t,e,i){var n=i(45),r=i(93),o=i(69),s=i(13);t.exports=n("Reflect","ownKeys")||function(t){var e=r.f(s(t)),i=o.f;return i?e.concat(i(t)):e}},function(t,e,i){var n=i(7);t.exports=n},function(t,e,i){var n=i(68),r=i(47).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,r)}},function(t,e,i){var n=i(32),r=i(46),o=i(95),s=function(t){return function(e,i,s){var a,l=n(e),c=r(l.length),h=o(s,c);if(t&&i!=i){for(;c>h;)if((a=l[h++])!=a)return!0}else for(;c>h;h++)if((t||h in l)&&l[h]===i)return t||h||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},function(t,e,i){var n=i(35),r=Math.max,o=Math.min;t.exports=function(t,e){var i=n(t);return i<0?r(i+e,0):o(i,e)}},function(t,e,i){var n=i(12),r=/#|\.prototype\./,o=function(t,e){var i=a[s(t)];return i==c||i!=l&&("function"==typeof e?n(e):!!e)},s=o.normalize=function(t){return String(t).replace(r,".").toLowerCase()},a=o.data={},l=o.NATIVE="N",c=o.POLYFILL="P";t.exports=o},function(t,e,i){"use strict";var n=i(13);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,i){"use strict";var n=i(12);function r(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=n((function(){var t=r("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=n((function(){var t=r("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,i){var n=i(70);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,i){"use strict";var n=i(49).charAt;t.exports=function(t,e,i){return e+(i?n(t,e).length:1)}},function(t,e,i){var n=i(40),r=i(48);t.exports=function(t,e){var i=t.exec;if("function"==typeof i){var o=i.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==n(t))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(t,e)}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,i){var n=i(8),r=i(50),o=i(18),s=n("unscopables"),a=Array.prototype;null==a[s]&&o.f(a,s,{configurable:!0,value:r(null)}),t.exports=function(t){a[s][t]=!0}},function(t,e,i){var n=i(45);t.exports=n("document","documentElement")},function(t,e,i){var n=i(12);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,i){var n=i(13),r=i(107);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),e=i instanceof Array}catch(t){}return function(i,o){return n(i),r(o),e?t.call(i,o):i.__proto__=o,i}}():void 0)},function(t,e,i){var n=i(17);t.exports=function(t){if(!n(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,i){"use strict";var n=i(109),r=i(117),o=i(118),s=i(119);(t.exports=function(t,e){var i,o,a,l,c;return arguments.length<2||"string"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(i=a=!0,o=!1):(i=s.call(t,"c"),o=s.call(t,"e"),a=s.call(t,"w")),c={value:e,configurable:i,enumerable:o,writable:a},l?n(r(l),c):c}).gs=function(t,e,i){var a,l,c,h;return"string"!=typeof t?(c=i,i=e,e=t,t=null):c=arguments[3],null==e?e=void 0:o(e)?null==i?i=void 0:o(i)||(c=i,i=void 0):(c=e,e=i=void 0),null==t?(a=!0,l=!1):(a=s.call(t,"c"),l=s.call(t,"e")),h={get:e,set:i,configurable:a,enumerable:l},c?n(r(c),h):h}},function(t,e,i){"use strict";t.exports=i(110)()?Object.assign:i(111)},function(t,e,i){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,i){"use strict";var n=i(112),r=i(116),o=Math.max;t.exports=function(t,e){var i,s,a,l=o(arguments.length,2);for(t=Object(r(t)),a=function(n){try{t[n]=e[n]}catch(t){i||(i=t)}},s=1;s<l;++s)n(e=arguments[s]).forEach(a);if(void 0!==i)throw i;return t}},function(t,e,i){"use strict";t.exports=i(113)()?Object.keys:i(114)},function(t,e,i){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e,i){"use strict";var n=i(51),r=Object.keys;t.exports=function(t){return r(n(t)?Object(t):t)}},function(t,e,i){"use strict";t.exports=function(){}},function(t,e,i){"use strict";var n=i(51);t.exports=function(t){if(!n(t))throw new TypeError("Cannot use null or undefined");return t}},function(t,e,i){"use strict";var n=i(51),r=Array.prototype.forEach,o=Object.create,s=function(t,e){var i;for(i in t)e[i]=t[i]};t.exports=function(t){var e=o(null);return r.call(arguments,(function(t){n(t)&&s(Object(t),e)})),e}},function(t,e,i){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,i){"use strict";t.exports=i(120)()?String.prototype.contains:i(121)},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"))}},function(t,e,i){"use strict";var n=String.prototype.indexOf;t.exports=function(t){return n.call(this,t,arguments[1])>-1}},function(t,e,i){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,i){"use strict";var n=i(49).charAt,r=i(26),o=i(74),s=r.set,a=r.getterFor("String Iterator");o(String,"String",(function(t){s(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=a(this),i=e.string,r=e.index;return r>=i.length?{value:void 0,done:!0}:(t=n(i,r),e.index+=t.length,{value:t,done:!1})}))},function(t,e,i){"use strict";var n=i(16),r=i(12),o=i(73),s=i(69),a=i(60),l=i(36),c=i(61),h=Object.assign,u=Object.defineProperty;t.exports=!h||r((function(){if(n&&1!==h({b:1},h(u({},"a",{enumerable:!0,get:function(){u(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},i=Symbol();return t[i]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=h({},t)[i]||"abcdefghijklmnopqrst"!=o(h({},e)).join("")}))?function(t,e){for(var i=l(t),r=arguments.length,h=1,u=s.f,d=a.f;r>h;)for(var f,p=c(arguments[h++]),g=u?o(p).concat(u(p)):o(p),m=g.length,v=0;m>v;)f=g[v++],n&&!d.call(p,f)||(i[f]=p[f]);return i}:h},function(t,e,i){"use strict";var n=i(80),r=i(36),o=i(127),s=i(128),a=i(46),l=i(129),c=i(52);t.exports=function(t){var e,i,h,u,d,f,p=r(t),g="function"==typeof this?this:Array,m=arguments.length,v=m>1?arguments[1]:void 0,y=void 0!==v,b=c(p),w=0;if(y&&(v=n(v,m>2?arguments[2]:void 0,2)),null==b||g==Array&&s(b))for(i=new g(e=a(p.length));e>w;w++)f=y?v(p[w],w):p[w],l(i,w,f);else for(d=(u=b.call(p)).next,i=new g;!(h=d.call(u)).done;w++)f=y?o(u,v,[h.value,w],!0):h.value,l(i,w,f);return i.length=w,i}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,i){var n=i(13);t.exports=function(t,e,i,r){try{return r?e(n(i)[0],i[1]):e(i)}catch(e){var o=t.return;throw void 0!==o&&n(o.call(t)),e}}},function(t,e,i){var n=i(8),r=i(27),o=n("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||s[o]===t)}},function(t,e,i){"use strict";var n=i(41),r=i(18),o=i(25);t.exports=function(t,e,i){var s=n(e);s in t?r.f(t,s,o(0,i)):t[s]=i}},function(t,e,i){var n={};n[i(8)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,i){"use strict";var n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,o="Overflow: input needs wider integers to process",s=Math.floor,a=String.fromCharCode,l=function(t){return t+22+75*(t<26)},c=function(t,e,i){var n=0;for(t=i?s(t/700):t>>1,t+=s(t/e);t>455;n+=36)t=s(t/35);return s(n+36*t/(t+38))},h=function(t){var e,i,n=[],r=(t=function(t){for(var e=[],i=0,n=t.length;i<n;){var r=t.charCodeAt(i++);if(r>=55296&&r<=56319&&i<n){var o=t.charCodeAt(i++);56320==(64512&o)?e.push(((1023&r)<<10)+(1023&o)+65536):(e.push(r),i--)}else e.push(r)}return e}(t)).length,h=128,u=0,d=72;for(e=0;e<t.length;e++)(i=t[e])<128&&n.push(a(i));var f=n.length,p=f;for(f&&n.push("-");p<r;){var g=2147483647;for(e=0;e<t.length;e++)(i=t[e])>=h&&i<g&&(g=i);var m=p+1;if(g-h>s((2147483647-u)/m))throw RangeError(o);for(u+=(g-h)*m,h=g,e=0;e<t.length;e++){if((i=t[e])<h&&++u>2147483647)throw RangeError(o);if(i==h){for(var v=u,y=36;;y+=36){var b=y<=d?1:y>=d+26?26:y-d;if(v<b)break;var w=v-b,x=36-b;n.push(a(l(b+w%x))),v=s(w/x)}n.push(a(l(v))),d=c(u,m,p==f),u=0,++p}}++u,++h}return n.join("")};t.exports=function(t){var e,i,o=[],s=t.toLowerCase().replace(r,".").split(".");for(e=0;e<s.length;e++)i=s[e],o.push(n.test(i)?"xn--"+h(i):i);return o.join(".")}},function(t,e,i){"use strict";i(71);var n=i(31),r=i(45),o=i(78),s=i(19),a=i(133),l=i(37),c=i(75),h=i(26),u=i(79),d=i(10),f=i(80),p=i(81),g=i(13),m=i(17),v=i(50),y=i(25),b=i(134),w=i(52),x=i(8),_=r("fetch"),k=r("Headers"),E=x("iterator"),S=h.set,T=h.getterFor("URLSearchParams"),C=h.getterFor("URLSearchParamsIterator"),O=/\+/g,A=Array(4),N=function(t){return A[t-1]||(A[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},I=function(t){try{return decodeURIComponent(t)}catch(e){return t}},R=function(t){var e=t.replace(O," "),i=4;try{return decodeURIComponent(e)}catch(t){for(;i;)e=e.replace(N(i--),I);return e}},j=/[!'()~]|%20/g,L={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},z=function(t){return L[t]},D=function(t){return encodeURIComponent(t).replace(j,z)},P=function(t,e){if(e)for(var i,n,r=e.split("&"),o=0;o<r.length;)(i=r[o++]).length&&(n=i.split("="),t.push({key:R(n.shift()),value:R(n.join("="))}))},B=function(t){this.entries.length=0,P(this.entries,t)},M=function(t,e){if(t<e)throw TypeError("Not enough arguments")},F=c((function(t,e){S(this,{type:"URLSearchParamsIterator",iterator:b(T(t).entries),kind:e})}),"Iterator",(function(){var t=C(this),e=t.kind,i=t.iterator.next(),n=i.value;return i.done||(i.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),i})),q=function(){u(this,q,"URLSearchParams");var t,e,i,n,r,o,s,a,l,c=arguments.length>0?arguments[0]:void 0,h=this,f=[];if(S(h,{type:"URLSearchParams",entries:f,updateURL:function(){},updateSearchParams:B}),void 0!==c)if(m(c))if("function"==typeof(t=w(c)))for(i=(e=t.call(c)).next;!(n=i.call(e)).done;){if((s=(o=(r=b(g(n.value))).next).call(r)).done||(a=o.call(r)).done||!o.call(r).done)throw TypeError("Expected sequence with length 2");f.push({key:s.value+"",value:a.value+""})}else for(l in c)d(c,l)&&f.push({key:l,value:c[l]+""});else P(f,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},U=q.prototype;a(U,{append:function(t,e){M(arguments.length,2);var i=T(this);i.entries.push({key:t+"",value:e+""}),i.updateURL()},delete:function(t){M(arguments.length,1);for(var e=T(this),i=e.entries,n=t+"",r=0;r<i.length;)i[r].key===n?i.splice(r,1):r++;e.updateURL()},get:function(t){M(arguments.length,1);for(var e=T(this).entries,i=t+"",n=0;n<e.length;n++)if(e[n].key===i)return e[n].value;return null},getAll:function(t){M(arguments.length,1);for(var e=T(this).entries,i=t+"",n=[],r=0;r<e.length;r++)e[r].key===i&&n.push(e[r].value);return n},has:function(t){M(arguments.length,1);for(var e=T(this).entries,i=t+"",n=0;n<e.length;)if(e[n++].key===i)return!0;return!1},set:function(t,e){M(arguments.length,1);for(var i,n=T(this),r=n.entries,o=!1,s=t+"",a=e+"",l=0;l<r.length;l++)(i=r[l]).key===s&&(o?r.splice(l--,1):(o=!0,i.value=a));o||r.push({key:s,value:a}),n.updateURL()},sort:function(){var t,e,i,n=T(this),r=n.entries,o=r.slice();for(r.length=0,i=0;i<o.length;i++){for(t=o[i],e=0;e<i;e++)if(r[e].key>t.key){r.splice(e,0,t);break}e===i&&r.push(t)}n.updateURL()},forEach:function(t){for(var e,i=T(this).entries,n=f(t,arguments.length>1?arguments[1]:void 0,3),r=0;r<i.length;)n((e=i[r++]).value,e.key,this)},keys:function(){return new F(this,"keys")},values:function(){return new F(this,"values")},entries:function(){return new F(this,"entries")}},{enumerable:!0}),s(U,E,U.entries),s(U,"toString",(function(){for(var t,e=T(this).entries,i=[],n=0;n<e.length;)t=e[n++],i.push(D(t.key)+"="+D(t.value));return i.join("&")}),{enumerable:!0}),l(q,"URLSearchParams"),n({global:!0,forced:!o},{URLSearchParams:q}),o||"function"!=typeof _||"function"!=typeof k||n({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,i,n,r=[t];return arguments.length>1&&(m(e=arguments[1])&&(i=e.body,"URLSearchParams"===p(i)&&((n=e.headers?new k(e.headers):new k).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=v(e,{body:y(0,String(i)),headers:y(0,n)}))),r.push(e)),_.apply(this,r)}}),t.exports={URLSearchParams:q,getState:T}},function(t,e,i){var n=i(19);t.exports=function(t,e,i){for(var r in e)n(t,r,e[r],i);return t}},function(t,e,i){var n=i(13),r=i(52);t.exports=function(t){var e=r(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return n(e.call(t))}},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}},function(t,e,i){"use strict";function n(t,e){function i(i){for(var n=e.length-1;n>=0;n--){var s=e[n],a=i.clientX,l=i.clientY;if(i.touches&&i.touches.length&&(a=i.touches[0].clientX,l=i.touches[0].clientY),o(s,t,a,l)){s.dispatchEvent(r(i));break}}}if("iframe"===t.nodeName||"IFRAME"===t.nodeName)try{this.target=t.contentDocument}catch(e){this.target=t}else this.target=t;for(var n=["mouseup","mousedown","click","touchstart"],s=0;s<n.length;s++){var a=n[s];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 o(t,e,i,n){var r=e.getBoundingClientRect();function o(t,e,i){var n=t.top-r.top,o=t.left-r.left,s=n+t.height,a=o+t.width;return n<=i&&o<=e&&s>i&&a>e}if(!o(t.getBoundingClientRect(),i,n))return!1;for(var s=t.getClientRects(),a=0,l=s.length;a<l;a++)if(o(s[a],i,n))return!0;return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.proxyMouse=n,e.clone=r,e.default={proxyMouse:n}},function(t,e,i){var n=i(82);t.exports=function(){return n.Date.now()}},function(t,e,i){(function(e){var i="object"==typeof e&&e&&e.Object===Object&&e;t.exports=i}).call(this,i(30))},function(t,e,i){var n=i(53),r=i(140),o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return NaN;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var i=a.test(t);return i||l.test(t)?c(t.slice(2),i?2:8):s.test(t)?NaN:+t}},function(t,e,i){var n=i(141),r=i(144);t.exports=function(t){return"symbol"==typeof t||r(t)&&"[object Symbol]"==n(t)}},function(t,e,i){var n=i(83),r=i(142),o=i(143),s=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?r(t):o(t)}},function(t,e,i){var n=i(83),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),i=t[a];try{t[a]=void 0;var n=!0}catch(t){}var r=s.call(t);return n&&(e?t[a]=i:delete t[a]),r}},function(t,e){var i=Object.prototype.toString;t.exports=function(t){return i.call(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}}]).default})),
/*!
localForage -- Offline Storage, Improved
Version 1.10.0
diff --git a/gulpfile.js b/gulpfile.js
index 3c27442..201a30d 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -19,7 +19,8 @@ gulp.task('minifyLibsJS', function(cb) {
'lib/bootstrap/v3/js/jquery.js',
'lib/bootstrap/v3/js/bootstrap.min.js',
'node_modules/jszip/dist/jszip.min.js',
- 'node_modules/epubjs/dist/epub.js',
+ 'lib/epub.js/dist/epub.js',
+ //'node_modules/epubjs/dist/epub.js',
'node_modules/localforage/dist/localforage.js',
'lib/jquery.mobile-events.min.js',
'lib/hyphen/*.js'])