var DEFAULT_SCALE="auto",DEFAULT_SCALE_DELTA=1.1,UNKNOWN_SCALE=0,CACHE_SIZE=20,CSS_UNITS=96/72,SCROLLBAR_PADDING=40,VERTICAL_PADDING=5,MAX_AUTO_SCALE=1.25,MIN_SCALE=.25,MAX_SCALE=4,VIEW_HISTORY_MEMORY=20,SCALE_SELECT_CONTAINER_PADDING=8,SCALE_SELECT_PADDING=22,THUMBNAIL_SCROLL_MARGIN=-19,USE_ONLY_CSS_ZOOM=!1,CLEANUP_TIMEOUT=3E4,IGNORE_CURRENT_POSITION_ON_ZOOM=!1,RenderingStates={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},FindStates={FIND_FOUND:0,FIND_NOTFOUND:1,FIND_WRAPPED:2,FIND_PENDING:3},mozL10n= document.mozL10n||document.webL10n,CustomStyle=function(){function a(){}var b=["ms","Moz","Webkit","O"],c={};a.getProp=function(a,e){if(1==arguments.length&&"string"==typeof c[a])return c[a];e=e||document.documentElement;var f=e.style,g,h;if("string"==typeof f[a])return c[a]=a;h=a.charAt(0).toUpperCase()+a.slice(1);for(var k=0,m=b.length;ka&&b.shift().destroy()}},DEFAULT_PREFERENCES={showPreviousViewOnLoad:!0, defaultZoomValue:"",ifAvailableShowOutlineOnLoad:!1,enableHandToolOnLoad:!1,enableWebGL:!1},Preferences={prefs:Object.create(DEFAULT_PREFERENCES),isInitializedPromiseResolved:!1,initializedPromise:null,initialize:function(){return this.initializedPromise=this._readFromStorage(DEFAULT_PREFERENCES).then(function(a){this.isInitializedPromiseResolved=!0;a&&(this.prefs=a)}.bind(this))},reset:function(){return this.initializedPromise.then(function(){this.prefs=Object.create(DEFAULT_PREFERENCES);return this._writeToStorage(DEFAULT_PREFERENCES)}.bind(this))}, reload:function(){return this.initializedPromise.then(function(){this._readFromStorage(DEFAULT_PREFERENCES).then(function(a){a&&(this.prefs=a)}.bind(this))}.bind(this))},set:function(a,b){return this.initializedPromise.then(function(){if(void 0===DEFAULT_PREFERENCES[a])throw Error("preferencesSet: '"+a+"' is undefined.");if(void 0===b)throw Error("preferencesSet: no value is specified.");var c=typeof b,d=typeof DEFAULT_PREFERENCES[a];if(c!==d)if("number"===c&&"string"===d)b=b.toString();else throw Error("Preferences_set: '"+ b+"' is a \""+c+'", expected "'+d+'".');else if("number"===c&&(b|0)!==b)throw Error("Preferences_set: '"+b+'\' must be an "integer".');this.prefs[a]=b;return this._writeToStorage(this.prefs)}.bind(this))},get:function(a){return this.initializedPromise.then(function(){var b=DEFAULT_PREFERENCES[a];if(void 0===b)throw Error("preferencesGet: '"+a+"' is undefined.");var c=this.prefs[a];return void 0!==c?c:b}.bind(this))},_writeToStorage:function(a){return new Promise(function(b){localStorage.setItem("pdfjs.preferences", JSON.stringify(a));b()})},_readFromStorage:function(a){return new Promise(function(a){var c=JSON.parse(localStorage.getItem("pdfjs.preferences"));a(c)})}}; (function(){function a(a){var b=document.createEvent("CustomEvent");b.initCustomEvent(a,!1,!1,"custom");window.dispatchEvent(b)}function b(){if(e)if(d(),++f=VIEW_HISTORY_MEMORY&&a.files.shift();for(var c,d=0,e=a.files.length;d=c||0>b.pageIdx)b.pageIdx=a?c-1:0,b.wrapped=!0},updateMatch:function(a){var b=FindStates.FIND_NOTFOUND,c=this.offset.wrapped;this.offset.wrapped=!1;a&&(a=this.selected.pageIdx,this.selected.pageIdx=this.offset.pageIdx,this.selected.matchIdx=this.offset.matchIdx,b=c?FindStates.FIND_WRAPPED:FindStates.FIND_FOUND,-1!==a&&a!==this.selected.pageIdx&&this.updatePage(a));this.updateUIState(b,this.state.findPrevious); -1!==this.selected.pageIdx&&this.updatePage(this.selected.pageIdx,!0)},updateUIState:function(a,b){this.integratedFind?FirefoxCom.request("updateFindControlState",{result:a,findPrevious:b}):PDFFindBar.updateUIState(a,b)}},PDFHistory={initialized:!1,initialDestination:null,initialize:function(a){function b(){var a=c._getPreviousParams(null,!0);a&&(c._pushToHistory(a,!1,!c.current.dest&&c.current.hash!==c.previousHash),c._updatePreviousBookmark());window.removeEventListener("beforeunload",b,!1)}if(!PDFJS.disableHistory&& !PDFView.isViewerEmbedded){this.initialized=!0;this.reInitialized=!1;this.historyUnlocked=this.allowHashChange=!0;this.previousHash=window.location.hash.substring(1);this.currentBookmark="";this.currentPage=0;this.updatePreviousBookmark=!1;this.previousBookmark="";this.previousPage=0;this.nextHashParam="";this.fingerprint=a;this.currentUid=this.uid=0;this.current={};a=window.history.state;this._isStateObjectDefined(a)?(a.target.dest?this.initialDestination=a.target.dest:PDFView.initialBookmark=a.target.hash, this.currentUid=a.uid,this.uid=a.uid+1,this.current=a.target):(a&&a.fingerprint&&this.fingerprint!==a.fingerprint&&(this.reInitialized=!0),this._pushOrReplaceState({fingerprint:this.fingerprint},!0));var c=this;window.addEventListener("popstate",function(a){a.preventDefault();a.stopPropagation();c.historyUnlocked&&(a.state?c._goTo(a.state):(c.previousHash=window.location.hash.substring(1),0===c.uid&&(a=c.previousHash&&c.currentBookmark&&c.previousHash!==c.currentBookmark?{hash:c.currentBookmark,page:c.currentPage}: {page:1},c.historyUnlocked=!1,c.allowHashChange=!1,window.history.back(),c._pushToHistory(a,!1,!0),window.history.forward(),c.historyUnlocked=!0),c._pushToHistory({hash:c.previousHash},!1,!0),c._updatePreviousBookmark()))},!1);window.addEventListener("beforeunload",b,!1);window.addEventListener("pageshow",function(a){window.addEventListener("beforeunload",b,!1)},!1)}},_isStateObjectDefined:function(a){return a&&0<=a.uid&&a.fingerprint&&this.fingerprint===a.fingerprint&&a.target&&a.target.hash?!0: !1},_pushOrReplaceState:function(a,b){b?window.history.replaceState(a,"",document.URL):window.history.pushState(a,"",document.URL)},get isHashChangeUnlocked(){if(!this.initialized)return!0;var a=this.allowHashChange;this.allowHashChange=!0;return a},_updatePreviousBookmark:function(){this.updatePreviousBookmark&&this.currentBookmark&&this.currentPage&&(this.previousBookmark=this.currentBookmark,this.previousPage=this.currentPage,this.updatePreviousBookmark=!1)},updateCurrentBookmark:function(a,b){this.initialized&& (this.currentBookmark=a.substring(1),this.currentPage=b|0,this._updatePreviousBookmark())},updateNextHashParam:function(a){this.initialized&&(this.nextHashParam=a)},push:function(a,b){if(this.initialized&&this.historyUnlocked)if(a.dest&&!a.hash&&(a.hash=this.current.hash&&this.current.dest&&this.current.dest===a.dest?this.current.hash:PDFView.getDestinationHash(a.dest).split("#")[1]),a.page&&(a.page|=0),b){var c=window.history.state.target;c||(this._pushToHistory(a,!1),this.previousHash=window.location.hash.substring(1)); this.updatePreviousBookmark=this.nextHashParam?!1:!0;c&&this._updatePreviousBookmark()}else{if(this.nextHashParam){if(this.nextHashParam===a.hash){this.nextHashParam=null;this.updatePreviousBookmark=!0;return}this.nextHashParam=null}a.hash?this.current.hash?this.current.hash!==a.hash?this._pushToHistory(a,!0):(!this.current.page&&a.page&&this._pushToHistory(a,!1,!0),this.updatePreviousBookmark=!0):this._pushToHistory(a,!0):this.current.page&&a.page&&this.current.page!==a.page&&this._pushToHistory(a, !0)}},_getPreviousParams:function(a,b){if(!this.currentBookmark||!this.currentPage)return null;this.updatePreviousBookmark&&(this.updatePreviousBookmark=!1);if(0this.uid&&(this.uid=a.uid);this.current=a.target;this.updatePreviousBookmark=!0;a=window.location.hash.substring(1);this.previousHash!==a&& (this.allowHashChange=!1);this.previousHash=a;this.historyUnlocked=!0}},back:function(){this.go(-1)},forward:function(){this.go(1)},go:function(a){if(this.initialized&&this.historyUnlocked){var b=window.history.state;-1===a&&b&&0b?mozL10n.get("document_properties_kb",{size_kb:(+b.toPrecision(3)).toLocaleString(),size_b:a.toLocaleString()},"{{size_kb}} KB ({{size_b}} bytes)"):mozL10n.get("document_properties_mb",{size_mb:(+(b/1024).toPrecision(3)).toLocaleString(),size_b:a.toLocaleString()}, "{{size_mb}} MB ({{size_b}} bytes)")},show:function(){this.visible||(this.visible=!0,this.overlayContainer.classList.remove("hidden"),this.overlayContainer.lastElementChild.classList.remove("hidden"),this.dataAvailablePromise.then(function(){this.getProperties()}.bind(this)))},hide:function(){this.visible&&(this.visible=!1,this.overlayContainer.classList.add("hidden"),this.overlayContainer.lastElementChild.classList.add("hidden"))},parseDate:function(a){var b=a;if(void 0===b)return"";"D:"===b.substring(0, 2)&&(b=b.substring(2));a=parseInt(b.substring(0,4),10);var c=parseInt(b.substring(4,6),10)-1,d=parseInt(b.substring(6,8),10),e=parseInt(b.substring(8,10),10),f=parseInt(b.substring(10,12),10),g=parseInt(b.substring(12,14),10),h=b.substring(14,15),k=parseInt(b.substring(15,17),10),b=parseInt(b.substring(18,20),10);"-"==h?(e+=k,f+=b):"+"==h&&(e-=k,f+=b);c=new Date(Date.UTC(a,c,d,e,f,g));a=c.toLocaleDateString();c=c.toLocaleTimeString();return mozL10n.get("document_properties_date_string",{date:a,time:c}, "{{date}}, {{time}}")}},PDFView={pages:[],thumbnails:[],currentScale:UNKNOWN_SCALE,currentScaleValue:null,initialBookmark:document.location.hash.substring(1),container:null,thumbnailContainer:null,initialized:!1,fellback:!1,pdfDocument:null,sidebarOpen:!1,pageViewScroll:null,thumbnailViewScroll:null,pageRotation:0,mouseScrollTimeStamp:0,mouseScrollDelta:0,lastScroll:0,previousPageNumber:1,isViewerEmbedded:window.parent!==window,idleTimeout:null,currentPosition:null,initialize:function(){var a=this, b=this.container=document.getElementById("viewerContainer");this.pageViewScroll={};this.watchScroll(b,this.pageViewScroll,updateViewarea);var c=this.thumbnailContainer=document.getElementById("thumbnailView");this.thumbnailViewScroll={};this.watchScroll(c,this.thumbnailViewScroll,this.renderHighestPriority.bind(this));Preferences.initialize();PDFFindBar.initialize({bar:document.getElementById("findbar"),toggleButton:document.getElementById("viewFind"),findField:document.getElementById("findInput"), highlightAllCheckbox:document.getElementById("findHighlightAll"),caseSensitiveCheckbox:document.getElementById("findMatchCase"),findMsg:document.getElementById("findMsg"),findStatusIcon:document.getElementById("findStatusIcon"),findPreviousButton:document.getElementById("findPrevious"),findNextButton:document.getElementById("findNext")});PDFFindController.initialize({pdfPageSource:this,integratedFind:this.supportsIntegratedFind});HandTool.initialize({container:b,toggleHandTool:document.getElementById("toggleHandTool")}); SecondaryToolbar.initialize({toolbar:document.getElementById("secondaryToolbar"),presentationMode:PresentationMode,toggleButton:document.getElementById("secondaryToolbarToggle"),presentationModeButton:document.getElementById("secondaryPresentationMode"),openFile:document.getElementById("secondaryOpenFile"),print:document.getElementById("secondaryPrint"),download:document.getElementById("secondaryDownload"),viewBookmark:document.getElementById("secondaryViewBookmark"),firstPage:document.getElementById("firstPage"), lastPage:document.getElementById("lastPage"),pageRotateCw:document.getElementById("pageRotateCw"),pageRotateCcw:document.getElementById("pageRotateCcw"),documentProperties:DocumentProperties,documentPropertiesButton:document.getElementById("documentProperties")});PasswordPrompt.initialize({overlayContainer:document.getElementById("overlayContainer"),passwordField:document.getElementById("password"),passwordText:document.getElementById("passwordText"),passwordSubmit:document.getElementById("passwordSubmit"), passwordCancel:document.getElementById("passwordCancel")});PresentationMode.initialize({container:b,secondaryToolbar:SecondaryToolbar,firstPage:document.getElementById("contextFirstPage"),lastPage:document.getElementById("contextLastPage"),pageRotateCw:document.getElementById("contextPageRotateCw"),pageRotateCcw:document.getElementById("contextPageRotateCcw")});DocumentProperties.initialize({overlayContainer:document.getElementById("overlayContainer"),closeButton:document.getElementById("documentPropertiesClose"), fileNameField:document.getElementById("fileNameField"),fileSizeField:document.getElementById("fileSizeField"),titleField:document.getElementById("titleField"),authorField:document.getElementById("authorField"),subjectField:document.getElementById("subjectField"),keywordsField:document.getElementById("keywordsField"),creationDateField:document.getElementById("creationDateField"),modificationDateField:document.getElementById("modificationDateField"),creatorField:document.getElementById("creatorField"), producerField:document.getElementById("producerField"),versionField:document.getElementById("versionField"),pageCountField:document.getElementById("pageCountField")});b.addEventListener("scroll",function(){a.lastScroll=Date.now()},!1);return Promise.all([Preferences.get("enableWebGL").then(function(a){PDFJS.disableWebGL=!a})]).then(function(){PDFView.initialized=!0})},getPage:function(a){return this.pdfDocument.getPage(a)},watchScroll:function(a,b,c){b.down=!0;b.lastY=a.scrollTop;a.addEventListener("scroll", function(d){d=a.scrollTop;var e=b.lastY;d>e?b.down=!0:dMIN_SCALE);this.setScale(b,!0)},set page(a){var b=this.pages,c=document.createEvent("UIEvents");c.initUIEvent("pagechange",!1,!1,window,0);0this.container.clientWidth},setTitleUsingUrl:function(a){this.url=a;try{this.setTitle(decodeURIComponent(getFileName(a))||a)}catch(b){this.setTitle(a)}},setTitle:function(a){document.title=a},close:function(){document.getElementById("errorWrapper").setAttribute("hidden", "true");if(this.pdfDocument){this.pdfDocument.destroy();this.pdfDocument=null;for(var a=document.getElementById("thumbnailView");a.hasChildNodes();)a.removeChild(a.lastChild);"_loadingInterval"in a&&clearInterval(a._loadingInterval);for(a=document.getElementById("viewer");a.hasChildNodes();)a.removeChild(a.lastChild);"undefined"!==typeof PDFBug&&PDFBug.cleanup()}},open:function(a,b,c,d,e){this.pdfDocument&&Preferences.reload();this.close();c={password:c};"string"===typeof a?(this.setTitleUsingUrl(a), c.url=a):a&&"byteLength"in a&&(c.data=a);if(e)for(var f in e)c[f]=e[f];var g=this;g.loading=!0;g.downloadComplete=!1;PDFJS.getDocument(c,d,function(a,b){PasswordPrompt.updatePassword=a;PasswordPrompt.reason=b;PasswordPrompt.show()},function(a){g.progress(a.loaded/a.total)}).then(function(a){g.load(a,b);g.loading=!1},function(a,b){var c=mozL10n.get("loading_error",null,"An error occurred while loading the PDF.");b&&"InvalidPDFException"===b.name&&(c=mozL10n.get("invalid_file_error",null,"Invalid or corrupted PDF file.")); b&&"MissingPDFException"===b.name&&(c=mozL10n.get("missing_file_error",null,"Missing PDF file."));g.error(c,{message:a});g.loading=!1})},download:function(){function a(){d.downloadUrl(b,c)}var b=this.url.split("#")[0],c=getPDFFileNameFromURL(b),d=new DownloadManager;d.onerror=function(a){PDFView.error("PDF failed to download.")};this.pdfDocument?this.downloadComplete?this.pdfDocument.getData().then(function(a){a=PDFJS.createBlob(a,"application/pdf");d.download(a,b,c)},a).then(null,a):a():a()},fallback:function(a){}, navigateTo:function(a){var b="",c=this,d=function(e){c.pendingRefStr=null;var f=e instanceof Object?c.pagesRefMap[e.num+" "+e.gen+" R"]:e+1;f?(f>c.pages.length&&(f=c.pages.length),c.pages[f-1].scrollIntoView(a),PDFHistory.push({dest:a,hash:b,page:f})):c.pdfDocument.getPageIndex(e).then(function(a){c.pagesRefMap[e.num+" "+e.gen+" R"]=a+1;d(e)})};this.destinationsPromise.then(function(){"string"===typeof a&&(b=a,a=c.destinations[a]);a instanceof Array&&d(a[0])})},getDestinationHash:function(a){if("string"=== typeof a)return PDFView.getAnchorUrl("#"+escape(a));if(a instanceof Array){var b=a[0];if(b=b instanceof Object?this.pagesRefMap[b.num+" "+b.gen+" R"]:b+1){var b=PDFView.getAnchorUrl("#page="+b),c=a[1];if("object"===typeof c&&"name"in c&&"XYZ"==c.name){var c=a[4]||this.currentScaleValue,d=parseFloat(c);d&&(c=100*d);b+="&zoom="+c;if(a[2]||a[3])b+=","+(a[2]||0)+","+(a[3]||0)}return b}}return""},getAnchorUrl:function(a){return a},error:function(a,b){var c=mozL10n.get("error_version_info",{version:PDFJS.version|| "?",build:PDFJS.build||"?"},"PDF.js v{{version}} (build: {{build}})")+"\n";b&&(c+=mozL10n.get("error_message",{message:b.message},"Message: {{message}}"),b.stack?c+="\n"+mozL10n.get("error_stack",{stack:b.stack},"Stack: {{stack}}"):(b.filename&&(c+="\n"+mozL10n.get("error_file",{file:b.filename},"File: {{file}}")),b.lineNumber&&(c+="\n"+mozL10n.get("error_line",{line:b.lineNumber},"Line: {{line}}"))));var d=document.getElementById("errorWrapper");d.removeAttribute("hidden");document.getElementById("errorMessage").textContent= a;var e=document.getElementById("errorClose");e.onclick=function(){d.setAttribute("hidden","true")};var f=document.getElementById("errorMoreInfo"),g=document.getElementById("errorShowMore"),h=document.getElementById("errorShowLess");g.onclick=function(){f.removeAttribute("hidden");g.setAttribute("hidden","true");h.removeAttribute("hidden");f.style.height=f.scrollHeight+"px"};h.onclick=function(){f.setAttribute("hidden","true");g.removeAttribute("hidden");h.setAttribute("hidden","true")};g.oncontextmenu= noContextMenuHandler;h.oncontextmenu=noContextMenuHandler;e.oncontextmenu=noContextMenuHandler;g.removeAttribute("hidden");h.setAttribute("hidden","true");f.value=c},progress:function(a){a=Math.round(100*a);a>PDFView.loadingBar.percent&&(PDFView.loadingBar.percent=a)},load:function(a,b){function c(a,b){a.onAfterDraw=function(){e||(e=!0,f());b.setImage(a.canvas)}}var d=this,e=!1,f=null,g=new Promise(function(a){f=a});PDFFindController.reset();this.pdfDocument=a;DocumentProperties.resolveDataAvailable(); var h=a.getDownloadInfo().then(function(){d.downloadComplete=!0;PDFView.loadingBar.hide();document.getElementById("outerContainer").classList.remove("loadingInProgress")}),k=a.numPages,m=a.fingerprint;document.getElementById("numPages").textContent=mozL10n.get("page_of",{pageCount:k},"of {{pageCount}}");document.getElementById("pageNumber").max=k;PDFView.documentFingerprint=m;var p=PDFView.store=new ViewHistory(m);this.pageRotation=0;var u=this.pages=[],v=this.pagesRefMap={},y=this.thumbnails=[], q;this.pagesPromise=m=new Promise(function(a){q=a});var l=a.getPage(1),r=document.getElementById("viewer"),n=document.getElementById("thumbnailView");l.then(function(e){e=e.getViewport((b||1)*CSS_UNITS);for(var f=1;f<=k;++f){var m=e.clone(),p=new PageView(r,f,b,d.navigateTo.bind(d),m),m=new ThumbnailView(n,f,m);c(p,m);u.push(p);y.push(m)}g.then(function(){if(PDFJS.disableAutoFetch)q();else for(var b=k,c=1;c<=k;++c)a.getPage(c).then(function(a,c){var d=u[a-1];d.pdfPage||d.setPdfPage(c);v[c.ref.num+ " "+c.ref.gen+" R"]=a;b--;b||q()}.bind(null,c))});h.then(function(){var a=document.createEvent("CustomEvent");a.initCustomEvent("documentload",!0,!0,{});window.dispatchEvent(a)});PDFView.loadingBar.setWidth(r);PDFFindController.resolveFirstPage();PDFHistory.initialize(d.documentFingerprint)});var w,t=Preferences.get("showPreviousViewOnLoad").then(function(a){w=a}),x,z=Preferences.get("defaultZoomValue").then(function(a){x=a});Promise.all([l,p.initializedPromise,t,z]).then(function(){var a=null;if(w&& p.get("exists",!1))var a=p.get("page","1"),c=x||p.get("zoom",PDFView.currentScale),e=p.get("scrollLeft","0"),g=p.get("scrollTop","0"),a="page="+a+"&zoom="+c+","+e+","+g;else x&&(a="page=1&zoom="+x);d.setInitialView(a,b);d.isViewerEmbedded||d.container.focus()},function(a){console.error(a);l.then(function(){d.setInitialView(null,b)})});m.then(function(){PDFView.supportsPrinting&&a.getJavaScript().then(function(a){a.length&&(console.warn("Warning: JavaScript is not supported"),PDFView.fallback(PDFJS.UNSUPPORTED_FEATURES.javaScript)); for(var b=/\bprint\s*\(/g,c=0,d=a.length;ce)break;u=h.el.offsetLeft+h.el.clientLeft;p=h.el.clientWidth;u+pg||(p=Math.max(0,d-k)+Math.max(0,k+m-e),m=100*(m-p)/m|0,a.push({id:h.id,x:u,y:k,view:h, percent:m}))}b=a[0];d=a[a.length-1];c&&a.sort(function(a,b){var c=a.percent-b.percent;return.001c&&50>b-c||((0a|| 0>this.mouseScrollDelta&&0=e+f[b].str.length;)e+=f[b].str.length,b++;b==f.length&&console.error("Could not find matching mapping");for(var u={begin:{divIdx:b,offset:p-e}},p= p+h;b!==g&&p>e+f[b].str.length;)e+=f[b].str.length,b++;u.end={divIdx:b,offset:p-e};k.push(u)}return k};this.renderMatches=function(a){function b(a,c){var d=a.divIdx;h[d].textContent="";f(d,0,a.offset,c)}function e(a,b,c){f(a.divIdx,a.offset,b.offset,c)}function f(a,b,c,d){var e=h[a];a=g[a].str.substring(b,c);a=document.createTextNode(a);d?(b=document.createElement("span"),b.className=d,b.appendChild(a),e.appendChild(b)):e.appendChild(a)}if(0!==a.length){var g=this.textContent.items,h=this.textDivs, k=null,m=null===PDFFindController?!1:this.pageIdx===PDFFindController.selected.pageIdx,p=null===PDFFindController?-1:PDFFindController.selected.matchIdx,u={divIdx:-1,offset:void 0},v=p,y=v+1;if(null===PDFFindController?0:PDFFindController.state.highlightAll)v=0,y=a.length;else if(!m)return;for(;vg.percent)break;if(g.id===PDFView.page){f=!0;break}}f||(c=b[0].id);PresentationMode.active||(updateViewarea.inProgress=!0,PDFView.page=c,updateViewarea.inProgress=!1);var b=PDFView.currentScale,c=PDFView.currentScaleValue,h=parseFloat(c)===b?Math.round(1E4*b)/100:c,k=a.id,b="#page="+ k+("&zoom="+h),c=PDFView.container,a=PDFView.pages[k-1].getPagePoint(c.scrollLeft-a.x,c.scrollTop-a.y),m=Math.round(a[0]),p=Math.round(a[1]),b=b+(","+m+","+p);PDFView.currentPosition=PresentationMode.active||PresentationMode.switchInProgress?null:{page:k,left:m,top:p};var u=PDFView.store;u.initializedPromise.then(function(){u.set("exists",!0);u.set("page",k);u.set("zoom",h);u.set("scrollLeft",m);u.set("scrollTop",p)});a=PDFView.getAnchorUrl(b);document.getElementById("viewBookmark").href=a;document.getElementById("secondaryViewBookmark").href= a;PDFHistory.updateCurrentBookmark(b,k)}}}window.addEventListener("resize",function(a){PDFView.initialized&&(document.getElementById("pageWidthOption").selected||document.getElementById("pageFitOption").selected||document.getElementById("pageAutoOption").selected)&&PDFView.setScale(document.getElementById("scaleSelect").value);updateViewarea();SecondaryToolbar.setMaxHeight(PDFView.container)});window.addEventListener("hashchange",function(a){PDFHistory.isHashChangeUnlocked&&PDFView.setHash(document.location.hash.substring(1))}); window.addEventListener("change",function(a){if((a=a.target.files)&&0!==a.length){a=a[0];if(!PDFJS.disableCreateObjectURL&&"undefined"!==typeof URL&&URL.createObjectURL)PDFView.open(URL.createObjectURL(a),0);else{var b=new FileReader;b.onload=function(a){a=new Uint8Array(a.target.result);PDFView.open(a,0)};b.readAsArrayBuffer(a)}PDFView.setTitleUsingUrl(a.name);document.getElementById("viewBookmark").setAttribute("hidden","true");document.getElementById("secondaryViewBookmark").setAttribute("hidden", "true");document.getElementById("download").setAttribute("hidden","true");document.getElementById("secondaryDownload").setAttribute("hidden","true")}},!0);function selectScaleOption(a){for(var b=document.getElementById("scaleSelect").options,c=!1,d=0;d=c)&&scrollIntoView(b,{top:THUMBNAIL_SCROLL_MARGIN})}}document.getElementById("previous").disabled=1>= a;document.getElementById("next").disabled=a>=PDFView.pages.length},!0);function handleMouseWheel(a){var b="DOMMouseScroll"===a.type?-a.detail:a.wheelDelta/40,c=0>b?"zoomOut":"zoomIn";a.ctrlKey?(a.preventDefault(),PDFView[c](Math.abs(b))):PresentationMode.active&&PDFView.mouseScroll(40*b)}window.addEventListener("DOMMouseScroll",handleMouseWheel);window.addEventListener("mousewheel",handleMouseWheel); window.addEventListener("click",function(a){PresentationMode.active?0===a.button&&a.preventDefault():SecondaryToolbar.opened&&PDFView.container.contains(a.target)&&SecondaryToolbar.close()},!1); window.addEventListener("keydown",function(a){if(!PasswordPrompt.visible){var b=!1,c=(a.ctrlKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0)|(a.metaKey?8:0);if(1===c||8===c||5===c||12===c)switch(a.keyCode){case 70:PDFView.supportsIntegratedFind||(PDFFindBar.open(),b=!0);break;case 71:PDFView.supportsIntegratedFind||(PDFFindBar.dispatchEvent("again",5===c||12===c),b=!0);break;case 61:case 107:case 187:case 171:PDFView.zoomIn();b=!0;break;case 173:case 109:case 189:PDFView.zoomOut();b=!0;break;case 48:case 96:setTimeout(function(){PDFView.setScale(DEFAULT_SCALE, !0)}),b=!1}if(1===c||8===c)switch(a.keyCode){case 83:PDFView.download(),b=!0}if(3===c||10===c)switch(a.keyCode){case 80:SecondaryToolbar.presentationModeClick();b=!0;break;case 71:document.getElementById("pageNumber").select(),b=!0}if(b)a.preventDefault();else{var d=document.activeElement||document.querySelector(":focus"),e=d&&d.tagName.toUpperCase();if("INPUT"!==e&&"TEXTAREA"!==e&&"SELECT"!==e||27===a.keyCode){if(0===c)switch(a.keyCode){case 38:case 33:case 8:if(!PresentationMode.active&&"page-fit"!== PDFView.currentScaleValue)break;case 37:if(PDFView.isHorizontalScrollbarEnabled)break;case 75:case 80:PDFView.page--;b=!0;break;case 27:SecondaryToolbar.opened&&(SecondaryToolbar.close(),b=!0);!PDFView.supportsIntegratedFind&&PDFFindBar.opened&&(PDFFindBar.close(),b=!0);break;case 40:case 34:case 32:if(!PresentationMode.active&&"page-fit"!==PDFView.currentScaleValue)break;case 39:if(PDFView.isHorizontalScrollbarEnabled)break;case 74:case 78:PDFView.page++;b=!0;break;case 36:PresentationMode.active&& (PDFView.page=1,b=!0);break;case 35:PresentationMode.active&&(PDFView.page=PDFView.pdfDocument.numPages,b=!0);break;case 72:PresentationMode.active||HandTool.toggle();break;case 82:PDFView.rotatePages(90)}if(4===c)switch(a.keyCode){case 32:if(!PresentationMode.active&&"page-fit"!==PDFView.currentScaleValue)break;PDFView.page--;b=!0;break;case 82:PDFView.rotatePages(-90)}b||PresentationMode.active||(33<=a.keyCode&&40>=a.keyCode&&!PDFView.container.contains(d)&&PDFView.container.focus(),32===a.keyCode&& "BUTTON"!==e&&(PDFView.container.contains(d)||PDFView.container.focus()));if(2===c)switch(a.keyCode){case 37:PresentationMode.active&&(PDFHistory.back(),b=!0);break;case 39:PresentationMode.active&&(PDFHistory.forward(),b=!0)}b&&(a.preventDefault(),PDFView.clearMouseScrollState())}}}});window.addEventListener("beforeprint",function(a){PDFView.beforePrint()});window.addEventListener("afterprint",function(a){PDFView.afterPrint()}); (function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){a()};PDFView.animationStartedPromise=new Promise(function(b){a(function(){b()})})})();