1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7586],{54:(t,e,i)=>{"use strict";var r=i(146);t.exports=function(t){if("function"!=typeof t||!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length||"function"!=typeof t.call||"function"!=typeof t.apply)return!1}catch(t){return!1}return!r(t)}},63:(t,e,i)=>{"use strict";var r=i(7260);i.o(r,"usePathname")&&i.d(e,{usePathname:function(){return r.usePathname}}),i.o(r,"useRouter")&&i.d(e,{useRouter:function(){return r.useRouter}}),i.o(r,"useSearchParams")&&i.d(e,{useSearchParams:function(){return r.useSearchParams}})},146:(t,e,i)=>{"use strict";var r=i(915);t.exports=function(t){if(!r(t))return!1;try{if(!t.constructor)return!1;return t.constructor.prototype===t}catch(t){return!1}}},211:(t,e,i)=>{"use strict";let r=i(5057);t.exports={recognize:async(t,e,i)=>{let n=await r(e,1,i);return n.recognize(t).finally(async()=>{await n.terminate()})},detect:async(t,e)=>{let i=await r("osd",0,e);return i.detect(t).finally(async()=>{await i.terminate()})}}},528:(t,e,i)=>{"use strict";var r,n,s,o,a,h,l,c=i(4455),u=i(948),d=Function.prototype.apply,p=Function.prototype.call,f=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;return u(e),v.call(this,"__ee__")?i=this.__ee__:(i=y.value=f(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},n=function(t,e){var i,n;return u(e),n=this,r.call(this,t,i=function(){s.call(n,t,i),d.call(e,this,arguments)}),i.__eeOnceListener__=e,this},a={on:r,once:n,off:s=function(t,e){var i,r,n,s;if(u(e),!v.call(this,"__ee__")||!(i=this.__ee__)[t])return this;if("object"==typeof(r=i[t]))for(s=0;n=r[s];++s)(n===e||n.__eeOnceListener__===e)&&(2===r.length?i[t]=r[+!s]:r.splice(s,1));else(r===e||r.__eeOnceListener__===e)&&delete i[t];return this},emit:o=function(t){var e,i,r,n,s;if(v.call(this,"__ee__")&&(n=this.__ee__[t]))if("object"==typeof n){for(e=1,i=arguments.length,s=Array(i-1);e<i;++e)s[e-1]=arguments[e];for(e=0,n=n.slice();r=n[e];++e)d.call(r,this,s)}else switch(arguments.length){case 1:p.call(n,this);break;case 2:p.call(n,this,arguments[1]);break;case 3:p.call(n,this,arguments[1],arguments[2]);break;default:for(e=1,i=arguments.length,s=Array(i-1);e<i;++e)s[e-1]=arguments[e];d.call(n,this,s)}}},l=m({},h={on:c(r),once:c(n),off:c(s),emit:c(o)}),t.exports=e=function(t){return null==t?f(l):m(Object(t),h)},e.methods=a},556:t=>{var e=/\s/;t.exports=function(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}},656:function(t,e,i){"use strict";let r=i(5718),{log:n}=i(9501),s=i(2178),o=0;t.exports=()=>{let t=s("Scheduler",o),e={},i={},a=[];o+=1;let h=()=>Object.keys(e).length,l=()=>{if(0!==a.length){let t=Object.keys(e);for(let r=0;r<t.length;r+=1)if(void 0===i[t[r]]){a[0](e[t[r]]);break}}},c=(e,s)=>new Promise((o,h)=>{let c=r({action:e,payload:s});a.push(async t=>{a.shift(),i[t.id]=c;try{o(await t[e].apply(this,[...s,c.id]))}catch(t){h(t)}finally{delete i[t.id],l()}}),n(`[${t}]: Add ${c.id} to JobQueue`),n(`[${t}]: JobQueue length=${a.length}`),l()});return{addWorker:i=>(e[i.id]=i,n(`[${t}]: Add ${i.id}`),n(`[${t}]: Number of workers=${h()}`),l(),i.id),addJob:async(e,...i)=>{if(0===h())throw Error(`[${t}]: You need to have at least one worker before adding jobs`);return c(e,i)},terminate:async()=>{Object.keys(e).forEach(async t=>{await e[t].terminate()}),a=[]},getQueueLen:()=>a.length,getNumWorkers:h}}},684:(t,e,i)=>{var r=i(5396);r.DOMImplementation,r.XMLSerializer,e.DOMParser=i(3524).DOMParser},772:(t,e,i)=>{"use strict";t.exports=i(5629)()?String.prototype.contains:i(6470)},915:(t,e,i)=>{"use strict";var r=i(6907),n={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!r(t)&&hasOwnProperty.call(n,typeof t)}},942:(t,e,i)=>{var r=i(3423),n=i(5443),s=i(8840),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?n(t):s(t)}},948:t=>{"use strict";t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");return t}},1060:(t,e,i)=>{"use strict";
1t.exports=i(9469)()?Object.assign:i(1689)},1155:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});let r=(0,i(1847).A)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]])},1192:t=>{var e=function(t){"use strict";var e,i=Object.prototype,r=i.hasOwnProperty,n=Object.defineProperty||function(t,e,i){t[e]=i.value},s="function"==typeof Symbol?Symbol:{},o=s.iterator||"@@iterator",a=s.asyncIterator||"@@asyncIterator",h=s.toStringTag||"@@toStringTag";function l(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,i){return t[e]=i}}function c(t,i,r,s){var o,a,h,l,c=Object.create((i&&i.prototype instanceof m?i:m).prototype);return n(c,"_invoke",{value:(o=t,a=r,h=new C(s||[]),l=d,function(t,i){if(l===p)throw Error("Generator is already running");if(l===f){if("throw"===t)throw i;return L()}for(h.method=t,h.arg=i;;){var r=h.delegate;if(r){var n=function t(i,r){var n=r.method,s=i.iterator[n];if(e===s)return(r.delegate=null,"throw"===n&&i.iterator.return&&(r.method="return",r.arg=e,t(i,r),"throw"===r.method))?g:("return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),g);var o=u(s,i.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[i.resultName]=a.value,r.next=i.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,g)}(r,h);if(n){if(n===g)continue;return n}}if("next"===h.method)h.sent=h._sent=h.arg;else if("throw"===h.method){if(l===d)throw l=f,h.arg;h.dispatchException(h.arg)}else"return"===h.method&&h.abrupt("return",h.arg);l=p;var s=u(o,a,h);if("normal"===s.type){if(l=h.done?f:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:h.done}}"throw"===s.type&&(l=f,h.method="throw",h.arg=s.arg)}})}),c}function u(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var d="suspendedStart",p="executing",f="completed",g={};function m(){}function v(){}function y(){}var b={};l(b,o,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(_([])));x&&x!==i&&r.call(x,o)&&(b=x);var E=y.prototype=m.prototype=Object.create(b);function D(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function S(t,e){var i;n(this,"_invoke",{value:function(n,s){function o(){return new e(function(i,o){!function i(n,s,o,a){var h=u(t[n],t,s);if("throw"===h.type)a(h.arg);else{var l=h.arg,c=l.value;return c&&"object"==typeof c&&r.call(c,"__await")?e.resolve(c.__await).then(function(t){i("next",t,o,a)},function(t){i("throw",t,o,a)}):e.resolve(c).then(function(t){l.value=t,o(l)},function(t){return i("throw",t,o,a)})}}(n,s,i,o)})}return i=i?i.then(o,o):o()}})}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function _(t){if(t){var i=t[o];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,s=function i(){for(;++n<t.length;)if(r.call(t,n))return i.value=t[n],i.done=!1,i;return i.value=e,i.done=!0,i};return s.next=s}}return{next:L}}function L(){return{value:e,done:!0}}return v.prototype=y,n(E,"constructor",{value:y,configurable:!0}),n(y,"constructor",{value:v,configurable:!0}),v.displayName=l(y,h,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,h,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},D(S.prototype),l(S.prototype,a,function(){return this}),t.AsyncIterator=S,t.async=function(e,i,r,n,s){void 0===s&&(s=Prom
1ise);var o=new S(c(e,i,r,n),s);return t.isGeneratorFunction(i)?o:o.next().then(function(t){return t.done?t.value:o.next()})},D(E),l(E,h,"Generator"),l(E,o,function(){return this}),l(E,"toString",function(){return"[object Generator]"}),t.keys=function(t){var e=Object(t),i=[];for(var r in e)i.push(r);return i.reverse(),function t(){for(;i.length;){var r=i.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=_,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var i in this)"t"===i.charAt(0)&&r.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var i=this;function n(r,n){return a.type="throw",a.arg=t,i.next=r,n&&(i.method="next",i.arg=e),!!n}for(var s=this.tryEntries.length-1;s>=0;--s){var o=this.tryEntries[s],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var h=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(h&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);else if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(h){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else if(l){if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else throw Error("try statement without catch or finally")}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var s=n;break}}s&&("break"===t||"continue"===t)&&s.tryLoc<=e&&e<=s.finallyLoc&&(s=null);var o=s?s.completion:{};return(o.type=t,o.arg=e,s)?(this.method="next",this.next=s.finallyLoc,g):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),N(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var r=i.completion;if("throw"===r.type){var n=r.arg;N(i)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,i,r){return this.delegate={iterator:_(t),resultName:i,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},1483:(t,e,i)=>{var r=i(4402),n="object"==typeof self&&self&&self.Object===Object&&self;t.exports=r||n||Function("return this")()},1548:t=>{"use strict";t.exports={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}},1617:(t,e,i)=>{"use strict";i.d(e,{i3:()=>K,UC:()=>$,ZL:()=>Y,Kq:()=>V,bL:()=>G,l9:()=>X});var r=i(2115),n=i(2556),s=i(4446),o=i(3468),a=i(4831),h=i(8946),l=i(6093),c=i(5433),u=i(6842),d=i(8142),p=i(5155),f=Symbol("radix.slottable"),g=i(3558),m=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),v=r.forwardRef((t,e)=>(0,p.jsx)(d.sG.span,{...t,ref:e,style:{...m,...t.style}}));v.displayName="VisuallyHidden";var[y,b]=(0,o.A)("Tooltip",[l.Bk]),w=(0,l.Bk)(),x="TooltipProvider",E="tooltip.open",[D,S]=y(x),T=t=>{let{__scopeTooltip:e,delayDuration:i=700,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=t,a=r.useRef(!0),h=r.useRef(!1),l=r.useRef(0);return r.useEffect(()=>{let t=l.current;return()=>window.clearTimeout(t)},[]),(0,p.jsx)(D,{scope:e,isOpenDelayedRef:a,delayDuration:i,onOpen:r.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:r.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:h,onPointerInTransitChange:r.useCallback(t=>{h.current=t},[]),disableHoverableContent:s,children:o})};T.displayName=x;var N="Tooltip",[C,_]=y(N),L=t=>{let{__scopeTooltip:e,children:i,open:n,defaultOpen:s,onOpenChange:o,disableHoverableContent:a,delayDuration:c}=t,u=S(N,t.__scopeTooltip),d=w(e),[f,m]=r.useState(null),v=(0,h.B)(),y=r.useRef(0),b=null!=a?a:u.disableHoverableContent,x=null!=c?c:u.delayDuration,D=r.useRef(!1),[T,_]=(0,g.i)({prop:n,defaultProp:null!=s&&s,onChange:t=>{t?(u.onOpen(),document.dispatchEvent(new CustomEvent(E))):u.onClose(),null==o||o(t)},caller:N}),L=r.useMemo(()=>T?D.current?"delayed-open":"instant-open":"closed",[T]),k=r.useCallback(()=>{window.clearTimeout(y.current),y.current=0,D.current=!1,_(!0)},[_]),A=r.useCallback(()=>{window.clearTimeout(y.current),y.current=0,_(!1)},[_]),R=r.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{D.current=!0,_(!0),y.current=0},x)},[x,_]);return r.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),(0,p.jsx)(l.bL,{...d,children:(0,p.jsx)(C,{scope:e,contentId:v,open:T,stateAttribute:L,trigger:f,onTriggerChange:m,onTriggerEnter:r.useCallback(()=>{u.isOpenDelayedRef.current?R():k()},[u.isOpenDelayedRef,R,k]),onTriggerLeave:r.useCallback(()=>{b?A():(window.clearTimeout(y.current),y.current=0)},[A,b]),onOpen:k,onClose:A,disableHoverableContent:b,children:i})})};L.displayName=N;var k="TooltipTrigger",A=r.forwardRef((t,e)=>{let{__scopeTooltip:i,...o}=t,a=_(k,i),h=S(k,i),c=w(i),u=r.useRef(null),f=(0,s.s)(e,u,a.onTriggerChange),g=r.useRef(!1),m=r.useRef(!1),v=r.useCallback(()=>g.current=!1,[]);return r.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),(0,p.jsx)(l.Mz,{asChild:!0,...c,children:(0,p.jsx)(d.sG.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...o,ref:f,onPointerMove:(0,n.mK)(t.onPointerMove,t=>{"touch"!==t.pointerType&&(m.current||h.isPointerInTransitRef.current||(a.onTriggerEnter(),m.current=!0))}),onPointerLeave:(0,n.mK)(t.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:(0,n.mK)(t.onPointerDown,()=>{a.open&&a.onClose(),g.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:(0,n.mK)(t.onFocus,()=>{g.current||a.onOpen()}),onBlur:(0,n.mK)(t.onBlur,a.onClose),onClick:(0,n.mK)(t.onClick,a.onClose)})})});A.displayName=k;var R="TooltipPortal",[O,I]=y(R,{forceMount:void 0}),q=t=>{let{__scopeTooltip:e,forceMount:i,children:r,container:n}=t,s=_(R,e);return(0,p.jsx)(O,{scope:e,forceMount:i,children:(0,p.jsx)(u.C,{present:i||s.open,children:(0,p.jsx)(c.Z,{asChild:!0,container:n,children:r})})})};q.displayName=R;var P="TooltipContent",M=r.forwardRef((t,e)=>{let i=I(P,t.__scopeTooltip),{forceMount:r=i.forceMount,side:n="top",...s}=t,o=_(P,t.__scopeTooltip);return(0,p.jsx)(u.C,{present:r||o.open,children:o.disableHoverableContent?(0,p.jsx)(F,{side:n,...s,ref:e}):(0,p.jsx)(B,{side:n,...s,ref:e})})}),B=r.forwardRef((t,e)=>{let i=_(P,t.__scopeTooltip),n=S(P,t.__scopeTooltip),o=r.useRef(null),a=(0,s.s)(e,o),[h,l]=r.useState(null),{trigger:c,onClose:u}=i,d=o.current,{onPointerInTransitChange:f}=n,g=r.useCallback(()=>
1{l(null),f(!1)},[f]),m=r.useCallback((t,e)=>{let i=t.currentTarget,r={x:t.clientX,y:t.clientY},n=function(t,e){let i=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),n=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(i,r,n,s)){case s:return"left";case n:return"right";case i:return"top";case r:return"bottom";default:throw Error("unreachable")}}(r,i.getBoundingClientRect());l(function(t){let e=t.slice();return e.sort((t,e)=>t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:1*!!(t.y>e.y)),function(t){if(t.length<=1)return t.slice();let e=[];for(let i=0;i<t.length;i++){let r=t[i];for(;e.length>=2;){let t=e[e.length-1],i=e[e.length-2];if((t.x-i.x)*(r.y-i.y)>=(t.y-i.y)*(r.x-i.x))e.pop();else break}e.push(r)}e.pop();let i=[];for(let e=t.length-1;e>=0;e--){let r=t[e];for(;i.length>=2;){let t=i[i.length-1],e=i[i.length-2];if((t.x-e.x)*(r.y-e.y)>=(t.y-e.y)*(r.x-e.x))i.pop();else break}i.push(r)}return(i.pop(),1===e.length&&1===i.length&&e[0].x===i[0].x&&e[0].y===i[0].y)?e:e.concat(i)}(e)}([...function(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=[];switch(e){case"top":r.push({x:t.x-i,y:t.y+i},{x:t.x+i,y:t.y+i});break;case"bottom":r.push({x:t.x-i,y:t.y-i},{x:t.x+i,y:t.y-i});break;case"left":r.push({x:t.x+i,y:t.y-i},{x:t.x+i,y:t.y+i});break;case"right":r.push({x:t.x-i,y:t.y-i},{x:t.x-i,y:t.y+i})}return r}(r,n),...function(t){let{top:e,right:i,bottom:r,left:n}=t;return[{x:n,y:e},{x:i,y:e},{x:i,y:r},{x:n,y:r}]}(e.getBoundingClientRect())])),f(!0)},[f]);return r.useEffect(()=>()=>g(),[g]),r.useEffect(()=>{if(c&&d){let t=t=>m(t,d),e=t=>m(t,c);return c.addEventListener("pointerleave",t),d.addEventListener("pointerleave",e),()=>{c.removeEventListener("pointerleave",t),d.removeEventListener("pointerleave",e)}}},[c,d,m,g]),r.useEffect(()=>{if(h){let t=t=>{let e=t.target,i={x:t.clientX,y:t.clientY},r=(null==c?void 0:c.contains(e))||(null==d?void 0:d.contains(e)),n=!function(t,e){let{x:i,y:r}=t,n=!1;for(let t=0,s=e.length-1;t<e.length;s=t++){let o=e[t],a=e[s],h=o.x,l=o.y,c=a.x,u=a.y;l>r!=u>r&&i<(c-h)*(r-l)/(u-l)+h&&(n=!n)}return n}(i,h);r?g():n&&(g(),u())};return document.addEventListener("pointermove",t),()=>document.removeEventListener("pointermove",t)}},[c,d,h,u,g]),(0,p.jsx)(F,{...t,ref:a})}),[z,j]=y(N,{isInside:!1}),U=function(t){let e=({children:t})=>(0,p.jsx)(p.Fragment,{children:t});return e.displayName=`${t}.Slottable`,e.__radixId=f,e}("TooltipContent"),F=r.forwardRef((t,e)=>{let{__scopeTooltip:i,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:h,...c}=t,u=_(P,i),d=w(i),{onClose:f}=u;return r.useEffect(()=>(document.addEventListener(E,f),()=>document.removeEventListener(E,f)),[f]),r.useEffect(()=>{if(u.trigger){let t=t=>{let e=t.target;(null==e?void 0:e.contains(u.trigger))&&f()};return window.addEventListener("scroll",t,{capture:!0}),()=>window.removeEventListener("scroll",t,{capture:!0})}},[u.trigger,f]),(0,p.jsx)(a.qW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:h,onFocusOutside:t=>t.preventDefault(),onDismiss:f,children:(0,p.jsxs)(l.UC,{"data-state":u.stateAttribute,...d,...c,ref:e,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,p.jsx)(U,{children:n}),(0,p.jsx)(z,{scope:i,isInside:!0,children:(0,p.jsx)(v,{id:u.contentId,role:"tooltip",children:s||n})})]})})});M.displayName=P;var W="TooltipArrow",H=r.forwardRef((t,e)=>{let{__scopeTooltip:i,...r}=t,n=w(i);return j(W,i).isInside?null:(0,p.jsx)(l.i3,{...n,...r,ref:e})});H.displayName=W;var V=T,G=L,X=A,Y=q,$=M,K=H},1689:(t,e,i)=>{"use strict";var r=i(3385),n=i(2008),s=Math.max;t.exports=function(t,e){var i,o,a,h=s(arguments.length,2);for(o=1,t=Object(n(t)),a=function(r){try{t[r]=e[r]}catch(t){i||(i=t)}};o<h;++o)e=arguments[o],r(e).forEach(a);if(void 0!==i)throw i;return t}},1786:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});
1let r=(0,i(1847).A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},1982:(t,e,i)=>{var r=i(6862),n=i(6745),s=i(6702),o=0/0,a=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(s(t))return o;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=r(t);var i=h.test(t);return i||l.test(t)?c(t.slice(2),i?2:8):a.test(t)?o:+t}},1998:(t,e)=>{"use strict";function i(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=i,e.default={createElement:i}},2008:(t,e,i)=>{"use strict";var r=i(8046);t.exports=function(t){if(!r(t))throw TypeError("Cannot use null or undefined");return t}},2178:t=>{"use strict";t.exports=(t,e)=>`${t}-${e}-${Math.random().toString(16).slice(3,8)}`},2483:(t,e,i)=>{"use strict";var r=i(8360).freeze;e.XML_ENTITIES=r({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=r({Aacute:"\xc1",aacute:"\xe1",Abreve:"Ä",abreve:"Ä",ac:"â¾",acd:"â¿",acE:"â¾Ì³",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"Ð",acy:"а",AElig:"\xc6",aelig:"\xe6",af:"â¡",Afr:"\uD835\uDD04",afr:"\uD835\uDD1E",Agrave:"\xc0",agrave:"\xe0",alefsym:"âµ",aleph:"âµ",Alpha:"Î",alpha:"α",Amacr:"Ä",amacr:"Ä",amalg:"⨿",AMP:"&",amp:"&",And:"â©",and:"â§",andand:"â©",andd:"â©",andslope:"â©",andv:"â©",ang:"â ",ange:"⦤",angle:"â ",angmsd:"â¡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"â¦",angmsdag:"⦮",angmsdah:"⦯",angrt:"â",angrtvb:"â¾",angrtvbd:"â¦",angsph:"â¢",angst:"\xc5",angzarr:"â¼",Aogon:"Ä",aogon:"Ä
",Aopf:"\uD835\uDD38",aopf:"\uD835\uDD52",ap:"â",apacir:"⩯",apE:"â©°",ape:"â",apid:"â",apos:"'",ApplyFunction:"â¡",approx:"â",approxeq:"â",Aring:"\xc5",aring:"\xe5",Ascr:"\uD835\uDC9C",ascr:"\uD835\uDCB6",Assign:"â",ast:"*",asymp:"â",asympeq:"â",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"â³",awint:"â¨",backcong:"â",backepsilon:"϶",backprime:"âµ",backsim:"â½",backsimeq:"â",Backslash:"â",Barv:"â«§",barvee:"â½",Barwed:"â",barwed:"â
",barwedge:"â
",bbrk:"âµ",bbrktbrk:"â¶",bcong:"â",Bcy:"Ð",bcy:"б",bdquo:"â",becaus:"âµ",Because:"âµ",because:"âµ",bemptyv:"⦰",bepsi:"϶",bernou:"â¬",Bernoullis:"â¬",Beta:"Î",beta:"β",beth:"â¶",between:"â¬",Bfr:"\uD835\uDD05",bfr:"\uD835\uDD1F",bigcap:"â",bigcirc:"â¯",bigcup:"â",bigodot:"â¨",bigoplus:"â¨",bigotimes:"â¨",bigsqcup:"â¨",bigstar:"â
",bigtriangledown:"â½",bigtriangleup:"â³",biguplus:"â¨",bigvee:"â",bigwedge:"â",bkarow:"â¤",blacklozenge:"â§«",blacksquare:"âª",blacktriangle:"â´",blacktriangledown:"â¾",blacktriangleleft:"â",blacktriangleright:"â¸",blank:"â£",blk12:"â",blk14:"â",blk34:"â",block:"â",bne:"=â¥",bnequiv:"â¡â¥",bNot:"â«",bnot:"â",Bopf:"\uD835\uDD39",bopf:"\uD835\uDD53",bot:"â¥",bottom:"â¥",bowtie:"â",boxbox:"â§",boxDL:"â",boxDl:"â",boxdL:"â",boxdl:"â",boxDR:"â",boxDr:"â",boxdR:"â",boxdr:"â",boxH:"â",boxh:"â",boxHD:"â¦",boxHd:"â¤",boxhD:"â¥",boxhd:"â¬",boxHU:"â©",boxHu:"â§",boxhU:"â¨",boxhu:"â´",boxminus:"â",boxplus:"â",boxtimes:"â ",boxUL:"â",boxUl:"â",boxuL:"â",boxul:"â",boxUR:"â",boxUr:"â",boxuR:"â",boxur:"â",boxV:"â",boxv:"â",boxVH:"â¬",boxVh:"â«",boxvH:"âª",boxvh:"â¼",boxVL:"â£",boxVl:"â¢",boxvL:"â¡",boxvl:"â¤",boxVR:"â ",boxVr:"â",boxvR:"â",boxvr:"â",bprime:"âµ",Breve:"Ë",breve:"Ë",brvbar:"\xa6",Bscr:"â¬",bscr:"\uD835\uDCB7",bsemi:"â",bsim:"â½",b
1sime:"â",bsol:"\\",bsolb:"â§
",bsolhsub:"â",bull:"â¢",bullet:"â¢",bump:"â",bumpE:"⪮",bumpe:"â",Bumpeq:"â",bumpeq:"â",Cacute:"Ä",cacute:"Ä",Cap:"â",cap:"â©",capand:"â©",capbrcup:"â©",capcap:"â©",capcup:"â©",capdot:"â©",CapitalDifferentialD:"â
",caps:"â©ï¸",caret:"â",caron:"Ë",Cayleys:"â",ccaps:"â©",Ccaron:"Ä",ccaron:"Ä",Ccedil:"\xc7",ccedil:"\xe7",Ccirc:"Ä",ccirc:"Ä",Cconint:"â°",ccups:"â©",ccupssm:"â©",Cdot:"Ä",cdot:"Ä",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"⦲",cent:"\xa2",CenterDot:"\xb7",centerdot:"\xb7",Cfr:"â",cfr:"\uD835\uDD20",CHcy:"Ч",chcy:"Ñ",check:"â",checkmark:"â",Chi:"Χ",chi:"Ï",cir:"â",circ:"Ë",circeq:"â",circlearrowleft:"âº",circlearrowright:"â»",circledast:"â",circledcirc:"â",circleddash:"â",CircleDot:"â",circledR:"\xae",circledS:"â",CircleMinus:"â",CirclePlus:"â",CircleTimes:"â",cirE:"â§",cire:"â",cirfnint:"â¨",cirmid:"⫯",cirscir:"â§",ClockwiseContourIntegral:"â²",CloseCurlyDoubleQuote:"â",CloseCurlyQuote:"â",clubs:"â£",clubsuit:"â£",Colon:"â·",colon:":",Colone:"â©´",colone:"â",coloneq:"â",comma:",",commat:"@",comp:"â",compfn:"â",complement:"â",complexes:"â",cong:"â
",congdot:"â©",Congruent:"â¡",Conint:"â¯",conint:"â®",ContourIntegral:"â®",Copf:"â",copf:"\uD835\uDD54",coprod:"â",Coproduct:"â",COPY:"\xa9",copy:"\xa9",copysr:"â",CounterClockwiseContourIntegral:"â³",crarr:"âµ",Cross:"⨯",cross:"â",Cscr:"\uD835\uDC9E",cscr:"\uD835\uDCB8",csub:"â«",csube:"â«",csup:"â«",csupe:"â«",ctdot:"â¯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"â",cuesc:"â",cularr:"â¶",cularrp:"⤽",Cup:"â",cup:"âª",cupbrcap:"â©",CupCap:"â",cupcap:"â©",cupcup:"â©",cupdot:"â",cupor:"â©
",cups:"âªï¸",curarr:"â·",curarrm:"⤼",curlyeqprec:"â",curlyeqsucc:"â",curlyvee:"â",curlywedge:"â",curren:"\xa4",curvearrowleft:"â¶",curvearrowright:"â·",cuvee:"â",cuwed:"â",cwconint:"â²",cwint:"â±",cylcty:"â",Dagger:"â¡",dagger:"â ",daleth:"â¸",Darr:"â¡",dArr:"â",darr:"â",dash:"â",Dashv:"⫤",dashv:"â£",dbkarow:"â¤",dblac:"Ë",Dcaron:"Ä",dcaron:"Ä",Dcy:"Ð",dcy:"д",DD:"â
",dd:"â
",ddagger:"â¡",ddarr:"â",DDotrahd:"â¤",ddotseq:"â©·",deg:"\xb0",Del:"â",Delta:"Î",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"\uD835\uDD07",dfr:"\uD835\uDD21",dHar:"⥥",dharl:"â",dharr:"â",DiacriticalAcute:"\xb4",DiacriticalDot:"Ë",DiacriticalDoubleAcute:"Ë",DiacriticalGrave:"`",DiacriticalTilde:"Ë",diam:"â",Diamond:"â",diamond:"â",diamondsuit:"â¦",diams:"â¦",die:"\xa8",DifferentialD:"â
",digamma:"Ï",disin:"â²",div:"\xf7",divide:"\xf7",divideontimes:"â",divonx:"â",DJcy:"Ð",djcy:"Ñ",dlcorn:"â",dlcrop:"â",dollar:"$",Dopf:"\uD835\uDD3B",dopf:"\uD835\uDD55",Dot:"\xa8",dot:"Ë",DotDot:"â",doteq:"â",doteqdot:"â",DotEqual:"â",dotminus:"â¸",dotplus:"â",dotsquare:"â¡",doublebarwedge:"â",DoubleContourIntegral:"â¯",DoubleDot:"\xa8",DoubleDownArrow:"â",DoubleLeftArrow:"â",DoubleLeftRightArrow:"â",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"â¸",DoubleLongLeftRightArrow:"âº",DoubleLongRightArrow:"â¹",DoubleRightArrow:"â",DoubleRightTee:"â¨",DoubleUpArrow:"â",DoubleUpDownArrow:"â",DoubleVerticalBar:"â¥",DownArrow:"â",Downarrow:"â",downarrow:"â",DownArrowBar:"â¤",DownArrowUpArrow:"âµ",DownBreve:"Ì",downdownarrows:"â",downharpoonleft:"â",downharpoonright:"â",DownLeftRightVector:"â¥",DownLeftTeeVector:"â¥",DownLeftVector:"â½",DownLeftVectorBar:"â¥",DownRightTeeVector:"â¥",DownRightVector:"â",DownRightVectorBar:"â¥",DownTee:"â¤",DownTeeArrow:"â§",drbkarow:"â¤",drcorn:"â",drcrop:"â",Dscr:"\uD835\uDC9F",dscr:"\uD835\uDCB9",DScy:"Ð
",dscy:"Ñ",dsol:"â§¶",Dstrok:"Ä",dstrok:"Ä",dtdot:"â±",dtri:"â¿",dtrif:"â¾",duarr:"âµ",duhar:"⥯",dwangle:"⦦",DZcy:"Ð",dzcy:"Ñ",dzigrarr:"â¿",Eacute:"\xc9",eacute:"\xe9",easter:"â©®",Ecaron:"Ä",ecaron:"Ä",ecir:"â",Ecirc:"\xca",ecirc:"\xea",ecolon:"â",Ecy:"Ð",ecy:"Ñ",eDDot:"â©·",Edot:"Ä",eDot:"â",edot:"Ä",ee:"â
",efDot:"â",Efr:"\uD835\uDD08",efr:"\uD835\uDD22",eg:"âª",Egrave:"\xc8",egrave:"\xe8",egs:"âª",egsdot:"âª",el:"âª",Element:"â",elinters:"â§",ell:"â",els:"âª",elsdot:"âª",Emacr:"Ä",emacr:"Ä",empty:"â
",emptyset:"â
",EmptySmallSquare:"â»",emptyv:"â
",EmptyVerySmallSquare:"â«",emsp:"â",emsp13:"â",emsp14:"â
",ENG:"Å",eng:"Å",ensp:"â",Eogon:"Ä",eogon:"Ä",Eopf:"\uD835\uDD3C",eopf:"\uD835\uDD56",epar:"â",eparsl:"â§£",eplus:"⩱",epsi:"ε",Epsilon:"Î",epsilon:"ε",epsiv:"ϵ",eqcirc:"â",eqcolon:"â",eqsim:"â",eqslantgtr:"âª",eqslantless:"âª",Equal:"⩵",equals:"=",EqualTilde:"â",equest:"â",Equilibrium:"â",equiv:"â¡",equivDD:"⩸",eqvparsl:"â§¥",erarr:"⥱",erDot:"â",Escr:"â°",escr:"â¯",esdot:"â",Esim:"⩳",esim:"â",Eta:"Î",eta:"η",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"â¬",excl:"!",exist:"â",Exists:"â",expectation:"â°",ExponentialE:"â
",exponentiale:"â
",fallingdotseq:"â",Fcy:"Ф",fcy:"Ñ",female:"â",ffilig:"ï¬",fflig:"ï¬",ffllig:"ï¬",Ffr:"\uD835\uDD09",ffr:"\uD835\uDD23",filig:"ï¬",FilledSmallSquare:"â¼",FilledVerySmallSquare:"âª",fjlig:"fj",flat:"â",fllig:"ï¬",fltns:"â±",fnof:"Æ",Fopf:"\uD835\uDD3D",fopf:"\uD835\uDD57",ForAll:"â",forall:"â",fork:"â",forkv:"â«",Fouriertrf:"â±",fpartint:"â¨",frac12:"\xbd",frac13:"â
",frac14:"\xbc",frac15:"â
",frac16:"â
",frac18
1:"â
",frac23:"â
",frac25:"â
",frac34:"\xbe",frac35:"â
",frac38:"â
",frac45:"â
",frac56:"â
",frac58:"â
",frac78:"â
",frasl:"â",frown:"â¢",Fscr:"â±",fscr:"\uD835\uDCBB",gacute:"ǵ",Gamma:"Î",gamma:"γ",Gammad:"Ï",gammad:"Ï",gap:"âª",Gbreve:"Ä",gbreve:"Ä",Gcedil:"Ä¢",Gcirc:"Ä",gcirc:"Ä",Gcy:"Ð",gcy:"г",Gdot:"Ä ",gdot:"Ä¡",gE:"â§",ge:"â¥",gEl:"âª",gel:"â",geq:"â¥",geqq:"â§",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"âª",gesdoto:"âª",gesdotol:"âª",gesl:"âï¸",gesles:"âª",Gfr:"\uD835\uDD0A",gfr:"\uD835\uDD24",Gg:"â",gg:"â«",ggg:"â",gimel:"â·",GJcy:"Ð",gjcy:"Ñ",gl:"â·",gla:"⪥",glE:"âª",glj:"⪤",gnap:"âª",gnapprox:"âª",gnE:"â©",gne:"âª",gneq:"âª",gneqq:"â©",gnsim:"â§",Gopf:"\uD835\uDD3E",gopf:"\uD835\uDD58",grave:"`",GreaterEqual:"â¥",GreaterEqualLess:"â",GreaterFullEqual:"â§",GreaterGreater:"⪢",GreaterLess:"â·",GreaterSlantEqual:"⩾",GreaterTilde:"â³",Gscr:"\uD835\uDCA2",gscr:"â",gsim:"â³",gsime:"âª",gsiml:"âª",Gt:"â«",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"â",gtlPar:"â¦",gtquest:"⩼",gtrapprox:"âª",gtrarr:"⥸",gtrdot:"â",gtreqless:"â",gtreqqless:"âª",gtrless:"â·",gtrsim:"â³",gvertneqq:"â©ï¸",gvnE:"â©ï¸",Hacek:"Ë",hairsp:"â",half:"\xbd",hamilt:"â",HARDcy:"Ъ",hardcy:"Ñ",hArr:"â",harr:"â",harrcir:"â¥",harrw:"â",Hat:"^",hbar:"â",Hcirc:"Ĥ",hcirc:"Ä¥",hearts:"â¥",heartsuit:"â¥",hellip:"â¦",hercon:"â¹",Hfr:"â",hfr:"\uD835\uDD25",HilbertSpace:"â",hksearow:"⤥",hkswarow:"⤦",hoarr:"â¿",homtht:"â»",hookleftarrow:"â©",hookrightarrow:"âª",Hopf:"â",hopf:"\uD835\uDD59",horbar:"â",HorizontalLine:"â",Hscr:"â",hscr:"\uD835\uDCBD",hslash:"â",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"â",HumpEqual:"â",hybull:"â",hyphen:"â",Iacute:"\xcd",iacute:"\xed",ic:"â£",Icirc:"\xce",icirc:"\xee",Icy:"Ð",icy:"и",Idot:"İ",IEcy:"Ð",iecy:"е",iexcl:"\xa1",iff:"â",Ifr:"â",ifr:"\uD835\uDD26",Igrave:"\xcc",igrave:"\xec",ii:"â
",iiiint:"â¨",iiint:"â",iinfin:"â§",iiota:"â©",IJlig:"IJ",ijlig:"ij",Im:"â",Imacr:"Ī",imacr:"Ä«",image:"â",ImaginaryI:"â
",imagline:"â",imagpart:"â",imath:"ı",imof:"â·",imped:"Ƶ",Implies:"â",in:"â",incare:"â
",infin:"â",infintie:"â§",inodot:"ı",Int:"â¬",int:"â«",intcal:"âº",integers:"â¤",Integral:"â«",intercal:"âº",Intersection:"â",intlarhk:"â¨",intprod:"⨼",InvisibleComma:"â£",InvisibleTimes:"â¢",IOcy:"Ð",iocy:"Ñ",Iogon:"Ä®",iogon:"į",Iopf:"\uD835\uDD40",iopf:"\uD835\uDD5A",Iota:"Î",iota:"ι",iprod:"⨼",iquest:"\xbf",Iscr:"â",iscr:"\uD835\uDCBE",isin:"â",isindot:"âµ",isinE:"â¹",isins:"â´",isinsv:"â³",isinv:"â",it:"â¢",Itilde:"Ĩ",itilde:"Ä©",Iukcy:"Ð",iukcy:"Ñ",Iuml:"\xcf",iuml:"\xef",Jcirc:"Ä´",jcirc:"ĵ",Jcy:"Ð",jcy:"й",Jfr:"\uD835\uDD0D",jfr:"\uD835\uDD27",jmath:"È·",Jopf:"\uD835\uDD41",jopf:"\uD835\uDD5B",Jscr:"\uD835\uDCA5",jscr:"\uD835\uDCBF",Jsercy:"Ð",jsercy:"Ñ",Jukcy:"Ð",jukcy:"Ñ",Kappa:"Î",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"Ä·",Kcy:"Ð",kcy:"к",Kfr:"\uD835\uDD0E",kfr:"\uD835\uDD28",kgreen:"ĸ",KHcy:"Ð¥",khcy:"Ñ
",KJcy:"Ð",kjcy:"Ñ",Kopf:"\uD835\uDD42",kopf:"\uD835\uDD5C",Kscr:"\uD835\uDCA6",kscr:"\uD835\uDCC0",lAarr:"â",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"â",Lambda:"Î",lambda:"λ",Lang:"âª",lang:"â¨",langd:"â¦",langle:"â¨",lap:"âª
",Laplacetrf:"â",laquo:"\xab",Larr:"â",lArr:"â",larr:"â",larrb:"â¤",larrbfs:"â¤",larrfs:"â¤",larrhk:"â©",larrlp:"â«",larrpl:"⤹",larrsim:"⥳",larrtl:"â¢",lat:"⪫",lAtail:"â¤",latail:"â¤",late:"âª",lates:"âªï¸",lBarr:"â¤",lbarr:"â¤",lbbrk:"â²",lbrace:"{",lbrack:"[",lbrke:"â¦",lbrksld:"â¦",lbrkslu:"â¦",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ä»",lcedil:"ļ",lceil:"â",lcub:"{",Lcy:"Ð",lcy:"л",ldca:"⤶",ldquo:"â",ldquor:"â",ldrdhar:"⥧",ldrushar:"â¥",ldsh:"â²",lE:"â¦",le:"â¤",LeftAngleBracket:"â¨",LeftArrow:"â",Leftarrow:"â",leftarrow:"â",LeftArrowBar:"â¤",LeftArrowRightArrow:"â",leftarrowtail:"â¢",LeftCeiling:"â",LeftDoubleBracket:"â¦",LeftDownTeeVector:"⥡",LeftDownVector:"â",LeftDownVectorBar:"â¥",LeftFloor:"â",leftharpoondown:"â½",leftharpoonup:"â¼",leftleftarrows:"â",LeftRightArrow:"â",Leftrightarrow:"â",leftrightarrow:"â",leftrightarrows:"â",leftrightharpoons:"â",leftrightsquigarrow:"â",LeftRightVector:"â¥",LeftTee:"â£",LeftTeeArrow:"â¤",LeftTeeVector:"â¥",leftthreetimes:"â",LeftTriangle:"â²",LeftTriangleBar:"â§",LeftTriangleEqual:"â´",LeftUpDownVector:"â¥",LeftUpTeeVector:"⥠",LeftUpVector:"â¿",LeftUpVectorBar:"â¥",LeftVector:"â¼",LeftVectorBar:"â¥",lEg:"âª",leg:"â",leq:"â¤",leqq:"â¦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"â©¿",lesdoto:"âª",lesdotor:"âª",lesg:"âï¸",lesges:"âª",lessapprox:"âª
",lessdot:"â
1",lesseqgtr:"â",lesseqqgtr:"âª",LessEqualGreater:"â",LessFullEqual:"â¦",LessGreater:"â¶",lessgtr:"â¶",LessLess:"⪡",lesssim:"â²",LessSlantEqual:"⩽",LessTilde:"â²",lfisht:"⥼",lfloor:"â",Lfr:"\uD835\uDD0F",lfr:"\uD835\uDD29",lg:"â¶",lgE:"âª",lHar:"⥢",lhard:"â½",lharu:"â¼",lharul:"⥪",lhblk:"â",LJcy:"Ð",ljcy:"Ñ",Ll:"â",ll:"âª",llarr:"â",llcorner:"â",Lleftarrow:"â",llhard:"⥫",lltri:"âº",Lmidot:"Ä¿",lmidot:"Å",lmoust:"â°",lmoustache:"â°",lnap:"âª",lnapprox:"âª",lnE:"â¨",lne:"âª",lneq:"âª",lneqq:"â¨",lnsim:"â¦",loang:"â¬",loarr:"â½",lobrk:"â¦",LongLeftArrow:"âµ",Longleftarrow:"â¸",longleftarrow:"âµ",LongLeftRightArrow:"â·",Longleftrightarrow:"âº",longleftrightarrow:"â·",longmapsto:"â¼",LongRightArrow:"â¶",Longrightarrow:"â¹",longrightarrow:"â¶",looparrowleft:"â«",looparrowright:"â¬",lopar:"â¦
",Lopf:"\uD835\uDD43",lopf:"\uD835\uDD5D",loplus:"â¨",lotimes:"⨴",lowast:"â",lowbar:"_",LowerLeftArrow:"â",LowerRightArrow:"â",loz:"â",lozenge:"â",lozf:"â§«",lpar:"(",lparlt:"â¦",lrarr:"â",lrcorner:"â",lrhar:"â",lrhard:"â¥",lrm:"â",lrtri:"â¿",lsaquo:"â¹",Lscr:"â",lscr:"\uD835\uDCC1",Lsh:"â°",lsh:"â°",lsim:"â²",lsime:"âª",lsimg:"âª",lsqb:"[",lsquo:"â",lsquor:"â",Lstrok:"Å",lstrok:"Å",Lt:"âª",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"â",lthree:"â",ltimes:"â",ltlarr:"⥶",ltquest:"â©»",ltri:"â",ltrie:"â´",ltrif:"â",ltrPar:"â¦",lurdshar:"â¥",luruhar:"⥦",lvertneqq:"â¨ï¸",lvnE:"â¨ï¸",macr:"\xaf",male:"â",malt:"â ",maltese:"â ",Map:"â¤
",map:"â¦",mapsto:"â¦",mapstodown:"â§",mapstoleft:"â¤",mapstoup:"â¥",marker:"â®",mcomma:"⨩",Mcy:"Ð",mcy:"м",mdash:"â",mDDot:"âº",measuredangle:"â¡",MediumSpace:"â",Mellintrf:"â³",Mfr:"\uD835\uDD10",mfr:"\uD835\uDD2A",mho:"â§",micro:"\xb5",mid:"â£",midast:"*",midcir:"â«°",middot:"\xb7",minus:"â",minusb:"â",minusd:"â¸",minusdu:"⨪",MinusPlus:"â",mlcp:"â«",mldr:"â¦",mnplus:"â",models:"â§",Mopf:"\uD835\uDD44",mopf:"\uD835\uDD5E",mp:"â",Mscr:"â³",mscr:"\uD835\uDCC2",mstpos:"â¾",Mu:"Î",mu:"μ",multimap:"â¸",mumap:"â¸",nabla:"â",Nacute:"Å",nacute:"Å",nang:"â â",nap:"â",napE:"⩰̸",napid:"â̸",napos:"Å",napprox:"â",natur:"â®",natural:"â®",naturals:"â",nbsp:"\xa0",nbump:"â̸",nbumpe:"â̸",ncap:"â©",Ncaron:"Å",ncaron:"Å",Ncedil:"Å
",ncedil:"Å",ncong:"â",ncongdot:"â©Ì¸",ncup:"â©",Ncy:"Ð",ncy:"н",ndash:"â",ne:"â ",nearhk:"⤤",neArr:"â",nearr:"â",nearrow:"â",nedot:"â̸",NegativeMediumSpace:"â",NegativeThickSpace:"â",NegativeThinSpace:"â",NegativeVeryThinSpace:"â",nequiv:"â¢",nesear:"⤨",nesim:"â̸",NestedGreaterGreater:"â«",NestedLessLess:"âª",NewLine:"\n",nexist:"â",nexists:"â",Nfr:"\uD835\uDD11",nfr:"\uD835\uDD2B",ngE:"â§Ì¸",nge:"â±",ngeq:"â±",ngeqq:"â§Ì¸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"â̸",ngsim:"âµ",nGt:"â«â",ngt:"â¯",ngtr:"â¯",nGtv:"â«Ì¸",nhArr:"â",nharr:"â®",nhpar:"⫲",ni:"â",nis:"â¼",nisd:"âº",niv:"â",NJcy:"Ð",njcy:"Ñ",nlArr:"â",nlarr:"â",nldr:"â¥",nlE:"â¦Ì¸",nle:"â°",nLeftarrow:"â",nleftarrow:"â",nLeftrightarrow:"â",nleftrightarrow:"â®",nleq:"â°",nleqq:"â¦Ì¸",nleqslant:"⩽̸",nles:"⩽̸",nless:"â®",nLl:"â̸",nlsim:"â´",nLt:"âªâ",nlt:"â®",nltri:"âª",nltrie:"â¬",nLtv:"âªÌ¸",nmid:"â¤",NoBreak:"â ",NonBreakingSpace:"\xa0",Nopf:"â",nopf:"\uD835\uDD5F",Not:"⫬",not:"\xac",NotCongruent:"â¢",NotCupCap:"â",NotDoubleVerticalBar:"â¦",NotElement:"â",NotEqual:"â ",NotEqualTilde:"â̸",NotExists:"â",NotGreater:"â¯",NotGreaterEqual:"â±",NotGreaterFullEqual:"â§Ì¸",NotGreaterGreater:"â«Ì¸",NotGreaterLess:"â¹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"âµ",NotHumpDownHump:"â̸",NotHumpEqual:"â̸",notin:"â",notindot:"âµÌ¸",notinE:"â¹Ì¸",notinva:"â",notinvb:"â·",notinvc:"â¶",NotLeftTriangle:"âª",NotLeftTriangleBar:"â§Ì¸",NotLeftTriangleEqual:"â¬",NotLess:"â®",NotLessEqual:"â°",NotLessGreater:"â¸",NotLessLess:"âªÌ¸",NotLessSlantEqual:"⩽̸",NotLessTilde:"â´",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"â",notniva:"â",notnivb:"â¾",notnivc:"â½",NotPrecedes:"â",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"â ",NotReverseElement:"â",NotRightTriangle:"â«",NotRightTriangleBar:"â§Ì¸",NotRightTriangleEqual:"â",NotSquareSubset:"â̸",NotSquareSubsetEqual:"â¢",NotSquareSuperset:"â̸",NotSquareSupersetEqual:"â£",NotSubset:"ââ",NotSubsetEqual:"â",NotSucceeds:"â",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"â¡",NotSucceedsTilde:"â¿Ì¸",NotSuperset:"ââ",NotSupersetEqual:"â",NotTilde:"â",NotTildeEqual:"â",NotTildeFullEqual:"â",NotTildeTilde:"â",NotVerticalBar:"â¤",npar:"â¦",nparallel:"â¦",nparsl:"⫽â¥",npart:"â̸",npolint:"â¨",npr:"â",nprcue:"â
1 ",npre:"⪯̸",nprec:"â",npreceq:"⪯̸",nrArr:"â",nrarr:"â",nrarrc:"⤳̸",nrarrw:"â̸",nRightarrow:"â",nrightarrow:"â",nrtri:"â«",nrtrie:"â",nsc:"â",nsccue:"â¡",nsce:"⪰̸",Nscr:"\uD835\uDCA9",nscr:"\uD835\uDCC3",nshortmid:"â¤",nshortparallel:"â¦",nsim:"â",nsime:"â",nsimeq:"â",nsmid:"â¤",nspar:"â¦",nsqsube:"â¢",nsqsupe:"â£",nsub:"â",nsubE:"â«
̸",nsube:"â",nsubset:"ââ",nsubseteq:"â",nsubseteqq:"â«
̸",nsucc:"â",nsucceq:"⪰̸",nsup:"â
",nsupE:"â«Ì¸",nsupe:"â",nsupset:"ââ",nsupseteq:"â",nsupseteqq:"â«Ì¸",ntgl:"â¹",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"â¸",ntriangleleft:"âª",ntrianglelefteq:"â¬",ntriangleright:"â«",ntrianglerighteq:"â",Nu:"Î",nu:"ν",num:"#",numero:"â",numsp:"â",nvap:"ââ",nVDash:"â¯",nVdash:"â®",nvDash:"â",nvdash:"â¬",nvge:"â¥â",nvgt:">â",nvHarr:"â¤",nvinfin:"â§",nvlArr:"â¤",nvle:"â¤â",nvlt:"<â",nvltrie:"â´â",nvrArr:"â¤",nvrtrie:"âµâ",nvsim:"â¼â",nwarhk:"⤣",nwArr:"â",nwarr:"â",nwarrow:"â",nwnear:"⤧",Oacute:"\xd3",oacute:"\xf3",oast:"â",ocir:"â",Ocirc:"\xd4",ocirc:"\xf4",Ocy:"Ð",ocy:"о",odash:"â",Odblac:"Å",odblac:"Å",odiv:"⨸",odot:"â",odsold:"⦼",OElig:"Å",oelig:"Å",ofcir:"⦿",Ofr:"\uD835\uDD12",ofr:"\uD835\uDD2C",ogon:"Ë",Ograve:"\xd2",ograve:"\xf2",ogt:"â§",ohbar:"⦵",ohm:"Ω",oint:"â®",olarr:"âº",olcir:"⦾",olcross:"⦻",oline:"â¾",olt:"â§",Omacr:"Å",omacr:"Å",Omega:"Ω",omega:"Ï",Omicron:"Î",omicron:"ο",omid:"⦶",ominus:"â",Oopf:"\uD835\uDD46",oopf:"\uD835\uDD60",opar:"⦷",OpenCurlyDoubleQuote:"â",OpenCurlyQuote:"â",operp:"⦹",oplus:"â",Or:"â©",or:"â¨",orarr:"â»",ord:"â©",order:"â´",orderof:"â´",ordf:"\xaa",ordm:"\xba",origof:"â¶",oror:"â©",orslope:"â©",orv:"â©",oS:"â",Oscr:"\uD835\uDCAA",oscr:"â´",Oslash:"\xd8",oslash:"\xf8",osol:"â",Otilde:"\xd5",otilde:"\xf5",Otimes:"⨷",otimes:"â",otimesas:"⨶",Ouml:"\xd6",ouml:"\xf6",ovbar:"â½",OverBar:"â¾",OverBrace:"â",OverBracket:"â´",OverParenthesis:"â",par:"â¥",para:"\xb6",parallel:"â¥",parsim:"⫳",parsl:"⫽",part:"â",PartialD:"â",Pcy:"Ð",pcy:"п",percnt:"%",period:".",permil:"â°",perp:"â¥",pertenk:"â±",Pfr:"\uD835\uDD13",pfr:"\uD835\uDD2D",Phi:"Φ",phi:"Ï",phiv:"Ï",phmmat:"â³",phone:"â",Pi:"Î ",pi:"Ï",pitchfork:"â",piv:"Ï",planck:"â",planckh:"â",plankv:"â",plus:"+",plusacir:"⨣",plusb:"â",pluscir:"⨢",plusdo:"â",plusdu:"⨥",pluse:"⩲",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"⨦",plustwo:"⨧",pm:"\xb1",Poincareplane:"â",pointint:"â¨",Popf:"â",popf:"\uD835\uDD61",pound:"\xa3",Pr:"⪻",pr:"âº",prap:"⪷",prcue:"â¼",prE:"⪳",pre:"⪯",prec:"âº",precapprox:"⪷",preccurlyeq:"â¼",Precedes:"âº",PrecedesEqual:"⪯",PrecedesSlantEqual:"â¼",PrecedesTilde:"â¾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"â¨",precsim:"â¾",Prime:"â³",prime:"â²",primes:"â",prnap:"⪹",prnE:"⪵",prnsim:"â¨",prod:"â",Product:"â",profalar:"â®",profline:"â",profsurf:"â",prop:"â",Proportion:"â·",Proportional:"â",propto:"â",prsim:"â¾",prurel:"â°",Pscr:"\uD835\uDCAB",pscr:"\uD835\uDCC5",Psi:"Ψ",psi:"Ï",puncsp:"â",Qfr:"\uD835\uDD14",qfr:"\uD835\uDD2E",qint:"â¨",Qopf:"â",qopf:"\uD835\uDD62",qprime:"â",Qscr:"\uD835\uDCAC",qscr:"\uD835\uDCC6",quaternions:"â",quatint:"â¨",quest:"?",questeq:"â",QUOT:'"',quot:'"',rAarr:"â",race:"â½Ì±",Racute:"Å",racute:"Å",radic:"â",raemptyv:"⦳",Rang:"â«",rang:"â©",rangd:"â¦",range:"⦥",rangle:"â©",raquo:"\xbb",Rarr:"â ",rArr:"â",rarr:"â",rarrap:"⥵",rarrb:"â¥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"â¤",rarrhk:"âª",rarrlp:"â¬",rarrpl:"â¥
",rarrsim:"⥴",Rarrtl:"â¤",rarrtl:"â£",rarrw:"â",rAtail:"â¤",ratail:"â¤",ratio:"â¶",rationals:"â",RBarr:"â¤",rBarr:"â¤",rbarr:"â¤",rbbrk:"â³",rbrace:"}",rbrack:"]",rbrke:"â¦",rbrksld:"â¦",rbrkslu:"â¦",Rcaron:"Å",rcaron:"Å",Rcedil:"Å",rcedil:"Å",rceil:"â",rcub:"}",Rcy:"Ð ",rcy:"Ñ",rdca:"⤷",rdldhar:"⥩",rdquo:"â",rdquor:"â",rdsh:"â³",Re:"â",real:"â",realine:"â",realpart:"â",reals:"â",rect:"â",REG:"\xae",reg:"\xae",ReverseElement:"â",ReverseEquilibrium:"â",ReverseUpEquilibrium:"⥯",rf
1isht:"⥽",rfloor:"â",Rfr:"â",rfr:"\uD835\uDD2F",rHar:"⥤",rhard:"â",rharu:"â",rharul:"⥬",Rho:"Ρ",rho:"Ï",rhov:"ϱ",RightAngleBracket:"â©",RightArrow:"â",Rightarrow:"â",rightarrow:"â",RightArrowBar:"â¥",RightArrowLeftArrow:"â",rightarrowtail:"â£",RightCeiling:"â",RightDoubleBracket:"â§",RightDownTeeVector:"â¥",RightDownVector:"â",RightDownVectorBar:"â¥",RightFloor:"â",rightharpoondown:"â",rightharpoonup:"â",rightleftarrows:"â",rightleftharpoons:"â",rightrightarrows:"â",rightsquigarrow:"â",RightTee:"â¢",RightTeeArrow:"â¦",RightTeeVector:"â¥",rightthreetimes:"â",RightTriangle:"â³",RightTriangleBar:"â§",RightTriangleEqual:"âµ",RightUpDownVector:"â¥",RightUpTeeVector:"â¥",RightUpVector:"â¾",RightUpVectorBar:"â¥",RightVector:"â",RightVectorBar:"â¥",ring:"Ë",risingdotseq:"â",rlarr:"â",rlhar:"â",rlm:"â",rmoust:"â±",rmoustache:"â±",rnmid:"â«®",roang:"â",roarr:"â¾",robrk:"â§",ropar:"â¦",Ropf:"â",ropf:"\uD835\uDD63",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"â¦",rppolint:"â¨",rrarr:"â",Rrightarrow:"â",rsaquo:"âº",Rscr:"â",rscr:"\uD835\uDCC7",Rsh:"â±",rsh:"â±",rsqb:"]",rsquo:"â",rsquor:"â",rthree:"â",rtimes:"â",rtri:"â¹",rtrie:"âµ",rtrif:"â¸",rtriltri:"â§",RuleDelayed:"â§´",ruluhar:"⥨",rx:"â",Sacute:"Å",sacute:"Å",sbquo:"â",Sc:"⪼",sc:"â»",scap:"⪸",Scaron:"Å ",scaron:"Å¡",sccue:"â½",scE:"⪴",sce:"⪰",Scedil:"Å",scedil:"Å",Scirc:"Å",scirc:"Å",scnap:"⪺",scnE:"⪶",scnsim:"â©",scpolint:"â¨",scsim:"â¿",Scy:"С",scy:"Ñ",sdot:"â
",sdotb:"â¡",sdote:"⩦",searhk:"⤥",seArr:"â",searr:"â",searrow:"â",sect:"\xa7",semi:";",seswar:"⤩",setminus:"â",setmn:"â",sext:"â¶",Sfr:"\uD835\uDD16",sfr:"\uD835\uDD30",sfrown:"â¢",sharp:"â¯",SHCHcy:"Щ",shchcy:"Ñ",SHcy:"Ш",shcy:"Ñ",ShortDownArrow:"â",ShortLeftArrow:"â",shortmid:"â£",shortparallel:"â¥",ShortRightArrow:"â",ShortUpArrow:"â",shy:"\xad",Sigma:"Σ",sigma:"Ï",sigmaf:"Ï",sigmav:"Ï",sim:"â¼",simdot:"⩪",sime:"â",simeq:"â",simg:"âª",simgE:"⪠",siml:"âª",simlE:"âª",simne:"â",simplus:"⨤",simrarr:"⥲",slarr:"â",SmallCircle:"â",smallsetminus:"â",smashp:"⨳",smeparsl:"⧤",smid:"â£",smile:"â£",smt:"⪪",smte:"⪬",smtes:"⪬ï¸",SOFTcy:"Ь",softcy:"Ñ",sol:"/",solb:"â§",solbar:"â¿",Sopf:"\uD835\uDD4A",sopf:"\uD835\uDD64",spades:"â ",spadesuit:"â ",spar:"â¥",sqcap:"â",sqcaps:"âï¸",sqcup:"â",sqcups:"âï¸",Sqrt:"â",sqsub:"â",sqsube:"â",sqsubset:"â",sqsubseteq:"â",sqsup:"â",sqsupe:"â",sqsupset:"â",sqsupseteq:"â",squ:"â¡",Square:"â¡",square:"â¡",SquareIntersection:"â",SquareSubset:"â",SquareSubsetEqual:"â",SquareSuperset:"â",SquareSupersetEqual:"â",SquareUnion:"â",squarf:"âª",squf:"âª",srarr:"â",Sscr:"\uD835\uDCAE",sscr:"\uD835\uDCC8",ssetmn:"â",ssmile:"â£",sstarf:"â",Star:"â",star:"â",starf:"â
",straightepsilon:"ϵ",straightphi:"Ï",strns:"\xaf",Sub:"â",sub:"â",subdot:"⪽",subE:"â«
",sube:"â",subedot:"â«",submult:"â«",subnE:"â«",subne:"â",subplus:"⪿",subrarr:"⥹",Subset:"â",subset:"â",subseteq:"â",subseteqq:"â«
",SubsetEqual:"â",subsetneq:"â",subsetneqq:"â«",subsim:"â«",subsub:"â«",subsup:"â«",succ:"â»",succapprox:"⪸",succcurlyeq:"â½",Succeeds:"â»",SucceedsEqual:"⪰",SucceedsSlantEqual:"â½",SucceedsTilde:"â¿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"â©",succsim:"â¿",SuchThat:"â",Sum:"â",sum:"â",sung:"âª",Sup:"â",sup:"â",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supdot:"⪾",supdsub:"â«",supE:"â«",supe:"â",supedot:"â«",Superset:"â",SupersetEqual:"â",suphsol:"â",suphsub:"â«",suplarr:"⥻",supmult:"â«",supnE:"â«",supne:"â",supplus:"â«",Supset:"â",supset:"â",supseteq:"â",supseteqq:"â«",supsetneq:"â",supsetneqq:"â«",supsim:"â«",supsub:"â«",supsup:"â«",swarhk:"⤦",swArr:"â",swarr:"â",swarrow:"â",swnwar:"⤪",szlig:"\xdf",Tab:" ",target:"â",Tau:"Τ",tau:"Ï",tbrk:"â´",Tcaron:"Ť",tcaron:"Å¥",Tcedil:"Å¢",tcedil:"Å£",Tcy:"Т",tcy:"Ñ",tdot:"â",telrec:"â",Tfr:"\uD835\uDD17",tfr:"\uD835\uDD31",there4:"â´",Therefore:"â´",therefore:"â´",Theta:"Î",theta:"θ",thetasym:"Ï",thetav:"Ï",thickapprox:"â",thicksim:"â¼",ThickS
1pace:"ââ",thinsp:"â",ThinSpace:"â",thkap:"â",thksim:"â¼",THORN:"\xde",thorn:"\xfe",Tilde:"â¼",tilde:"Ë",TildeEqual:"â",TildeFullEqual:"â
",TildeTilde:"â",times:"\xd7",timesb:"â ",timesbar:"⨱",timesd:"⨰",tint:"â",toea:"⤨",top:"â¤",topbot:"â¶",topcir:"⫱",Topf:"\uD835\uDD4B",topf:"\uD835\uDD65",topfork:"â«",tosa:"⤩",tprime:"â´",TRADE:"â¢",trade:"â¢",triangle:"âµ",triangledown:"â¿",triangleleft:"â",trianglelefteq:"â´",triangleq:"â",triangleright:"â¹",trianglerighteq:"âµ",tridot:"â¬",trie:"â",triminus:"⨺",TripleDot:"â",triplus:"⨹",trisb:"â§",tritime:"⨻",trpezium:"â¢",Tscr:"\uD835\uDCAF",tscr:"\uD835\uDCC9",TScy:"Ц",tscy:"Ñ",TSHcy:"Ð",tshcy:"Ñ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"â¬",twoheadleftarrow:"â",twoheadrightarrow:"â ",Uacute:"\xda",uacute:"\xfa",Uarr:"â",uArr:"â",uarr:"â",Uarrocir:"â¥",Ubrcy:"Ð",ubrcy:"Ñ",Ubreve:"Ŭ",ubreve:"Å",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"У",ucy:"Ñ",udarr:"â
",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"\uD835\uDD18",ufr:"\uD835\uDD32",Ugrave:"\xd9",ugrave:"\xf9",uHar:"⥣",uharl:"â¿",uharr:"â¾",uhblk:"â",ulcorn:"â",ulcorner:"â",ulcrop:"â",ultri:"â¸",Umacr:"Ū",umacr:"Å«",uml:"\xa8",UnderBar:"_",UnderBrace:"â",UnderBracket:"âµ",UnderParenthesis:"â",Union:"â",UnionPlus:"â",Uogon:"Ų",uogon:"ų",Uopf:"\uD835\uDD4C",uopf:"\uD835\uDD66",UpArrow:"â",Uparrow:"â",uparrow:"â",UpArrowBar:"â¤",UpArrowDownArrow:"â
",UpDownArrow:"â",Updownarrow:"â",updownarrow:"â",UpEquilibrium:"⥮",upharpoonleft:"â¿",upharpoonright:"â¾",uplus:"â",UpperLeftArrow:"â",UpperRightArrow:"â",Upsi:"Ï",upsi:"Ï
",upsih:"Ï",Upsilon:"Î¥",upsilon:"Ï
",UpTee:"â¥",UpTeeArrow:"â¥",upuparrows:"â",urcorn:"â",urcorner:"â",urcrop:"â",Uring:"Å®",uring:"ů",urtri:"â¹",Uscr:"\uD835\uDCB0",uscr:"\uD835\uDCCA",utdot:"â°",Utilde:"Ũ",utilde:"Å©",utri:"âµ",utrif:"â´",uuarr:"â",Uuml:"\xdc",uuml:"\xfc",uwangle:"⦧",vangrt:"â¦",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"â
",varphi:"Ï",varpi:"Ï",varpropto:"â",vArr:"â",varr:"â",varrho:"ϱ",varsigma:"Ï",varsubsetneq:"âï¸",varsubsetneqq:"â«ï¸",varsupsetneq:"âï¸",varsupsetneqq:"â«ï¸",vartheta:"Ï",vartriangleleft:"â²",vartriangleright:"â³",Vbar:"â««",vBar:"⫨",vBarv:"â«©",Vcy:"Ð",vcy:"в",VDash:"â«",Vdash:"â©",vDash:"â¨",vdash:"â¢",Vdashl:"⫦",Vee:"â",vee:"â¨",veebar:"â»",veeeq:"â",vellip:"â®",Verbar:"â",verbar:"|",Vert:"â",vert:"|",VerticalBar:"â£",VerticalLine:"|",VerticalSeparator:"â",VerticalTilde:"â",VeryThinSpace:"â",Vfr:"\uD835\uDD19",vfr:"\uD835\uDD33",vltri:"â²",vnsub:"ââ",vnsup:"ââ",Vopf:"\uD835\uDD4D",vopf:"\uD835\uDD67",vprop:"â",vrtri:"â³",Vscr:"\uD835\uDCB1",vscr:"\uD835\uDCCB",vsubnE:"â«ï¸",vsubne:"âï¸",vsupnE:"â«ï¸",vsupne:"âï¸",Vvdash:"âª",vzigzag:"â¦",Wcirc:"Å´",wcirc:"ŵ",wedbar:"â©",Wedge:"â",wedge:"â§",wedgeq:"â",weierp:"â",Wfr:"\uD835\uDD1A",wfr:"\uD835\uDD34",Wopf:"\uD835\uDD4E",wopf:"\uD835\uDD68",wp:"â",wr:"â",wreath:"â",Wscr:"\uD835\uDCB2",wscr:"\uD835\uDCCC",xcap:"â",xcirc:"â¯",xcup:"â",xdtri:"â½",Xfr:"\uD835\uDD1B",xfr:"\uD835\uDD35",xhArr:"âº",xharr:"â·",Xi:"Î",xi:"ξ",xlArr:"â¸",xlarr:"âµ",xmap:"â¼",xnis:"â»",xodot:"â¨",Xopf:"\uD835\uDD4F",xopf:"\uD835\uDD69",xoplus:"â¨",xotime:"â¨",xrArr:"â¹",xrarr:"â¶",Xscr:"\uD835\uDCB3",xscr:"\uD835\uDCCD",xsqcup:"â¨",xuplus:"â¨",xutri:"â³",xvee:"â",xwedge:"â",Yacute:"\xdd",yacute:"\xfd",YAcy:"Я",yacy:"Ñ",Ycirc:"Ŷ",ycirc:"Å·",Ycy:"Ы",ycy:"Ñ",yen:"\xa5",Yfr:"\uD835\uDD1C",yfr:"\uD835\uDD36",YIcy:"Ð",yicy:"Ñ",Yopf:"\uD835\uDD50",yopf:"\uD835\uDD6A",Yscr:"\uD835\uDCB4",yscr:"\uD835\uDCCE",YUcy:"Ю",yucy:"Ñ",Yuml:"Ÿ",yuml:"\xff",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"Ð",zcy:"з",Zdot:"Å»",zdot:"ż",zeetrf:"â¨",ZeroWidthSpace:"â",Zeta:"Î",zeta:"ζ",Zfr:"â¨",zfr:"\uD835\uDD37",ZHcy:"Ð",zhcy:"ж",zigrarr:"â",Zopf:"â¤",zopf:"\uD835\uDD6B",Zscr:"\uD835\uDCB5",zscr:"\uD835\uDCCF",zwj:"â",zwnj:"â"}),e.entityMap=e.HTML_ENTITIES},2654:(t,e,i)=>{var r=i(3693),n=i(6745);
1t.exports=function(t,e,i){var s=!0,o=!0;if("function"!=typeof t)throw TypeError("Expected a function");return n(i)&&(s="leading"in i?!!i.leading:s,o="trailing"in i?!!i.trailing:o),r(t,e,{leading:s,maxWait:e,trailing:o})}},2883:t=>{"use strict";t.exports={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12",RAW_LINE:"13"}},2987:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});let r=(0,i(1847).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},3385:(t,e,i)=>{"use strict";t.exports=i(5502)()?Object.keys:i(4222)},3423:(t,e,i)=>{t.exports=i(1483).Symbol},3524:(t,e,i)=>{var r=i(8360),n=i(5396),s=i(2483),o=i(7840),a=n.DOMImplementation,h=r.NAMESPACE,l=o.ParseError,c=o.XMLReader;function u(t){this.options=t||{locator:{}}}function d(){this.cdata=!1}function p(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function f(t){if(t)return"\n@"+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function g(t,e,i){return"string"==typeof t?t.substr(e,i):t.length>=e+i||e?new java.lang.String(t,e,i)+"":t}function m(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}u.prototype.parseFromString=function(t,e){var i=this.options,r=new c,n=i.domBuilder||new d,o=i.errorHandler,a=i.locator,l=i.xmlns||{},u=/\/x?html?$/.test(e),p=u?s.HTML_ENTITIES:s.XML_ENTITIES;return a&&n.setDocumentLocator(a),r.errorHandler=function(t,e,i){if(!t){if(e instanceof d)return e;t=e}var r={},n=t instanceof Function;function s(e){var s=t[e];!s&&n&&(s=2==t.length?function(i){t(e,i)}:t),r[e]=s&&function(t){s("[xmldom "+e+"] "+t+f(i))}||function(){}}return i=i||{},s("warning"),s("error"),s("fatalError"),r}(o,n,a),r.domBuilder=i.domBuilder||n,u&&(l[""]=h.HTML),l.xml=l.xml||h.XML,t&&"string"==typeof t?r.parse(t,l,p):r.errorHandler.error("invalid doc source"),n.doc},d.prototype={startDocument:function(){this.doc=new a().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,i,r){var n=this.doc,s=n.createElementNS(t,i||e),o=r.length;m(this,s),this.currentElement=s,this.locator&&p(this.locator,s);for(var a=0;a<o;a++){var t=r.getURI(a),h=r.getValue(a),i=r.getQName(a),l=n.createAttributeNS(t,i);this.locator&&p(r.getLocator(a),l),l.value=l.nodeValue=h,s.setAttributeNode(l)}},endElement:function(t,e,i){var r=this.currentElement;r.tagName,this.currentElement=r.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var i=this.doc.createProcessingInstruction(t,e);this.locator&&p(this.locator,i),m(this,i)},ignorableWhitespace:function(t,e,i){},characters:function(t,e,i){if(t=g.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(t);else var r=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(t)&&this.doc.appendChild(r),this.locator&&p(this.locator,r)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,i){t=g.apply(this,arguments);var r=this.doc.createComment(t);this.locator&&p(this.locator,r),m(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,i){var r=this.doc.implementation;if(r&&r.createDocumentType){var n=r.createDocumentType(t,e,i);this.locator&&p(this.locator,n),m(this,n),this.doc.doctype=n}},warning:function(t){console.warn("[xmldom warning] "+t,f(this.locator))},error:function(t){console.error("[xmldom error] "+t,f(this.locator))},fatalError:function(t){throw new l(t,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){d.prototype[t]=function(){return null}}),e.DOMParser=u,n.DOMImplementation,n.XMLSerializer},3540:t=>{"use strict";t.exports=({workerPath:t,workerBlobURL:e})=>{let i;if(Blob&&URL&&e){let e=new Blob([`importScripts("${t}");`],{type:"application/javascript"});i=new Worker(URL.createObjectURL(e))}else i=new Worker(t);return i}},3630:(t,e,i)=>{"use strict";e.z2=e.f4=e.Zv=void 0;var r=function t(e,i,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,i);if(void 0===n){var s=Object.getPrototypeOf(e);if(null===s)return;return t(s,i,r)}if("value"in n)return n.value;var o=n.get;if(void 0!==o)return o.call(r)},n=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}
1return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),s=a(i(1998)),o=a(i(9693));function a(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&("object"==typeof e||"function"==typeof e)?e:t}function l(t,e){if("function"!=typeof e&&null!==e)throw 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 TypeError("Cannot call a class as a function")}e.Zv=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=s.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=s.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(){o=this.element,a=(r=this.target,n=this.container.getBoundingClientRect(),{top:(s=r.getBoundingClientRect()).top-n.top,left:s.left-n.left,height:r.scrollHeight,width:r.scrollWidth}),o.style.setProperty("top",a.top+"px","important"),o.style.setProperty("left",a.left+"px","important"),o.style.setProperty("height",a.height+"px","important"),o.style.setProperty("width",a.width+"px","important");var t=!0,e=!1,i=void 0;try{for(var r,n,s,o,a,h,l=this.marks[Symbol.iterator]();!(t=(h=l.next()).done);t=!0)h.value.render()}catch(t){e=!0,i=t}finally{try{!t&&l.return&&l.return()}finally{if(e)throw i}}}}]),t}();var u=e.f4=function(t){function e(t,i,r,n){c(this,e);var s=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return s.range=t,s.className=i,s.data=r||{},s.attributes=n||{},s}return l(e,t),n(e,[{key:"bind",value:function(t,i){for(var n in r(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(),r=this.container.getBoundingClientRect(),n=0,o=e.length;n<o;n++){var a=e[n],h=s.default.createElement("rect");h.setAttribute("x",a.left-i.left+r.left),h.setAttribute("y",a.top-i.top+r.top),h.setAttribute("height",a.height),h.setAttribute("width",a.width),t.appendChild(h)}this.element.appendChild(t)}}]),e}(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,r,n=0;n<t.length&&t[n]!==e;n++){if(i=t[n],(r=e).right<=i.right&&r.left>=i.left&&r.top>=i.top&&r.bottom<=i.bottom)return!1}return!0})}}]),t}());e.z2=function(t){function e(t,i,r,n){return c(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,i,r,n))}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(),r=this.container.getBoundingClientRect(),n=0,o=e.length;n<o;n++){var a=e[n],h=s.default.createElement("rect");h.setAttribute("x",a.left-i.left+r.left),h.setAttribute("y",a.top-i.top+r.top),h.setAttribute("height",a.height),h.setAttribute("width",a.width),h.setAttribute("fill","none");var l=s.default.createElement("line");l.setAttribute("x1",a.left-i.left+r.left),l.setAttribute("x2",a.left-i.left+r.left+a.width),l.setAttribute("y1",a.top-i.top+r.top+a.height-1),l.setAttribute("y2",a.top-i.top+r.top+a.height-1),l.setAttribute("stroke-width",1),l.setAttribute("stroke","black"),l.setAttribute("stroke-linecap","square"),t.appendChild(h),t.appendChild(l)}this.element.appendChild(t)}}]),e}(u)},3684:t=>{"use strict";
1t.exports={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"}},3693:(t,e,i)=>{var r=i(6745),n=i(6810),s=i(1982),o=Math.max,a=Math.min;t.exports=function(t,e,i){var h,l,c,u,d,p,f=0,g=!1,m=!1,v=!0;if("function"!=typeof t)throw TypeError("Expected a function");function y(e){var i=h,r=l;return h=l=void 0,f=e,u=t.apply(r,i)}function b(t){var i=t-p,r=t-f;return void 0===p||i>=e||i<0||m&&r>=c}function w(){var t,i,r,s=n();if(b(s))return x(s);d=setTimeout(w,(t=s-p,i=s-f,r=e-t,m?a(r,c-i):r))}function x(t){return(d=void 0,v&&h)?y(t):(h=l=void 0,u)}function E(){var t,i=n(),r=b(i);if(h=arguments,l=this,p=i,r){if(void 0===d)return f=t=p,d=setTimeout(w,e),g?y(t):u;if(m)return clearTimeout(d),d=setTimeout(w,e),y(p)}return void 0===d&&(d=setTimeout(w,e)),u}return e=s(e)||0,r(i)&&(g=!!i.leading,c=(m="maxWait"in i)?o(s(i.maxWait)||0,e):c,v="trailing"in i?!!i.trailing:v),E.cancel=function(){void 0!==d&&clearTimeout(d),f=0,h=p=l=d=void 0},E.flush=function(){return void 0===d?u:x(n())},E}},3815:t=>{"use strict";let e=t=>new Promise((e,i)=>{let r=new FileReader;r.onload=()=>{e(r.result)},r.onerror=({target:{error:{code:t}}})=>{i(Error(`File could not be read! Code=${t}`))},r.readAsArrayBuffer(t)}),i=async t=>{let r=t;if(void 0===t)return"undefined";if("string"==typeof t)if(/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(t))r=atob(t.split(",")[1]).split("").map(t=>t.charCodeAt(0));else{let e=await fetch(t);r=await e.arrayBuffer()}else if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)"IMG"===t.tagName&&(r=await i(t.src)),"VIDEO"===t.tagName&&(r=await i(t.poster)),"CANVAS"===t.tagName&&await new Promise(i=>{t.toBlob(async t=>{r=await e(t),i()})});else if("undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas){let i=await t.convertToBlob();r=await e(i)}else(t instanceof File||t instanceof Blob)&&(r=await e(t));return new Uint8Array(r)};t.exports=i},4222:(t,e,i)=>{"use strict";var r=i(8046),n=Object.keys;t.exports=function(t){return n(r(t)?Object(t):t)}},4402:(t,e,i)=>{t.exports="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g}
1,4455:(t,e,i)=>{"use strict";var r=i(6907),n=i(9643),s=i(1060),o=i(8006),a=i(772);(t.exports=function(t,e){var i,n,h,l,c;return arguments.length<2||"string"!=typeof t?(l=e,e=t,t=null):l=arguments[2],r(t)?(i=a.call(t,"c"),n=a.call(t,"e"),h=a.call(t,"w")):(i=h=!0,n=!1),c={value:e,configurable:i,enumerable:n,writable:h},l?s(o(l),c):c}).gs=function(t,e,i){var h,l,c,u;return"string"!=typeof t?(c=i,i=e,e=t,t=null):c=arguments[3],r(e)?n(e)?r(i)?n(i)||(c=i,i=void 0):i=void 0:(c=e,e=i=void 0):e=void 0,r(t)?(h=a.call(t,"c"),l=a.call(t,"e")):(h=!0,l=!1),u={get:e,set:i,configurable:h,enumerable:l},c?s(o(c),u):u}},4560:t=>{"use strict";t.exports={rE:"7.0.0"}},4793:t=>{"use strict";if(!e)var e={cwd:function(){return"/"}};function i(t){if("string"!=typeof t)throw TypeError("Path must be a string. Received "+t)}function r(t,e){for(var i,r="",n=-1,s=0,o=0;o<=t.length;++o){if(o<t.length)i=t.charCodeAt(o);else if(47===i)break;else i=47;if(47===i){if(n===o-1||1===s);else if(n!==o-1&&2===s){if(r.length<2||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2)){if(r.length>2){for(var a=r.length-1,h=a;h>=0&&47!==r.charCodeAt(h);--h);if(h!==a){r=-1===h?"":r.slice(0,h),n=o,s=0;continue}}else if(2===r.length||1===r.length){r="",n=o,s=0;continue}}e&&(r.length>0?r+="/..":r="..")}else r.length>0?r+="/"+t.slice(n+1,o):r=t.slice(n+1,o);n=o,s=0}else 46===i&&-1!==s?++s:s=-1}return r}var n={resolve:function(){for(var t,n,s="",o=!1,a=arguments.length-1;a>=-1&&!o;a--)a>=0?n=arguments[a]:(void 0===t&&(t=e.cwd()),n=t),i(n),0!==n.length&&(s=n+"/"+s,o=47===n.charCodeAt(0));if(s=r(s,!o),o)if(s.length>0)return"/"+s;else return"/";return s.length>0?s:"."},normalize:function(t){if(i(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return(0!==(t=r(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e)?"/"+t:t},isAbsolute:function(t){return i(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 r=arguments[e];i(r),r.length>0&&(void 0===t?t=r:t+="/"+r)}return void 0===t?".":n.normalize(t)},relative:function(t,e){if(i(t),i(e),t===e||(t=n.resolve(t))===(e=n.resolve(e)))return"";for(var r=1;r<t.length&&47===t.charCodeAt(r);++r);for(var s=t.length,o=s-r,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var h=e.length-a,l=o<h?o:h,c=-1,u=0;u<=l;++u){if(u===l){if(h>l){if(47===e.charCodeAt(a+u))return e.slice(a+u+1);else if(0===u)return e.slice(a+u)}else o>l&&(47===t.charCodeAt(r+u)?c=u:0===u&&(c=0));break}var d=t.charCodeAt(r+u);if(d!==e.charCodeAt(a+u))break;47===d&&(c=u)}var p="";for(u=r+c+1;u<=s;++u)(u===s||47===t.charCodeAt(u))&&(0===p.length?p+="..":p+="/..");return p.length>0?p+e.slice(a+c):(a+=c,47===e.charCodeAt(a)&&++a,e.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(i(t),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,s=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!s){n=o;break}}else s=!1;return -1===n?r?"/":".":r&&1===n?"//":t.slice(0,n)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw TypeError('"ext" argument must be a string');i(t);var r,n=0,s=-1,o=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var a=e.length-1,h=-1;for(r=t.length-1;r>=0;--r){var l=t.charCodeAt(r);if(47===l){if(!o){n=r+1;break}}else -1===h&&(o=!1,h=r+1),a>=0&&(l===e.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=h))}return n===s?s=h:-1===s&&(s=t.length),t.slice(n,s)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!o){n=r+1;break}}else -1===s&&(o=!1,s=r+1);return -1===s?"":t.slice(n,s)},extname:function(t){i(t);for(var e=-1,r=0,n=-1,s=!0,o=0,a=t.length-1;a>=0;--a){var h=t.charCodeAt(a);if(47===h){if(!s){r=a+1;break}continue}-1===n&&(s=!1,n=a+1),46===h?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1)}return -1===e||-1===n||0===o||1===o&&e===n-1&&e===r+1?"":t.slice(e,n)},format:function(t){var e,i;if(null===t||"object"!=typeof t)throw TypeError('Parameter "pathObject" must be an object, not '+typeof t);return e=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||""),e?e===t.root?e+i:e+"/"+i:i},parse:function(t){i(t);var e,r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n=t.charCodeAt(0),s=47===n;s?(r.root="/",e=1):e=0;for(var o=-1,a=0,h=-1,l=!0,c=t.length-1,u=0;c>=e;
1--c){if(47===(n=t.charCodeAt(c))){if(!l){a=c+1;break}continue}-1===h&&(l=!1,h=c+1),46===n?-1===o?o=c:1!==u&&(u=1):-1!==o&&(u=-1)}return -1===o||-1===h||0===u||1===u&&o===h-1&&o===a+1?-1!==h&&(0===a&&s?r.base=r.name=t.slice(1,h):r.base=r.name=t.slice(a,h)):(0===a&&s?(r.name=t.slice(1,o),r.base=t.slice(1,h)):(r.name=t.slice(a,o),r.base=t.slice(a,h)),r.ext=t.slice(o,h)),a>0?r.dir=t.slice(0,a-1):s&&(r.dir="/"),r},sep:"/",delimiter:":",posix:null};t.exports=n},5057:(t,e,i)=>{"use strict";let r=i(9609),n=i(5718),{log:s}=i(9501),o=i(2178),a=i(1548),{defaultOptions:h,spawnWorker:l,terminateWorker:c,onMessage:u,loadImage:d,send:p}=i(5573),f=0;t.exports=async(t="eng",e=a.LSTM_ONLY,i={},g={})=>{let m,v,y=o("Worker",f),{logger:b,errorHandler:w,...x}=r({...h,...i}),E={},D="string"==typeof t?t.split("+"):t,S=e,T=g,N=[a.DEFAULT,a.LSTM_ONLY].includes(e)&&!x.legacyCore,C=new Promise((t,e)=>{v=t,m=e}),_=l(x);_.onerror=t=>{m(t.message)},f+=1;let L=({id:t,action:e,payload:i})=>new Promise((r,n)=>{s(`[${y}]: Start ${t}, action=${e}`),E[`${e}-${t}`]={resolve:r,reject:n},p(_,{workerId:y,jobId:t,action:e,payload:i})}),k=(t,e)=>L(n({id:e,action:"loadLanguage",payload:{langs:t,options:{langPath:x.langPath,dataPath:x.dataPath,cachePath:x.cachePath,cacheMethod:x.cacheMethod,gzip:x.gzip,lstmOnly:[a.DEFAULT,a.LSTM_ONLY].includes(S)&&!x.legacyLang}}})),A=(t,e,i,r)=>L(n({id:r,action:"initialize",payload:{langs:t,oem:e,config:i}})),R=async(t,e={},i={text:!0},r)=>L(n({id:r,action:"recognize",payload:{image:await d(t),options:e,output:i}})),O=async(t,e)=>{if(N)throw Error("`worker.detect` requires Legacy model, which was not loaded.");return L(n({id:e,action:"detect",payload:{image:await d(t)}}))},I=async()=>(null!==_&&(c(_),_=null),Promise.resolve());u(_,({workerId:t,jobId:e,status:i,action:r,data:n})=>{let o=`${r}-${e}`;if("resolve"===i)s(`[${t}]: Complete ${e}`),E[o].resolve({jobId:e,data:n}),delete E[o];else if("reject"===i)if(E[o].reject(n),delete E[o],"load"===r&&m(n),w)w(n);else throw Error(n);else"progress"===i&&b({...n,userJobId:e})});let q={id:y,worker:_,load:()=>console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"),writeText:(t,e,i)=>L(n({id:i,action:"FS",payload:{method:"writeFile",args:[t,e]}})),readText:(t,e)=>L(n({id:e,action:"FS",payload:{method:"readFile",args:[t,{encoding:"utf8"}]}})),removeFile:(t,e)=>L(n({id:e,action:"FS",payload:{method:"unlink",args:[t]}})),FS:(t,e,i)=>L(n({id:i,action:"FS",payload:{method:t,args:e}})),reinitialize:(t="eng",e,i,r)=>{if(N&&[a.TESSERACT_ONLY,a.TESSERACT_LSTM_COMBINED].includes(e))throw Error("Legacy model requested but code missing.");let n=e||S;S=n;let s=i||T;T=s;let o=("string"==typeof t?t.split("+"):t).filter(t=>!D.includes(t));return(D.push(...o),o.length>0)?k(o,r).then(()=>A(t,n,s,r)):A(t,n,s,r)},setParameters:(t={},e)=>L(n({id:e,action:"setParameters",payload:{params:t}})),recognize:R,detect:O,terminate:I};return L(n({id:void 0,action:"load",payload:{options:{lstmOnly:N,corePath:x.corePath,logging:x.logging}}})).then(()=>k(t)).then(()=>A(t,e,g)).then(()=>v(q)).catch(()=>{}),C}},5299:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});let r=(0,i(1847).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},5396:(t,e,i)=>{var r=i(8360),n=r.find,s=r.NAMESPACE;function o(t){return""!==t}function a(t,e){return t.hasOwnProperty(e)||(t[e]=!0),t}function h(t){return t?Object.keys((t?t.split(/[\t\n\f\r ]+/).filter(o):[]).reduce(a,{})):[]}function l(t,e){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}function c(t,e){var i=t.prototype;if(!(i instanceof e)){function r(){}r.prototype=e.prototype,l(i,r=new r),t.prototype=i=r}i.constructor!=t&&("function"!=typeof t&&console.error("unknown Class:"+t),i.constructor=t)}var u={},d=u.ELEMENT_NODE=1,p=u.ATTRIBUTE_NODE=2,f=u.TEXT_NODE=3,g=u.CDATA_SECTION_NODE=4,m=u.ENTITY_REFERENCE_NODE=5,v=u.ENTITY_NODE=6,y=u.PROCESSING_INSTRUCTION_NODE=7,b=u.COMMENT_NODE=8,w=u.DOCUMENT_NODE=9,x=u.DOCUMENT_TYPE_NODE=10,E=u.DOCUMENT_FRAGMENT_NODE=11,D=u.NOTATION_NODE=12,S={},T={};T[1]="Index size error",S.INDEX_SIZE_ERR=1,T[2]="DOMString size error",S.DOMSTRING_SIZE_ERR=2;var N=(T[3]="Hierarchy request error",S.HIERARCHY_REQUEST_ERR=3);T[4]="Wrong document",S.WRONG_DOCUMENT_ERR=4,T[5]="Invalid character",S.INVALID_CHARACTER_ERR=5,T[6]="No data allowed",S.NO_DATA_ALLOWED_ER
1R=6,T[7]="No modification allowed",S.NO_MODIFICATION_ALLOWED_ERR=7;var C=(T[8]="Not found",S.NOT_FOUND_ERR=8);T[9]="Not supported",S.NOT_SUPPORTED_ERR=9;var _=(T[10]="Attribute in use",S.INUSE_ATTRIBUTE_ERR=10);function L(t,e){if(e instanceof Error)var i=e;else i=this,Error.call(this,T[t]),this.message=T[t],Error.captureStackTrace&&Error.captureStackTrace(this,L);return i.code=t,e&&(this.message=this.message+": "+e),i}function k(){}function A(t,e){this._node=t,this._refresh=e,R(this)}function R(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var i=t._refresh(t._node);if(tg(t,"length",i.length),!t.$$length||i.length<t.$$length)for(var r=i.length;r in t;r++)Object.prototype.hasOwnProperty.call(t,r)&&delete t[r];l(i,t),t._inc=e}}function O(){}function I(t,e){for(var i=t.length;i--;)if(t[i]===e)return i}function q(t,e,i,r){if(r?e[I(e,r)]=i:e[e.length++]=i,t){i.ownerElement=t;var n,o,a,h=t.ownerDocument;h&&(r&&F(h,t,r),n=h,o=t,a=i,n&&n._inc++,a.namespaceURI===s.XMLNS&&(o._nsMap[a.prefix?a.localName:""]=a.value))}}function P(t,e,i){var r=I(e,i);if(r>=0){for(var n=e.length-1;r<n;)e[r]=e[++r];if(e.length=n,t){var s=t.ownerDocument;s&&(F(s,t,i),i.ownerElement=null)}}else throw new L(C,Error(t.tagName+"@"+i))}function M(){}function B(){}function z(t){return"<"==t&&"<"||">"==t&&">"||"&"==t&&"&"||'"'==t&&"""||"&#"+t.charCodeAt()+";"}function j(t,e){if(e(t))return!0;if(t=t.firstChild)do if(j(t,e))return!0;while(t=t.nextSibling)}function U(){this.ownerDocument=this}function F(t,e,i,r){t&&t._inc++,i.namespaceURI===s.XMLNS&&delete e._nsMap[i.prefix?i.localName:""]}function W(t,e,i){if(t&&t._inc){t._inc++;var r=e.childNodes;if(i)r[r.length++]=i;else{for(var n=e.firstChild,s=0;n;)r[s++]=n,n=n.nextSibling;r.length=s,delete r[r.length]}}}function H(t,e){var i=e.previousSibling,r=e.nextSibling;return i?i.nextSibling=r:t.firstChild=r,r?r.previousSibling=i:t.lastChild=i,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,W(t.ownerDocument,t),e}function V(t){return t&&t.nodeType===B.DOCUMENT_TYPE_NODE}function G(t){return t&&t.nodeType===B.ELEMENT_NODE}function X(t){return t&&t.nodeType===B.TEXT_NODE}function Y(t,e){var i=t.childNodes||[];if(n(i,G)||V(e))return!1;var r=n(i,V);return!(e&&r&&i.indexOf(r)>i.indexOf(e))}function $(t,e){var i=t.childNodes||[];if(n(i,function(t){return G(t)&&t!==e}))return!1;var r=n(i,V);return!(e&&r&&i.indexOf(r)>i.indexOf(e))}function K(t,e,i){var r=t.childNodes||[],s=e.childNodes||[];if(e.nodeType===B.DOCUMENT_FRAGMENT_NODE){var o=s.filter(G);if(o.length>1||n(s,X))throw new L(N,"More than one element or text in fragment");if(1===o.length&&!$(t,i))throw new L(N,"Element in fragment can not be inserted before doctype")}if(G(e)&&!$(t,i))throw new L(N,"Only one element can be added and only after doctype");if(V(e)){if(n(r,function(t){return V(t)&&t!==i}))throw new L(N,"Only one doctype is allowed");var a=n(r,G);if(i&&r.indexOf(a)<r.indexOf(i))throw new L(N,"Doctype can only be inserted before an element")}}function Z(t,e,i,r){if(!(t&&(t.nodeType===B.DOCUMENT_NODE||t.nodeType===B.DOCUMENT_FRAGMENT_NODE||t.nodeType===B.ELEMENT_NODE)))throw new L(N,"Unexpected parent node type "+t.nodeType);if(i&&i.parentNode!==t)throw new L(C,"child not in parent");if(!(e&&(G(e)||X(e)||V(e)||e.nodeType===B.DOCUMENT_FRAGMENT_NODE||e.nodeType===B.COMMENT_NODE||e.nodeType===B.PROCESSING_INSTRUCTION_NODE))||V(e)&&t.nodeType!==B.DOCUMENT_NODE)throw new L(N,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType);t.nodeType===B.DOCUMENT_NODE&&(r||function(t,e,i){var r=t.childNodes||[],s=e.childNodes||[];if(e.nodeType===B.DOCUMENT_FRAGMENT_NODE){var o=s.filter(G);if(o.length>1||n(s,X))throw new L(N,"More than one element or text in fragment");if(1===o.length&&!Y(t,i))throw new L(N,"Element in fragment can not be inserted before doctype")}if(G(e)&&!Y(t,i))throw new L(N,"Only one element can be added and only after doctype");if(V(e)){if(n(r,V))throw new L(N,"Only one doctype is allowed");var a=n(r,G);if(i&&r.indexOf(a)<r.indexOf(i))throw new L(N,"Doctype can only be inserted before an element");
1if(!i&&a)throw new L(N,"Doctype can not be appended since element is present")}})(t,e,i);var s=e.parentNode;if(s&&s.removeChild(e),e.nodeType===E){var o=e.firstChild;if(null==o)return e;var a=e.lastChild}else o=a=e;var h=i?i.previousSibling:t.lastChild;o.previousSibling=h,a.nextSibling=i,h?h.nextSibling=o:t.firstChild=o,null==i?t.lastChild=a:i.previousSibling=a;do o.parentNode=t;while(o!==a&&(o=o.nextSibling));return W(t.ownerDocument||t,t),e.nodeType==E&&(e.firstChild=e.lastChild=null),e}function J(){this._nsMap={}}function Q(){}function tt(){}function te(){}function ti(){}function tr(){}function tn(){}function ts(){}function to(){}function ta(){}function th(){}function tl(){}function tc(){}function tu(t,e){var i=[],r=9==this.nodeType&&this.documentElement||this,n=r.prefix,s=r.namespaceURI;if(s&&null==n){var n=r.lookupPrefix(s);if(null==n)var o=[{namespace:s,prefix:null}]}return tf(this,i,t,e,o),i.join("")}function td(t,e,i){var r=t.prefix||"",n=t.namespaceURI;if(!n||"xml"===r&&n===s.XML||n===s.XMLNS)return!1;for(var o=i.length;o--;){var a=i[o];if(a.prefix===r)return a.namespace!==n}return!0}function tp(t,e,i){t.push(" ",e,'="',i.replace(/[<&"]/g,z),'"')}function tf(t,e,i,r,n){if(n||(n=[]),r){if(!(t=r(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case d:var o,a=t.attributes,h=a.length,l=t.firstChild,c=t.tagName;i=s.isHTML(t.namespaceURI)||i;var u=c;if(!i&&!t.prefix&&t.namespaceURI){for(var v=0;v<a.length;v++)if("xmlns"===a.item(v).name){o=a.item(v).value;break}if(!o)for(var D=n.length-1;D>=0;D--){var S=n[D];if(""===S.prefix&&S.namespace===t.namespaceURI){o=S.namespace;break}}if(o!==t.namespaceURI)for(var D=n.length-1;D>=0;D--){var S=n[D];if(S.namespace===t.namespaceURI){S.prefix&&(u=S.prefix+":"+c);break}}}e.push("<",u);for(var T=0;T<h;T++){var N=a.item(T);"xmlns"==N.prefix?n.push({prefix:N.localName,namespace:N.value}):"xmlns"==N.nodeName&&n.push({prefix:"",namespace:N.value})}for(var T=0;T<h;T++){var N=a.item(T);if(td(N,i,n)){var C=N.prefix||"",_=N.namespaceURI;tp(e,C?"xmlns:"+C:"xmlns",_),n.push({prefix:C,namespace:_})}tf(N,e,i,r,n)}if(c===u&&td(t,i,n)){var C=t.prefix||"",_=t.namespaceURI;tp(e,C?"xmlns:"+C:"xmlns",_),n.push({prefix:C,namespace:_})}if(l||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(e.push(">"),i&&/^script$/i.test(c))for(;l;)l.data?e.push(l.data):tf(l,e,i,r,n.slice()),l=l.nextSibling;else for(;l;)tf(l,e,i,r,n.slice()),l=l.nextSibling;e.push("</",u,">")}else e.push("/>");return;case w:case E:for(var l=t.firstChild;l;)tf(l,e,i,r,n.slice()),l=l.nextSibling;return;case p:return tp(e,t.name,t.value);case f:return e.push(t.data.replace(/[<&]/g,z).replace(/]]>/g,"]]>"));case g:return e.push("<![CDATA[",t.data,"]]>");case b:return e.push("\x3c!--",t.data,"--\x3e");case x:var L=t.publicId,k=t.systemId;if(e.push("<!DOCTYPE ",t.name),L)e.push(" PUBLIC ",L),k&&"."!=k&&e.push(" ",k),e.push(">");else if(k&&"."!=k)e.push(" SYSTEM ",k,">");else{var A=t.internalSubset;A&&e.push(" [",A,"]"),e.push(">")}return;case y:return e.push("<?",t.target," ",t.data,"?>");case m:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function tg(t,e,i){t[e]=i}T[11]="Invalid state",S.INVALID_STATE_ERR=11,T[12]="Syntax error",S.SYNTAX_ERR=12,T[13]="Invalid modification",S.INVALID_MODIFICATION_ERR=13,T[14]="Invalid namespace",S.NAMESPACE_ERR=14,T[15]="Invalid access",S.INVALID_ACCESS_ERR=15,L.prototype=Error.prototype,l(S,L),k.prototype={length:0,item:function(t){return t>=0&&t<this.length?this[t]:null},toString:function(t,e){for(var i=[],r=0;r<this.length;r++)tf(this[r],i,t,e);return i.join("")},filter:function(t){return Array.prototype.filter.call(this,t)},indexOf:function(t){return Array.prototype.indexOf.call(this,t)}},A.prototype.item=function(t){return R(this),this[t]||null},c(A,k),O.prototype={length:0,item:k.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var i=this[e];if(i.nodeName==t)return i}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new L(_);var i=this.getNamedItem(t.nodeName);return q(this._ownerElement,this,t,i),i},setNamedItemNS:function(t){var e,i=t.ownerElement;if(i&&i!=this._ownerElement)throw new L(_);return e=this.getNamedItemNS(t.namespaceURI,t.localName),q(this._ownerElement,this,t,e),e},removeNamedItem:function(t){var e=this.getNamedItem(t);return P(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var i=this.getNamedItemNS(t,e);return P(this._ownerElement,this,i),i},getNamedItemNS:function(t,e){for(var i=this.length;i--;){var r=this[i];if(r.localName==e&&r.namespaceURI==t)return r}return null}},M.prototype={hasFeature:function(t,e){return!0}
1,createDocument:function(t,e,i){var r=new U;if(r.implementation=this,r.childNodes=new k,r.doctype=i||null,i&&r.appendChild(i),e){var n=r.createElementNS(t,e);r.appendChild(n)}return r},createDocumentType:function(t,e,i){var r=new tn;return r.name=t,r.nodeName=t,r.publicId=e||"",r.systemId=i||"",r}},B.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(t,e){return Z(this,t,e)},replaceChild:function(t,e){Z(this,t,e,K),e&&this.removeChild(e)},removeChild:function(t){return H(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(t){return function t(e,i,r){var n=new i.constructor;for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)){var o=i[s];"object"!=typeof o&&o!=n[s]&&(n[s]=o)}switch(i.childNodes&&(n.childNodes=new k),n.ownerDocument=e,n.nodeType){case d:var a=i.attributes,h=n.attributes=new O,l=a.length;h._ownerElement=n;for(var c=0;c<l;c++)n.setAttributeNode(t(e,a.item(c),!0));break;case p:r=!0}if(r)for(var u=i.firstChild;u;)n.appendChild(t(e,u,r)),u=u.nextSibling;return n}(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==f&&t.nodeType==f?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var e=this;e;){var i=e._nsMap;if(i){for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r)&&i[r]===t)return r}e=e.nodeType==p?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var i=e._nsMap;if(i&&t in i&&Object.prototype.hasOwnProperty.call(i,t))return i[t];e=e.nodeType==p?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)}},l(u,B),l(u,B.prototype),U.prototype={nodeName:"#document",nodeType:w,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==E){for(var i=t.firstChild;i;){var r=i.nextSibling;this.insertBefore(i,e),i=r}return t}return Z(this,t,e),t.ownerDocument=this,null===this.documentElement&&t.nodeType===d&&(this.documentElement=t),t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),H(this,t)},replaceChild:function(t,e){Z(this,t,e,K),t.ownerDocument=this,e&&this.removeChild(e),G(t)&&(this.documentElement=t)},importNode:function(t,e){return function t(e,i,r){var n;switch(i.nodeType){case d:(n=i.cloneNode(!1)).ownerDocument=e;case E:break;case p:r=!0}if(n||(n=i.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var s=i.firstChild;s;)n.appendChild(t(e,s,r)),s=s.nextSibling;return n}(this,t,e)},getElementById:function(t){var e=null;return j(this.documentElement,function(i){if(i.nodeType==d&&i.getAttribute("id")==t)return e=i,!0}),e},getElementsByClassName:function(t){var e=h(t);return new A(this,function(i){var r=[];return e.length>0&&j(i.documentElement,function(n){if(n!==i&&n.nodeType===d){var s=n.getAttribute("class");if(s){var o=t===s;if(!o){var a=h(s);o=e.every(function(t){return a&&-1!==a.indexOf(t)})}o&&r.push(n)}}}),r})},createElement:function(t){var e=new J;return e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new k,(e.attributes=new O)._ownerElement=e,e},createDocumentFragment:function(){var t=new th;return t.ownerDocument=this,t.childNodes=new k,t},createTextNode:function(t){var e=new te;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new ti;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new tr;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var i=new tl;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=t,i.nodeValue=i.data=e,i},createAttribute:function(t){var e=new Q;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.
1specified=!0,e},createEntityReference:function(t){var e=new ta;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var i=new J,r=e.split(":"),n=i.attributes=new O;return i.childNodes=new k,i.ownerDocument=this,i.nodeName=e,i.tagName=e,i.namespaceURI=t,2==r.length?(i.prefix=r[0],i.localName=r[1]):i.localName=e,n._ownerElement=i,i},createAttributeNS:function(t,e){var i=new Q,r=e.split(":");return i.ownerDocument=this,i.nodeName=e,i.name=e,i.namespaceURI=t,i.specified=!0,2==r.length?(i.prefix=r[0],i.localName=r[1]):i.localName=e,i}},c(U,B),J.prototype={nodeType:d,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var i=this.ownerDocument.createAttribute(t);i.value=i.nodeValue=""+e,this.setAttributeNode(i)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===E?this.insertBefore(t,null):(t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,t.previousSibling=this.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:this.firstChild=t,this.lastChild=t,W(this.ownerDocument,this,t),t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var i=this.getAttributeNodeNS(t,e);i&&this.removeAttributeNode(i)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var i=this.getAttributeNodeNS(t,e);return i&&i.value||""},setAttributeNS:function(t,e,i){var r=this.ownerDocument.createAttributeNS(t,e);r.value=r.nodeValue=""+i,this.setAttributeNode(r)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new A(this,function(e){var i=[];return j(e,function(r){r!==e&&r.nodeType==d&&("*"===t||r.tagName==t)&&i.push(r)}),i})},getElementsByTagNameNS:function(t,e){return new A(this,function(i){var r=[];return j(i,function(n){n!==i&&n.nodeType===d&&("*"===t||n.namespaceURI===t)&&("*"===e||n.localName==e)&&r.push(n)}),r})}},U.prototype.getElementsByTagName=J.prototype.getElementsByTagName,U.prototype.getElementsByTagNameNS=J.prototype.getElementsByTagNameNS,c(J,B),Q.prototype.nodeType=p,c(Q,B),tt.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw Error(T[N])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,i){i=this.data.substring(0,t)+i+this.data.substring(t+e),this.nodeValue=this.data=i,this.length=i.length}},c(tt,B),te.prototype={nodeName:"#text",nodeType:f,splitText:function(t){var e=this.data,i=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},c(te,tt),ti.prototype={nodeName:"#comment",nodeType:b},c(ti,tt),tr.prototype={nodeName:"#cdata-section",nodeType:g},c(tr,tt),tn.prototype.nodeType=x,c(tn,B),ts.prototype.nodeType=D,c(ts,B),to.prototype.nodeType=v,c(to,B),ta.prototype.nodeType=m,c(ta,B),th.prototype.nodeName="#document-fragment",th.prototype.nodeType=E,c(th,B),tl.prototype.nodeType=y,c(tl,B),tc.prototype.serializeToString=function(t,e,i){return tu.call(t,e,i)},B.prototype.toString=tu;try{Object.defineProperty&&(Object.defineProperty(A.prototype,"length",{get:function(){return R(this),this.$$length}}),Object.defineProperty(B.prototype,"textContent",{get:function(){return function t(e){switch(e.nodeType){case d:case E:var i=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&i.push(t(e)),e=e.nextSibling;return i.join("");
1default:return e.nodeValue}}(this)},set:function(t){switch(this.nodeType){case d:case E:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),tg=function(t,e,i){t["$$"+e]=i})}catch(t){}e.DocumentType=tn,e.DOMException=L,e.DOMImplementation=M,e.Element=J,e.Node=B,e.NodeList=k,e.XMLSerializer=tc},5443:(t,e,i)=>{var r=i(3423),n=Object.prototype,s=n.hasOwnProperty,o=n.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=s.call(t,a),i=t[a];try{t[a]=void 0;var r=!0}catch(t){}var n=o.call(t);return r&&(e?t[a]=i:delete t[a]),n}},5502:t=>{"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},5573:(t,e,i)=>{"use strict";let r=i(7394),n=i(3540),s=i(5744),o=i(6801);t.exports={defaultOptions:r,spawnWorker:n,terminateWorker:s,onMessage:o,send:i(5801),loadImage:i(3815)}},5629:t=>{"use strict";var e="razdwatrzy";t.exports=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}},5718:(t,e,i)=>{"use strict";let r=i(2178),n=0;t.exports=({id:t,action:e,payload:i={}})=>{let s=t;return void 0===s&&(s=r("Job",n),n+=1),{id:s,action:e,payload:i}}},5744:t=>{"use strict";t.exports=t=>{t.terminate()}},5801:t=>{"use strict";t.exports=async(t,e)=>{t.postMessage(e)}},5880:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});let r=(0,i(1847).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},6104:(t,e,i)=>{"use strict";var r=i(5704);t.exports=t=>{let e={};return("undefined"!=typeof WorkerGlobalScope?e.type="webworker":"object"==typeof document?e.type="browser":"object"==typeof r&&(e.type="node"),void 0===t)?e:e[t]}},6132:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});let r=(0,i(1847).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},6451:t=>{"use strict";t.exports=function(){}},6470:t=>{"use strict";var e=String.prototype.indexOf;t.exports=function(t){return e.call(this,t,arguments[1])>-1}},6526:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},6639:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>tQ});var r={};i.r(r),i.d(r,{RangeObject:()=>X,blob2base64:()=>j,borders:()=>x,bounds:()=>w,createBase64Url:()=>A,createBlob:()=>_,createBlobUrl:()=>L,defaults:()=>g,defer:()=>U,documentHeight:()=>c,extend:()=>m,filterChildren:()=>V,findChildren:()=>W,getParentByTagName:()=>G,indexOfElementNode:()=>N,indexOfNode:()=>S,indexOfSorted:()=>b,indexOfTextNode:()=>T,insert:()=>v,isElement:()=>u,isFloat:()=>p,isNumber:()=>d,isXml:()=>C,locationOf:()=>y,nodeBounds:()=>E,parents:()=>H,parse:()=>O,prefixed:()=>f,qs:()=>I,qsa:()=>q,qsp:()=>P,querySelectorByType:()=>F,requestAnimationFrame:()=>a,revokeBlobUrl:()=>k,sprint:()=>M,treeWalker:()=>B,type:()=>R,uuid:()=>l,walk:()=>z,windowBounds:()=>D});var n=i(528),s=i.n(n),o=i(684);let a="undefined"!=typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),h="undefined"!=typeof URL?URL:"undefined"!=typeof window?window.URL||window.webkitURL||window.mozURL:void 0;function l(){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 c(){return Math.max(document.documentElement.clientHeight,document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight)}function u(t){return!!(t&&1==t.nodeType)}function d(t){return!isNaN(parseFloat(t))&&isFinite(t)}function p(t){let e=parseFloat(t);return!1!==d(t)&&(!!("string"==typeof t&&t.indexOf(".")>-1)||Math.floor(e)!==e)}function f(t){var e=["-webkit-","-webkit-","-moz-","-o-","-ms-"],i=t.toLowerCase();if("undefined"==typeof document||void 0!==document.body.style[i])return t;for(var r=0;r<5;r++)if(void 0!==document.body.style[e[r]+i])return e[r]+i;return t}function g(t){for(var e=1,i=arguments.length;e<i;e++){var r=arguments[e];for(var n in r)void 0===t[n]&&(t[n]=r[n])}return t}
1function m(t){var e=[].slice.call(arguments,1);return e.forEach(function(e){e&&Object.getOwnPropertyNames(e).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))})}),t}function v(t,e,i){var r=y(t,e,i);return e.splice(r,0,t),r}function y(t,e,i,r,n){var s,o=r||0,a=n||e.length,h=parseInt(o+(a-o)/2);return(i||(i=function(t,e){return t>e?1:t<e?-1:t==e?0:void 0}),a-o<=0)?h:(s=i(e[h],t),a-o==1)?s>=0?h:h+1:0===s?h:-1===s?y(t,e,i,h,a):y(t,e,i,o,h)}function b(t,e,i,r,n){var s,o=r||0,a=n||e.length,h=parseInt(o+(a-o)/2);return(i||(i=function(t,e){return t>e?1:t<e?-1:t==e?0:void 0}),a-o<=0)?-1:(s=i(e[h],t),a-o==1)?0===s?h:-1:0===s?h:-1===s?b(t,e,i,h,a):b(t,e,i,o,h)}function w(t){var e=window.getComputedStyle(t),i=0,r=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){r+=parseFloat(e[t])||0}),{height:r,width:i}}function x(t){var e=window.getComputedStyle(t),i=0,r=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){r+=parseFloat(e[t])||0}),{height:r,width:i}}function E(t){let e,i=t.ownerDocument;if(t.nodeType==Node.TEXT_NODE){let r=i.createRange();r.selectNodeContents(t),e=r.getBoundingClientRect()}else e=t.getBoundingClientRect();return e}function D(){var t=window.innerWidth,e=window.innerHeight;return{top:0,left:0,right:t,bottom:e,width:t,height:e}}function S(t,e){for(var i,r=t.parentNode.childNodes,n=-1,s=0;s<r.length&&((i=r[s]).nodeType===e&&n++,i!=t);s++);return n}function T(t){return S(t,3)}function N(t){return S(t,1)}function C(t){return["xml","opf","ncx"].indexOf(t)>-1}function _(t,e){return new Blob([t],{type:e})}function L(t,e){var i=_(t,e);return h.createObjectURL(i)}function k(t){return h.revokeObjectURL(t)}function A(t,e){if("string"==typeof t)return"data:"+e+";base64,"+btoa(t)}function R(t){return Object.prototype.toString.call(t).slice(8,-1)}function O(t,e,i){var r;return r="undefined"==typeof DOMParser||i?o.DOMParser:DOMParser,65279===t.charCodeAt(0)&&(t=t.slice(1)),new r().parseFromString(t,e)}function I(t,e){var i;if(!t)throw Error("No Element Provided");return void 0!==t.querySelector?t.querySelector(e):(i=t.getElementsByTagName(e)).length?i[0]:void 0}function q(t,e){return void 0!==t.querySelector?t.querySelectorAll(e):t.getElementsByTagName(e)}function P(t,e,i){var r,n;if(void 0!==t.querySelector){for(var s in e+="[",i)e+=s+"~='"+i[s]+"'";return e+="]",t.querySelector(e)}if(r=t.getElementsByTagName(e),n=Array.prototype.slice.call(r,0).filter(function(t){for(var e in i)if(t.getAttribute(e)===i[e])return!0;return!1}))return n[0]}function M(t,e){void 0!==(t.ownerDocument||t).createTreeWalker?B(t,e,NodeFilter.SHOW_TEXT):z(t,function(t){t&&3===t.nodeType&&e(t)},!0)}function B(t,e,i){let r;for(var n=document.createTreeWalker(t,i,null,!1);r=n.nextNode();)e(r)}function z(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(z(t,e))return!0;t=t.nextSibling}while(t)}function j(t){return new Promise(function(e,i){var r=new FileReader;
1r.readAsDataURL(t),r.onloadend=function(){e(r.result)}})}function U(){this.resolve=null,this.reject=null,this.id=l(),this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e}),Object.freeze(this)}function F(t,e,i){var r;if(void 0!==t.querySelector&&(r=t.querySelector(`${e}[*|type="${i}"]`)),r&&0!==r.length)return r;r=q(t,e);for(var n=0;n<r.length;n++)if(r[n].getAttributeNS("http://www.idpf.org/2007/ops","type")===i||r[n].getAttribute("epub:type")===i)return r[n]}function W(t){for(var e=[],i=t.childNodes,r=0;r<i.length;r++){let t=i[r];1===t.nodeType&&e.push(t)}return e}function H(t){for(var e=[t];t;t=t.parentNode)e.unshift(t);return e}function V(t,e,i){for(var r=[],n=t.childNodes,s=0;s<n.length;s++){let t=n[s];if(1===t.nodeType&&t.nodeName.toLowerCase()===e)if(i)return t;else r.push(t)}if(!i)return r}function G(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 X{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=H(t||this.startContainer),r=H(e||this.endContainer);if(i[0]==r[0]){for(var n=0;n<i.length;n++)if(i[n]!=r[n])return i[n-1]}}_checkCollapsed(){this.startContainer===this.endContainer&&this.startOffset===this.endOffset?this.collapsed=!0:this.collapsed=!1}toString(){}}var Y=i(4793),$=i.n(Y);class K{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 $().parse(t)}isAbsolute(t){return $().isAbsolute(t||this.path)}isDirectory(t){return"/"===t.charAt(t.length-1)}resolve(t){return $().resolve(this.directory,t)}relative(t){return t&&t.indexOf("://")>-1?t:$().relative(this.directory,t)}splitPath(t){return this.splitPathRe.exec(t).slice(1)}toString(){return this.path}}class Z{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 K(this.base).resolve(r))}this.Path=new K(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=$().resolve(this.directory,t),this.origin+e)}relative(t){return $().relative(t,this.directory)}toString(){return this.href}}class J{constructor(t,e,i){var r;if(this.str="",this.base={},this.spinePos=0,this.range=!1,this.path={},this.start=null,this.end=null,!(this instanceof J))return new J(t,e,i);if("string"==typeof e?this.base=this.parseComponent(e):"object"==typeof e&&e.steps&&(this.base=e),"string"===(r=this.checkType(t)))return this.str=t,m(this,this.parse(t));if("range"===r)return m(this,this.fromRange(t,this.base,i));if("node"===r)return m(this,this.fromNode(t,this.base,i));else if("EpubCFI"===r&&t.path)return t;else if(!t)return this;else throw TypeError("not a valid argument for EpubCFI")}checkType(t){return this.isCfiString(t)?"string":t&&"object"==typeof t&&("Range"===R(t)||void 0!==t.startContainer)?"range":t&&"object"==typeof t&&void 0!==t.nodeType?"node":!!t&&"object"==typeof t&&t instanceof J&&"EpubCFI"}parse(t){var e,i,r,n={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))?(n.base=this.parseComponent(e),i=this.getPathComponent(t),n.path=this.parseComponent(i),(r=this.getRange(t))&&(n.range=!0,n.start=this.parseComponent(r[0]),n.end=this.parseComponent(r[1])),n.spinePos=n.base.steps[1].index,n):{spinePos:-1}}parseComponent(t){var e,i={steps:[],terminal:{offset:null,assertion:null}},r=t.split(":"),n=r[0].split("/");return r.length>1&&(e=r[1],i.terminal=this.parseTerminal(e)),""===n[0]&&n.shift(),i.steps=n.map((function(t){return this.parseStep(t)}).bind(this)),i}parseStep(t){var e,i,r,n,s;if((n=t.match(/\[(.*)\]/))&&n[1]&&(s=n[1]),!isNaN(i=parseInt(t)))return i%2==0?(e="element",r=i/2-1):(e="text",r=(i-1)/2),{type:e,index:r,id:s||null}}parseTerminal(t){var e,i,r=t.match(/\[(.*)\]/);return r&&r[1]?(e=parseInt(t.split("[")[0]),i=r[1]):e=parseInt(t),d(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+=(t.index+1)*2),"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){if("string"==typeof t&&(t=new J(t)),"string"==typeof e&&(e=new J(e)),t.spinePos>e.spinePos)return 1;if(t.spinePos<e.spinePos)return -1;t.range?(i=t.path.steps.concat(t.start.steps),n=t.start.terminal):(i=t.path.steps,n=t.path.terminal),e.range?(r=e.path.steps.concat(e.start.steps),s=e.start.terminal):(r=e.path.steps,s=e.path.terminal);for(var i,r,n,s,o=0;o<i.length;o++){if(!i[o])return -1;if(!r[o]||i[o].index>r[o].index)return 1;if(i[o].index<r[o].index)return -1}return i.length<r.length?-1:n.offset>s.offset?1:n.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,r=this.filter(t,e);if(r)return i=3===r.nodeType?"text":"element",{id:r.id,tagName:r.tagName,type:i,index:this.filteredPosition(r,e)}}pathTo(t,e,i){for(var r,n={steps:[],terminal:{offset:null,assertion:null}},s=t;s&&s.parentNode&&9!=s.parentNode.nodeType;)(r=i?this.filteredStep(s,i):this.step(s))&&n.steps.unshift(r),s=s.parentNode;return null!=e&&e>=0&&(n.terminal.offset=e,"text"!=n.steps[n.steps.length-1].type&&n.steps.push({type:"text",index:0})),n}equalStep(t,e){return!!t&&!!e&&t.index===e.index&&t.id===e.id&&t.type===e.type}fromRange(t,e,i){var r={range:!1,base:{},path:{},start:null,end:null},n=t.startContainer,s=t.endContainer,o=t.startOffset,a=t.endOffset,h=!1;if(i&&(h=null!=n.ownerDocument.querySelector("."+i)),"string"==typeof e?(r.base=this.parseComponent(e),r.spinePos=r.base.steps[1].index):"object"==typeof e&&(r.base=e),t.collapsed)h&&(o=this.patchOffset(n,o,i)),r.path=this.pathTo(n,o,i);else{r.range=!0,h&&(o=this.patchOffset(n,o,i)),r.start=this.pathTo(n,o,i),h&&(a=this.patchOffset(s,a,i)),r.end=this.pathTo(s,a,i),r.path={steps:[],terminal:null};var l,c=r.start.steps.length;for(l=0;l<c;l++)if(this.equalStep(r.start.steps[l],r.end.steps[l]))l===c-1?r.start.terminal===r.end.terminal&&(r.path.steps.push(r.start.steps[l]),r.range=!1):r.path.steps.push(r.start.steps[l]);else break;r.start.steps=r.start.steps.slice(r.path.steps.length),r.end.steps=r.end.steps.slice(r.path.steps.length)}return r}fromNode(t,e,i){var r={range:!1,base:{},path:{},start:null,end:null};return"string"==typeof e?(r.base=this.parseComponent(e),r.spinePos=r.base.steps[1].index):"object"==typeof e&&(r.base=e),r.path=this.pathTo(t,null,i),r}filter(t,e){var i,r,n,s,o,a=!1;return(3===t.nodeType?(a=!0,n=t.parentNode,i=t.parentNode.classList.contains(e)):(a=!1,i=t.classList.contains(e)),i&&a)?(s=n.previousSibling,o=n.nextSibling,s&&3===s.nodeType?r=s:o&&3===o.nodeType&&(r=o),r)?r:t:(!i||!!a)&&t}patchOffset(t,e,i){if(3!=t.nodeType)throw Error("Anchor must be a text node");var r=t,n=e;for(t.parentNode.classList.contains(i)&&(r=t.parentNode);r.previousSibling;){if(1===r.previousSibling.nodeType)if(r.previousSibling.classList.contains(i))n+=r.previousSibling.textContent.length;else break;else n+=r.previousSibling.textContent.length;r=r.previousSibling}return n}normalizedMap(t,e,i){var r,n,s,o={},a=-1,h=t.length;for(s=0;s<h;s++)1===(r=t[s].nodeType)&&t[s].classList.contains(i)&&(r=3),s>0&&3===r&&3===n?o[s]=a:e===r&&(a+=1,o[s]=a),n=r;return o}position(t){var e,i;return 1===t.nodeType?((e=t.parentNode.children)||(e=W(t.parentNode)),i=Array.prototype.indexOf.call(e,t)):i=(e=this.textNodes(t.parentNode)).indexOf(t),i}filteredPosition(t,e){var i,r;return 1===t.nodeType?(i=t.parentNode.children,r=this.normalizedMap(i,1,e)):(i=t.parentNode.childNodes,t.parentNode.classList.contains(e)&&(i=(t=t.parentNode).parentNode.childNodes),r=this.normalizedMap(i,3,e)),r[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,n,s=e||document,o=s.documentElement,a=t.length;for(n=0;
1n<a&&("element"===(r=t[n]).type?o=r.id?s.getElementById(r.id):(o.children||W(o))[r.index]:"text"===r.type&&(o=this.textNodes(o,i)[r.index]),o);n++);return o}findNode(t,e,i){var r,n,s=e||document;return i||void 0===s.evaluate?r=i?this.walkToNode(t,s,i):this.walkToNode(t,s):(n=this.stepsToXpath(t),r=s.evaluate(n,s,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue),r}fixMiss(t,e,i,r){var n,s,o=this.findNode(t.slice(0,-1),i,r),a=o.childNodes,h=this.normalizedMap(a,3,r),l=t[t.length-1].index;for(let t in h){if(!h.hasOwnProperty(t))return;if(h[t]===l)if(s=(n=a[t]).textContent.length,e>s)e-=s;else{o=1===n.nodeType?n.childNodes[0]:n;break}}return{container:o,offset:e}}toRange(t,e){var i,r,n,s,o,a,h,l,c=t||document,u=!!e&&null!=c.querySelector("."+e);if(i=void 0!==c.createRange?c.createRange():new X,this.range?(r=this.start,a=this.path.steps.concat(r.steps),s=this.findNode(a,c,u?e:null),n=this.end,h=this.path.steps.concat(n.steps),o=this.findNode(h,c,u?e:null)):(r=this.path,a=this.path.steps,s=this.findNode(this.path.steps,c,u?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){l=this.fixMiss(a,r.terminal.offset,c,u?e:null),i.setStart(l.container,l.offset)}if(o)try{null!=n.terminal.offset?i.setEnd(o,n.terminal.offset):i.setEnd(o,0)}catch(t){l=this.fixMiss(h,this.end.terminal.offset,c,u?e:null),i.setEnd(l.container,l.offset)}return i}isCfiString(t){return"string"==typeof t&&0===t.indexOf("epubcfi(")&&")"===t[t.length-1]}generateChapterComponent(t,e,i){var r=parseInt(e),n="/"+(t+1)*2+"/";return n+=(r+1)*2,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))}}class Q{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){for(let e=0;e<this.hooks.length;e++)if(this.hooks[e]===t){this.hooks.splice(e,1);break}}trigger(){var t=arguments,e=this.context,i=[];return this.hooks.forEach(function(r){try{var n=r.apply(e,t)}catch(t){console.log(t)}n&&"function"==typeof n.then&&i.push(n)}),Promise.all(i)}list(){return this.hooks}clear(){return this.hooks=[]}}function tt(t,e){var i,r,n=e.url,s=n.indexOf("://")>-1;t&&(r=I(t,"head"),(i=I(r,"base"))||(i=t.createElement("base"),r.insertBefore(i,r.firstChild)),!s&&window&&window.location&&(n=window.location.origin+n),i.setAttribute("href",n))}function te(t,e){var i,r,n=e.canonical;t&&(i=I(t,"head"),(r=I(i,"link[rel='canonical']"))?r.setAttribute("href",n):((r=t.createElement("link")).setAttribute("rel","canonical"),r.setAttribute("href",n),i.appendChild(r)))}function ti(t,e){var i,r,n=e.idref;t&&(i=I(t,"head"),(r=I(i,"link[property='dc.identifier']"))?r.setAttribute("content",n):((r=t.createElement("meta")).setAttribute("name","dc.identifier"),r.setAttribute("content",n),i.appendChild(r)))}function tr(t,e,i){return e.forEach(function(e,r){e&&i[r]&&(e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t=t.replace(RegExp(e,"g"),i[r]))}),t}let tn=function(t,e,i,r){var n,s="undefined"!=typeof window&&window.URL,o=new U,a=new XMLHttpRequest,h=XMLHttpRequest.prototype;for(n in"overrideMimeType"in h||Object.defineProperty(h,"overrideMimeType",{value:function(){}}),i&&(a.withCredentials=!0),a.onreadystatechange=function(){if(this.readyState===XMLHttpRequest.DONE){var t,i=!1;if((""===this.responseType||"document"===this.responseType)&&(i=this.responseXML),200===this.status||0===this.status||i){if(!this.response&&!i)return o.reject({status:this.status,message:"Empty Response",stack:Error().stack}),o.promise;if(403===this.status)return o.reject({status:this.status,response:this.response,message:"Forbidden",stack:Error().stack}),o.promise;t=i?this.responseXML:C(e)?O(this.response,"text/xml"):"xhtml"==e?O(this.response,"application/xhtml+xml"):"html"==e||"htm"==e?O(this.response,"text/html"):"json"==e?JSON.parse(this.response):"blob"==e?s?this.response:new Blob([this.response]):this.response,o.resolve(t)}else o.reject({status:this.status,message:this.response,stack:Error().stack})}},a.onerror=function(t){o.reject(t)},a.open("GET",t,!0),r)a.setRequestHeader(n,r[n]);return"json"==e&&a.setRequestHeader("Accept","application/json"),e||(e=new K(t).extension),"blob"==e&&(a.responseType=s?"blob":"arraybuffer"),C(e)&&a.overrideMimeType("text/xml"),"binary"==e&&(a.responseType="arraybuffer"),a.send(),o.promise};class ts{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.
1next,this.prev=t.prev,this.cfiBase=t.cfiBase,e?this.hooks=e:(this.hooks={},this.hooks.serialize=new Q(this),this.hooks.content=new Q(this)),this.document=void 0,this.contents=void 0,this.output=void 0}load(t){var e=t||this.request||tn,i=new U,r=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)}),r}base(){return tt(this.document,this)}render(t){var e=new U,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?o.DOMParser: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=[],r=t.toLowerCase(),n=function(t){for(var n,s,o,a=t.textContent.toLowerCase(),h=e.document.createRange(),l=-1;-1!=s;)-1!=(s=a.indexOf(r,l+1))&&((h=e.document.createRange()).setStart(t,s),h.setEnd(t,s+r.length),n=e.cfiFromRange(h),o=t.textContent.length<150?t.textContent:"..."+(o=t.textContent.substring(s-75,s+75))+"...",i.push({cfi:n,excerpt:o})),l=s};return M(e.document,function(t){n(t)}),i}search(t,e=5){if(void 0===document.createTreeWalker)return this.find(t);let i=[],r=this,n=t.toLowerCase(),s=function(t){let e=t.reduce((t,e)=>t+e.textContent,"").toLowerCase().indexOf(n);if(-1!=e){let s=e+n.length,o=0,a=0;if(e<t[0].length){let n;for(;o<t.length-1&&!(s<=(a+=t[o].length));)o+=1;let h=t[0],l=t[o],c=r.document.createRange();c.setStart(h,e);let u=t.slice(0,o).reduce((t,e)=>t+e.textContent.length,0);c.setEnd(l,u>s?s:s-u),n=r.cfiFromRange(c);let d=t.slice(0,o+1).reduce((t,e)=>t+e.textContent,"");d.length>
1150&&(d="..."+(d=d.substring(e-75,e+75))+"..."),i.push({cfi:n,excerpt:d})}}},o=document.createTreeWalker(r.document,NodeFilter.SHOW_TEXT,null,!1),a,h=[];for(;a=o.nextNode();)h.push(a),h.length==e&&(s(h.slice(0,e)),h=h.slice(1,e));return h.length>0&&s(h),i}reconcileLayoutSettings(t){var e={layout:t.layout,spread:t.spread,orientation:t.orientation};return this.properties.forEach(function(t){var i,r,n=t.replace("rendition:",""),s=n.indexOf("-");-1!=s&&(i=n.slice(0,s),r=n.slice(s+1),e[i]=r)}),e}cfiFromRange(t){return new J(t,this.cfiBase).toString()}cfiFromElement(t){return new J(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}}class to{constructor(){this.spineItems=[],this.spineByHref={},this.spineById={},this.hooks={},this.hooks.serialize=new Q,this.hooks.content=new Q,this.hooks.content.register(tt),this.hooks.content.register(te),this.hooks.content.register(ti),this.epubcfi=new J,this.loaded=!1,this.items=void 0,this.manifest=void 0,this.spineNodeIndex=void 0,this.baseUrl=void 0,this.length=void 0}
1unpack(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,r)=>{var n,s=this.manifest[t.idref];t.index=r,t.cfiBase=this.epubcfi.generateChapterComponent(this.spineNodeIndex,t.index,t.id),t.href&&(t.url=e(t.href,!0),t.canonical=i(t.href)),s&&(t.href=s.href,t.url=e(t.href,!0),t.canonical=i(t.href),s.properties.length&&t.properties.push.apply(t.properties,s.properties)),"yes"===t.linear?(t.prev=(function(){let e=t.index;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(){}),n=new ts(t,this.hooks),this.append(n)}),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 this.epubcfi.isCfiString(t)?e=new J(t).spinePos:"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}}class ta{constructor(t){this._q=[],this.context=t,this.tick=a,this.running=!1,this.paused=!1}enqueue(){var t,e,i,r=[].shift.call(arguments),n=arguments;if(!r)throw Error("No Task Provided");return"function"==typeof r?(e=(t=new U).promise,i={task:r,args:n,deferred:t,promise:e}):i={promise:r},this._q.push(i),!1!=this.paused||this.running||this.run(),i.promise}dequeue(){var t,e,i;return!this._q.length||this.paused?((t=new U).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 U),this.tick.call(window,()=>{this._q.length?this.dequeue().then((function(){this.run()}).bind(this)):(this.defered.resolve(),this.running=void 0)}),!0==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}}let th=["keydown","keyup","keypressed","mouseup","mousedown","mousemove","click","touchend","touchstart","touchmove"],tl={BOOK:{OPEN_FAILED:"openFailed"},CONTENTS:{EXPAND:"expand",RESIZE:"resize",SELECTED:"selected",SELECTED_RANGE:"selectedRange",LINK_CLICKED:"linkClicked"},LOCATIONS:{CHANGED:"changed"},MANAGERS:{RESIZE:"resize",RESIZED:"resized",ORIENTATION_CHANGE:"orientationchange",ADDED:"added",SCROLL:"scroll",SCROLLED:"scrolled",REMOVED:"removed"},VIEWS:{AXIS:"axis",WRITING_MODE:"writingMode",LOAD_ERROR:"loaderror",RENDERED:"rendered",RESIZED:"resized",DISPLAYED:"displayed",SHOWN:"shown",HIDDEN:"hidden",MARK_CLICKED:"markClicked"},RENDITION:{STARTED:"started",ATTACHED:"attached",DISPLAYED:"displayed",DISPLAY_ERROR:"displayerror",RENDERED:"rendered",REMOVED:"removed",RESIZED:"resized",ORIENTATION_CHANGE:"orientationchange",LOCATION_CHANGED:"locationChanged",RELOCATED:"relocated",MARK_CLICKED:"markClicked",SELECTED:"selected",LAYOUT:"layout"},LAYOUT:{UPDATED:"updated"},ANNOTATION:{ATTACH:"attach",DETACH:"detach"}};class tc{constructor(t,e,i){this.spine=t,this.request=e,this.pause=i||100,this.q=ne
1w ta(this),this.epubcfi=new J,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 U,r=this.parse(e,t.cfiBase);return this._locations=this._locations.concat(r),t.unload(),this.processingTimeout=setTimeout(()=>i.resolve(r),this.pause),i.promise}).bind(this))}parse(t,e,i){var r,n,s=[],o=I(t.ownerDocument,"body"),a=0,h=i||this.break;if(M(o,(function(t){var i,o=t.length,l=0;if(0===t.textContent.trim().length)return!1;for(0==a&&((r=this.createRange()).startContainer=t,r.startOffset=0),(i=h-a)>o&&(a+=o,l=o);l<o;)if(i=h-a,0===a&&(l+=1,(r=this.createRange()).startContainer=t,r.startOffset=l),l+i>=o)a+=o-l,l=o;else{l+=i,r.endContainer=t,r.endOffset=l;let n=new J(r,e).toString();s.push(n),a=0}n=t}).bind(this)),r&&r.startContainer&&n){r.endContainer=n,r.endOffset=n.length;let t=new J(r,e).toString();s.push(t),a=0}return s}generateFromWords(t,e,i){var r=t?new J(t):void 0;return this.q.pause(),this._locationsWords=[],this._wordCounter=0,this.spine.each((function(t){t.linear&&(r?t.index>=r.spinePos&&this.q.enqueue(this.processWords.bind(this),t,e,r,i):this.q.enqueue(this.processWords.bind(this),t,e,r,i))}).bind(this)),this.q.run().then((function(){return this._currentCfi&&(this.currentLocation=this._currentCfi),this._locationsWords}).bind(this))}processWords(t,e,i,r){return r&&this._locationsWords.length>=r?Promise.resolve():t.load(this.request).then((function(n){var s=new U,o=this.parseWords(n,t,e,i),a=r-this._locationsWords.length;return this._locationsWords=this._locationsWords.concat(o.length>=r?o.slice(0,a):o),t.unload(),this.processingTimeout=setTimeout(()=>s.resolve(o),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,r){var n,s=e.cfiBase,o=[],a=I(t.ownerDocument,"body"),h=!r||r.spinePos!==e.index;
1return r&&e.index===r.spinePos&&(n=r.findNode(r.range?r.path.steps.concat(r.start.steps):r.path.steps,t.ownerDocument)),M(a,(function(t){if(!h)if(t!==n)return!1;else h=!0;if(t.textContent.length<10&&0===t.textContent.trim().length)return!1;var e,r=this.countWords(t.textContent),a=0;if(0===r)return!1;for((e=i-this._wordCounter)>r&&(this._wordCounter+=r,a=r);a<r;)if(a+(e=i-this._wordCounter)>=r)this._wordCounter+=r-a,a=r;else{a+=e;let i=new J(t,s);o.push({cfi:i.toString(),wordCount:this._wordCounter}),this._wordCounter=0}}).bind(this)),o}locationFromCfi(t){let e;return(J.prototype.isCfiString(t)&&(t=new J(t)),0===this._locations.length)?-1:(e=y(t,this._locations,this.epubcfi.compare))>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 J(this._locations[this.total]);return t.collapse(),t.toString()}return e=Math.ceil(this.total*t),this.cfiFromLocation(e)}load(t){return"string"==typeof t?this._locations=JSON.parse(t):this._locations=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(tl.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)}}s()(tc.prototype);class tu{constructor(t){this.packagePath="",this.directory="",this.encoding="",t&&this.parse(t)}parse(t){var e;if(!t)throw Error("Container File Not Found");if(!(e=I(t,"rootfile")))throw Error("No RootFile Found");this.packagePath=e.getAttribute("full-path"),this.directory=$().dirname(this.packagePath),this.encoding=t.xmlEncoding}destroy(){this.packagePath=void 0,this.directory=void 0,this.encoding=void 0}}class td{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,r;if(!t)throw Error("Package File Not Found");if(!(e=I(t,"metadata")))throw Error("No Metadata Found");if(!(i=I(t,"manifest")))throw Error("No Manifest Found");if(!(r=I(t,"spine")))throw Error("No Spine Found");return this.manifest=this.parseManifest(i),this.navPath=this.findNavPath(i),this.ncxPath=this.findNcxPath(i,r),this.coverPath=this.findCoverPath(t),this.spineNodeIndex=N(r),this.spine=this.parseSpine(r,this.manifest),this.uniqueIdentifier=this.findUniqueIdentifier(t),this.metadata=this.parseMetadata(e),this.metadata.direction=r.getAttribute("page-progression-direction"),{metadata:this.metadata,spine:this.spine,manifest:this.manifest,navPath:this.navPath,ncxPath:this.ncxPath,coverPath:this.coverPath,spineNodeIndex:this.spineNodeIndex}}parseMetadata(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=q(t,"item");
1return Array.prototype.slice.call(i).forEach(function(t){var i=t.getAttribute("id"),r=t.getAttribute("href")||"",n=t.getAttribute("media-type")||"",s=t.getAttribute("media-overlay")||"",o=t.getAttribute("properties")||"";e[i]={href:r,type:n,overlay:s,properties:o.length?o.split(" "):[]}}),e}parseSpine(t,e){var i=[],r=q(t,"itemref");return Array.prototype.slice.call(r).forEach(function(t,e){var r=t.getAttribute("idref"),n=t.getAttribute("properties")||"",s=n.length?n.split(" "):[],o={id:t.getAttribute("id"),idref:r,linear:t.getAttribute("linear")||"yes",properties:s,index:e};i.push(o)}),i}findUniqueIdentifier(t){var e=t.documentElement.getAttribute("unique-identifier");if(!e)return"";var i=t.getElementById(e);return i&&"identifier"===i.localName&&"http://purl.org/dc/elements/1.1/"===i.namespaceURI&&i.childNodes.length>0?i.childNodes[0].nodeValue.trim():""}findNavPath(t){var e=P(t,"item",{properties:"nav"});return!!e&&e.getAttribute("href")}findNcxPath(t,e){var i,r=P(t,"item",{"media-type":"application/x-dtbncx+xml"});return!r&&(i=e.getAttribute("toc"))&&(r=t.querySelector(`#${i}`)),!!r&&r.getAttribute("href")}findCoverPath(t){I(t,"package").getAttribute("version");var e=P(t,"item",{properties:"cover-image"});if(e)return e.getAttribute("href");var i=P(t,"meta",{name:"cover"});if(!i)return!1;var r=i.getAttribute("content"),n=t.getElementById(r);return n?n.getAttribute("href"):""}getElementText(t,e){var i,r=t.getElementsByTagNameNS("http://purl.org/dc/elements/1.1/",e);return r&&0!==r.length&&(i=r[0]).childNodes.length?i.childNodes[0].nodeValue:""}getPropertyText(t,e){var i=P(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}}class tp{constructor(t){this.toc=[],this.tocByHref={},this.tocById={},this.landmarks=[],this.landmarksByType={},this.length=0,t&&this.parse(t)}parse(t){let e,i,r=t.nodeType;r&&(e=I(t,"html"),i=I(t,"ncx")),r?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;let r=i[e];if(r&&(t===r.id||t===r.href))return r;{let r;for(let n=0;n<i.length&&!(r=this.getByIndex(t,e,i[n].subitems));++n);return r}}landmark(t){var e;return t?(e=this.landmarksByType[t],this.landmarks[e]):this.landmarks}parseNav(t){var e=F(t,"nav","toc"),i=[];if(!e)return i;let r=V(e,"ol",!0);return r?i=this.parseNavList(r):i}parseNavList(t,e){let i=[];if(!t||!t.children)return i;for(let r=0;r<t.children.length;r++){let n=this.navItem(t.children[r],e);n&&i.push(n)}return i}navItem(t,e){let i=t.getAttribute("id")||void 0,r=V(t,"a",!0)||V(t,"span",!0);if(!r)return;let n=r.getAttribute("href")||"";i||(i=n);let s=r.textContent||"",o=[],a=V(t,"ol",!0);return a&&(o=this.parseNavList(a,i)),{id:i,href:n,label:s,subitems:o,parent:e}}parseLandmarks(t){var e,i,r=F(t,"nav","landmarks"),n=r?q(r,"li"):[],s=n.length,o=[];if(!n||0===s)return o;for(e=0;e<s;++e)(i=this.landmarkItem(n[e]))&&(o.push(i),this.landmarksByType[i.type]=e);return o}landmarkItem(t){let e=V(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,r=q(t,"navPoint"),n=r.length,s={},o=[];if(!r||0===n)return o;for(e=0;e<n;++e)s[(i=this.ncxItem(r[e])).id]=i,i.parent?s[i.parent].subitems.push(i):o.push(i);return o}ncxItem(t){var e,i=t.getAttribute("id")||!1,r=I(t,"content").getAttribute("src"),n=I(t,"navLabel"),s=n.textContent?n.textContent:"",o=t.parentNode;return o&&("navPoint"===o.nodeName||"navPoint"===o.nodeName.split(":").slice(-1)[0])&&(e=o.getAttribute("id")),{id:i,href:r,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)}}var tf={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"}},tg=function(){var t,e,i,r,n={};for(t in tf)if(tf.hasOwnProperty(t)){for(e in tf[t])if(tf[t].hasOwnProperty(e))if("string"==typeof(i=tf[t][e]))n[i]=t+"/"+e;else for(r=0;r<i.length;r++)n[i[r]]=t+"/"+e}return n}();let tm={lookup:function(t){return t&&tg[t.split(".").pop().toLowerCase()]||"text/plain"}};class tv{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 Z(t),i=tm.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=>j(t)).then(t=>A(t,i)):this.settings.request(t,"blob").then(t=>L(t,i))}replacements(){return"none"===this.settings.replacements?new Promise((function(t){t(this.urls)}).bind(this)):Promise.all(this.urls.map(t=>{var e=this.settings.resolver(t);return this.createUrl(e).catch(t=>(console.error(t),null))})).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.forEac
1h((function(r){var n=this.createCssFile(r,t,e).then((function(t){var e=this.urls.indexOf(r);e>-1&&(this.replacementUrls[e]=t)}).bind(this));i.push(n)}).bind(this)),Promise.all(i)}createCssFile(t){if($().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 r=this.urls.map(t=>{var e=this.settings.resolver(t);return new K(i).relative(e)});return e?e.then(t=>(t=tr(t,r,this.replacementUrls),"base64"===this.settings.replacements?A(t,"text/css"):L(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 r=e(i);return new K(t).relative(r)}).bind(this))}get(t){var e=this.urls.indexOf(t);if(-1!==e)if(this.replacementUrls.length)return new Promise((function(t,i){t(this.replacementUrls[e])}).bind(this));else return this.createUrl(t)}substitute(t,e){return tr(t,e?this.relativeTo(e):this.urls,this.replacementUrls)}destroy(){this.settings=void 0,this.manifest=void 0,this.resources=void 0,this.replacementUrls=void 0,this.html=void 0,this.assets=void 0,this.css=void 0,this.urls=void 0,this.cssUrls=void 0}}class ty{constructor(t){this.pages=[],this.locations=[],this.epubcfi=new J,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=I(t,"html"),i=I(t,"ncx");return e?this.parseNav(t):i?this.parseNcx(t):void 0}parseNav(t){var e,i=F(t,"nav","page-list"),r=i?q(i,"li"):[],n=r.length,s=[];if(!r||0===n)return s;for(e=0;e<n;++e)s.push(this.item(r[e]));return s}parseNcx(t){var e,i,r=[],n=0,s=0;if(!(e=I(t,"pageList"))||(s=(i=q(e,"pageTarget")).length,!i||0===i.length))return r;for(n=0;n<s;++n)r.push(this.ncxItem(i[n]));return r}ncxItem(t){var e=I(t,"navLabel"),i=I(e,"text").textContent;return{href:I(t,"content").getAttribute("src"),page:parseInt(i,10)}}item(t){var e,i,r=I(t,"a"),n=r.getAttribute("href")||"",s=parseInt(r.textContent||"");return -1!=n.indexOf("epubcfi")?(i=(e=n.split("#"))[0],{cfi:e.length>1&&e[1],href:n,packageUrl:i,page:s}):{href:n,page:s}}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=b(t,this.locations,this.epubcfi.compare);return -1!=i?e=this.pages[i]:void 0!==(e=(i=y(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){return Math.round(1e3*((t-this.firstPage)/this.totalPages))/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}}class tb{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&&("scrolled"===t||"scrolled-continuous"===t||"scrolled-doc"===t?this._flow="scrolled":this._flow="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 r,n,s,o,a=1,h=i||0,l=t,c=Math.floor(l/12);a=this._spread&&l>=this._minSpreadWidth?2:1,"reflowable"!==this.name||"paginated"!==this._flow||i>=0||(h=c%2==0?c:c-1),"pre-paginated"===this.name&&(h=0),a>1?s=(r=l/a-h)+h:(r=l,s=l),"pre-paginated"===this.name&&a>1&&(l=r),n=r*a+h,o=l,this.width=l,this.height=e,this.spreadWidth=n,this.pageWidth=s,this.delta=o,this.columnWidth=r,this.gap=h,this.divisor=a,this.update({width:l,height:e,spreadWidth:n,pageWidth:s,delta:o,columnWidth:r,gap:h,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,r;return"pre-paginated"===this.name?(i=1,r=1):r="paginated"===this._flow?(i=Math.ceil(t/(e=e||this.delta)))*this.divisor:i=Math.ceil(t/(e=e||this.height)),{spreads:i,pages:r}}
1update(t){if(Object.keys(t).forEach(e=>{this.props[e]===t[e]&&delete t[e]}),Object.keys(t).length>0){let e=m(this.props,t);this.emit(tl.LAYOUT.UPDATED,e,t)}}}s()(tb.prototype);class tw{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){if(1==arguments.length&&"object"==typeof arguments[0])return this.registerThemes(arguments[0]);if(1==arguments.length&&"string"==typeof arguments[0])return this.default(arguments[0]);if(2==arguments.length&&"string"==typeof arguments[1])return this.registerUrl(arguments[0],arguments[1]);if(2==arguments.length&&"object"==typeof arguments[1])return this.registerRules(arguments[0],arguments[1])}}default(t){if(t){if("string"==typeof t)return this.registerUrl("default",t);if("object"==typeof t)return this.registerRules("default",t)}}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 Z(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=[],r=this._themes;for(var n in r)r.hasOwnProperty(n)&&(n===this._current||"default"===n)&&(((e=r[n]).rules&&Object.keys(e.rules).length>0||e.url&&-1===i.indexOf(e.url))&&this.add(n,t),this._injected.push(n));"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 r=this.rendition.getContents();this._overrides[t]={value:e,priority:!0===i},r.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}}class tx{constructor(t,e,i,r=!1){this.layout=t,this.horizontal="horizontal"===i,this.direction=e||"ltr",this._dev=r}section(t){var e=this.findRanges(t);return this.rangeListToCfiList(t.section.cfiBase,e)}page(t,e,i,r){var n,s=!!t&&!!t.document&&t.document.body;if(s){if(n=this.rangePairToCfiPair(e,{start:this.findStart(s,i,r),end:this.findEnd(s,i,r)}),!0===this._dev){let e=t.document,i=new J(n.start).toRange(e),r=new J(n.end).toRange(e),s=e.defaultView.getSelection(),o=e.createRange();s.removeAllRanges(),o.setStart(i.startContainer,i.startOffset),o.setEnd(r.endContainer,r.endOffset),s.addRange(o)}return n}}walk(t,e){if(!t||t.nodeType!==Node.TEXT_NODE){var i,r,n=function(t){return t.data.trim().length>0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT};n.acceptNode=n;for(var s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,n,!1);(i=s.nextNode())&&!(r=e(i)););return r}}findRanges(t){for(var e,i,r=[],n=Math.ceil(t.contents.scrollWidth()/this.layout.spreadWidth)*this.layout.divisor,s=this.layout.columnWidth,o=this.layout.gap,a=0;a<n.pages;a++)e=(s+o)*a,i=s*(a+1)+o*a,r.push({start:this.findStart(t.document.body,e,i),end:this.findEnd(t.document.body,e,i)});return r}findStart(t,e,i){for(var r,n,s=[t],o=t;s.length;)if(r=s.shift(),n=this.walk(r,t=>{var r,n,a,h,l;if(l=E(t),this.horizontal&&"ltr"===this.direction){if(r=this.horizontal?l.left:l.top,n=this.horizontal?l.right:l.bottom,r>=e&&r<=i||n>e)return t;o=t,s.push(t)}else if(this.horizontal&&"rtl"===this.direction){if(r=l.left,(n=l.right)<=i&&n>=e||r<i)return t;o=t,s.push(t)}else{if(a=l.top,h=l.bottom,a>=e&&a<=i||h>e)return t;o=t,s.push(t)}}))return this.findTextStartRange(n,e,i);return this.findTextStartRange(o,e,i)}findEnd(t,e,i){for(var r,n,s=[t],o=t;s.length;)if(r=s.shift(),n=this.walk(r,t=>{var r,n,a,h,l;if(l=E(t),this.horizontal&&"ltr"===this.direction){if(r=Math.round(l.left),n=Math.round(l.right),r>i&&o)return o;if(n>i)return t;o=t,s.push(t)}else if(this.horizontal&&"rtl"===this.direction){if(r=Math.round(this.horizontal?l.left:l.top),(n=Math.round(this.horizontal?l.right:l.bottom))<e&&o)return o;if(r<e)return t;o=t,s.push(t)}else{if(a=Math.round(l.top),h=Math.round(l.bottom),a>i&&o)return o;if(h>i)return t;o=t,s.push(t)}}))return this.findTextEndRange(n,e,i);return this.findTextEndRange(o,e,i)}findTextStartRange(t,e,i){for(var r,n,s=this.splitTextNodeIntoRanges(t),o=0;o<s.length;
1o++)if(n=(r=s[o]).getBoundingClientRect(),this.horizontal&&"ltr"===this.direction){if(n.left>=e)return r}else if(this.horizontal&&"rtl"===this.direction){if(n.right<=i)return r}else if(n.top>=e)return r;return s[0]}findTextEndRange(t,e,i){for(var r,n,s,o,a,h,l,c=this.splitTextNodeIntoRanges(t),u=0;u<c.length;u++){if(s=(n=c[u]).getBoundingClientRect(),this.horizontal&&"ltr"===this.direction){if(o=s.left,a=s.right,o>i&&r)return r;if(a>i)return n}else if(this.horizontal&&"rtl"===this.direction){if(o=s.left,(a=s.right)<e&&r)return r;if(o<e)return n}else{if(h=s.top,l=s.bottom,h>i&&r)return r;if(l>i)return n}r=n}return c[c.length-1]}splitTextNodeIntoRanges(t,e){var i,r=[],n=(t.textContent||"").trim(),s=t.ownerDocument,o=e||" ",a=n.indexOf(o);if(-1===a||t.nodeType!=Node.TEXT_NODE)return(i=s.createRange()).selectNodeContents(t),[i];for((i=s.createRange()).setStart(t,0),i.setEnd(t,a),r.push(i),i=!1;-1!=a;)(a=n.indexOf(o,a+1))>0&&(i&&(i.setEnd(t,a),r.push(i)),(i=s.createRange()).setStart(t,a+1));return i&&(i.setEnd(t,n.length),r.push(i)),r}rangePairToCfiPair(t,e){var i=e.start,r=e.end;return i.collapse(!0),r.collapse(!1),{start:new J(i,t).toString(),end:new J(r,t).toString()}}rangeListToCfiList(t,e){for(var i=[],r=0;r<e.length;r++)i.push(this.rangePairToCfiPair(t,e[r]));return i}axis(t){return t&&(this.horizontal="horizontal"===t),this.horizontal}}let tE="undefined"!=typeof navigator,tD=tE&&/Chrome/.test(navigator.userAgent),tS=tE&&!tD&&/AppleWebKit/.test(navigator.userAgent);class tT{constructor(t,e,i,r){this.epubcfi=new J,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=r||0,this.cfiBase=i||"",this.epubReadingSystem("epub.js","0.3"),this.called=0,this.active=!0,this.listeners()}static get listenedEvents(){return th}width(t){var e=this.content;return t&&d(t)&&(t+="px"),t&&(e.style.width=t),parseInt(this.window.getComputedStyle(e).width)}height(t){var e=this.content;return t&&d(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&&d(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&&d(t)&&(t+="px"),t&&(e.style.height=t),parseInt(this.window.getComputedStyle(e).height)}textWidth(){let t,e=this.document.createRange(),i=this.content||this.document.body,r=x(i);return e.selectNodeContents(i),t=e.getBoundingClientRect().width,r&&r.width&&(t+=r.width),Math.round(t)}textHeight(){let t=this.document.createRange(),e=this.content||this.document.body;return t.selectNodeContents(e),Math.round(t.getBoundingClientRect().bottom)}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 r=this.content||this.document.body;return e?r.style.setProperty(t,e,i?"important":""):r.style.removeProperty(t),this.window.getComputedStyle(r)[t]}viewport(t){var e=this.document.querySelector("meta[name='viewport']"),i={width:void 0,height:void 0,scale:void 0,minimum:void 0,maximum:void 0,scalable:void 0},r=[],n={};if(e&&e.hasAttribute("content")){let t=e.getAttribute("content"),r=t.match(/width\s*=\s*([^,]*)/),n=t.match(/height\s*=\s*([^,]*)/),s=t.match(/initial-scale\s*=\s*([^,]*)/),o=t.match(/minimum-scale\s*=\s*([^,]*)/),a=t.match(/maximum-scale\s*=\s*([^,]*)/),h=t.match(/user-scalable\s*=\s*([^,]*)/);r&&r.length&&void 0!==r[1]&&(i.width=r[1]),n&&n.length&&void 0!==n[1]&&(i.height=n[1]),s&&s.length&&void 0!==s[1]&&(i.scale=s[1]),o&&o.length&&void 0!==o[1]&&(i.minimum=o[1]),a&&a.length&&void 0!==a[1]&&(i.maximum=a[1]),h&&h.length&&void 0!==h[1]&&(i.scalable=h[1])}return n=g(t||{},i),t&&(n.width&&r.push("width="+n.width),n.height&&r.push("height="+n.height),n.scale&&r.push("initial-scale="+n.scale),"no"===n.scalable?(r.push("minimum-scale="+n.scale),r.push("maximum-scale="+n.scale),r.push("user-scalable="+n.scalable)):(n.scalable&&r.push("user-scalable="+n.scalable),n.minimum&&r.push("minimum-scale="+n.minimum),n.maximum&&r.push("minimum-scale="+n.maximum)),e||((e=this.document.createElement("meta")).setAttribute("name","viewport"),this.document.querySelector("head").appendChild(e)),e.setAttribute("content",r.join(", ")),this.window.scrollTo(0,0)),n}
1expand(){this.emit(tl.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(tl.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,e=this.document.styleSheets,i=(function(t){t.matches&&!this._expanding&&setTimeout(this.expand.bind(this),1)}).bind(this),r=0;r<e.length;r+=1){try{t=e[r].cssRules}catch(t){return}if(!t)return;for(var n=0;n<t.length;n+=1)t[n].media&&this.window.matchMedia(t[n].media.mediaText).addListener(i)}}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,r={left:0,top:0};if(!this.document)return r;if(this.epubcfi.isCfiString(t)){let n=new J(t).toRange(this.document,e);if(n){try{if(!n.endContainer||n.startContainer==n.endContainer&&n.startOffset==n.endOffset){let t=n.startContainer.textContent.indexOf(" ",n.startOffset);-1==t&&(t=n.startContainer.textContent.length),n.setEnd(n.startContainer,t)}}catch(t){console.error("setting end offset to start container length failed",t)}if(n.startContainer.nodeType===Node.ELEMENT_NODE)r.left=(i=n.startContainer.getBoundingClientRect()).left,r.top=i.top;else if(tS){let t=n.startContainer,e=new Range;try{1===t.nodeType?i=t.getBoundingClientRect():n.startOffset+2<t.length?(e.setStart(t,n.startOffset),e.setEnd(t,n.startOffset+2),i=e.getBoundingClientRect()):n.startOffset-2>0?(e.setStart(t,n.startOffset-2),e.setEnd(t,n.startOffset),i=e.getBoundingClientRect()):i=t.parentNode.getBoundingClientRect()}catch(t){console.error(t,t.stack)}}else i=n.getBoundingClientRect()}}else if("string"==typeof t&&t.indexOf("#")>-1){let e=t.substring(t.indexOf("#")+1),r=this.document.getElementById(e);if(r)if(tS){let t=new Range;t.selectNode(r),i=t.getBoundingClientRect()}else i=r.getBoundingClientRect()}return i&&(r.left=i.left,r.top=i.top),r}addStylesheet(t){return new Promise((function(e,i){var r,n=!1;return this.document?(r=this.document.querySelector("link[href='"+t+"']"))?void e(!0):void((r=this.document.createElement("link")).type="text/css",r.rel="stylesheet",r.href=t,r.onload=r.onreadystatechange=function(){n||this.readyState&&"complete"!=this.readyState||(n=!0,setTimeout(()=>{e(!0)},1))},this.document.head.appendChild(r)):void 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)}
1addStylesheetCss(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 r=0,n=t.length;r<n;r++){var s=1,o=t[r],a=t[r][0],h="";"[object Array]"===Object.prototype.toString.call(o[1][0])&&(o=o[1],s=0);for(var l=o.length;s<l;s++){var c=o[s];h+=c[0]+":"+c[1]+(c[2]?" !important":"")+";\n"}i.insertRule(a+"{"+h+"}",i.cssRules.length)}else Object.keys(t).forEach(e=>{let r=t[e];if(Array.isArray(r))r.forEach(t=>{let r=Object.keys(t).map(e=>`${e}:${t[e]}`).join(";");i.insertRule(`${e}{${r}}`,i.cssRules.length)});else{let t=Object.keys(r).map(t=>`${t}:${r[t]}`).join(";");i.insertRule(`${e}{${t}}`,i.cssRules.length)}})}addScript(t){return new Promise((function(e,i){var r,n=!1;if(!this.document)return void e(!1);(r=this.document.createElement("script")).type="text/javascript",r.async=!0,r.src=t,r.onload=r.onreadystatechange=function(){n||this.readyState&&"complete"!=this.readyState||(n=!0,setTimeout(function(){e(!0)},1))},this.document.head.appendChild(r)}).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),th.forEach(function(t){this.document.addEventListener(t,this._triggerEvent,{passive:!0})},this))}removeEventListeners(){this.document&&(th.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 J(e,this.cfiBase).toString(),this.emit(tl.CONTENTS.SELECTED,i),this.emit(tl.CONTENTS.SELECTED_RANGE,e)))}range(t,e){return new J(t).toRange(this.document,e)}cfiFromRange(t,e){return new J(t,this.cfiBase,e).toString()}cfiFromNode(t,e){return new J(t,this.cfiBase,e).toString()}map(t){return new tx(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,r,n){let s=f("column-axis"),o=f("column-gap"),a=f("column-width"),h=f("column-fill"),l=0===this.writingMode().indexOf("vertical")?"vertical":"horizontal";this.layoutStyle("paginated"),"rtl"===n&&"horizontal"===l&&this.direction(n),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"===l?(this.css("padding-top",r/2+"px",!0),this.css("padding-bottom",r/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",r/2+"px",!0),this.css("padding-right",r/2+"px",!0),this.css(s,"horizontal")),this.css("box-sizing","border-box"),this.css("max-width","inherit"),this.css(h,"auto"),this.css(o,r+"px"),this.css(a,i+"px"),this.css("-webkit-line-box-contain","block glyphs replaced")}scaler(t,e,i){var r="";this.css("transform-origin","top left"),(e>=0||i>=0)&&(r=" translate("+(e||0)+"px, "+(i||0)+"px )"),this.css("transform","scale("+t+")"+r)}fit(t,e,i){var r=this.viewport(),n=parseInt(r.width),s=parseInt(r.height),o=t/n,a=e/s,h=o<a?o:a;if(this.layoutStyle("paginated"),this.width(n),this.height(s),this.overflow("hidden"),this.scaler(h,0,0),this.css("background-size",n*h+"px "+s*h+"px"),this.css("background-color","transparent"),i&&i.properties.includes("page-spread-left")){var l=t-n*h;this.css("margin-left",l+"px")}}direction(t){this.documentElement&&(this.documentElement.style.direction=t)}mapPage(t,e,i,r,n){return new tx(e,n).page(this,t,i,r)}linksHandler(){!function(t,e){var i=t.querySelectorAll("a[href]");if(i.length)for(var r=I(t.ownerDocument,"base"),n=r?r.getAttribute("href"):void 0,s=(function(t){var i,r=t.getAttribute("href");if(0!==r.indexOf("mailto:"))if(r.indexOf("://")>-1)t.setAttribute("target","_blank");else{try{i=new Z(r,n)}catch(t){}t.onclick=function(){return i&&i.hash?e(i.Path.path+i.hash):i?e(i.Path.path):e(r),!1}}}).bind(this),o=0;o<i.length;o++)s(i[o])}(this.content,t=>
1{this.emit(tl.CONTENTS.LINK_CLICKED,t)})}writingMode(t){let e=f("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;default:return!1}}},navigator.epubReadingSystem}destroy(){this.removeListeners()}}s()(tT.prototype);class tN{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,r,n,s){let o=encodeURI(e+t),a=new J(e).spinePos,h=new tC({type:t,cfiRange:e,data:i,sectionIndex:a,cb:r,className:n,styles:s});return this._annotations[o]=h,a in this._annotationsBySectionIndex?this._annotationsBySectionIndex[a].push(o):this._annotationsBySectionIndex[a]=[o],this.rendition.views().forEach(t=>{h.sectionIndex===t.index&&h.attach(t)}),h}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,r,n){return this.add("highlight",t,e,i,r,n)}underline(t,e,i,r,n){return this.add("underline",t,e,i,r,n)}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;e in this._annotationsBySectionIndex&&this._annotationsBySectionIndex[e].forEach(e=>{this._annotations[e].attach(t)})}clear(t){let e=t.index;e in this._annotationsBySectionIndex&&this._annotationsBySectionIndex[e].forEach(e=>{this._annotations[e].detach(t)})}show(){}hide(){}}class tC{constructor({type:t,cfiRange:e,data:i,sectionIndex:r,cb:n,className:s,styles:o}){this.type=t,this.cfiRange=e,this.data=i,this.sectionIndex=r,this.mark=void 0,this.cb=n,this.className=s,this.styles=o}update(t){this.data=t}attach(t){let e,{cfiRange:i,data:r,type:n,mark:s,cb:o,className:a,styles:h}=this;return"highlight"===n?e=t.highlight(i,r,o,a,h):"underline"===n?e=t.underline(i,r,o,a,h):"mark"===n&&(e=t.mark(i,r,o)),this.mark=e,this.emit(tl.ANNOTATION.ATTACH,e),e}detach(t){let e,{cfiRange:i,type:r}=this;return t&&("highlight"===r?e=t.unhighlight(i):"underline"===r?e=t.ununderline(i):"mark"===r&&(e=t.unmark(i))),this.mark=void 0,this.emit(tl.ANNOTATION.DETACH,e),e}text(){}}s()(tC.prototype);var t_=i(3630);class tL{constructor(t,e){this.settings=m({ignoreClass:"",axis:void 0,direction:void 0,width:0,height:0,layout:void 0,globalLayoutProperties:{},method:void 0,forceRight:!1,allowScriptedContent:!1,allowPopups:!1},e||{}),this.id="epubjs-view-"+l(),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 J,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",t&&"horizontal"==t?e.style.flex="none":e.style.flex="initial",e}create(){return this.iframe||(this.element||(this.element=this.createContainer()),this.iframe=document.createElement("iframe"),this.iframe.id=this.id,this.iframe.scrolling="no",this.iframe.style.overflow="hidden",this.iframe.seamless="seamless",this.iframe.style.border="none",this.iframe.sandbox="allow-same-origin",this.settings.allowScriptedContent&&(this.iframe.sandbox+=" allow-scripts"),this.settings.allowPopups&&(this.iframe.sandbox+=" allow-popups"),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=w(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
1(tl.VIEWS.AXIS,t),this.setWritingMode(e),this.emit(tl.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(tl.VIEWS.LOAD_ERROR,t),new Promise((e,i)=>{i(t)})}).bind(this)).then((function(){this.emit(tl.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,r=e||this.settings.height;"pre-paginated"===this.layout.name?this.lock("both",i,r):"horizontal"===this.settings.axis?this.lock("height",i,r):this.lock("width",i,r),this.settings.width=i,this.settings.height=r}lock(t,e,i){var r,n=x(this.element);r=this.iframe?x(this.iframe):{width:0,height:0},"width"==t&&d(e)&&(this.lockedWidth=e-n.width-r.width),"height"==t&&d(i)&&(this.lockedHeight=i-n.height-r.height),"both"===t&&d(e)&&d(i)&&(this.lockedWidth=e-n.width-r.width,this.lockedHeight=i-n.height-r.height),this.displayed&&this.iframe&&this.expand()}expand(t){var e,i=this.lockedWidth,r=this.lockedHeight;this.iframe&&!this._expanding&&(this._expanding=!0,"pre-paginated"===this.layout.name?(i=this.layout.columnWidth,r=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&&(r=this.contents.textHeight(),"paginated"===this.settings.flow&&r%this.layout.height>0&&(r=Math.ceil(r/this.layout.height)*this.layout.height)),(this._needsReframe||i!=this._width||r!=this._height)&&this.reframe(i,r),this._expanding=!1)}reframe(t,e){var i;d(t)&&(this.element.style.width=t+"px",this.iframe.style.width=t+"px",this._width=t),d(e)&&(this.element.style.height=e+"px",this.iframe.style.height=e+"px",this._height=e);let r=this.prevBounds?t-this.prevBounds.width:t,n=this.prevBounds?e-this.prevBounds.height:e;i={width:t,height:e,widthDelta:r,heightDelta:n},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(tl.VIEWS.RESIZED,i),this.prevBounds=i,this.elementBounds=w(this.element)}load(t){var e=new U,i=e.promise;if(!this.iframe)return e.reject(Error("No Iframe Available")),i;if(this.iframe.onload=(function(t){this.onLoad(t,e)}).bind(this),"blobUrl"===this.settings.method)this.blobUrl=L(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(Error("No Document Available")),i;if(this.iframe.contentDocument.open(),window.MSApp&&MSApp.execUnsafeLocalFunction){var r=this;MSApp.execUnsafeLocalFunction(function(){r.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 tT(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(tl.CONTENTS.EXPAND,()=>{this.displayed&&this.iframe&&(this.expand(),this.contents&&this.layout.format(this.contents))}),this.contents.on(tl.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,"horizontal"==t?this.element.style.flex="none":this.element.style.flex="initial",this.size()}setWritingMode(t){this.writingMode=t}addListeners(){}removeListeners(t){}display(t){var e=new U;return this.displayed?e.resolve(this):this.render(t).then((function(){this.emit
1(tl.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(tl.VIEWS.SHOWN,this)}hide(){this.element.style.visibility="hidden",this.iframe.style.visibility="hidden",this.stopExpanding=!0,this.emit(tl.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=w(this.element)),this.elementBounds}highlight(t,e={},i,r="epubjs-hl",n={}){if(!this.contents)return;let s=Object.assign({fill:"yellow","fill-opacity":"0.3","mix-blend-mode":"multiply"},n),o=this.contents.range(t),a=()=>{this.emit(tl.VIEWS.MARK_CLICKED,t,e)};e.epubcfi=t,this.pane||(this.pane=new t_.Zv(this.iframe,this.element));let h=new t_.f4(o,r,e,s),l=this.pane.addMark(h);return this.highlights[t]={mark:l,element:l.element,listeners:[a,i]},l.element.setAttribute("ref",r),l.element.addEventListener("click",a),l.element.addEventListener("touchstart",a),i&&(l.element.addEventListener("click",i),l.element.addEventListener("touchstart",i)),l}underline(t,e={},i,r="epubjs-ul",n={}){if(!this.contents)return;let s=Object.assign({stroke:"black","stroke-opacity":"0.3","mix-blend-mode":"multiply"},n),o=this.contents.range(t),a=()=>{this.emit(tl.VIEWS.MARK_CLICKED,t,e)};e.epubcfi=t,this.pane||(this.pane=new t_.Zv(this.iframe,this.element));let h=new t_.z2(o,r,e,s),l=this.pane.addMark(h);return this.underlines[t]={mark:l,element:l.element,listeners:[a,i]},l.element.setAttribute("ref",r),l.element.addEventListener("click",a),l.element.addEventListener("touchstart",a),i&&(l.element.addEventListener("click",i),l.element.addEventListener("touchstart",i)),l}mark(t,e={},i){if(!this.contents)return;if(t in this.marks)return this.marks[t];let r=this.contents.range(t);if(!r)return;let n=r.commonAncestorContainer,s=1===n.nodeType?n:n.parentNode,o=i=>{this.emit(tl.VIEWS.MARK_CLICKED,t,e)};r.collapsed&&1===n.nodeType?(r=new Range).selectNodeContents(n):r.collapsed&&(r=new Range).selectNodeContents(s);let a=this.document.createElement("a");return a.setAttribute("ref","epubjs-mk"),a.style.position="absolute",a.dataset.epubcfi=t,e&&Object.keys(e).forEach(t=>{a.dataset[t]=e[t]}),i&&(a.addEventListener("click",i),a.addEventListener("touchstart",i)),a.addEventListener("click",o),a.addEventListener("touchstart",o),this.placeMark(a,r),this.element.appendChild(a),this.marks[t]={element:a,range:r,listeners:[o,i]},s}placeMark(t,e){let i,r,n;if("pre-paginated"===this.layout.name||"horizontal"!==this.settings.axis){let t=e.getBoundingClientRect();i=t.top,r=t.right}else{let t,o=e.getClientRects();for(var s=0;s!=o.length;s++)t=o[s],(!n||t.left<n)&&(r=Math.ceil((n=t.left)/this.layout.props.pageWidth)*this.layout.props.pageWidth-this.layout.gap/2,i=t.top)}t.style.top=`${i}px`,t.style.left=`${r}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&&k(this.blobUrl),this.displayed&&(this.displayed=!1,this.removeListeners(),this.contents.destroy(),this.stopExpanding=!0,this.element.removeChild(this.iframe),this.pane&&(this.pane.element.remove(),this.pane=void 0),this.iframe=void 0,this.contents=void 0,this._textWidth=null,this._textHeight=null,this._width=null,this._height=null)}}s()(tL.prototype);var tk=i(2654),tA=i.n(tk);class tR{constructor(t){this.settings=t||{},this.id="epubjs-container-"+l(),this.container=this.create(this.settings),this.settings.hidden&&(this.wrapper=this.wrap(this.container))}create(t){let e=t.height,i=t.width,r=t.overflow||!1,n=t.axis||"vertical",s=t.direction;m(this.settings,t),t.height&&d(t.height)&&(e=t.height+"px"),t.width&&d(t.width)&&(i=t.width+"px");let o=document.createElement("div");return o.id=this.id,o.classList.add("epub-container"),o.style.wordSpacing="0",o.style.lineHeight="0",o.style.verticalAlign="top",o.style.position="relative","horizontal"===n&&(o.style.display="flex",o.style.flexDirection="row",o.style.flexWrap="nowrap"),i&&(o.style.width=i),e&&(o.style.height=e),r&&("scroll"===r&&"vertical"===n?(o.style["overflow-y"]=r,o.style["overflow-x"]="hidden"):"scroll"===r&&"horizontal"===n?(o.style["overflow-y"]="hidden",o.style["overflow-x"]=r):o.style.overflow=r),s&&(o.dir=s,o.style.direction=s),s&&this.settings.fullsize&&(document.body.style.direction=s),o}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(u(t)?e=t:"string"==typeof t&&(e=document.getElementById(t)),!e)throw 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){d(this.settings.width)&&d(this.settings.height)||(this.resizeFunc=tA(
1)(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 r=t||this.settings.width,n=e||this.settings.height;null===t?(i=this.element.getBoundingClientRect()).width&&(t=Math.floor(i.width),this.container.style.width=t+"px"):d(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"):d(e)?this.container.style.height=e+"px":this.container.style.height=e,d(t)||(t=this.container.clientWidth),d(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=D(),o=window.getComputedStyle(document.body),a={left:parseFloat(o["padding-left"])||0,right:parseFloat(o["padding-right"])||0,top:parseFloat(o["padding-top"])||0,bottom:parseFloat(o["padding-bottom"])||0};return r||(t=s.width-a.left-a.right),(!this.settings.fullsize||n)&&n||(e=s.height-a.top-a.bottom),{width:t-this.containerPadding.left-this.containerPadding.right,height:e-this.containerPadding.top-this.containerPadding.bottom}}bounds(){let t;return("visible"!==this.container.style.overflow&&(t=this.container&&this.container.getBoundingClientRect()),t&&t.width&&t.height)?t:D()}getSheet(){var t=document.createElement("style");return t.appendChild(document.createTextNode("")),document.head.appendChild(t),t.sheet}addStyleRules(t,e){var i="#"+this.id+" ",r="";this.sheet||(this.sheet=this.getSheet()),e.forEach(function(t){for(var e in t)t.hasOwnProperty(e)&&(r+=e+":"+t[e]+";")}),this.sheet.insertRule(i+t+" {"+r+"}",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))}}class tO{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,r=0;r<i;r++)if((e=this._views[r]).displayed&&e.section.index==t.index)return e}displayed(){for(var t,e=[],i=this.length,r=0;r<i;r++)(t=this._views[r]).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}}
1class tI{constructor(t){this.name="default",this.optsSettings=t.settings,this.View=t.view,this.request=t.request,this.renditionQueue=t.queue,this.q=new ta(this),this.settings=m(this.settings||{},{infinite:!0,hidden:!1,width:void 0,height:void 0,axis:void 0,writingMode:void 0,flow:"scrolled",ignoreClass:"",fullsize:void 0,allowScriptedContent:!1,allowPopups:!1}),m(this.settings,t.settings||{}),this.viewSettings={ignoreClass:this.settings.ignoreClass,axis:this.settings.axis,flow:this.settings.flow,layout:this.layout,method:this.settings.method,width:0,height:0,forceEvenPages:!0,allowScriptedContent:this.settings.allowScriptedContent,allowPopups:this.settings.allowPopups},this.rendered=!1}render(t,e){var i,r,n,s,o,a;let h=t.tagName;void 0===this.settings.fullsize&&h&&("body"==h.toLowerCase()||"html"==h.toLowerCase())&&(this.settings.fullsize=!0),this.settings.fullsize&&(this.settings.overflow="visible",this.overflow=this.settings.overflow),this.settings.size=e,this.settings.rtlScrollType=(i="reverse",(n=document.createElement("div")).dir="rtl",n.style.position="fixed",n.style.width="1px",n.style.height="1px",n.style.top="0px",n.style.left="0px",n.style.overflow="hidden",(s=document.createElement("div")).style.width="2px",(o=document.createElement("span")).style.width="1px",o.style.display="inline-block",(a=document.createElement("span")).style.width="1px",a.style.display="inline-block",s.appendChild(o),s.appendChild(a),n.appendChild(s),r=n,document.body.appendChild(r),r.scrollLeft>0?i="default":"undefined"!=typeof Element&&Element.prototype.scrollIntoView?(r.children[0].children[1].scrollIntoView(),r.scrollLeft<0&&(i="negative")):(r.scrollLeft=1,0===r.scrollLeft&&(i="negative")),document.body.removeChild(r),i),this.stage=new tR({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 tO(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;
1this.optsSettings.resizeOnOrientationChange&&this.resize(),clearTimeout(this.orientationTimeout),this.orientationTimeout=setTimeout((function(){this.orientationTimeout=void 0,this.optsSettings.resizeOnOrientationChange&&this.resize(),this.emit(tl.MANAGERS.ORIENTATION_CHANGE,e)}).bind(this),500)}onResized(t){this.resize()}resize(t,e,i){let r=this.stage.size(t,e);if(this.winBounds=D(),this.orientationTimeout&&this.winBounds.width===this.winBounds.height){this._stageSize=void 0;return}this._stageSize&&this._stageSize.width===r.width&&this._stageSize.height===r.height||(this._stageSize=r,this._bounds=this.bounds(),this.clear(),this.viewSettings.width=this._stageSize.width,this.viewSettings.height=this._stageSize.height,this.updateLayout(),this.emit(tl.MANAGERS.RESIZED,{width:this._stageSize.width,height:this._stageSize.height},i))}createView(t,e){return new this.View(t,m(this.viewSettings,{forceRight:e}))}handleNextPrePaginated(t,e,i){let r;if("pre-paginated"===this.layout.name&&this.layout.divisor>1){if(t||0===e.index)return;if((r=e.next())&&!r.properties.includes("page-spread-left"))return i.call(this,r)}}display(t,e){var i=new U,r=i.promise;(e===t.href||d(e))&&(e=void 0);var n=this.views.find(t);if(n&&t&&"pre-paginated"!==this.layout.name){let t=n.offset();if("ltr"===this.settings.direction)this.scrollTo(t.left,t.top,!0);else{let e=n.width();this.scrollTo(t.left+e,t.top,!0)}if(e){let t=n.locationOf(e),i=n.width();this.moveTo(t,i)}return i.resolve(),r}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),r=t.width();this.moveTo(i,r)}}).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)),r}afterDisplayed(t){this.emit(tl.MANAGERS.ADDED,t)}afterResized(t){this.emit(tl.MANAGERS.RESIZE,t.section)}moveTo(t,e){var i=0,r=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),(r=Math.floor(t.top/this.layout.delta)*this.layout.delta)+this.layout.delta>this.container.scrollHeight&&(r=this.container.scrollHeight-this.layout.delta)):r=t.top,"rtl"===this.settings.direction&&(i+=this.layout.delta,i-=e),this.scrollTo(i,r,!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(tl.VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(tl.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(tl.VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(tl.VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),i.display(this.request)}prepend(t,e){var i=this.createView(t,e);return i.on(tl.VIEWS.RESIZED,t=>{this.counter(t)}),this.views.prepend(i),i.onDisplayed=this.afterDisplayed.bind(this),i.onResize=this.afterResized.bind(this),i.on(tl.VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(tl.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&&(this.isPaginated&&"horizontal"===this.settings.axis&&(!e||"ltr"===e)?(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()):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()):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()):t=this.views.last().section.next(),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&&(this.isPaginated&&"horizontal"===this.settings.axis&&(!e||"ltr"===e)?(this.scrollLeft=this.container.scrollLeft,this.container.scrollLeft>0?this.scrollBy(-this.layout.delta,0,!0):t=this.views.first().section.prev()):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()):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()):t=this.views.first().section.prev(),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,r=e.width<window.innerWidth?e.width:window.innerWidth,n="vertical"===this.settings.axis;this.settings.direction;let s=0;return this.settings.fullsize&&(s=n?window.scrollY:window.scrollX),t.map(t=>{let o,a,h,l,{index:c,href:u}=t.section,d=t.position(),p=t.width(),f=t.height();n?(a=(o=s+e.top-d.top+0)+i-0,l=this.layout.count(f,i).pages,h=i):(a=(o=s+e.left-d.left+0)+r-0,l=this.layout.count(p,r).pages,h=r);let g=Math.ceil(o/h),m=[],v=Math.ceil(a/h);if("rtl"===this.settings.direction&&!n){let t=g;g=l-v,v=l-t}m=[];for(var y=g;y<=v;y++){let t=y+1;m.push(t)}return{index:c,href:u,pages:m,totalPages:l,mapping:this.mapping.page(t.contents,t.section.cfiBase,o,a)}})}paginatedLocation(){let t=this.visible(),e=this.container.getBoundingClientRect(),i=0,r=0;return this.settings.fullsize&&(i=window.scrollX),t.map(t=>{let n,s,o,a,{index:h,href:l}=t.section,c=t.position(),u=t.width();"rtl"===this.settings.direction?(a=Math.min(Math.abs((n=e.right-i)-c.left),this.layout.width)-r,s=(o=c.width-(c.right-n)-r)-a):(n=e.left+i,a=Math.min(c.right-n,this.layout.width)-r,o=(s=n-c.left+r)+a),r+=a;let d=this.mapping.page(t.contents,t.section.cfiBase,s,o),p=this.layout.count(u).pages,f=Math.floor(s/this.layout.pageWidth),g=[],m=Math.floor(o/this.layout.pageWidth);if(f<0&&(f=0,m+=1),"rtl"===this.settings.direction){let t=f;f=p-m,m=p-t}for(var v=f+1;v<=m;v++){let t=v;g.push(t)}return{index:h,href:l,pages:g,totalPages:p,mapping:d}})}isVisible(t,e,i,r){var n=t.position(),s=r||this.bounds();return"horizontal"===this.settings.axis&&n.right>s.left-e&&n.left<s.right+i||"vertical"===this.settings.axis&&!!(n.bottom>s.top-e)&&!!(n.top<s.bottom+i)}visible(){for(var t,e=this.bounds(),i=this.views.displayed(),r=i.length,n=[],s=0;s<r;s++)t=i[s],!0===this.isVisible(t,0,0,e)&&n.push(t);return n}scrollBy(t,e,i){let r="rtl"===this.settings.direction?-1:1;i&&(this.ignore=!0),this.settings.fullsize?window.scrollBy(t*r,e*r):(t&&(this.container.scrollLeft+=t*r),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
1(tl.MANAGERS.SCROLL,{top:t,left:e}),clearTimeout(this.afterScrolled),this.afterScrolled=setTimeout((function(){this.emit(tl.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 tx(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 tx(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){let i=e&&e.contents;i&&t.push(i)}),t}direction(t="ltr"){this.settings.direction=t,this.stage&&this.stage.direction(t),this.viewSettings.direction=t,this.updateLayout()}isRendered(){return this.rendered}}s()(tI.prototype);let tq=tI,tP={easeInCubic:function(t){return Math.pow(t,3)}};class tM{constructor(t,e){this.settings=m({duration:80,minVelocity:.2,minDistance:10,easing:tP.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(tl.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(tl.MANAGERS.ADDED,this._afterDis
1played),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],r=Math.abs(i-this.endTouchY);this.touchCanceler=!0,!this.fullsize&&r<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),r=e/(this.endTime-this.startTime),n=this.settings.minVelocity;return i<=this.settings.minDistance||i>=t?0:r>n?-1:r<-n?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,r=Math.round(e/i)*i;return t&&(r+=t*i),this.smoothScrollTo(r)}smoothScrollTo(t){let e=new U,i=this.scrollLeft,r=this.now(),n=this.settings.duration,s=this.settings.easing;return this.snapping=!0,(function o(){let a=Math.min(1,(this.now()-r)/n);if(s(a),this.touchCanceler||this.resizeCanceler){this.resizeCanceler=!1,this.snapping=!1,e.resolve();return}a<1?(window.requestAnimationFrame(o.bind(this)),this.scrollTo(i+(t-i)*a,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)}}s()(tM.prototype);var tB=i(3693),tz=i.n(tB);class tj extends tq{constructor(t){super(t),this.name="continuous",this.settings=m(this.settings||{},{infinite:!0,overflow:void 0,axis:void 0,writingMode:void 0,flow:"scrolled",offset:500,offsetDelta:250,width:void 0,height:void 0,snap:!1,afterScrolledTimeout:10,allowScriptedContent:!1,allowPopups:!1}),m(this.settings,t.settings||{}),"undefined"!=t.settings.gap&&0===t.settings.gap&&(this.settings.gap=t.settings.gap),this.viewSettings={ignoreClass:this.settings.ignoreClass,axis:this.settings.axis,flow:this.settings.flow,layout:this.layout,width:0,height:0,forceEvenPages:!1,allowScriptedContent:this.settings.allowScriptedContent,allowPopups:this.settings.allowPopups},this.scrollTop=0,this.scrollLeft=0}display(t,e){return tq.prototype.display.call(this,t,e).then((function(){return this.fill()}).bind(this))}fill(t){var e=t||new U;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:(i=t.top,t.top),this.settings.offsetDelta,(e>0||i>0)&&this.scrollBy(e,i,!0)}afterResized(t){this.emit(tl.MANAGERS.RESIZE,t.section)}removeShownListeners(t){t.onDisplayed=function(){}}add(t){var e=this.createView(t);return this.views.append(e),e.on(tl.VIEWS.RESIZED,t=>{e.expanded=!0}),e.on(tl.VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(tl.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(tl.VIEWS.RESIZED,t=>{e.expanded=!0}),e.on(tl.VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(tl.VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}
1),this.views.append(e),e.onDisplayed=this.afterDisplayed.bind(this),e}prepend(t){var e=this.createView(t);return e.on(tl.VIEWS.RESIZED,t=>{this.counter(t),e.expanded=!0}),e.on(tl.VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(tl.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(),n=r.length,s=[],o=void 0!==t?t:this.settings.offset||0,a=new U,h=[],l=0;l<n;l++)if(e=r[l],!0===this.isVisible(e,o,o,i)){if(e.displayed)e.show();else{let t=e.display(this.request).then(function(t){t.show()},t=>{e.hide()});h.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 h.length?Promise.all(h).catch(t=>{a.reject(t)}):(a.resolve(),a.promise)}check(t,e){var i=new U,r=[],n="horizontal"===this.settings.axis,s=this.settings.offset||0;t&&n&&(s=t),e&&!n&&(s=e);var o=this._bounds;let a=n?this.scrollLeft:this.scrollTop,h=n?Math.floor(o.width):o.height,l=n?this.container.scrollWidth:this.container.scrollHeight,c=this.writingMode&&0===this.writingMode.indexOf("vertical")?"vertical":"horizontal",u=this.settings.rtlScrollType,d="rtl"===this.settings.direction;this.settings.fullsize?(n&&d&&"negative"===u||!n&&d&&"default"===u)&&(a*=-1):(d&&"default"===u&&"horizontal"===c&&(a=l-h-a),d&&"negative"===u&&"horizontal"===c&&(a*=-1));let p=()=>{let t=this.views.first(),e=t&&t.section.prev();e&&r.push(this.prepend(e))},f=()=>{let t=this.views.last(),e=t&&t.section.next();e&&r.push(this.append(e))},g=a+h+s,m=a-s;g>=l&&f(),m<0&&p();let v=r.map(t=>t.display(this.request));return r.length?Promise.all(v).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 U,e=this.views.displayed(),i=e[0],r=e[e.length-1],n=this.views.indexOf(i),s=this.views.indexOf(r),o=this.views.slice(0,n),a=this.views.slice(s+1),h=0;h<o.length-1;h++)this.erase(o[h],o);for(var l=1;l<a.length;l++)this.erase(a[l]);return t.resolve(),t.promise}erase(t,e){this.settings.fullsize?(i=window.scrollY,r=window.scrollX):(i=this.container.scrollTop,r=this.container.scrollLeft);var i,r,n=t.bounds();this.views.remove(t),e&&("vertical"===this.settings.axis?this.scrollTo(0,i-n.height,!0):"rtl"===this.settings.direction?this.settings.fullsize?this.scrollTo(r+Math.floor(n.width),0,!0):this.scrollTo(r,0,!0):this.scrollTo(r-Math.floor(n.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 tM(this,this.settings.snap&&"object"==typeof this.settings.snap&&this.settings.snap))}addScrollListeners(){var t;this.tick=a;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=tz()(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()}
1).bind(this)),this.emit(tl.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(tl.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 tM(this,this.settings.snap&&"object"==typeof this.settings.snap&&this.settings.snap))}destroy(){super.destroy(),this.snapper&&this.snapper.destroy()}}class tU{constructor(t,e){this.settings=m(this.settings||{},{width:null,height:null,ignoreClass:"",manager:"default",view:"iframe",flow:null,layout:null,spread:null,minSpreadWidth:800,stylesheet:null,resizeOnOrientationChange:!0,script:null,snap:!1,defaultDirection:"ltr",allowScriptedContent:!1,allowPopups:!1}),m(this.settings,e),"object"==typeof this.settings.manager&&(this.manager=this.settings.manager),this.book=t,this.hooks={},this.hooks.display=new Q(this),this.hooks.serialize=new Q(this),this.hooks.content=new Q(this),this.hooks.unloaded=new Q(this),this.hooks.layout=new Q(this),this.hooks.render=new Q(this),this.hooks.show=new Q(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 tw(this),this.annotations=new tN(this),this.epubcfi=new J,this.q=new ta(this),this.location=void 0,this.q.enqueue(this.book.opened),this.starting=new U,this.started=this.starting.promise,this.q.enqueue(this.start)}setManager(t){this.manager=t}requireManager(t){return"string"==typeof t&&"default"===t?tq:"string"==typeof t&&"continuous"===t?tj:t}requireView(t){return"string"==typeof t&&"iframe"===t?tL: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(tl.MANAGERS.ADDED,this.afterDisplayed.bind(this)),this.manager.on(tl.MANAGERS.REMOVED,this.afterRemoved.bind(this)),this.manager.on(tl.MANAGERS.RESIZED,this.onResized.bind(this)),this.manager.on(tl.MANAGERS.ORIENTATION_CHANGE,this.onOrientationChange.bind(this)),this.manager.on(tl.MANAGERS.SCROLLED,this.reportLocation.bind(this)),this.emit(tl.RENDITION.STARTED),this.starting.resolve()}attachTo(t){return this.q.enqueue((function(){this.manager.render(t,{width:this.settings.width,height:this.settings.height}
1),this.emit(tl.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 U,r=i.promise;return(this.displaying=i,this.book.locations.length()&&p(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(tl.RENDITION.DISPLAYED,e),this.reportLocation()},t=>{this.emit(tl.RENDITION.DISPLAY_ERROR,t)}):i.reject(Error("No Section Found")),r}}afterDisplayed(t){t.on(tl.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(tl.RENDITION.RENDERED,t.section,t)}):this.emit(tl.RENDITION.RENDERED,t.section,t)})}afterRemoved(t){this.hooks.unloaded.trigger(t,this).then(()=>{this.emit(tl.RENDITION.REMOVED,t.section,t)})}onResized(t,e){this.emit(tl.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(tl.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",r=this.settings.orientation||t.orientation||"auto",n=this.settings.flow||t.flow||"auto",s=t.viewport||"",o=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:r,flow:n,viewport:s,minSpreadWidth:o,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 tb(t),this._layout.spread(t.spread,this.settings.minSpreadWidth),this._layout.on(tl.LAYOUT.UPDATED,(t,e)=>{this.emit(tl.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(tl.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(tl.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(tl.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(tl.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],r={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}}},n=this.book.locations.locationFromCfi(e.mapping.start),s=this.book.locations.locationFromCfi(i.mapping.end);null!=n&&(r.start.location=n,r.start.percentage=this.book.locations.percentageFromLocation(n)),null!=s&&(r.end.location=s,r.end.percentage=this.book.locations.percentageFromLocation(s));let o=this.book.pageList.pageFromCfi(e.mapping.start),a=this.book.pageList.pageFromCfi(i.mapping.end);
1return -1!=o&&(r.start.page=o),-1!=a&&(r.end.page=a),i.index===this.book.spine.last().index&&r.end.displayed.page>=r.end.displayed.total&&(r.atEnd=!0),e.index===this.book.spine.first().index&&1===r.start.displayed.page&&(r.atStart=!0),r}destroy(){this.manager&&this.manager.destroy(),this.book=void 0}passEvents(t){th.forEach(e=>{t.on(e,e=>this.triggerViewEvent(e,t))}),t.on(tl.CONTENTS.SELECTED,e=>this.triggerSelectedEvent(e,t))}triggerViewEvent(t,e){this.emit(t.type,t,e)}triggerSelectedEvent(t,e){this.emit(tl.RENDITION.SELECTED,t,e)}triggerMarkEvent(t,e,i){this.emit(tl.RENDITION.MARK_CLICKED,t,e,i)}getRange(t,e){var i=new J(t),r=this.manager.visible().filter(function(t){if(i.spinePos===t.index)return!0});if(r.length)return r[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=(t.content.offsetHeight-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)))*.95,r=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight);return t.addStylesheetRules({img:{"max-width":(this._layout.columnWidth?this._layout.columnWidth-r+"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-r+"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(tl.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,r=t.createElement("meta");r.setAttribute("name","dc.relation.ispartof"),i&&r.setAttribute("content",i),t.getElementsByTagName("head")[0].appendChild(r)}}s()(tU.prototype);var tF=i(4366),tW=i.n(tF);class tH{constructor(){this.zip=void 0,this.urlCache={},this.checkRequirements()}checkRequirements(){try{this.zip=new(tW())}catch(t){throw Error("JSZip lib not loaded")}}open(t,e){return this.zip.loadAsync(t,{base64:e})}openUrl(t,e){return tn(t,"binary").then((function(t){return this.zip.loadAsync(t,{base64:e})}).bind(this))}request(t,e){var i,r=new U,n=new K(t);return e||(e=n.extension),(i="blob"==e?this.getBlob(t):this.getText(t))?i.then((function(t){let i=this.handleResponse(t,e);r.resolve(i)}).bind(this)):r.reject({message:"File not found in the epub: "+t,stack:Error().stack}),r.promise}handleResponse(t,e){return"json"==e?JSON.parse(t):C(e)?O(t,"text/xml"):"xhtml"==e?O(t,"application/xhtml+xml"):"html"==e||"htm"==e?O(t,"text/html"):t}getBlob(t,e){var i=window.decodeURIComponent(t.substr(1)),r=this.zip.file(i);if(r)return e=e||tm.lookup(r.name),r.async("uint8array").then(function(t){return new Blob([t],{type:e})})}getText(t,e){var i=window.decodeURIComponent(t.substr(1)),r=this.zip.file(i);if(r)return r.async("string").then(function(t){return t})}getBase64(t,e){var i=window.decodeURIComponent(t.substr(1)),r=this.zip.file(i);if(r)return e=e||tm.lookup(r.name),r.async("base64").then(function(t){return"data:"+e+";base64,"+t})}createUrl(t,e){var i,r,n=new U,s=window.URL||window.webkitURL||window.mozURL,o=e&&e.base64;return t in this.urlCache?n.resolve(this.urlCache[t]):(o?(r=this.getBase64(t))&&r.then((function(e){this.urlCache[t]=e,n.resolve(e)}).bind(this)):(r=this.getBlob(t))&&r.then((function(e){i=s.createObjectURL(e),this.urlCache[t]=i,n.resolve(i)}).bind(this)),r||n.reject({message:"File not found in the epub: "+t,stack:Error().stack})),n.promise}revokeUrl(t){var e=window.URL||window.webkitURL||window.mozURL,i=this.urlCache[t];i&&e.revokeObjectURL(i)}destroy(){var t=window.URL||window.webkitURL||window.mozURL;for(let e in this.urlCache)t.revokeObjectURL(e);this.zip=void 0,this.urlCache={}}}var tV=i(9832),tG=i.n(tV);class tX{constructor(t,e,i){this.urlCache={},this.storage=void 0,this.name=t,this.requester=e||tn,this.resolver=i,this.online=!0,this.checkRequirements(),this.addListeners()}checkRequirements(){try{let t;void 0===tG()&&(t=tG()),this.storage=t.createInstance({name:this.name})}catch(t){throw 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;
1this.online=e,e?this.emit("online",this):this.emit("offline",this)}add(t,e){return Promise.all(t.resources.map(t=>{let{href:i}=t,r=this.resolver(i),n=window.encodeURIComponent(r);return this.storage.getItem(n).then(t=>!t||e?this.requester(r,"binary").then(t=>this.storage.setItem(n,t)):t)}))}put(t,e,i){let r=window.encodeURIComponent(t);return this.storage.getItem(r).then(n=>n||this.requester(t,"binary",e,i).then(t=>this.storage.setItem(r,t)))}request(t,e,i,r){return this.online?this.requester(t,e,i,r).then(e=>(this.put(t),e)):this.retrieve(t,e)}retrieve(t,e){new U;var i=new K(t);return e||(e=i.extension),("blob"==e?this.getBlob(t):this.getText(t)).then(i=>{var r,n=new U;return i?(r=this.handleResponse(i,e),n.resolve(r)):n.reject({message:"File not found in storage: "+t,stack:Error().stack}),n.promise})}handleResponse(t,e){return"json"==e?JSON.parse(t):C(e)?O(t,"text/xml"):"xhtml"==e?O(t,"application/xhtml+xml"):"html"==e||"htm"==e?O(t,"text/html"):t}getBlob(t,e){let i=window.encodeURIComponent(t);return this.storage.getItem(i).then(function(i){if(i)return new Blob([i],{type:e=e||tm.lookup(t)})})}getText(t,e){let i=window.encodeURIComponent(t);return e=e||tm.lookup(t),this.storage.getItem(i).then(function(t){var i,r=new U,n=new FileReader;if(t)return i=new Blob([t],{type:e}),n.addEventListener("loadend",()=>{r.resolve(n.result)}),n.readAsText(i,e),r.promise})}getBase64(t,e){let i=window.encodeURIComponent(t);return e=e||tm.lookup(t),this.storage.getItem(i).then(t=>{var i,r=new U,n=new FileReader;if(t)return i=new Blob([t],{type:e}),n.addEventListener("loadend",()=>{r.resolve(n.result)}),n.readAsDataURL(i,e),r.promise})}createUrl(t,e){var i,r,n=new U,s=window.URL||window.webkitURL||window.mozURL,o=e&&e.base64;return t in this.urlCache?n.resolve(this.urlCache[t]):(o?(r=this.getBase64(t))&&r.then((function(e){this.urlCache[t]=e,n.resolve(e)}).bind(this)):(r=this.getBlob(t))&&r.then((function(e){i=s.createObjectURL(e),this.urlCache[t]=i,n.resolve(i)}).bind(this)),r||n.reject({message:"File not found in storage: "+t,stack:Error().stack})),n.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()}}s()(tX.prototype);class tY{constructor(t){this.interactive="",this.fixedLayout="",this.openToSpread="",this.orientationLock="",t&&this.parse(t)}parse(t){if(!t)return this;let e=I(t,"display_options");return e&&q(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}}let t$="META-INF/container.xml",tK={BINARY:"binary",BASE64:"base64",EPUB:"epub",OPF:"opf",MANIFEST:"json",DIRECTORY:"directory"};class tZ{constructor(t,e){void 0===e&&"string"!=typeof t&&t instanceof Blob==!1&&t instanceof ArrayBuffer==!1&&(e=t,t=void 0),this.settings=m(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}),m(this.settings,e),this.opening=new U,this.opened=this.opening.promise,this.isOpen=!1,this.loading={manifest:new U,spine:new U,metadata:new U,cover:new U,navigation:new U,pageList:new U,resources:new U,displayOptions:new U},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||tn,this.spine=new to,this.locations=new tc(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=Error("Cannot load book at "+t);
1this.emit(tl.BOOK.OPEN_FAILED,i)})}open(t,e){var i,r=e||this.determineType(t);return r===tK.BINARY?(this.archived=!0,this.url=new Z("/",""),i=this.openEpub(t)):r===tK.BASE64?(this.archived=!0,this.url=new Z("/",""),i=this.openEpub(t,r)):r===tK.EPUB?(this.archived=!0,this.url=new Z("/",""),i=this.request(t,"binary",this.settings.requestCredentials,this.settings.requestHeaders).then(this.openEpub.bind(this))):r==tK.OPF?(this.url=new Z(t),i=this.openPackaging(this.url.Path.toString())):r==tK.MANIFEST?(this.url=new Z(t),i=this.openManifest(this.url.Path.toString())):(this.url=new Z(t),i=this.openContainer(t$).then(this.openPackaging.bind(this))),i}openEpub(t,e){return this.unarchive(t,e||this.settings.encoding).then(()=>this.openContainer(t$)).then(t=>this.openPackaging(t))}openContainer(t){return this.load(t).then(t=>(this.container=new tu(t),this.resolve(this.container.packagePath)))}openPackaging(t){return this.path=new K(t),this.load(t).then(t=>(this.packaging=new td(t),this.unpack(this.packaging)))}openManifest(t){return this.path=new K(t),this.load(t).then(t=>(this.packaging=new td,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)),!1!=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?tK.BASE64:"string"!=typeof t?tK.BINARY:((e=new Z(t).path().extension)&&(e=e.replace(/\?.*$/,"")),e)?"epub"===e?tK.EPUB:"opf"===e?tK.OPF:"json"===e?tK.MANIFEST:void 0:tK.DIRECTORY}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 tY(t),this.loading.displayOptions.resolve(this.displayOptions)}).catch(t=>{this.displayOptions=new tY,this.loading.displayOptions.resolve(this.displayOptions)}):(this.displayOptions=new tY,this.loading.displayOptions.resolve(this.displayOptions)),this.spine.unpack(this.packaging,this.resolve.bind(this),this.canonical.bind(this)),this.resources=new tv(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,r)=>{this.navigation=new tp(i),t.pageList&&(this.pageList=new ty(t.pageList)),e(this.navigation)}):e?this.load(e,"xml").then(t=>(this.navigation=new tp(t),this.pageList=new ty(t),this.navigation)):new Promise((t,e)=>{this.navigation=new tp,this.pageList=new ty,t(this.navigation)})}section(t){return this.spine.get(t)}renderTo(t,e){return this.rendition=new tU(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 tH,this.archive.open(t,e)}store(t){let e=this.settings.replacements&&"none"!==this.settings.replacements,i=this.url,r=this.settings.requestMethod||tn.bind(this);return this.storage=new tX(t,r,this.resolve.bind(this)),this.request=this.storage.request.bind(this.storage),this.opened.then(()=>{this.archived&&(this.storage.requester=this.archive.request.bind(this.archive));let 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 Z("/",""),this.spine.hooks.serialize.register(t)}),this.storage.on("online",()=>{this.url=i,this.spine.hooks.serialize.deregister(t)})}),this.storage}
1coverUrl(){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 J(t),i=this.spine.get(e.spinePos),r=this.load.bind(this);return i?i.load(r).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:0.3:${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}}function tJ(t,e){return new tZ(t,e)}s()(tZ.prototype),tJ.VERSION="0.3",void 0!==i.g&&(i.g.EPUBJS_VERSION="0.3"),tJ.Book=tZ,tJ.Rendition=tU,tJ.Contents=tT,tJ.CFI=J,tJ.utils=r;let tQ=tJ},6702:(t,e,i)=>{var r=i(942),n=i(6526);t.exports=function(t){return"symbol"==typeof t||n(t)&&"[object Symbol]"==r(t)}},6745:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},6801:t=>{"use strict";t.exports=(t,e)=>{t.onmessage=({data:t})=>{e(t)}}},6810:(t,e,i)=>{var r=i(1483);t.exports=function(){return r.Date.now()}},6862:(t,e,i)=>{var r=i(556),n=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(n,""):t}},6907:t=>{"use strict";var e=void 0;t.exports=function(t){return t!==e&&null!==t}},6983:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});let r=(0,i(1847).A)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},7004:t=>{"use strict";t.exports={workerBlobURL:!0,logger:()=>{}}},7394:(t,e,i)=>{"use strict";let r=i(4560).rE;t.exports={...i(7004),workerPath:`https://cdn.jsdelivr.net/npm/tesseract.js@v${r}/dist/worker.min.js`}},7840:(t,e,i)=>{var r=i(8360).NAMESPACE,n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,s=RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),o=RegExp("^"+n.source+s.source+"*(?::"+n.source+s.source+"*)?$");function a(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,a)}function h(){}function l(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function c(t,e,i){for(var n=t.tagName,s=null,o=t.length;o--;){var a=t[o],h=a.qName,l=a.value,c=h.indexOf(":");if(c>0)var d=a.prefix=h.slice(0,c),p=h.slice(c+1),f="xmlns"===d&&p;else p=h,d=null,f="xmlns"===h&&"";a.localName=p,!1!==f&&(null==s&&(s={},u(i,i={})),i[f]=s[f]=l,a.uri=r.XMLNS,e.startPrefixMapping(f,l))}for(var o=t.length;o--;){var d=(a=t[o]).prefix;d&&("xml"===d&&(a.uri=r.XML),"xmlns"!==d&&(a.uri=i[d||""]))}var c=n.indexOf(":");c>0?(d=t.prefix=n.slice(0,c),p=t.localName=n.slice(c+1)):(d=null,p=t.localName=n);var g=t.uri=i[d||""];if(e.startElement(g,p,n,t),!t.closed)return t.currentNSMap=i,t.localNSMap=s,!0;if(e.endElement(g,p,n),s)for(d in s)Object.prototype.hasOwnProperty.call(s,d)&&e.endPrefixMapping(d)}function u(t,e){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}function d(){this.attributeNames={}}a.prototype=Error(),a.prototype.name=a.name,h.prototype={parse:function(t,e,i){var n=this.domBuilder;n.startDocument(),u(e,e={}),function(t,e,i,n,s){function o(t){var e,r=t.slice(1,-1);return r in i?i[r]:"#"===r.charAt(0)?(e=parseInt(r.substr(1).replace("x","0x")))>65535?String.fromCharCode(55296+((e-=65536)>>
110),56320+(1023&e)):String.fromCharCode(e):(s.error("entity not found:"+t),t)}function h(e){if(e>b){var i=t.substring(b,e).replace(/&#?\w+;/g,o);m&&u(b),n.characters(i,0,e-b),b=e}}function u(e,i){for(;e>=f&&(i=g.exec(t));)f=(p=i.index)+i[0].length,m.lineNumber++;m.columnNumber=e-p+1}for(var p=0,f=0,g=/.*(?:\r\n?|\n)|.*$/g,m=n.locator,v=[{currentNSMap:e}],y={},b=0;;){try{var w=t.indexOf("<",b);if(w<0){if(!t.substr(b).match(/^\s*$/)){var x=n.doc,E=x.createTextNode(t.substr(b));x.appendChild(E),n.currentElement=E}return}switch(w>b&&h(w),t.charAt(w+1)){case"/":var D=t.indexOf(">",w+3),S=t.substring(w+2,D).replace(/[ \t\n\r]+$/g,""),T=v.pop();D<0?(S=t.substring(w+2).replace(/[\s<].*/,""),s.error("end tag name: "+S+" is not complete:"+T.tagName),D=w+1+S.length):S.match(/\s</)&&(S=S.replace(/[\s<].*/,""),s.error("end tag name: "+S+" maybe not complete"),D=w+1+S.length);var N=T.localNSMap,C=T.tagName==S;if(C||T.tagName&&T.tagName.toLowerCase()==S.toLowerCase()){if(n.endElement(T.uri,T.localName,S),N)for(var _ in N)Object.prototype.hasOwnProperty.call(N,_)&&n.endPrefixMapping(_);C||s.fatalError("end tag name: "+S+" is not match the current start tagName:"+T.tagName)}else v.push(T);D++;break;case"?":m&&u(w),D=function(t,e,i){var r=t.indexOf("?>",e);if(r){var n=t.substring(e,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(n)return n[0].length,i.processingInstruction(n[1],n[2]),r+2}return -1}(t,w,n);break;case"!":m&&u(w),D=function(t,e,i,r){if("-"===t.charAt(e+2)){if("-"===t.charAt(e+3)){var n=t.indexOf("--\x3e",e+4);if(n>e)return i.comment(t,e+4,n-e-4),n+3;r.error("Unclosed comment")}}else{if("CDATA["==t.substr(e+3,6)){var n=t.indexOf("]]>",e+9);return i.startCDATA(),i.characters(t,e+9,n-e-9),i.endCDATA(),n+3}var s=function(t,e){var i,r=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=e,n.exec(t);i=n.exec(t);)if(r.push(i),i[1])return r}(t,e),o=s.length;if(o>1&&/!doctype/i.test(s[0][0])){var a=s[1][0],h=!1,l=!1;o>3&&(/^public$/i.test(s[2][0])?(h=s[3][0],l=o>4&&s[4][0]):/^system$/i.test(s[2][0])&&(l=s[3][0]));var c=s[o-1];return i.startDTD(a,h,l),i.endDTD(),c.index+c[0].length}}return -1}(t,w,n,s);break;default:m&&u(w);var L=new d,k=v[v.length-1].currentNSMap,D=function(t,e,i,n,s,o){function a(t,e,r){i.attributeNames.hasOwnProperty(t)&&o.fatalError("Attribute "+t+" redefined"),i.addValue(t,e,r)}for(var h,l,c=++e,u=0;;){var d=t.charAt(c);switch(d){case"=":if(1===u)h=t.slice(e,c),u=3;else if(2===u)u=3;else throw Error("attribute equal must after attrName");break;case"'":case'"':if(3===u||1===u)if(1===u&&(o.warning('attribute value must after "="'),h=t.slice(e,c)),e=c+1,(c=t.indexOf(d,e))>0)a(h,l=t.slice(e,c).replace(/&#?\w+;/g,s),e-1),u=5;else throw Error("attribute value no end '"+d+"' match");else if(4==u)a(h,l=t.slice(e,c).replace(/&#?\w+;/g,s),e),o.warning('attribute "'+h+'" missed start quot('+d+")!!"),e=c+1,u=5;else throw Error('attribute value must after "="');break;case"/":switch(u){case 0:i.setTagName(t.slice(e,c));case 5:case 6:case 7:u=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==u&&i.setTagName(t.slice(e,c)),c;case">":switch(u){case 0:i.setTagName(t.slice(e,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(l=t.slice(e,c)).slice(-1)&&(i.closed=!0,l=l.slice(0,-1));case 2:2===u&&(l=h),4==u?(o.warning('attribute "'+l+'" missed quot(")!'),a(h,l.replace(/&#?\w+;/g,s),e)):(r.isHTML(n[""])&&l.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),a(l,l,e));break;case 3:throw Error("attribute value missed!!")}return c;case"\x80":d=" ";default:if(d<=" ")switch(u){case 0:i.setTagName(t.slice(e,c)),u=6;break;case 1:h=t.slice(e,c),u=2;break;case 4:var l=t.slice(e,c).replace(/&#?\w+;/g,s);o.warning('attribute "'+l+'" missed quot(")!!'),a(h,l,e);case 5:u=6}else switch(u){case 2:i.tagName,r.isHTML(n[""])&&h.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+h+'" missed value!! "'+h+'" instead2!!'),a(h,h,e),e=c,u=1;break;case 5:o.warning('attribute space is required"'+h+'"!!');case 6:u=1,e=c;break;case 3:u=4,e=c;break;case 7:throw Error("elements closed character '/' and '>' must be connected to")}}c++}}(t,w,L,k,o,s),A=L.length;
1if(!L.closed&&function(t,e,i,r){var n=r[i];return null==n&&((n=t.lastIndexOf("</"+i+">"))<e&&(n=t.lastIndexOf("</"+i)),r[i]=n),n<e}(t,D,L.tagName,y)&&(L.closed=!0,i.nbsp||s.warning("unclosed xml attribute")),m&&A){for(var R=l(m,{}),O=0;O<A;O++){var I=L[O];u(I.offset),I.locator=l(m,{})}n.locator=R,c(L,n,k)&&v.push(L),n.locator=m}else c(L,n,k)&&v.push(L);r.isHTML(L.uri)&&!L.closed?D=function(t,e,i,r,n){if(/^(?:script|textarea)$/i.test(i)){var s=t.indexOf("</"+i+">",e),o=t.substring(e+1,s);if(/[&<]/.test(o))return/^script$/i.test(i)||(o=o.replace(/&#?\w+;/g,r)),n.characters(o,0,o.length),s}return e+1}(t,D,L.tagName,o,n):D++}}catch(t){if(t instanceof a)throw t;s.error("element parse error: "+t),D=-1}D>b?b=D:h(Math.max(w,b)+1)}}(t,e,i,n,this.errorHandler),n.endDocument()}},d.prototype={setTagName:function(t){if(!o.test(t))throw Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,i){if(!o.test(t))throw Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:i}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},e.XMLReader=h,e.ParseError=a},8006:(t,e,i)=>{"use strict";var r=i(8046),n=Array.prototype.forEach,s=Object.create,o=function(t,e){var i;for(i in t)e[i]=t[i]};t.exports=function(t){var e=s(null);return n.call(arguments,function(t){r(t)&&o(Object(t),e)}),e}},8046:(t,e,i)=>{"use strict";var r=i(6451)();t.exports=function(t){return t!==r&&null!==t}},8360:(t,e)=>{"use strict";function i(t,e){return void 0===e&&(e=Object),e&&"function"==typeof e.freeze?e.freeze(t):t}var r=i({HTML:"text/html",isHTML:function(t){return t===r.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),n=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(t){return t===n.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});e.find=function(t,e,i){if(void 0===i&&(i=Array.prototype),t&&"function"==typeof i.find)return i.find.call(t,e);for(var r=0;r<t.length;r++)if(Object.prototype.hasOwnProperty.call(t,r)){var n=t[r];if(e.call(void 0,n,r,t))return n}},e.freeze=i,e.MIME_TYPE=r,e.NAMESPACE=n},8840:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},9013:(t,e,i)=>{"use strict";i(1192);let r=i(656),n=i(5057),s=i(211),o=i(3684),a=i(1548),h=i(2883),{setLogging:l}=i(9501);t.exports={languages:o,OEM:a,PSM:h,createScheduler:r,createWorker:n,setLogging:l,...s}},9469:t=>{"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")}},9501:function(t,e){"use strict";let i=!1;e.logging=!1,e.setLogging=t=>{i=t},e.log=(...t)=>i?console.log.apply(this,t):null},9609:(t,e,i)=>{"use strict";let r="browser"===i(6104)("type")?t=>new URL(t,window.location.href).href:t=>t;t.exports=t=>{let e={...t};return["corePath","workerPath","langPath"].forEach(i=>{t[i]&&(e[i]=r(e[i]))}),e}},9643:(t,e,i)=>{"use strict";var r=i(54),n=/^\s*class[\s{/}]/,s=Function.prototype.toString;t.exports=function(t){return!(!r(t)||n.test(s.call(t)))}},9693:(t,e)=>{"use strict";function i(t,e){if("iframe"===t.nodeName||"IFRAME"===t.nodeName)try{this.target=t.contentDocument}catch(e){this.target=t}else this.target=t;for(var i=["mouseup","mousedown","click","touchstart"],n=0;n<i.length;n++){var s=i[n];this.target.addEventListener(s,function(i){for(var n=e.length-1;n>=0;n--){var s=e[n],o=i.clientX,a=i.clientY;if(i.touches&&i.touches.length&&(o=i.touches[0].clientX,a=i.touches[0].clientY),function(t,e,i,r){var n=e.getBoundingClientRect();function s(t,e,i){var r=t.top-n.top,s=t.left-n.left,o=r+t.height,a=s+t.width;return r<=i&&s<=e&&o>i&&a>e}if(!s(t.getBoundingClientRect(),i,r))return!1;for(var o=t.getClientRects(),a=0,h=o.length;a<h;a++)if(s(o[a],i,r))return!0;return!1}(s,t,o,a)){s.dispatchEvent(r(i));break}}},!1)}}function r(t){var e=Object.assign({},t,{bubbles:!1});try{return new MouseEvent(t.type,e)}catch(r){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}}
1Object.defineProperty(e,"__esModule",{value:!0}),e.proxyMouse=i,e.clone=r,e.default={proxyMouse:i}},9715:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});let r=(0,i(1847).A)("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},9832:(t,e,i)=>{t.exports=(function t(e,i,r){function n(o,a){if(!i[o]){if(!e[o]){if(s)return s(o,!0);var h=Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var l=i[o]={exports:{}};e[o][0].call(l.exports,function(t){return n(e[o][1][t]||t)},l,l.exports,t,e,i,r)}return i[o].exports}for(var s=void 0,o=0;o<r.length;o++)n(r[o]);return n})({1:[function(t,e,r){(function(t){"use strict";var i,r,n=t.MutationObserver||t.WebKitMutationObserver;if(n){var s=0,o=new n(c),a=t.document.createTextNode("");o.observe(a,{characterData:!0}),i=function(){a.data=s=++s%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(){c(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(c,0)};else{var h=new t.MessageChannel;h.port1.onmessage=c,i=function(){h.port2.postMessage(0)}}var l=[];function c(){r=!0;for(var t,e,i=l.length;i;){for(e=l,l=[],t=-1;++t<i;)e[t]();i=l.length}r=!1}e.exports=function(t){1!==l.push(t)||r||i()}}).call(this,void 0!==i.g?i.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,i){"use strict";var r=t(1);function n(){}var s={},o=["REJECTED"],a=["FULFILLED"],h=["PENDING"];function l(t){if("function"!=typeof t)throw TypeError("resolver must be a function");this.state=h,this.queue=[],this.outcome=void 0,t!==n&&p(this,t)}function c(t,e,i){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function u(t,e,i){r(function(){var r;try{r=e(i)}catch(e){return s.reject(t,e)}r===t?s.reject(t,TypeError("Cannot resolve promise with itself")):s.resolve(t,r)})}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 p(t,e){var i=!1;function r(e){i||(i=!0,s.reject(t,e))}function n(e){i||(i=!0,s.resolve(t,e))}var o=f(function(){e(n,r)});"error"===o.status&&r(o.value)}function f(t,e){var i={};try{i.value=t(e),i.status="success"}catch(t){i.status="error",i.value=t}return i}e.exports=l,l.prototype.catch=function(t){return this.then(null,t)},l.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===o)return this;var i=new this.constructor(n);return this.state!==h?u(i,this.state===a?t:e,this.outcome):this.queue.push(new c(i,t,e)),i},c.prototype.callFulfilled=function(t){s.resolve(this.promise,t)},c.prototype.otherCallFulfilled=function(t){u(this.promise,this.onFulfilled,t)},c.prototype.callRejected=function(t){s.reject(this.promise,t)},c.prototype.otherCallRejected=function(t){u(this.promise,this.onRejected,t)},s.resolve=function(t,e){var i=f(d,e);if("error"===i.status)return s.reject(t,i.value);var r=i.value;if(r)p(t,r);else{t.state=a,t.outcome=e;for(var n=-1,o=t.queue.length;++n<o;)t.queue[n].callFulfilled(e)}return t},s.reject=function(t,e){t.state=o,t.outcome=e;for(var i=-1,r=t.queue.length;++i<r;)t.queue[i].callRejected(e);return t},l.resolve=function(t){return t instanceof this?t:s.resolve(new this(n),t)},l.reject=function(t){var e=new this(n);return s.reject(e,t)},l.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(TypeError("must be an array"));var i=t.length,r=!1;if(!i)return this.resolve([]);for(var o=Array(i),a=0,h=-1,l=new this(n);++h<i;)!function(t,n){e.resolve(t).then(function(t){o[n]=t,++a!==i||r||(r=!0,s.resolve(l,o))},function(t){r||(r=!0,s.reject(l,t))})}(t[h],h);return l},l.race=function(t){var e,i=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(TypeError("must be an array"));var r=t.length,o=!1;if(!r)return this.resolve([]);for(var a=-1,h=new this(n);++a<r;){e=t[a],i.resolve(e).then(function(t){o||(o=!0,s.resolve(h,t))},function(t){o||(o=!0,s.reject(h,t))})}return h}},{1:1}],3:[function(t,e,r){(function(e){"use strict";"function"!=typeof e.Promise&&(e.Promise=t(2))}).call(this,void 0!==i.g?i.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}
1],4:[function(t,e,i){"use strict";var r="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},n=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 s(t,e){t=t||[],e=e||{};try{return new Blob(t,e)}catch(n){if("TypeError"!==n.name)throw n;for(var i=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<t.length;r+=1)i.append(t[r]);return i.getBlob(e.type)}}"undefined"==typeof Promise&&t(3);var o=Promise;function a(t,e){e&&t.then(function(t){e(null,t)},function(t){e(t)})}function h(t,e,i){"function"==typeof e&&t.then(e),"function"==typeof i&&t.catch(i)}function l(t){return"string"!=typeof t&&(console.warn(t+" used as a key, but it is not a string."),t=String(t)),t}function c(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var u="local-forage-detect-blob-support",d=void 0,p={},f=Object.prototype.toString,g="readonly",m="readwrite";function v(t){var e=p[t.name],i={};i.promise=new o(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 y(t){var e=p[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function b(t,e){var i=p[t.name].deferredOperations.pop();if(i)return i.reject(e),i.promise}function w(t,e){return new o(function(i,r){if(p[t.name]=p[t.name]||N(),t.db)if(!e)return i(t.db);else v(t),t.db.close();var s=[t.name];e&&s.push(t.version);var o=n.open.apply(n,s);e&&(o.onupgradeneeded=function(e){var i=o.result;try{i.createObjectStore(t.storeName),e.oldVersion<=1&&i.createObjectStore(u)}catch(i){if("ConstraintError"===i.name)console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.');else throw i}}),o.onerror=function(t){t.preventDefault(),r(o.error)},o.onsuccess=function(){var e=o.result;e.onversionchange=function(t){t.target.close()},i(e),y(t)}})}function x(t,e){if(!t.db)return!0;var i=!t.db.objectStoreNames.contains(t.storeName),r=t.version<t.db.version,n=t.version>t.db.version;if(r&&(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),n||i){if(i){var s=t.db.version+1;s>t.version&&(t.version=s)}return!0}return!1}function E(t){return s([function(t){for(var e=t.length,i=new ArrayBuffer(e),r=new Uint8Array(i),n=0;n<e;n++)r[n]=t.charCodeAt(n);return i}(atob(t.data))],{type:t.type})}function D(t){return t&&t.__local_forage_encoded_blob}function S(t){var e=this,i=e._initReady().then(function(){var t=p[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady});return h(i,t,t),i}function T(t,e,i,r){void 0===r&&(r=1);try{var n=t.db.transaction(t.storeName,e);i(null,n)}catch(n){if(r>0&&(!t.db||"InvalidStateError"===n.name||"NotFoundError"===n.name))return o.resolve().then(function(){if(!t.db||"NotFoundError"===n.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),w(t,!0)}).then(function(){return(function(t){v(t);for(var e=p[t.name],i=e.forages,r=0;r<i.length;r++){var n=i[r];n._dbInfo.db&&(n._dbInfo.db.close(),n._dbInfo.db=null)}return t.db=null,w(t,!1).then(function(e){return(t.db=e,x(t))?w(t,!0):e}).then(function(r){t.db=e.db=r;for(var n=0;n<i.length;n++)i[n]._dbInfo.db=r}).catch(function(e){throw b(t,e),e})})(t).then(function(){T(t,e,i,r-1)})}).catch(i);i(n)}}function N(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}var C={_driver:"asyncStorage",_initStorage:function(t){var e=this,i={db:null};if(t)for(var r in t)i[r]=t[r];var n=p[i.name];n||(n=N(),p[i.name]=n),n.forages.push(e),e._initReady||(e._initReady=e.ready,e.ready=S);var s=[];function a(){return o.resolve()}for(var h=0;h<n.forages.length;h++){var l=n.forages[h];l!==e&&s.push(l._initReady().catch(a))}var c=n.forages.slice(0);return o.all(s).then(function(){return i.db=n.db,w(i,!1)}).then(function(t){return(i.db=t,x(i,e._defaultConfig.version))?w(i,
1!0):t}).then(function(t){i.db=n.db=t,e._dbInfo=i;for(var r=0;r<c.length;r++){var s=c[r];s!==e&&(s._dbInfo.db=i.db,s._dbInfo.version=i.version)}})},_support:function(){try{if(!n||!n.open)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,r=new o(function(e,r){i.ready().then(function(){T(i._dbInfo,g,function(n,s){if(n)return r(n);try{var o=s.objectStore(i._dbInfo.storeName).openCursor(),a=1;o.onsuccess=function(){var i=o.result;if(i){var r=i.value;D(r)&&(r=E(r));var n=t(r,i.key,a++);void 0!==n?e(n):i.continue()}else e()},o.onerror=function(){r(o.error)}}catch(t){r(t)}})}).catch(r)});return a(r,e),r},getItem:function(t,e){var i=this;t=l(t);var r=new o(function(e,r){i.ready().then(function(){T(i._dbInfo,g,function(n,s){if(n)return r(n);try{var o=s.objectStore(i._dbInfo.storeName).get(t);o.onsuccess=function(){var t=o.result;void 0===t&&(t=null),D(t)&&(t=E(t)),e(t)},o.onerror=function(){r(o.error)}}catch(t){r(t)}})}).catch(r)});return a(r,e),r},setItem:function(t,e,i){var r=this;t=l(t);var n=new o(function(i,n){var a;r.ready().then(function(){return(a=r._dbInfo,"[object Blob]"===f.call(e))?(function(t){return"boolean"==typeof d?o.resolve(d):new o(function(e){var i=t.transaction(u,m),r=s([""]);i.objectStore(u).put(r,"key"),i.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},i.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/);e(navigator.userAgent.match(/Edge\//)||!t||parseInt(t[1],10)>=43)}}).catch(function(){return!1}).then(function(t){return d=t})})(a.db).then(function(t){return t?e:new o(function(t,i){var r=new FileReader;r.onerror=i,r.onloadend=function(i){t({__local_forage_encoded_blob:!0,data:btoa(i.target.result||""),type:e.type})},r.readAsBinaryString(e)})}):e}).then(function(e){T(r._dbInfo,m,function(s,o){if(s)return n(s);try{var a=o.objectStore(r._dbInfo.storeName);null===e&&(e=void 0);var h=a.put(e,t);o.oncomplete=function(){void 0===e&&(e=null),i(e)},o.onabort=o.onerror=function(){var t=h.error?h.error:h.transaction.error;n(t)}}catch(t){n(t)}})}).catch(n)});return a(n,i),n},removeItem:function(t,e){var i=this;t=l(t);var r=new o(function(e,r){i.ready().then(function(){T(i._dbInfo,m,function(n,s){if(n)return r(n);try{var o=s.objectStore(i._dbInfo.storeName).delete(t);s.oncomplete=function(){e()},s.onerror=function(){r(o.error)},s.onabort=function(){var t=o.error?o.error:o.transaction.error;r(t)}}catch(t){r(t)}})}).catch(r)});return a(r,e),r},clear:function(t){var e=this,i=new o(function(t,i){e.ready().then(function(){T(e._dbInfo,m,function(r,n){if(r)return i(r);try{var s=n.objectStore(e._dbInfo.storeName).clear();n.oncomplete=function(){t()},n.onabort=n.onerror=function(){var t=s.error?s.error:s.transaction.error;i(t)}}catch(t){i(t)}})}).catch(i)});return a(i,t),i},length:function(t){var e=this,i=new o(function(t,i){e.ready().then(function(){T(e._dbInfo,g,function(r,n){if(r)return i(r);try{var s=n.objectStore(e._dbInfo.storeName).count();s.onsuccess=function(){t(s.result)},s.onerror=function(){i(s.error)}}catch(t){i(t)}})}).catch(i)});return a(i,t),i},key:function(t,e){var i=this,r=new o(function(e,r){if(t<0)return void e(null);i.ready().then(function(){T(i._dbInfo,g,function(n,s){if(n)return r(n);try{var o=s.objectStore(i._dbInfo.storeName),a=!1,h=o.openKeyCursor();h.onsuccess=function(){var i=h.result;if(!i)return void e(null);0===t||a?e(i.key):(a=!0,i.advance(t))},h.onerror=function(){r(h.error)}}catch(t){r(t)}})}).catch(r)});return a(r,e),r},keys:function(t){var e=this,i=new o(function(t,i){e.ready().then(function(){T(e._dbInfo,g,function(r,n){if(r)return i(r);try{var s=n.objectStore(e._dbInfo.storeName).openKeyCursor(),o=[];s.onsuccess=function(){var e=s.result;if(!e)return void t(o);o.push(e.key),e.continue()},s.onerror=function(){i(s.error)}}catch(t){i(t)}})}).catch(i)});return a(i,t),i},dropInstance:function(t,e){e=c.apply(this,arguments);var i,r=this.config();if((t="function"!=typeof t&&t||{}).name||(t.name=t.name||r.name,t.storeName=t.storeName||r.storeName),t.name){var s=t.name===r.name&&this._dbInfo.db?o.resolve(this._dbInfo.db):w(t,!1).then(function(e){var i=p[t.name],r=i.forages;i.db=e;for(var n=0;n<r.length;n++)r[n]._dbInfo.db=e;return e});i=t.storeName?s.then(function(e){if(e.objectStoreNames.contains(t.storeName)){var i=e.version+1;v(t);var r=p[t.name],s=r.forages;e.close();for(var a=0;a<s.length;a++){var h=s[a];h._dbInfo.db=null,h._dbInfo.version=i}return new o(function(e,r){var s=n.open(t.name,i);s.onerror=function(t){s.result.close(),r(t)},s.onupgradeneeded=function(){s.result.deleteObjectStore(t.storeName)},s.onsuccess=function(){var t=s.result;t.close(),e(t)}
1}).then(function(t){r.db=t;for(var e=0;e<s.length;e++){var i=s[e];i._dbInfo.db=t,y(i._dbInfo)}}).catch(function(e){throw(b(t,e)||o.resolve()).catch(function(){}),e})}}):s.then(function(e){v(t);var i=p[t.name],r=i.forages;e.close();for(var s=0;s<r.length;s++)r[s]._dbInfo.db=null;return new o(function(e,i){var r=n.deleteDatabase(t.name);r.onerror=function(){var t=r.result;t&&t.close(),i(r.error)},r.onblocked=function(){console.warn('dropInstance blocked for database "'+t.name+'" until all open connections are closed')},r.onsuccess=function(){var t=r.result;t&&t.close(),e(t)}}).then(function(t){i.db=t;for(var e=0;e<r.length;e++)y(r[e]._dbInfo)}).catch(function(e){throw(b(t,e)||o.resolve()).catch(function(){}),e})})}else i=o.reject("Invalid arguments");return a(i,e),i}},_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L=/^~~local_forage_type~([^~]+)~/,k="__lfsc__:",A=k.length,R="arbf",O="blob",I="si08",q="ui08",P="uic8",M="si16",B="si32",z="ur16",j="ui32",U="fl32",F="fl64",W=A+R.length,H=Object.prototype.toString;function V(t){var e,i,r,n,s,o=.75*t.length,a=t.length,h=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var l=new ArrayBuffer(o),c=new Uint8Array(l);for(e=0;e<a;e+=4)i=_.indexOf(t[e]),r=_.indexOf(t[e+1]),n=_.indexOf(t[e+2]),s=_.indexOf(t[e+3]),c[h++]=i<<2|r>>4,c[h++]=(15&r)<<4|n>>2,c[h++]=(3&n)<<6|63&s;return l}function G(t){var e,i=new Uint8Array(t),r="";for(e=0;e<i.length;e+=3)r+=_[i[e]>>2],r+=_[(3&i[e])<<4|i[e+1]>>4],r+=_[(15&i[e+1])<<2|i[e+2]>>6],r+=_[63&i[e+2]];return i.length%3==2?r=r.substring(0,r.length-1)+"=":i.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var X={serialize:function(t,e){var i="";if(t&&(i=H.call(t)),t&&("[object ArrayBuffer]"===i||t.buffer&&"[object ArrayBuffer]"===H.call(t.buffer))){var r,n=k;t instanceof ArrayBuffer?(r=t,n+=R):(r=t.buffer,"[object Int8Array]"===i?n+=I:"[object Uint8Array]"===i?n+=q:"[object Uint8ClampedArray]"===i?n+=P:"[object Int16Array]"===i?n+=M:"[object Uint16Array]"===i?n+=z:"[object Int32Array]"===i?n+=B:"[object Uint32Array]"===i?n+=j:"[object Float32Array]"===i?n+=U:"[object Float64Array]"===i?n+=F:e(Error("Failed to get type for BinaryArray"))),e(n+G(r))}else if("[object Blob]"===i){var s=new FileReader;s.onload=function(){e(k+O+("~~local_forage_type~"+t.type+"~")+G(this.result))},s.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(t.substring(0,A)!==k)return JSON.parse(t);var e,i=t.substring(W),r=t.substring(A,W);if(r===O&&L.test(i)){var n=i.match(L);e=n[1],i=i.substring(n[0].length)}var o=V(i);switch(r){case R:return o;case O:return s([o],{type:e});case I:return new Int8Array(o);case q:return new Uint8Array(o);case P:return new Uint8ClampedArray(o);case M:return new Int16Array(o);case z:return new Uint16Array(o);case B:return new Int32Array(o);case j:return new Uint32Array(o);case U:return new Float32Array(o);case F:return new Float64Array(o);default:throw Error("Unkown type: "+r)}},stringToBuffer:V,bufferToString:G};function Y(t,e,i,r){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],i,r)}function $(t,e,i,r,n,s){t.executeSql(i,r,n,function(t,o){o.code===o.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],function(t,a){a.rows.length?s(t,o):Y(t,e,function(){t.executeSql(i,r,n,s)},s)},s):s(t,o)},s)}function K(t,e,i,r){var n=this;t=l(t);var s=new o(function(s,o){n.ready().then(function(){void 0===e&&(e=null);var a=e,h=n._dbInfo;h.serializer.serialize(e,function(e,l){l?o(l):h.db.transaction(function(i){$(i,h,"INSERT OR REPLACE INTO "+h.storeName+" (key, value) VALUES (?, ?)",[t,e],function(){s(a)},function(t,e){o(e)})},function(e){if(e.code===e.QUOTA_ERR){if(r>0)return void s(K.apply(n,[t,a,i,r-1]));o(e)}})})}).catch(o)});return a(s,i),s}var Z={_driver:"webSQLStorage",_initStorage:function(t){var e=this,i={db:null};if(t)for(var r in t)i[r]="string"!=typeof t[r]?t[r].toString():t[r];var n=new o(function(t,r){try{i.db=openDatabase(i.name,String(i.version),i.description,i.size)}catch(t){return r(t)}i.db.transaction(function(n){Y(n,i,function(){e._dbInfo=i,t()},function(t,e){r(e)})},r)});
1return i.serializer=X,n},_support:"function"==typeof openDatabase,iterate:function(t,e){var i=this,r=new o(function(e,r){i.ready().then(function(){var n=i._dbInfo;n.db.transaction(function(i){$(i,n,"SELECT * FROM "+n.storeName,[],function(i,r){for(var s=r.rows,o=s.length,a=0;a<o;a++){var h=s.item(a),l=h.value;if(l&&(l=n.serializer.deserialize(l)),void 0!==(l=t(l,h.key,a+1)))return void e(l)}e()},function(t,e){r(e)})})}).catch(r)});return a(r,e),r},getItem:function(t,e){var i=this;t=l(t);var r=new o(function(e,r){i.ready().then(function(){var n=i._dbInfo;n.db.transaction(function(i){$(i,n,"SELECT * FROM "+n.storeName+" WHERE key = ? LIMIT 1",[t],function(t,i){var r=i.rows.length?i.rows.item(0).value:null;r&&(r=n.serializer.deserialize(r)),e(r)},function(t,e){r(e)})})}).catch(r)});return a(r,e),r},setItem:function(t,e,i){return K.apply(this,[t,e,i,1])},removeItem:function(t,e){var i=this;t=l(t);var r=new o(function(e,r){i.ready().then(function(){var n=i._dbInfo;n.db.transaction(function(i){$(i,n,"DELETE FROM "+n.storeName+" WHERE key = ?",[t],function(){e()},function(t,e){r(e)})})}).catch(r)});return a(r,e),r},clear:function(t){var e=this,i=new o(function(t,i){e.ready().then(function(){var r=e._dbInfo;r.db.transaction(function(e){$(e,r,"DELETE FROM "+r.storeName,[],function(){t()},function(t,e){i(e)})})}).catch(i)});return a(i,t),i},length:function(t){var e=this,i=new o(function(t,i){e.ready().then(function(){var r=e._dbInfo;r.db.transaction(function(e){$(e,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],function(e,i){t(i.rows.item(0).c)},function(t,e){i(e)})})}).catch(i)});return a(i,t),i},key:function(t,e){var i=this,r=new o(function(e,r){i.ready().then(function(){var n=i._dbInfo;n.db.transaction(function(i){$(i,n,"SELECT key FROM "+n.storeName+" WHERE id = ? LIMIT 1",[t+1],function(t,i){e(i.rows.length?i.rows.item(0).key:null)},function(t,e){r(e)})})}).catch(r)});return a(r,e),r},keys:function(t){var e=this,i=new o(function(t,i){e.ready().then(function(){var r=e._dbInfo;r.db.transaction(function(e){$(e,r,"SELECT key FROM "+r.storeName,[],function(e,i){for(var r=[],n=0;n<i.rows.length;n++)r.push(i.rows.item(n).key);t(r)},function(t,e){i(e)})})}).catch(i)});return a(i,t),i},dropInstance:function(t,e){e=c.apply(this,arguments);var i,r=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||r.name,t.storeName=t.storeName||r.storeName);var n=this;return a(i=t.name?new o(function(e){var i;(i=t.name===r.name?n._dbInfo.db:openDatabase(t.name,"","",0),t.storeName)?e({db:i,storeNames:[t.storeName]}):e(new o(function(t,e){i.transaction(function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(e,r){for(var n=[],s=0;s<r.rows.length;s++)n.push(r.rows.item(s).name);t({db:i,storeNames:n})},function(t,i){e(i)})},function(t){e(t)})}))}).then(function(t){return new o(function(e,i){t.db.transaction(function(r){for(var n=[],s=0,a=t.storeNames.length;s<a;s++)n.push(function(t){return new o(function(e,i){r.executeSql("DROP TABLE IF EXISTS "+t,[],function(){e()},function(t,e){i(e)})})}(t.storeNames[s]));o.all(n).then(function(){e()}).catch(function(t){i(t)})},function(t){i(t)})})}):o.reject("Invalid arguments"),e),i}};function J(t,e){var i=t.name+"/";return t.storeName!==e.storeName&&(i+=t.storeName+"/"),i}var Q={_driver:"localStorageWrapper",_initStorage:function(t){var e={};if(t)for(var i in t)e[i]=t[i];return(e.keyPrefix=J(t,this._defaultConfig),!function(){var t="_localforage_support_test";try{return localStorage.setItem(t,!0),localStorage.removeItem(t),!1}catch(t){return!0}}()||localStorage.length>0)?(this._dbInfo=e,e.serializer=X,o.resolve()):o.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}(),iterate:function(t,e){var i=this,r=i.ready().then(function(){for(var e=i._dbInfo,r=e.keyPrefix,n=r.length,s=localStorage.length,o=1,a=0;a<s;a++){var h=localStorage.key(a);if(0===h.indexOf(r)){var l=localStorage.getItem(h);if(l&&(l=e.serializer.deserialize(l)),void 0!==(l=t(l,h.substring(n),o++)))return l}}});return a(r,e),r},getItem:function(t,e){var i=this;t=l(t);var r=i.ready().then(function(){var e=i._dbInfo,r=localStorage.getItem(e.keyPrefix+t);return r&&(r=e.serializer.deserialize(r)),r});return a(r,e),r}
1,setItem:function(t,e,i){var r=this;t=l(t);var n=r.ready().then(function(){void 0===e&&(e=null);var i=e;return new o(function(n,s){var o=r._dbInfo;o.serializer.serialize(e,function(e,r){if(r)s(r);else try{localStorage.setItem(o.keyPrefix+t,e),n(i)}catch(t){("QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&s(t),s(t)}})})});return a(n,i),n},removeItem:function(t,e){var i=this;t=l(t);var r=i.ready().then(function(){var e=i._dbInfo;localStorage.removeItem(e.keyPrefix+t)});return a(r,e),r},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 r=localStorage.key(i);0===r.indexOf(t)&&localStorage.removeItem(r)}});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,r=i.ready().then(function(){var e,r=i._dbInfo;try{e=localStorage.key(t)}catch(t){e=null}return e&&(e=e.substring(r.keyPrefix.length)),e});return a(r,e),r},keys:function(t){var e=this,i=e.ready().then(function(){for(var t=e._dbInfo,i=localStorage.length,r=[],n=0;n<i;n++){var s=localStorage.key(n);0===s.indexOf(t.keyPrefix)&&r.push(s.substring(t.keyPrefix.length))}return r});return a(i,t),i},dropInstance:function(t,e){if(e=c.apply(this,arguments),!(t="function"!=typeof t&&t||{}).name){var i,r=this.config();t.name=t.name||r.name,t.storeName=t.storeName||r.storeName}var n=this;return a(i=t.name?new o(function(e){e(t.storeName?J(t,n._defaultConfig):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)}}):o.reject("Invalid arguments"),e),i}},tt=function(t,e){for(var i,r=t.length,n=0;n<r;){if((i=t[n])===e||"number"==typeof i&&"number"==typeof e&&isNaN(i)&&isNaN(e))return!0;n++}return!1},te=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},ti={},tr={},tn={INDEXEDDB:C,WEBSQL:Z,LOCALSTORAGE:Q},ts=[tn.INDEXEDDB._driver,tn.WEBSQL._driver,tn.LOCALSTORAGE._driver],to=["dropInstance"],ta=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(to),th={description:"",driver:ts.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function tl(){for(var t=1;t<arguments.length;t++){var e=arguments[t];if(e)for(var i in e)e.hasOwnProperty(i)&&(te(e[i])?arguments[0][i]=e[i].slice():arguments[0][i]=e[i])}return arguments[0]}e.exports=new(function(){function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");for(var i in tn)if(tn.hasOwnProperty(i)){var r=tn[i],n=r._driver;this[i]=n,ti[n]||this.defineDriver(r)}this._defaultConfig=tl({},th),this._config=tl({},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((void 0===t?"undefined":r(t))==="object"){if(this._ready)return 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 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 r=new o(function(e,i){try{var r=t._driver,n=Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver)return void i(n);for(var s=ta.concat("_initStorage"),h=0,l=s.length;h<l;h++){var c=s[h];if((!tt(to,c)||t[c])&&"function"!=typeof t[c])return void i(n)}for(var u=function(t){return function(){var e=Error("Method "+t+" is not implemented by the current driver"),i=o.reject(e);return a(i,arguments[arguments.length-1]),i}},d=0,p=to.length;d<p;d++){var f=to[d];t[f]||(t[f]=u(f))}var g=function(i){ti[r]&&console.info("Redefining LocalForage driver: "+r),ti[r]=t,tr[r]=i,e()};"_support"in t?t._support&&"function"==typeof t._support?t._support().then(g,i):g(!!t._support):g(!0)}catch(t){i(t)}});return h(r,e,i),r},t.prototype.driver=function(){return this._driver||null}
1,t.prototype.getDriver=function(t,e,i){var r=ti[t]?o.resolve(ti[t]):o.reject(Error("Driver not found."));return h(r,e,i),r},t.prototype.getSerializer=function(t){var e=o.resolve(X);return h(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 h(i,t,t),i},t.prototype.setDriver=function(t,e,i){var r=this;te(t)||(t=[t]);var n=this._getSupportedDrivers(t);function s(){r._config.driver=r.driver()}function a(t){return r._extend(t),s(),r._ready=r._initStorage(r._config),r._ready}var l=null!==this._driverSet?this._driverSet.catch(function(){return o.resolve()}):o.resolve();return this._driverSet=l.then(function(){var t=n[0];return r._dbInfo=null,r._ready=null,r.getDriver(t).then(function(t){r._driver=t._driver,s(),r._wrapLibraryMethodsWithReady(),r._initDriver=function(){var t=0;return function e(){for(;t<n.length;){var i=n[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(i).then(a).catch(e)}s();var h=Error("No available storage method found.");return r._driverSet=o.reject(h),r._driverSet}()}})}).catch(function(){s();var t=Error("No available storage method found.");return r._driverSet=o.reject(t),r._driverSet}),h(this._driverSet,e,i),this._driverSet},t.prototype.supports=function(t){return!!tr[t]},t.prototype._extend=function(t){tl(this,t)},t.prototype._getSupportedDrivers=function(t){for(var e=[],i=0,r=t.length;i<r;i++){var n=t[i];this.supports(n)&&e.push(n)}return e},t.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,e=ta.length;t<e;t++)!function(t,e){t[e]=function(){var i=arguments;return t.ready().then(function(){return t[e].apply(t,i)})}}(this,ta[t])},t.prototype.createInstance=function(e){return new t(e)},t}())},{3:3}]},{},[4])(4)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.