!function(t){vare={};functionr(n){if(e[n])returne[n].exports;varo=e[n]={i:n,l:!1,exports:{}};returnt[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)returnt;if(4&e&&"object"==typeoft&&t&&t.__esModule)returnt;varn=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeoft)for(varoint)r.d(n,o,function(e){returnt[e]}.bind(null,o));returnn},r.n=function(t){vare=t&&t.__esModule?function(){returnt.default}:function(){returnt};returnr.d(e,"a",e),e},r.o=function(t,e){returnObject.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=14)}({14:function(t,e,r){t.exports=r("7+HS")},"7+HS":function(t,e,r){"use strict";r.r(e);varn=r("o0o1"),o=r.n(n);functioni(t,e,r,n,o,i,a){try{varc=t[i](a),u=c.value}catch(t){returnvoidr(t)}c.done?e(u):Promise.resolve(u).then(n,o)}functiona(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}new(function(){functiont(e,r){!function(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}(this,t),this.url=e,this.canvas=r,this.context=r.getContext("2d"),this.currentPage=1,this.maxPages=1,this.currentScale=.75,this.currentScaleText=document.getElementById("zoom-level"),matchMedia("only screen and (max-width: 480px)").matches&&(this.currentScale=.5),this.currentScaleText.textContent=100*this.currentScale+"%"}vare,r,n,c,u;returne=t,(r=[{key:"handlePreviousPage",value:function(){1!=this.currentPage&&(this.currentPage-=1,this.handle())}},{key:"handleNextPage",value:function(){this.currentPage!=this.maxPages&&(this.currentPage+=1,this.handle())}},{key:"handleZoomChange",value:function(){vart=arguments.length>0&&void0!==arguments[0]?arguments[0]:null;if(.25!=this.currentScale||t)returnt?(this.currentScale+=.25,this.currentScaleText.textContent=100*this.currentScale+"%",this.handle()):(this.currentScale-=.25,this.currentScaleText.textContent=100*this.currentScale+"%",this.handle())}},{key:"prepare",value:function(){vart=this;returndocument.getElementById("previous-page-button").addEventListener("click",(function(){returnt.handlePreviousPage()})),document.getElementById("next-page-button").addEventListener("click",(function(){returnt.handleNextPage()})),document.getElementById("zoom-in").addEventListener("click",(function(){returnt.handleZoomChange(!0)})),document.getElementById("zoom-out").addEventListener("click",(function(){returnt.handleZoomChange()})),document.querySelector("meta[name=pdf-url]").addEventListener("change",(function(){t.canvas.getContext("2d").clearRect(0,0,t.canvas.width,t.canvas.height),t.url=document.querySelector("meta[name='pdf-url']").content,t.handle()})),this}},{key:"setPagesInViewport",value:function(){vart=document.getElementById("current-page-container"),e=document.getElementById("total-page-container"),r=document.getElementById("pagination-button-container");t.innerText=this.currentPage,e.innerText=this.maxPages,this.maxPages>1&&(r.style.display="flex")}},{key:"handle",value:(c=o.a.mark((functiont(){vare,r,n;returno.a.wrap((function(t){for(;;)switch(t.prev=t.next){case0:returnt.next=2,pdfjsLib.getDocument(this.url).promise;case2:returne=t.sent,t.next=5,e.getPage(this.currentPage);case5:returnr=t.sent,this.maxPages=e.numPages,t.next=9,r.getViewport({scale:this.currentScale});case9:n=t.sent,this.canvas.height=n.height,this.canvas.width=n.width,r.render({canvasContext:this.context,viewport:n}),this.setPagesInViewport();case14:case"end":returnt.stop()}}),t,this)})),u=function(){vart=this,e=arguments;returnnewPromise((function(r,n){varo=c.apply(t,e);functiona(t){i(o,r,n,a,u,"next",t)}functionu(t){i(o,r,n,a,u,"throw",t)}a(void0)}))},function(){returnu