b.matchIdx+1<d||a&&0<b.matchIdx){this.hadMatch=!0;b.matchIdx=a?b.matchIdx-1:b.matchIdx+1;this.updateMatch(!0);return}this.advanceOffsetPage(a)}this.nextPageMatch()}},nextPageMatch:function(){null!==this.resumePageIdx&&console.error("There can only be one pending page.");vara=function(a){varb=this.offset;a=a.length;varc=this.state.findPrevious;if(a)this.hadMatch=!0,b.matchIdx=c?a-1:0,this.updateMatch(!0);else{this.advanceOffsetPage(c);if(b.wrapped&&(b.matchIdx=null,!this.hadMatch)){this.updateMatch(!1);
function(){a.dispatchEvent("casesensitivitychange")})},dispatchEvent:function(a,b){varc=document.createEvent("CustomEvent");c.initCustomEvent("find"+a,!0,!0,{query:this.findField.value,caseSensitive:this.caseSensitive.checked,highlightAll:this.highlightAll.checked,findPrevious:b});returnwindow.dispatchEvent(c)},updateUIState:function(a,b){varc=!1,d="",f="";switch(a){caseFindStates.FIND_PENDING:f="pending";break;caseFindStates.FIND_NOTFOUND:d=mozL10n.get("find_not_found",null,"Phrase not found");
c=!0;break;caseFindStates.FIND_WRAPPED:d=b?mozL10n.get("find_reached_top",null,"Reached top of document, continued from bottom"):mozL10n.get("find_reached_bottom",null,"Reached end of document, continued from top")}c?this.findField.classList.add("notFound"):this.findField.classList.remove("notFound");this.findField.setAttribute("data-status",f);this.findMsg.textContent=d},open:function(){this.opened||(this.opened=!0,this.toggleButton.classList.add("toggled"),this.bar.classList.remove("hidden"),this.findField.select(),
null,"An error occurred while loading the PDF."),a);break}PDFView.open(b.data,0)}});FirefoxCom.requestSync("initPassiveLoading",null)},setTitleUsingUrl:function(a){this.url=a;try{this.setTitle(decodeURIComponent(getFileName(a))||a)}catch(b){this.setTitle(a)}},setTitle:function(a){document.title=a},open:function(a,b,c){vard={password:c};"string"===typeofa?(this.setTitleUsingUrl(a),d.url=a):a&&"byteLength"ina&&(d.data=a);PDFView.loadingBar||(PDFView.loadingBar=newProgressBar("#loadingBar",{}));
this.pdfDocument=null;varf=this;f.loading=!0;PDFJS.getDocument(d).then(function(a){f.load(a,b);f.loading=!1},function(d,e){if(e&&"PasswordException"===e.name&&"needpassword"===e.code){varg=mozL10n.get("request_password",null,"PDF is protected by a password:");if((c=prompt(g))&&0<c.length)returnPDFView.open(a,b,c)}g=mozL10n.get("loading_error",null,"An error occurred while loading the PDF.");e&&"InvalidPDFException"===e.name&&(g=mozL10n.get("invalid_file_error",null,"Invalid or corrupted PDF file."));
!0);for(vara=0,b=this.pages.length;a<b;++a)this.pages[a].beforePrint()}elsea=mozL10n.get("printing_not_supported",null,"Warning: Printing is not fully supported by this browser."),this.error(a)},afterPrint:function(){for(vara=document.getElementById("printContainer");a.hasChildNodes();)a.removeChild(a.lastChild)},fullscreen:function(){if(document.fullscreenElement||document.mozFullScreen||document.webkitIsFullScreen)return!1;vara=document.getElementById("viewerContainer");if(document.documentElement.requestFullscreen)a.requestFullscreen();
{left:a,top:b,width:c,height:d})},0)}elsescrollIntoView(g)};this.getTextContent=function(){this.textContent||(this.textContent=this.pdfPage.getTextContent());returnthis.textContent};this.draw=function(a){functionc(d){p.renderingState=RenderingStates.FINISHED;p.loadingIconDiv&&(g.removeChild(p.loadingIconDiv),deletep.loadingIconDiv);d&&PDFView.error(mozL10n.get("rendering_error",null,"An error occurred while rendering the page."),d);p.stats=b.stats;p.updateStats();if(p.onAfterDraw)p.onAfterDraw();
cache.push(p);a()}this.renderingState!==RenderingStates.INITIAL&&error("Must be in new state before drawing");this.renderingState=RenderingStates.RUNNING;vard=document.createElement("canvas");d.id="page"+this.id;d.mozOpaque=!0;g.appendChild(d);this.canvas=d;varf=null;PDFJS.disableTextLayer||(f=document.createElement("div"),f.className="textLayer",g.appendChild(f));varh=this.textLayer=f?newTextLayerBuilder(f,this.id-1):null,r=this.viewport,q=PDFView.getOutputScale();d.width=Math.floor(r.width)*
RenderingStates.INITIAL;this.resume=null};this.drawingRequired=function(){return!this.hasImage};this.draw=function(a){this.renderingState!==RenderingStates.INITIAL&&error("Must be in new state before drawing");this.renderingState=RenderingStates.RUNNING;if(this.hasImage)a();else{varc=this,f=d(),h=b.getViewport(s,e);b.render({canvasContext:f,viewport:h,continueCallback:function(a){PDFView.highestPriorityPage!=="thumbnail"+c.id?(c.renderingState=RenderingStates.PAUSED,c.resume=function(){c.renderingState=