????
Current Path : C:/inetpub/vhost/qlk.nextform.vn/www/wwwroot/static/js/ |
Current File : C:/inetpub/vhost/qlk.nextform.vn/www/wwwroot/static/js/7443.8e8c4883.chunk.js |
/*! For license information please see 7443.8e8c4883.chunk.js.LICENSE.txt */ (self.webpackChunkgdt=self.webpackChunkgdt||[]).push([[7443],{51963:(e,t,i)=>{"use strict";i.d(t,{q:()=>d});const n=Object.prototype.toString;function s(e){return"number"==typeof e||function(e){return"object"==typeof e&&null!==e}(e)&&"[object Number]"==function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":n.call(e)}(e)}const r=["kh\xf4ng","m\u1ed9t","hai","ba","b\u1ed1n","n\u0103m","s\xe1u","b\u1ea3y","t\xe1m","ch\xedn"],a=["m\u01b0\u1eddi","hai m\u01b0\u01a1i","ba m\u01b0\u01a1i","b\u1ed1n m\u01b0\u01a1i","n\u0103m m\u01b0\u01a1i","s\xe1u m\u01b0\u01a1i","b\u1ea3y m\u01b0\u01a1i","t\xe1m m\u01b0\u01a1i","ch\xedn m\u01b0\u01a1i"],o=["kh\xf4ng tr\u0103m","m\u1ed9t tr\u0103m","hai tr\u0103m","ba tr\u0103m","b\u1ed1n tr\u0103m","n\u0103m tr\u0103m","s\xe1u tr\u0103m","b\u1ea3y tr\u0103m","t\xe1m tr\u0103m","ch\xedn tr\u0103m"],h=e=>{const t="".concat(e).split(""),i=parseInt(t[0]),n=parseInt(t[1]);return 0===n?a[i-1]:5===n?"".concat(a[i-1]," l\u0103m"):4===n?"".concat(a[i-1],1===i?" b\u1ed1n":" t\u01b0"):1===n?"".concat(a[i-1],1===i?" m\u1ed9t":" m\u1ed1t"):"".concat(a[i-1]," ").concat(r[n])},l=e=>{const t="".concat(e).split(""),i=parseInt(t[0]),n=parseInt(t[1]),s=parseInt(t[2]);return n>0?"".concat(o[i]," ").concat(h("".concat(n).concat(s))):0===s?"".concat(o[i]):4===s?"".concat(o[i]," linh t\u01b0"):"".concat(o[i]," linh ").concat(r[s])},c=e=>{const t="".concat(e).split("").reverse(),i=t.slice(0,3).reverse().join(""),n=parseInt(t.slice(3,t.length).reverse().join("")),s="".concat(n).length;let a="";return parseInt(i)>=1&&(a=l(i)),1===s?"".concat(r[n]," ngh\xecn ").concat(a):2===s?"".concat(h(n)," ngh\xecn ").concat(a):"".concat(l(n)," ngh\xecn ").concat(a)},u=e=>{const t="".concat(e).split("").reverse(),i=t.slice(0,6).reverse().join(""),n=parseInt(t.slice(6,t.length).reverse().join("")),s="".concat(n).length;let a="";return parseInt(i)>999?a=c(i):parseInt(i)<=999&&parseInt(i)>=1&&(a=l("".concat(i).split("").slice(3,6).join(""))),1===s?"".concat(r[n]," tri\u1ec7u ").concat(a):2===s?"".concat(h(n)," tri\u1ec7u ").concat(a):"".concat(l(n)," tri\u1ec7u ").concat(a)},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{if(!s(e))throw new Error("Input is not a number");if(Math.abs(e)>9007199254740992)throw new Error("Your number is too big");if(e<0)return"\xe2m ".concat(d(Math.abs(e)));const i="".concat(e).length;let n;return 1===i&&(n=r[e]),2===i&&(n=h(e)),3===i&&(n=l(e)),i>3&&i<=6&&(n=c(e)),i>6&&i<=9&&(n=u(e)),i>9&&(n=(e=>{const t="".concat(e).split("").reverse(),i=t.slice(0,9).reverse().join(""),n=parseInt(t.slice(9,t.length).reverse().join(""));let s="";parseInt(i)>999999&&parseInt(i)<=999999999?s=u(i):parseInt(i)<=999999&&parseInt(i)>999?s=c("".concat(i).split("").slice(3,9).join("")):parseInt(i)<=999&&parseInt(i)>=1&&(s=l("".concat(i).split("").slice(6,9).join("")));const a="".concat(n).length;return 1===a?"".concat(r[n]," t\u1ef7 ").concat(s):2===a?"".concat(h(n)," t\u1ef7 ").concat(s):3===a?"".concat(l(n)," t\u1ef7 ").concat(s):a>3&&a<=6?"".concat(c(n)," t\u1ef7 ").concat(s):a>6&&a<=9?"".concat(u(n)," t\u1ef7 ").concat(s):void 0})(e)),t?function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(" ").reverse();const i=t.findIndex((e=>"tr\u0103m"===e)),n=t.findIndex((e=>"ngh\xecn"===e)),s=t.findIndex((e=>"tri\u1ec7u"===e)),r=t.findIndex((e=>"t\u1ef7"===e));return-1!==r&&e&&t.splice(r,1,"".concat(t[r]).concat(e)),-1!==s&&e&&t.splice(s,1,"".concat(t[s]).concat(e)),-1!==n&&e&&-1!==i&&t.splice(n,1,"".concat(t[n]).concat(e)),t.reverse().join(" ")}(n,t):n}catch(e){console.error("error",e)}}},43613:function(e,t,i){var n;n=function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AnnotationLayerBuilder",{enumerable:!0,get:function(){return n.AnnotationLayerBuilder}}),Object.defineProperty(t,"DefaultAnnotationLayerFactory",{enumerable:!0,get:function(){return n.DefaultAnnotationLayerFactory}}),Object.defineProperty(t,"DefaultTextLayerFactory",{enumerable:!0,get:function(){return s.DefaultTextLayerFactory}}),Object.defineProperty(t,"TextLayerBuilder",{enumerable:!0,get:function(){return s.TextLayerBuilder}}),Object.defineProperty(t,"EventBus",{enumerable:!0,get:function(){return r.EventBus}}),Object.defineProperty(t,"NullL10n",{enumerable:!0,get:function(){return r.NullL10n}}),Object.defineProperty(t,"ProgressBar",{enumerable:!0,get:function(){return r.ProgressBar}}),Object.defineProperty(t,"PDFLinkService",{enumerable:!0,get:function(){return a.PDFLinkService}}),Object.defineProperty(t,"SimpleLinkService",{enumerable:!0,get:function(){return a.SimpleLinkService}}),Object.defineProperty(t,"DownloadManager",{enumerable:!0,get:function(){return o.DownloadManager}}),Object.defineProperty(t,"GenericL10n",{enumerable:!0,get:function(){return h.GenericL10n}}),Object.defineProperty(t,"PDFFindController",{enumerable:!0,get:function(){return l.PDFFindController}}),Object.defineProperty(t,"PDFHistory",{enumerable:!0,get:function(){return c.PDFHistory}}),Object.defineProperty(t,"PDFPageView",{enumerable:!0,get:function(){return u.PDFPageView}}),Object.defineProperty(t,"PDFSinglePageViewer",{enumerable:!0,get:function(){return d.PDFSinglePageViewer}}),Object.defineProperty(t,"PDFViewer",{enumerable:!0,get:function(){return g.PDFViewer}});var n=i(1),s=i(5),r=i(3),a=i(4),o=i(6),h=i(8),l=i(10),c=i(12),u=i(13),d=i(15),g=i(17)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultAnnotationLayerFactory=t.AnnotationLayerBuilder=void 0;var n=i(2),s=i(3),r=i(4);class a{constructor(e){let{pageDiv:t,pdfPage:i,linkService:n,downloadManager:r,imageResourcesPath:a="",renderInteractiveForms:o=!1,l10n:h=s.NullL10n}=e;this.pageDiv=t,this.pdfPage=i,this.linkService=n,this.downloadManager=r,this.imageResourcesPath=a,this.renderInteractiveForms=o,this.l10n=h,this.div=null,this._cancelled=!1}render(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"display";this.pdfPage.getAnnotations({intent:t}).then((t=>{if(this._cancelled)return;const i={viewport:e.clone({dontFlip:!0}),div:this.div,annotations:t,page:this.pdfPage,imageResourcesPath:this.imageResourcesPath,renderInteractiveForms:this.renderInteractiveForms,linkService:this.linkService,downloadManager:this.downloadManager};if(this.div)n.AnnotationLayer.update(i);else{if(0===t.length)return;this.div=document.createElement("div"),this.div.className="annotationLayer",this.pageDiv.appendChild(this.div),i.div=this.div,n.AnnotationLayer.render(i),this.l10n.translate(this.div)}}))}cancel(){this._cancelled=!0}hide(){this.div&&this.div.setAttribute("hidden","true")}}t.AnnotationLayerBuilder=a,t.DefaultAnnotationLayerFactory=class{createAnnotationLayerBuilder(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:s.NullL10n;return new a({pageDiv:e,pdfPage:t,imageResourcesPath:i,renderInteractiveForms:n,linkService:new r.SimpleLinkService,l10n:o})}}},function(e,t,n){"use strict";let s;s="undefined"!==typeof window&&window["pdfjs-dist/build/pdf"]?window["pdfjs-dist/build/pdf"]:i(73114),e.exports=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidRotation=function(e){return Number.isInteger(e)&&e%90===0},t.isValidScrollMode=function(e){return Number.isInteger(e)&&Object.values(n).includes(e)&&e!==n.UNKNOWN},t.isValidSpreadMode=function(e){return Number.isInteger(e)&&Object.values(s).includes(e)&&e!==s.UNKNOWN},t.isPortraitOrientation=function(e){return e.width<=e.height},t.clamp=u,t.getPDFFileNameFromURL=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!==typeof e)return t;if(function(e){let t=0;const i=e.length;for(;t<i&&""===e[t].trim();)t++;return"data:"===e.substring(t,t+5).toLowerCase()}(e))return console.warn('getPDFFileNameFromURL: ignoring "data:" URL for performance reasons.'),t;const i=/[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=/^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let s=i.exec(n[1])||i.exec(n[2])||i.exec(n[3]);if(s&&(s=s[0],s.includes("%")))try{s=i.exec(decodeURIComponent(s))[0]}catch(r){}return s||t},t.noContextMenuHandler=function(e){e.preventDefault()},t.parseQueryString=function(e){const t=e.split("&"),i=Object.create(null);for(let n=0,s=t.length;n<s;++n){const e=t[n].split("="),s=e[0].toLowerCase(),r=e.length>1?e[1]:null;i[decodeURIComponent(s)]=decodeURIComponent(r)}return i},t.backtrackBeforeAllVisibleElements=o,t.getVisibleElements=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=e.scrollTop,r=s+e.clientHeight,h=e.scrollLeft,l=h+e.clientWidth,c=[],u=t.length;let d=0===u?0:a(t,n?function(e){const t=e.div;return t.offsetLeft+t.clientLeft+t.clientWidth>h}:function(e){const t=e.div;return t.offsetTop+t.clientTop+t.clientHeight>s});d>0&&d<u&&!n&&(d=o(d,t,s));let g=n?l:-1;for(let a=d;a<u;a++){const e=t[a],i=e.div,o=i.offsetLeft+i.clientLeft,u=i.offsetTop+i.clientTop,d=i.clientWidth,p=i.clientHeight,f=o+d,_=u+p;if(-1===g)_>=r&&(g=_);else if((n?o:u)>g)break;if(_<=s||u>=r||f<=h||o>=l)continue;const m=(p-(Math.max(0,s-u)+Math.max(0,_-r)))*(d-(Math.max(0,h-o)+Math.max(0,f-l)))*100/p/d|0;c.push({id:e.id,x:o,y:u,view:e,percent:m})}const p=c[0],f=c[c.length-1];return i&&c.sort((function(e,t){const i=e.percent-t.percent;return Math.abs(i)>.001?-i:e.id-t.id})),{first:p,last:f,views:c}},t.roundToDivide=function(e,t){const i=e%t;return 0===i?e:Math.round(e-i+t)},t.getPageSizeInches=function(e){let{view:t,userUnit:i,rotate:n}=e;const[s,r,a,o]=t,h=n%180!==0,l=(a-s)/72*i,c=(o-r)/72*i;return{width:h?c:l,height:h?l:c}},t.approximateFraction=function(e){if(Math.floor(e)===e)return[e,1];const t=1/e;if(t>8)return[1,8];if(Math.floor(t)===t)return[1,t];const i=e>1?t:e;let n,s=0,r=1,a=1,o=1;for(;;){const e=s+a,t=r+o;if(t>8)break;i<=e/t?(a=e,o=t):(s=e,r=t)}return n=i-s/r<a/o-i?i===e?[s,r]:[r,s]:i===e?[a,o]:[o,a],n},t.getOutputScale=function(e){const t=window.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1,n=t/i;return{sx:n,sy:n,scaled:1!==n}},t.scrollIntoView=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.offsetParent;if(!n)return void console.error("offsetParent is not set -- cannot scroll");let s=e.offsetTop+e.clientTop,r=e.offsetLeft+e.clientLeft;for(;n.clientHeight===n.scrollHeight&&n.clientWidth===n.scrollWidth||i&&"hidden"===getComputedStyle(n).overflow;)if(n.dataset._scaleY&&(s/=n.dataset._scaleY,r/=n.dataset._scaleX),s+=n.offsetTop,r+=n.offsetLeft,n=n.offsetParent,!n)return;t&&(void 0!==t.top&&(s+=t.top),void 0!==t.left&&(r+=t.left,n.scrollLeft=r)),n.scrollTop=s},t.watchScroll=function(e,t){const i=function(i){s||(s=window.requestAnimationFrame((function(){s=null;const i=e.scrollLeft,r=n.lastX;i!==r&&(n.right=i>r),n.lastX=i;const a=e.scrollTop,o=n.lastY;a!==o&&(n.down=a>o),n.lastY=a,t(n)})))},n={right:!0,down:!0,lastX:e.scrollLeft,lastY:e.scrollTop,_eventHandler:i};let s=null;return e.addEventListener("scroll",i,!0),n},t.binarySearchFirstItem=a,t.normalizeWheelEventDelta=function(e){let t=Math.sqrt(e.deltaX*e.deltaX+e.deltaY*e.deltaY);const i=Math.atan2(e.deltaY,e.deltaX);return-.25*Math.PI<i&&i<.75*Math.PI&&(t=-t),0===e.deltaMode?t/=900:1===e.deltaMode&&(t/=30),t},t.waitOnEventOrTimeout=function(e){let{target:t,name:i,delay:n=0}=e;return new Promise((function(e,s){if("object"!==typeof t||!i||"string"!==typeof i||!(Number.isInteger(n)&&n>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function r(n){t instanceof c?t._off(i,a):t.removeEventListener(i,a),l&&clearTimeout(l),e(n)}const a=r.bind(null,h.EVENT);t instanceof c?t._on(i,a):t.addEventListener(i,a);const o=r.bind(null,h.TIMEOUT),l=setTimeout(o,n)}))},t.moveToEndOfArray=function(e,t){const i=[],n=e.length;let s=0;for(let r=0;r<n;++r)t(e[r])?i.push(e[r]):(e[s]=e[r],++s);for(let r=0;s<n;++r,++s)e[s]=i[r]},t.WaitOnType=t.animationStarted=t.ProgressBar=t.EventBus=t.NullL10n=t.SpreadMode=t.ScrollMode=t.TextLayerMode=t.RendererType=t.PresentationModeState=t.VERTICAL_PADDING=t.SCROLLBAR_PADDING=t.MAX_AUTO_SCALE=t.UNKNOWN_SCALE=t.MAX_SCALE=t.MIN_SCALE=t.DEFAULT_SCALE=t.DEFAULT_SCALE_VALUE=t.CSS_UNITS=t.AutoPrintRegExp=void 0,t.CSS_UNITS=96/72,t.DEFAULT_SCALE_VALUE="auto",t.DEFAULT_SCALE=1,t.MIN_SCALE=.1,t.MAX_SCALE=10,t.UNKNOWN_SCALE=0,t.MAX_AUTO_SCALE=1.25,t.SCROLLBAR_PADDING=40,t.VERTICAL_PADDING=5,t.PresentationModeState={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3},t.RendererType={CANVAS:"canvas",SVG:"svg"},t.TextLayerMode={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2};const n={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2};t.ScrollMode=n;const s={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};t.SpreadMode=s,t.AutoPrintRegExp=/\bprint\s*\(/;const r={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",get:async(e,t,i)=>function(e,t){return t?e.replace(/\{\{\s*(\w+)\s*\}\}/g,((e,i)=>i in t?t[i]:"{{"+i+"}}")):e}(i,t),async translate(e){}};function a(e,t){let i=0,n=e.length-1;if(n<0||!t(e[n]))return e.length;if(t(e[i]))return i;for(;i<n;){const s=i+n>>1;t(e[s])?n=s:i=s+1}return i}function o(e,t,i){if(e<2)return e;let n=t[e].div,s=n.offsetTop+n.clientTop;s>=i&&(n=t[e-1].div,s=n.offsetTop+n.clientTop);for(let r=e-2;r>=0&&(n=t[r].div,!(n.offsetTop+n.clientTop+n.clientHeight<=s));--r)e=r;return e}t.NullL10n=r;const h={EVENT:"event",TIMEOUT:"timeout"};t.WaitOnType=h;const l=new Promise((function(e){window.requestAnimationFrame(e)}));t.animationStarted=l;class c{constructor(e){this._listeners=Object.create(null)}on(e,t){this._on(e,t,{external:!0})}off(e,t){this._off(e,t,{external:!0})}dispatch(e){const t=this._listeners[e];if(!t||0===t.length)return;const i=Array.prototype.slice.call(arguments,1);let n;t.slice(0).forEach((function(e){let{listener:t,external:s}=e;if(s)return n||(n=[]),void n.push(t);t.apply(null,i)})),n&&(n.forEach((function(e){e.apply(null,i)})),n=null)}_on(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this._listeners[e];n||(this._listeners[e]=n=[]),n.push({listener:t,external:!0===(i&&i.external)})}_off(e,t){const i=this._listeners[e];if(i)for(let n=0,s=i.length;n<s;n++)if(i[n].listener===t)return void i.splice(n,1)}}function u(e,t,i){return Math.min(Math.max(e,t),i)}t.EventBus=c,t.ProgressBar=class{constructor(e){let{height:t,width:i,units:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.visible=!0,this.div=document.querySelector(e+" .progress"),this.bar=this.div.parentNode,this.height=t||100,this.width=i||100,this.units=n||"%",this.div.style.height=this.height+this.units,this.percent=0}_updateBar(){if(this._indeterminate)return this.div.classList.add("indeterminate"),void(this.div.style.width=this.width+this.units);this.div.classList.remove("indeterminate");const e=this.width*this._percent/100;this.div.style.width=e+this.units}get percent(){return this._percent}set percent(e){this._indeterminate=isNaN(e),this._percent=u(e,0,100),this._updateBar()}setWidth(e){if(!e)return;const t=e.parentNode.offsetWidth-e.offsetWidth;t>0&&(this.bar.style.width="calc(100% - ".concat(t,"px)"))}hide(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"),document.body.classList.remove("loadingInProgress"))}show(){this.visible||(this.visible=!0,document.body.classList.add("loadingInProgress"),this.bar.classList.remove("hidden"))}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleLinkService=t.PDFLinkService=void 0;var n=i(3);t.PDFLinkService=class{constructor(){let{eventBus:e,externalLinkTarget:t=null,externalLinkRel:i=null,externalLinkEnabled:n=!0,ignoreDestinationZoom:s=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.eventBus=e,this.externalLinkTarget=t,this.externalLinkRel=i,this.externalLinkEnabled=n,this._ignoreDestinationZoom=s,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null,this._pagesRefCache=null}setDocument(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.baseUrl=t,this.pdfDocument=e,this._pagesRefCache=Object.create(null)}setViewer(e){this.pdfViewer=e}setHistory(e){this.pdfHistory=e}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfViewer.currentPageNumber}set page(e){this.pdfViewer.currentPageNumber=e}get rotation(){return this.pdfViewer.pagesRotation}set rotation(e){this.pdfViewer.pagesRotation=e}navigateTo(e){const t=i=>{let{namedDest:n,explicitDest:s}=i;const r=s[0];let a;if(r instanceof Object){if(a=this._cachedPageNumber(r),null===a)return void this.pdfDocument.getPageIndex(r).then((e=>{this.cachePageRef(e+1,r),t({namedDest:n,explicitDest:s})})).catch((()=>{console.error('PDFLinkService.navigateTo: "'.concat(r,'" is not ')+'a valid page reference, for dest="'.concat(e,'".'))}))}else{if(!Number.isInteger(r))return void console.error('PDFLinkService.navigateTo: "'.concat(r,'" is not ')+'a valid destination reference, for dest="'.concat(e,'".'));a=r+1}!a||a<1||a>this.pagesCount?console.error('PDFLinkService.navigateTo: "'.concat(a,'" is not ')+'a valid page number, for dest="'.concat(e,'".')):(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:n,explicitDest:s,pageNumber:a})),this.pdfViewer.scrollPageIntoView({pageNumber:a,destArray:s,ignoreDestinationZoom:this._ignoreDestinationZoom}))};new Promise(((t,i)=>{"string"!==typeof e?t({namedDest:"",explicitDest:e}):this.pdfDocument.getDestination(e).then((i=>{t({namedDest:e,explicitDest:i})}))})).then((i=>{Array.isArray(i.explicitDest)?t(i):console.error('PDFLinkService.navigateTo: "'.concat(i.explicitDest,'" is')+' not a valid destination array, for dest="'.concat(e,'".'))}))}getDestinationHash(e){if("string"===typeof e)return this.getAnchorUrl("#"+escape(e));if(Array.isArray(e)){const t=JSON.stringify(e);return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}getAnchorUrl(e){return(this.baseUrl||"")+e}setHash(e){let t,i;if(e.includes("=")){const s=(0,n.parseQueryString)(e);if("search"in s&&this.eventBus.dispatch("findfromurlhash",{source:this,query:s.search.replace(/"/g,""),phraseSearch:"true"===s.phrase}),"page"in s&&(t=0|s.page||1),"zoom"in s){const e=s.zoom.split(","),t=e[0],n=parseFloat(t);t.includes("Fit")?"Fit"===t||"FitB"===t?i=[null,{name:t}]:"FitH"===t||"FitBH"===t||"FitV"===t||"FitBV"===t?i=[null,{name:t},e.length>1?0|e[1]:null]:"FitR"===t?5!==e.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):i=[null,{name:t},0|e[1],0|e[2],0|e[3],0|e[4]]:console.error('PDFLinkService.setHash: "'.concat(t,'" is not ')+"a valid zoom value."):i=[null,{name:"XYZ"},e.length>1?0|e[1]:null,e.length>2?0|e[2]:null,n?n/100:t]}i?this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:i,allowNegativeOffset:!0}):t&&(this.page=t),"pagemode"in s&&this.eventBus.dispatch("pagemode",{source:this,mode:s.pagemode}),"nameddest"in s&&this.navigateTo(s.nameddest)}else{i=unescape(e);try{i=JSON.parse(i),Array.isArray(i)||(i=i.toString())}catch(s){}if("string"===typeof i||function(e){if(!Array.isArray(e))return!1;const t=e.length;if(t<2)return!1;const i=e[0];if(("object"!==typeof i||!Number.isInteger(i.num)||!Number.isInteger(i.gen))&&!(Number.isInteger(i)&&i>=0))return!1;const n=e[1];if("object"!==typeof n||"string"!==typeof n.name)return!1;let s=!0;switch(n.name){case"XYZ":if(5!==t)return!1;break;case"Fit":case"FitB":return 2===t;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==t)return!1;break;case"FitR":if(6!==t)return!1;s=!1;break;default:return!1}for(let r=2;r<t;r++){const t=e[r];if(!("number"===typeof t||s&&null===t))return!1}return!0}(i))return void this.navigateTo(i);console.error('PDFLinkService.setHash: "'.concat(unescape(e),'" is not ')+"a valid destination.")}}executeNamedAction(e){switch(e){case"GoBack":this.pdfHistory&&this.pdfHistory.back();break;case"GoForward":this.pdfHistory&&this.pdfHistory.forward();break;case"NextPage":this.page<this.pagesCount&&this.page++;break;case"PrevPage":this.page>1&&this.page--;break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}this.eventBus.dispatch("namedaction",{source:this,action:e})}cachePageRef(e,t){if(!t)return;const i=0===t.gen?"".concat(t.num,"R"):"".concat(t.num,"R").concat(t.gen);this._pagesRefCache[i]=e}_cachedPageNumber(e){const t=0===e.gen?"".concat(e.num,"R"):"".concat(e.num,"R").concat(e.gen);return this._pagesRefCache&&this._pagesRefCache[t]||null}isPageVisible(e){return this.pdfViewer.isPageVisible(e)}},t.SimpleLinkService=class{constructor(){this.externalLinkTarget=null,this.externalLinkRel=null,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=!1}get pagesCount(){return 0}get page(){return 0}set page(e){}get rotation(){return 0}set rotation(e){}navigateTo(e){}getDestinationHash(e){return"#"}getAnchorUrl(e){return"#"}setHash(e){}executeNamedAction(e){}cachePageRef(e,t){}isPageVisible(e){return!0}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultTextLayerFactory=t.TextLayerBuilder=void 0;var n=i(2);class s{constructor(e){let{textLayerDiv:t,eventBus:i,pageIndex:n,viewport:s,findController:r=null,enhanceTextSelection:a=!1}=e;this.textLayerDiv=t,this.eventBus=i,this.textContent=null,this.textContentItemsStr=[],this.textContentStream=null,this.renderingDone=!1,this.pageIdx=n,this.pageNumber=this.pageIdx+1,this.matches=[],this.viewport=s,this.textDivs=[],this.findController=r,this.textLayerRenderTask=null,this.enhanceTextSelection=a,this._onUpdateTextLayerMatches=null,this._bindMouse()}_finishRendering(){if(this.renderingDone=!0,!this.enhanceTextSelection){const e=document.createElement("div");e.className="endOfContent",this.textLayerDiv.appendChild(e)}this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.pageNumber,numTextDivs:this.textDivs.length})}render(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!this.textContent&&!this.textContentStream||this.renderingDone)return;this.cancel(),this.textDivs=[];const t=document.createDocumentFragment();this.textLayerRenderTask=(0,n.renderTextLayer)({textContent:this.textContent,textContentStream:this.textContentStream,container:t,viewport:this.viewport,textDivs:this.textDivs,textContentItemsStr:this.textContentItemsStr,timeout:e,enhanceTextSelection:this.enhanceTextSelection}),this.textLayerRenderTask.promise.then((()=>{this.textLayerDiv.appendChild(t),this._finishRendering(),this._updateMatches()}),(function(e){})),this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=e=>{e.pageIndex!==this.pageIdx&&-1!==e.pageIndex||this._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches))}cancel(){this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),this._onUpdateTextLayerMatches&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null)}setTextContentStream(e){this.cancel(),this.textContentStream=e}setTextContent(e){this.cancel(),this.textContent=e}_convertMatches(e,t){if(!e)return[];const{findController:i,textContentItemsStr:n}=this;let s=0,r=0;const a=n.length-1,o=i.state.query.length,h=[];for(let l=0,c=e.length;l<c;l++){let i=e[l];for(;s!==a&&i>=r+n[s].length;)r+=n[s].length,s++;s===n.length&&console.error("Could not find a matching mapping");const c={begin:{divIdx:s,offset:i-r}};for(i+=t?t[l]:o;s!==a&&i>r+n[s].length;)r+=n[s].length,s++;c.end={divIdx:s,offset:i-r},h.push(c)}return h}_renderMatches(e){if(0===e.length)return;const{findController:t,pageIdx:i,textContentItemsStr:n,textDivs:s}=this,r=i===t.selected.pageIdx,a=t.selected.matchIdx;let o=null;const h={divIdx:-1,offset:void 0};function l(e,t){const i=e.divIdx;s[i].textContent="",c(i,0,e.offset,t)}function c(e,t,i,r){const a=s[e],o=n[e].substring(t,i),h=document.createTextNode(o);if(r){const e=document.createElement("span");return e.className=r,e.appendChild(h),void a.appendChild(e)}a.appendChild(h)}let u=a,d=u+1;if(t.state.highlightAll)u=0,d=e.length;else if(!r)return;for(let g=u;g<d;g++){const n=e[g],u=n.begin,d=n.end,p=r&&g===a,f=p?" selected":"";if(p&&t.scrollMatchIntoView({element:s[u.divIdx],pageIndex:i,matchIndex:a}),o&&u.divIdx===o.divIdx?c(o.divIdx,o.offset,u.offset):(null!==o&&c(o.divIdx,o.offset,h.offset),l(u)),u.divIdx===d.divIdx)c(u.divIdx,u.offset,d.offset,"highlight"+f);else{c(u.divIdx,u.offset,h.offset,"highlight begin"+f);for(let e=u.divIdx+1,t=d.divIdx;e<t;e++)s[e].className="highlight middle"+f;l(d,"highlight end"+f)}o=d}o&&c(o.divIdx,o.offset,h.offset)}_updateMatches(){if(!this.renderingDone)return;const{findController:e,matches:t,pageIdx:i,textContentItemsStr:n,textDivs:s}=this;let r=-1;for(let h=0,l=t.length;h<l;h++){const e=t[h];for(let t=Math.max(r,e.begin.divIdx),i=e.end.divIdx;t<=i;t++){const e=s[t];e.textContent=n[t],e.className=""}r=e.end.divIdx+1}if(!e||!e.highlightMatches)return;const a=e.pageMatches[i]||null,o=e.pageMatchesLength[i]||null;this.matches=this._convertMatches(a,o),this._renderMatches(this.matches)}_bindMouse(){const e=this.textLayerDiv;let t=null;e.addEventListener("mousedown",(i=>{if(this.enhanceTextSelection&&this.textLayerRenderTask)return this.textLayerRenderTask.expandTextDivs(!0),void(t&&(clearTimeout(t),t=null));const n=e.querySelector(".endOfContent");if(!n)return;let s=i.target!==e;if(s=s&&"none"!==window.getComputedStyle(n).getPropertyValue("-moz-user-select"),s){const t=e.getBoundingClientRect(),s=Math.max(0,(i.pageY-t.top)/t.height);n.style.top=(100*s).toFixed(2)+"%"}n.classList.add("active")})),e.addEventListener("mouseup",(()=>{if(this.enhanceTextSelection&&this.textLayerRenderTask)return void(t=setTimeout((()=>{this.textLayerRenderTask&&this.textLayerRenderTask.expandTextDivs(!1),t=null}),300));const i=e.querySelector(".endOfContent");i&&(i.style.top="",i.classList.remove("active"))}))}}t.TextLayerBuilder=s,t.DefaultTextLayerFactory=class{createTextLayerBuilder(e,t,i){return new s({textLayerDiv:e,pageIndex:t,viewport:i,enhanceTextSelection:arguments.length>3&&void 0!==arguments[3]&&arguments[3],eventBus:arguments.length>4?arguments[4]:void 0})}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadManager=void 0;var n=i(2);const s=i(7).viewerCompatibilityParams.disableCreateObjectURL||!1;function r(e,t){const i=document.createElement("a");if(!i.click)throw new Error('DownloadManager: "a.click()" is not supported.');i.href=e,i.target="_parent","download"in i&&(i.download=t),(document.body||document.documentElement).appendChild(i),i.click(),i.remove()}t.DownloadManager=class{constructor(e){let{disableCreateObjectURL:t=s}=e;this.disableCreateObjectURL=t}downloadUrl(e,t){(0,n.createValidAbsoluteUrl)(e,"http://example.com")&&r(e+"#pdfjs.action=download",t)}downloadData(e,t,i){navigator.msSaveBlob?navigator.msSaveBlob(new Blob([e],{type:i}),t):r((0,n.createObjectURL)(e,i,this.disableCreateObjectURL),t)}download(e,t,i){navigator.msSaveBlob?navigator.msSaveBlob(e,i)||this.downloadUrl(t,i):this.disableCreateObjectURL?this.downloadUrl(t,i):r(URL.createObjectURL(e),i)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.viewerCompatibilityParams=void 0;const n=Object.create(null);{const e="undefined"!==typeof navigator&&navigator.userAgent||"",t="undefined"!==typeof navigator&&navigator.platform||"",i="undefined"!==typeof navigator&&navigator.maxTouchPoints||1,s=/Android/.test(e),r=/Trident/.test(e),a=/\b(iPad|iPhone|iPod)(?=;)/.test(e)||"MacIntel"===t&&i>1,o=/CriOS/.test(e);(r||o)&&(n.disableCreateObjectURL=!0),(a||s)&&(n.maxCanvasPixels=5242880)}const s=Object.freeze(n);t.viewerCompatibilityParams=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericL10n=void 0,i(9);const n=document.webL10n;t.GenericL10n=class{constructor(e){this._lang=e,this._ready=new Promise(((t,i)=>{n.setLanguage(e,(()=>{t(n)}))}))}async getLanguage(){return(await this._ready).getLanguage()}async getDirection(){return(await this._ready).getDirection()}async get(e,t,i){return(await this._ready).get(e,t,i)}async translate(e){return(await this._ready).translate(e)}}},function(e,t,i){"use strict";document.webL10n=function(e,t,i){var n={},s="",r="textContent",a="",o={},h="loading",l=!0;function c(e,t,i){t=t||function(e){},i=i||function(){};var n=new XMLHttpRequest;n.open("GET",e,l),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=utf-8"),n.onreadystatechange=function(){4==n.readyState&&(200==n.status||0===n.status?t(n.responseText):i())},n.onerror=i,n.ontimeout=i;try{n.send(null)}catch(s){i()}}function u(e,t,i,a){var o=e.replace(/[^\/]*$/,"")||"./";function h(e){return e.lastIndexOf("\\")<0?e:e.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}c(e,(function(e){s+=e,function(e,i){var n={},s=/^\s*|\s*$/,r=/^\s*#|^\s*$/,a=/^\s*\[(.*)\]\s*$/,l=/^\s*@import\s+url\((.*)\)\s*$/i,u=/^([^=\s]*)\s*=\s*(.+)$/;function d(e,i,c){var d=e.replace(s,"").split(/[\r\n]+/),p="*",f=t.split("-",1)[0],_=!1,m="";!function e(){for(;;){if(!d.length)return void c();var s=d.shift();if(!r.test(s)){if(i){if(m=a.exec(s)){p=m[1].toLowerCase(),_="*"!==p&&p!==t&&p!==f;continue}if(_)continue;if(m=l.exec(s))return void g(o+m[1],e)}var v=s.match(u);v&&3==v.length&&(n[v[1]]=h(v[2]))}}}()}function g(e,t){c(e,(function(e){d(e,!1,t)}),(function(){console.warn(e+" not found."),t()}))}d(e,!0,(function(){i(n)}))}(e,(function(e){for(var t in e){var s,a,o=t.lastIndexOf(".");o>0?(s=t.substring(0,o),a=t.substring(o+1)):(s=t,a=r),n[s]||(n[s]={}),n[s][a]=e[t]}i&&i()}))}),a)}function d(e,i){e&&(e=e.toLowerCase()),i=i||function(){},n={},s="",a="",a=e;var r=t.querySelectorAll('link[type="application/l10n"]'),o=r.length;if(0!==o){var l,c=0;l=function(){++c>=o&&(i(),h="complete")};for(var d=0;d<o;d++)new _(r[d]).load(e,l)}else{var g=function(){var e=t.querySelector('script[type="application/l10n"]');return e?JSON.parse(e.innerHTML):null}();if(g&&g.locales&&g.default_locale){if(console.log("using the embedded JSON directory, early way out"),!(n=g.locales[e])){var p=g.default_locale.toLowerCase();for(var f in g.locales){if((f=f.toLowerCase())===e){n=g.locales[e];break}f===p&&(n=g.locales[p])}}i()}else console.log("no resource to load, early way out");h="complete"}function _(e){var t=e.href;this.load=function(e,i){u(t,e,i,(function(){console.warn(t+" not found."),console.warn('"'+e+'" resource not found'),a="",i()}))}}}function g(e,t,i){var s=n[e];if(!s){if(console.warn("#"+e+" is undefined."),!i)return null;s=i}var r={};for(var a in s){var o=s[a];o=f(o=p(o,t,e,a),t,e),r[a]=o}return r}function p(e,t,i,s){var r=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/.exec(e);if(!r||!r.length)return e;var a,h=r[1],l=r[2];return t&&l in t?a=t[l]:l in n&&(a=n[l]),h in o&&(e=(0,o[h])(e,a,i,s)),e}function f(e,t,i){return e.replace(/\{\{\s*(.+?)\s*\}\}/g,(function(e,s){return t&&s in t?t[s]:s in n?n[s]:(console.log("argument {{"+s+"}} for #"+i+" is undefined."),e)}))}function _(e){var i=function(e){if(!e)return{};var t=e.getAttribute("data-l10n-id"),i=e.getAttribute("data-l10n-args"),n={};if(i)try{n=JSON.parse(i)}catch(s){console.warn("could not parse arguments for #"+t)}return{id:t,args:n}}(e);if(i.id){var n=g(i.id,i.args);if(n){if(n[r]){if(0===function(e){if(e.children)return e.children.length;if("undefined"!==typeof e.childElementCount)return e.childElementCount;for(var t=0,i=0;i<e.childNodes.length;i++)t+=1===e.nodeType?1:0;return t}(e))e[r]=n[r];else{for(var s=e.childNodes,a=!1,o=0,h=s.length;o<h;o++)3===s[o].nodeType&&/\S/.test(s[o].nodeValue)&&(a?s[o].nodeValue="":(s[o].nodeValue=n[r],a=!0));if(!a){var l=t.createTextNode(n[r]);e.insertBefore(l,e.firstChild)}}delete n[r]}for(var c in n)e[c]=n[c]}else console.warn("#"+i.id+" is undefined.")}}return o.plural=function(e,t,i,s){var h=parseFloat(t);if(isNaN(h))return e;if(s!=r)return e;o._pluralRules||(o._pluralRules=function(e){function t(e,t){return-1!==t.indexOf(e)}function i(e,t,i){return t<=e&&e<=i}var n={0:function(e){return"other"},1:function(e){return i(e%100,3,10)?"few":0===e?"zero":i(e%100,11,99)?"many":2==e?"two":1==e?"one":"other"},2:function(e){return 0!==e&&e%10===0?"many":2==e?"two":1==e?"one":"other"},3:function(e){return 1==e?"one":"other"},4:function(e){return i(e,0,1)?"one":"other"},5:function(e){return i(e,0,2)&&2!=e?"one":"other"},6:function(e){return 0===e?"zero":e%10==1&&e%100!=11?"one":"other"},7:function(e){return 2==e?"two":1==e?"one":"other"},8:function(e){return i(e,3,6)?"few":i(e,7,10)?"many":2==e?"two":1==e?"one":"other"},9:function(e){return 0===e||1!=e&&i(e%100,1,19)?"few":1==e?"one":"other"},10:function(e){return i(e%10,2,9)&&!i(e%100,11,19)?"few":e%10!=1||i(e%100,11,19)?"other":"one"},11:function(e){return i(e%10,2,4)&&!i(e%100,12,14)?"few":e%10===0||i(e%10,5,9)||i(e%100,11,14)?"many":e%10==1&&e%100!=11?"one":"other"},12:function(e){return i(e,2,4)?"few":1==e?"one":"other"},13:function(e){return i(e%10,2,4)&&!i(e%100,12,14)?"few":1!=e&&i(e%10,0,1)||i(e%10,5,9)||i(e%100,12,14)?"many":1==e?"one":"other"},14:function(e){return i(e%100,3,4)?"few":e%100==2?"two":e%100==1?"one":"other"},15:function(e){return 0===e||i(e%100,2,10)?"few":i(e%100,11,19)?"many":1==e?"one":"other"},16:function(e){return e%10==1&&11!=e?"one":"other"},17:function(e){return 3==e?"few":0===e?"zero":6==e?"many":2==e?"two":1==e?"one":"other"},18:function(e){return 0===e?"zero":i(e,0,2)&&0!==e&&2!=e?"one":"other"},19:function(e){return i(e,2,10)?"few":i(e,0,1)?"one":"other"},20:function(e){return!i(e%10,3,4)&&e%10!=9||i(e%100,10,19)||i(e%100,70,79)||i(e%100,90,99)?e%1e6===0&&0!==e?"many":e%10!=2||t(e%100,[12,72,92])?e%10!=1||t(e%100,[11,71,91])?"other":"one":"two":"few"},21:function(e){return 0===e?"zero":1==e?"one":"other"},22:function(e){return i(e,0,1)||i(e,11,99)?"one":"other"},23:function(e){return i(e%10,1,2)||e%20===0?"one":"other"},24:function(e){return i(e,3,10)||i(e,13,19)?"few":t(e,[2,12])?"two":t(e,[1,11])?"one":"other"}},s={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3}[e.replace(/-.*$/,"")];return s in n?n[s]:(console.warn("plural form unknown for ["+e+"]"),function(){return"other"})}(a));var l="["+o._pluralRules(h)+"]";return 0===h&&i+"[zero]"in n?e=n[i+"[zero]"][s]:1==h&&i+"[one]"in n?e=n[i+"[one]"][s]:2==h&&i+"[two]"in n?e=n[i+"[two]"][s]:i+l in n?e=n[i+l][s]:i+"[other]"in n&&(e=n[i+"[other]"][s]),e},{get:function(e,t,i){var n,s=e.lastIndexOf("."),a=r;s>0&&(a=e.substring(s+1),e=e.substring(0,s)),i&&((n={})[a]=i);var o=g(e,t,n);return o&&a in o?o[a]:"{{"+e+"}}"},getData:function(){return n},getText:function(){return s},getLanguage:function(){return a},setLanguage:function(e,t){d(e,(function(){t&&t()}))},getDirection:function(){var e=a.split("-",1)[0];return["ar","he","fa","ps","ur"].indexOf(e)>=0?"rtl":"ltr"},translate:function(e){for(var i=function(e){return e?e.querySelectorAll("*[data-l10n-id]"):[]}(e=e||t.documentElement),n=i.length,s=0;s<n;s++)_(i[s]);_(e)},getReadyState:function(){return h},ready:function(i){i&&("complete"==h||"interactive"==h?e.setTimeout((function(){i()})):t.addEventListener&&t.addEventListener("localized",(function e(){t.removeEventListener("localized",e),i()})))}}}(window,document)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFindController=t.FindState=void 0;var n=i(2),s=i(11),r=i(3);const a={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3};t.FindState=a;const o={"\u2018":"'","\u2019":"'","\u201a":"'","\u201b":"'","\u201c":'"',"\u201d":'"',"\u201e":'"',"\u201f":'"',"\xbc":"1/4","\xbd":"1/2","\xbe":"3/4"};let h=null;function l(e){if(!h){const e=Object.keys(o).join("");h=new RegExp("[".concat(e,"]"),"g")}return e.replace(h,(function(e){return o[e]}))}t.PDFFindController=class{constructor(e){let{linkService:t,eventBus:i}=e;this._linkService=t,this._eventBus=i,this._reset(),i._on("findbarclose",this._onFindBarClose.bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return this._state}setDocument(e){this._pdfDocument&&this._reset(),e&&(this._pdfDocument=e,this._firstPageCapability.resolve())}executeCommand(e,t){if(!t)return;const i=this._pdfDocument;(null===this._state||this._shouldDirtyMatch(e,t))&&(this._dirtyMatch=!0),this._state=t,"findhighlightallchange"!==e&&this._updateUIState(a.PENDING),this._firstPageCapability.promise.then((()=>{if(!this._pdfDocument||i&&this._pdfDocument!==i)return;this._extractText();const t=!this._highlightMatches,n=!!this._findTimeout;this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),"find"===e?this._findTimeout=setTimeout((()=>{this._nextMatch(),this._findTimeout=null}),250):this._dirtyMatch?this._nextMatch():"findagain"===e?(this._nextMatch(),t&&this._state.highlightAll&&this._updateAllPages()):"findhighlightallchange"===e?(n?this._nextMatch():this._highlightMatches=!0,this._updateAllPages()):this._nextMatch()}))}scrollMatchIntoView(e){let{element:t=null,pageIndex:i=-1,matchIndex:n=-1}=e;if(!this._scrollMatches||!t)return;if(-1===n||n!==this._selected.matchIdx)return;if(-1===i||i!==this._selected.pageIdx)return;this._scrollMatches=!1;const s={top:-50,left:-400};(0,r.scrollIntoView)(t,s,!0)}_reset(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],this._state=null,this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=Object.create(null),this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=(0,n.createPromiseCapability)()}get _query(){return this._state.query!==this._rawQuery&&(this._rawQuery=this._state.query,this._normalizedQuery=l(this._state.query)),this._normalizedQuery}_shouldDirtyMatch(e,t){if(t.query!==this._state.query)return!0;switch(e){case"findagain":const e=this._selected.pageIdx+1,t=this._linkService;return e>=1&&e<=t.pagesCount&&e!==t.page&&!t.isPageVisible(e);case"findhighlightallchange":return!1}return!0}_prepareMatches(e,t,i){function n(t){const i=e[t],n=e[t+1];if(t<e.length-1&&i.match===n.match)return i.skipped=!0,!0;for(let s=t-1;s>=0;s--){const t=e[s];if(!t.skipped){if(t.match+t.matchLength<i.match)break;if(t.match+t.matchLength>=i.match+i.matchLength)return i.skipped=!0,!0}}return!1}e.sort((function(e,t){return e.match===t.match?e.matchLength-t.matchLength:e.match-t.match}));for(let s=0,r=e.length;s<r;s++)n(s)||(t.push(e[s].match),i.push(e[s].matchLength))}_isEntireWord(e,t,i){if(t>0){const i=e.charCodeAt(t),n=e.charCodeAt(t-1);if((0,s.getCharacterType)(i)===(0,s.getCharacterType)(n))return!1}const n=t+i-1;if(n<e.length-1){const t=e.charCodeAt(n),i=e.charCodeAt(n+1);if((0,s.getCharacterType)(t)===(0,s.getCharacterType)(i))return!1}return!0}_calculatePhraseMatch(e,t,i,n){const s=[],r=e.length;let a=-r;for(;a=i.indexOf(e,a+r),-1!==a;)n&&!this._isEntireWord(i,a,r)||s.push(a);this._pageMatches[t]=s}_calculateWordMatch(e,t,i,n){const s=[],r=e.match(/\S+/g);for(let a=0,o=r.length;a<o;a++){const e=r[a],t=e.length;let o=-t;for(;o=i.indexOf(e,o+t),-1!==o;)n&&!this._isEntireWord(i,o,t)||s.push({match:o,matchLength:t,skipped:!1})}this._pageMatchesLength[t]=[],this._pageMatches[t]=[],this._prepareMatches(s,this._pageMatches[t],this._pageMatchesLength[t])}_calculateMatch(e){let t=this._pageContents[e],i=this._query;const{caseSensitive:n,entireWord:s,phraseSearch:r}=this._state;if(0===i.length)return;n||(t=t.toLowerCase(),i=i.toLowerCase()),r?this._calculatePhraseMatch(i,e,t,s):this._calculateWordMatch(i,e,t,s),this._state.highlightAll&&this._updatePage(e),this._resumePageIdx===e&&(this._resumePageIdx=null,this._nextPageMatch());const a=this._pageMatches[e].length;a>0&&(this._matchesCountTotal+=a,this._updateUIResultsCount())}_extractText(){if(this._extractTextPromises.length>0)return;let e=Promise.resolve();for(let t=0,i=this._linkService.pagesCount;t<i;t++){const i=(0,n.createPromiseCapability)();this._extractTextPromises[t]=i.promise,e=e.then((()=>this._pdfDocument.getPage(t+1).then((e=>e.getTextContent({normalizeWhitespace:!0}))).then((e=>{const n=e.items,s=[];for(let t=0,i=n.length;t<i;t++)s.push(n[t].str);this._pageContents[t]=l(s.join("")),i.resolve(t)}),(e=>{console.error("Unable to get text content for page ".concat(t+1),e),this._pageContents[t]="",i.resolve(t)}))))}}_updatePage(e){this._scrollMatches&&this._selected.pageIdx===e&&(this._linkService.page=e+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:e})}_updateAllPages(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}_nextMatch(){const e=this._state.findPrevious,t=this._linkService.page-1,i=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=t,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,this._matchesCountTotal=0,this._updateAllPages();for(let e=0;e<i;e++)!0!==this._pendingFindMatches[e]&&(this._pendingFindMatches[e]=!0,this._extractTextPromises[e].then((e=>{delete this._pendingFindMatches[e],this._calculateMatch(e)})))}if(""===this._query)return void this._updateUIState(a.FOUND);if(this._resumePageIdx)return;const n=this._offset;if(this._pagesToSearch=i,null!==n.matchIdx){const t=this._pageMatches[n.pageIdx].length;if(!e&&n.matchIdx+1<t||e&&n.matchIdx>0)return n.matchIdx=e?n.matchIdx-1:n.matchIdx+1,void this._updateMatch(!0);this._advanceOffsetPage(e)}this._nextPageMatch()}_matchesReady(e){const t=this._offset,i=e.length,n=this._state.findPrevious;return i?(t.matchIdx=n?i-1:0,this._updateMatch(!0),!0):(this._advanceOffsetPage(n),!!(t.wrapped&&(t.matchIdx=null,this._pagesToSearch<0))&&(this._updateMatch(!1),!0))}_nextPageMatch(){null!==this._resumePageIdx&&console.error("There can only be one pending page.");let e=null;do{const t=this._offset.pageIdx;if(e=this._pageMatches[t],!e){this._resumePageIdx=t;break}}while(!this._matchesReady(e))}_advanceOffsetPage(e){const t=this._offset,i=this._linkService.pagesCount;t.pageIdx=e?t.pageIdx-1:t.pageIdx+1,t.matchIdx=null,this._pagesToSearch--,(t.pageIdx>=i||t.pageIdx<0)&&(t.pageIdx=e?i-1:0,t.wrapped=!0)}_updateMatch(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=a.NOT_FOUND;const i=this._offset.wrapped;if(this._offset.wrapped=!1,e){const e=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,t=i?a.WRAPPED:a.FOUND,-1!==e&&e!==this._selected.pageIdx&&this._updatePage(e)}this._updateUIState(t,this._state.findPrevious),-1!==this._selected.pageIdx&&(this._scrollMatches=!0,this._updatePage(this._selected.pageIdx))}_onFindBarClose(e){const t=this._pdfDocument;this._firstPageCapability.promise.then((()=>{!this._pdfDocument||t&&this._pdfDocument!==t||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),this._updateUIState(a.FOUND),this._highlightMatches=!1,this._updateAllPages())}))}_requestMatchesCount(){const{pageIdx:e,matchIdx:t}=this._selected;let i=0,n=this._matchesCountTotal;if(-1!==t){for(let t=0;t<e;t++)i+=this._pageMatches[t]&&this._pageMatches[t].length||0;i+=t+1}return(i<1||i>n)&&(i=n=0),{current:i,total:n}}_updateUIResultsCount(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:this._requestMatchesCount()})}_updateUIState(e,t){this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:e,previous:t,matchesCount:this._requestMatchesCount()})}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCharacterType=function(e){return function(e){return e<11904}(e)?function(e){return 0===(65408&e)}(e)?function(e){return 32===e||9===e||13===e||10===e}(e)?n.SPACE:function(e){return e>=97&&e<=122||e>=65&&e<=90}(e)||function(e){return e>=48&&e<=57}(e)||95===e?n.ALPHA_LETTER:n.PUNCT:function(e){return 3584===(65408&e)}(e)?n.THAI_LETTER:160===e?n.SPACE:n.ALPHA_LETTER:function(e){return e>=13312&&e<=40959||e>=63744&&e<=64255}(e)?n.HAN_LETTER:function(e){return e>=12448&&e<=12543}(e)?n.KATAKANA_LETTER:function(e){return e>=12352&&e<=12447}(e)?n.HIRAGANA_LETTER:function(e){return e>=65376&&e<=65439}(e)?n.HALFWIDTH_KATAKANA_LETTER:n.ALPHA_LETTER},t.CharacterType=void 0;const n={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};t.CharacterType=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDestHashesEqual=r,t.isDestArraysEqual=a,t.PDFHistory=void 0;var n=i(3);function s(){return document.location.hash}function r(e,t){if("string"!==typeof e||"string"!==typeof t)return!1;if(e===t)return!0;const{nameddest:i}=(0,n.parseQueryString)(e);return i===t}function a(e,t){function i(e,t){if(typeof e!==typeof t)return!1;if(Array.isArray(e)||Array.isArray(t))return!1;if(null!==e&&"object"===typeof e&&null!==t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!i(e[n],t[n]))return!1;return!0}return e===t||Number.isNaN(e)&&Number.isNaN(t)}if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(let n=0,s=e.length;n<s;n++)if(!i(e[n],t[n]))return!1;return!0}t.PDFHistory=class{constructor(e){let{linkService:t,eventBus:i}=e;this.linkService=t,this.eventBus=i,this._initialized=!1,this._fingerprint="",this.reset(),this._boundEvents=null,this._isViewerInPresentationMode=!1,this.eventBus._on("presentationmodechanged",(e=>{this._isViewerInPresentationMode=e.active||e.switchInProgress})),this.eventBus._on("pagesinit",(()=>{this._isPagesLoaded=!1;const e=t=>{this.eventBus._off("pagesloaded",e),this._isPagesLoaded=!!t.pagesCount};this.eventBus._on("pagesloaded",e)}))}initialize(e){let{fingerprint:t,resetHistory:i=!1,updateUrl:n=!1}=e;if(!t||"string"!==typeof t)return void console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');this._initialized&&this.reset();const r=""!==this._fingerprint&&this._fingerprint!==t;this._fingerprint=t,this._updateUrl=!0===n,this._initialized=!0,this._bindEvents();const a=window.history.state;if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=s(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this._isValidState(a,!0)||i){const{hash:e,page:t,rotation:n}=this._parseCurrentHash(!0);return!e||r||i?void this._pushOrReplaceState(null,!0):void this._pushOrReplaceState({hash:e,page:t,rotation:n},!0)}const o=a.destination;this._updateInternalState(o,a.uid,!0),this._uid>this._maxUid&&(this._maxUid=this._uid),void 0!==o.rotation&&(this._initialRotation=o.rotation),o.dest?(this._initialBookmark=JSON.stringify(o.dest),this._destination.page=null):o.hash?this._initialBookmark=o.hash:o.page&&(this._initialBookmark="page=".concat(o.page))}reset(){this._initialized&&(this._pageHide(),this._initialized=!1,this._unbindEvents()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}push(e){let{namedDest:t=null,explicitDest:i,pageNumber:n}=e;if(!this._initialized)return;if(t&&"string"!==typeof t)return void console.error("PDFHistory.push: "+'"'.concat(t,'" is not a valid namedDest parameter.'));if(!Array.isArray(i))return void console.error("PDFHistory.push: "+'"'.concat(i,'" is not a valid explicitDest parameter.'));if(!(Number.isInteger(n)&&n>0&&n<=this.linkService.pagesCount)&&(null!==n||this._destination))return void console.error("PDFHistory.push: "+'"'.concat(n,'" is not a valid pageNumber parameter.'));const s=t||JSON.stringify(i);if(!s)return;let o=!1;if(this._destination&&(r(this._destination.hash,s)||a(this._destination.dest,i))){if(this._destination.page)return;o=!0}this._popStateInProgress&&!o||(this._pushOrReplaceState({dest:i,hash:s,page:n,rotation:this.linkService.rotation},o),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then((()=>{this._popStateInProgress=!1}))))}pushCurrentPosition(){this._initialized&&!this._popStateInProgress&&this._tryPushCurrentPosition()}back(){if(!this._initialized||this._popStateInProgress)return;const e=window.history.state;this._isValidState(e)&&e.uid>0&&window.history.back()}forward(){if(!this._initialized||this._popStateInProgress)return;const e=window.history.state;this._isValidState(e)&&e.uid<this._maxUid&&window.history.forward()}get popStateInProgress(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}_pushOrReplaceState(e){const t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]||!this._destination,i={fingerprint:this._fingerprint,uid:t?this._uid:this._uid+1,destination:e};let n;if(this._updateInternalState(e,i.uid),this._updateUrl&&e&&e.hash){const t=document.location.href.split("#")[0];t.startsWith("file://")||(n="".concat(t,"#").concat(e.hash))}t?window.history.replaceState(i,"",n):(this._maxUid=this._uid,window.history.pushState(i,"",n))}_tryPushCurrentPosition(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._position)return;let t=this._position;if(e&&(t=Object.assign(Object.create(null),this._position),t.temporary=!0),!this._destination)return void this._pushOrReplaceState(t);if(this._destination.temporary)return void this._pushOrReplaceState(t,!0);if(this._destination.hash===t.hash)return;if(!this._destination.page&&this._numPositionUpdates<=50)return;let i=!1;if(this._destination.page>=t.first&&this._destination.page<=t.page){if(this._destination.dest||!this._destination.first)return;i=!0}this._pushOrReplaceState(t,i)}_isValidState(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return!1;if(e.fingerprint!==this._fingerprint){if(!t)return!1;{if("string"!==typeof e.fingerprint||e.fingerprint.length!==this._fingerprint.length)return!1;const[t]=performance.getEntriesByType("navigation");if(!t||"reload"!==t.type)return!1}}return!(!Number.isInteger(e.uid)||e.uid<0)&&null!==e.destination&&"object"===typeof e.destination}_updateInternalState(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),i&&e&&e.temporary&&delete e.temporary,this._destination=e,this._uid=t,this._numPositionUpdates=0}_parseCurrentHash(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=unescape(s()).substring(1),i=(0,n.parseQueryString)(t),r=i.nameddest||"";let a=0|i.page;return Number.isInteger(a)&&a>0&&a<=this.linkService.pagesCount&&!(e&&r.length>0)||(a=null),{hash:t,page:a,rotation:this.linkService.rotation}}_updateViewarea(e){let{location:t}=e;this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:this._isViewerInPresentationMode?"page=".concat(t.pageNumber):t.pdfOpenParams.substring(1),page:this.linkService.page,first:t.pageNumber,rotation:t.rotation},this._popStateInProgress||(this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,this._updateViewareaTimeout=setTimeout((()=>{this._popStateInProgress||this._tryPushCurrentPosition(!0),this._updateViewareaTimeout=null}),1e3))}_popState(e){let{state:t}=e;const i=s(),r=this._currentHash!==i;if(this._currentHash=i,!t){this._uid++;const{hash:e,page:t,rotation:i}=this._parseCurrentHash();return void this._pushOrReplaceState({hash:e,page:t,rotation:i},!0)}if(!this._isValidState(t))return;this._popStateInProgress=!0,r&&(this._blockHashChange++,(0,n.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:1e3}).then((()=>{this._blockHashChange--})));const a=t.destination;this._updateInternalState(a,t.uid,!0),this._uid>this._maxUid&&(this._maxUid=this._uid),(0,n.isValidRotation)(a.rotation)&&(this.linkService.rotation=a.rotation),a.dest?this.linkService.navigateTo(a.dest):a.hash?this.linkService.setHash(a.hash):a.page&&(this.linkService.page=a.page),Promise.resolve().then((()=>{this._popStateInProgress=!1}))}_pageHide(){this._destination&&!this._destination.temporary||this._tryPushCurrentPosition()}_bindEvents(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}_unbindEvents(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFPageView=void 0;var n=i(3),s=i(2),r=i(14);const a=i(7).viewerCompatibilityParams.maxCanvasPixels||16777216;t.PDFPageView=class{constructor(e){const t=e.container,i=e.defaultViewport;this.id=e.id,this.renderingId="page"+this.id,this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=e.scale||n.DEFAULT_SCALE,this.viewport=i,this.pdfPageRotate=i.rotation,this.hasRestrictedScaling=!1,this.textLayerMode=Number.isInteger(e.textLayerMode)?e.textLayerMode:n.TextLayerMode.ENABLE,this.imageResourcesPath=e.imageResourcesPath||"",this.renderInteractiveForms=e.renderInteractiveForms||!1,this.useOnlyCssZoom=e.useOnlyCssZoom||!1,this.maxCanvasPixels=e.maxCanvasPixels||a,this.eventBus=e.eventBus,this.renderingQueue=e.renderingQueue,this.textLayerFactory=e.textLayerFactory,this.annotationLayerFactory=e.annotationLayerFactory,this.renderer=e.renderer||n.RendererType.CANVAS,this.enableWebGL=e.enableWebGL||!1,this.l10n=e.l10n||n.NullL10n,this.paintTask=null,this.paintedViewportMap=new WeakMap,this.renderingState=r.RenderingStates.INITIAL,this.resume=null,this.error=null,this.annotationLayer=null,this.textLayer=null,this.zoomLayer=null;const s=document.createElement("div");s.className="page",s.style.width=Math.floor(this.viewport.width)+"px",s.style.height=Math.floor(this.viewport.height)+"px",s.setAttribute("data-page-number",this.id),this.div=s,t.appendChild(s)}setPdfPage(e){this.pdfPage=e,this.pdfPageRotate=e.rotate;const t=(this.rotation+this.pdfPageRotate)%360;this.viewport=e.getViewport({scale:this.scale*n.CSS_UNITS,rotation:t}),this.stats=e.stats,this.reset()}destroy(){this.reset(),this.pdfPage&&this.pdfPage.cleanup()}_resetZoomLayer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.zoomLayer)return;const t=this.zoomLayer.firstChild;this.paintedViewportMap.delete(t),t.width=0,t.height=0,e&&this.zoomLayer.remove(),this.zoomLayer=null}reset(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.cancelRendering(t),this.renderingState=r.RenderingStates.INITIAL;const i=this.div;i.style.width=Math.floor(this.viewport.width)+"px",i.style.height=Math.floor(this.viewport.height)+"px";const n=i.childNodes,s=e&&this.zoomLayer||null,a=t&&this.annotationLayer&&this.annotationLayer.div||null;for(let r=n.length-1;r>=0;r--){const e=n[r];s!==e&&a!==e&&i.removeChild(e)}i.removeAttribute("data-loaded"),a?this.annotationLayer.hide():this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null),s||(this.canvas&&(this.paintedViewportMap.delete(this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer()),this.svg&&(this.paintedViewportMap.delete(this.svg),delete this.svg),this.loadingIconDiv=document.createElement("div"),this.loadingIconDiv.className="loadingIcon",i.appendChild(this.loadingIconDiv)}update(e,t){this.scale=e||this.scale,"undefined"!==typeof t&&(this.rotation=t);const i=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*n.CSS_UNITS,rotation:i}),this.svg)return this.cssTransform(this.svg,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now()});let s=!1;if(this.canvas&&this.maxCanvasPixels>0){const e=this.outputScale;(Math.floor(this.viewport.width)*e.sx|0)*(Math.floor(this.viewport.height)*e.sy|0)>this.maxCanvasPixels&&(s=!0)}if(this.canvas){if(this.useOnlyCssZoom||this.hasRestrictedScaling&&s)return this.cssTransform(this.canvas,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now()});this.zoomLayer||this.canvas.hasAttribute("hidden")||(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform(this.zoomLayer.firstChild),this.reset(!0,!0)}cancelRendering(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.paintTask&&(this.paintTask.cancel(),this.paintTask=null),this.resume=null,this.textLayer&&(this.textLayer.cancel(),this.textLayer=null),!e&&this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null)}cssTransform(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this.viewport.width,n=this.viewport.height,s=this.div;e.style.width=e.parentNode.style.width=s.style.width=Math.floor(i)+"px",e.style.height=e.parentNode.style.height=s.style.height=Math.floor(n)+"px";const r=this.viewport.rotation-this.paintedViewportMap.get(e).rotation,a=Math.abs(r);let o=1,h=1;90!==a&&270!==a||(o=n/i,h=i/n);const l="rotate("+r+"deg) scale("+o+","+h+")";if(e.style.transform=l,this.textLayer){const e=this.textLayer.viewport,t=this.viewport.rotation-e.rotation,n=Math.abs(t);let s=i/e.width;90!==n&&270!==n||(s=i/e.height);const r=this.textLayer.textLayerDiv;let a,o;switch(n){case 0:a=o=0;break;case 90:a=0,o="-"+r.style.height;break;case 180:a="-"+r.style.width,o="-"+r.style.height;break;case 270:a="-"+r.style.width,o=0;break;default:console.error("Bad rotation value.")}r.style.transform="rotate("+n+"deg) scale("+s+", "+s+") translate("+a+", "+o+")",r.style.transformOrigin="0% 0%"}t&&this.annotationLayer&&this.annotationLayer.render(this.viewport,"display")}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(e,t){return this.viewport.convertToPdfPoint(e,t)}draw(){this.renderingState!==r.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());const{div:e,pdfPage:t}=this;if(!t)return this.renderingState=r.RenderingStates.FINISHED,this.loadingIconDiv&&(e.removeChild(this.loadingIconDiv),delete this.loadingIconDiv),Promise.reject(new Error("pdfPage is not loaded"));this.renderingState=r.RenderingStates.RUNNING;const i=document.createElement("div");i.style.width=e.style.width,i.style.height=e.style.height,i.classList.add("canvasWrapper"),this.annotationLayer&&this.annotationLayer.div?e.insertBefore(i,this.annotationLayer.div):e.appendChild(i);let a=null;if(this.textLayerMode!==n.TextLayerMode.DISABLE&&this.textLayerFactory){const t=document.createElement("div");t.className="textLayer",t.style.width=i.style.width,t.style.height=i.style.height,this.annotationLayer&&this.annotationLayer.div?e.insertBefore(t,this.annotationLayer.div):e.appendChild(t),a=this.textLayerFactory.createTextLayerBuilder(t,this.id-1,this.viewport,this.textLayerMode===n.TextLayerMode.ENABLE_ENHANCE,this.eventBus)}this.textLayer=a;let o=null;this.renderingQueue&&(o=e=>{if(!this.renderingQueue.isHighestPriority(this))return this.renderingState=r.RenderingStates.PAUSED,void(this.resume=()=>{this.renderingState=r.RenderingStates.RUNNING,e()});e()});const h=async i=>{if(l===this.paintTask&&(this.paintTask=null),i instanceof s.RenderingCancelledException)this.error=null;else if(this.renderingState=r.RenderingStates.FINISHED,this.loadingIconDiv&&(e.removeChild(this.loadingIconDiv),delete this.loadingIconDiv),this._resetZoomLayer(!0),this.error=i,this.stats=t.stats,this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now()}),i)throw i},l=this.renderer===n.RendererType.SVG?this.paintOnSvg(i):this.paintOnCanvas(i);l.onRenderContinue=o,this.paintTask=l;const c=l.promise.then((function(){return h(null).then((function(){if(a){const e=t.streamTextContent({normalizeWhitespace:!0});a.setTextContentStream(e),a.render()}}))}),(function(e){return h(e)}));return this.annotationLayerFactory&&(this.annotationLayer||(this.annotationLayer=this.annotationLayerFactory.createAnnotationLayerBuilder(e,t,this.imageResourcesPath,this.renderInteractiveForms,this.l10n)),this.annotationLayer.render(this.viewport,"display")),e.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),c}paintOnCanvas(e){const t=(0,s.createPromiseCapability)(),i={promise:t.promise,onRenderContinue(e){e()},cancel(){p.cancel()}},r=this.viewport,a=document.createElement("canvas");this.l10n.get("page_canvas",{page:this.id},"Page {{page}}").then((e=>{a.setAttribute("aria-label",e)})),a.setAttribute("hidden","hidden");let o=!0;const h=function(){o&&(a.removeAttribute("hidden"),o=!1)};e.appendChild(a),this.canvas=a,a.mozOpaque=!0;const l=a.getContext("2d",{alpha:!1}),c=(0,n.getOutputScale)(l);if(this.outputScale=c,this.useOnlyCssZoom){const e=r.clone({scale:n.CSS_UNITS});c.sx*=e.width/r.width,c.sy*=e.height/r.height,c.scaled=!0}if(this.maxCanvasPixels>0){const e=r.width*r.height,t=Math.sqrt(this.maxCanvasPixels/e);c.sx>t||c.sy>t?(c.sx=t,c.sy=t,c.scaled=!0,this.hasRestrictedScaling=!0):this.hasRestrictedScaling=!1}const u=(0,n.approximateFraction)(c.sx),d=(0,n.approximateFraction)(c.sy);a.width=(0,n.roundToDivide)(r.width*c.sx,u[0]),a.height=(0,n.roundToDivide)(r.height*c.sy,d[0]),a.style.width=(0,n.roundToDivide)(r.width,u[1])+"px",a.style.height=(0,n.roundToDivide)(r.height,d[1])+"px",this.paintedViewportMap.set(a,r);const g={canvasContext:l,transform:c.scaled?[c.sx,0,0,c.sy,0,0]:null,viewport:this.viewport,enableWebGL:this.enableWebGL,renderInteractiveForms:this.renderInteractiveForms},p=this.pdfPage.render(g);return p.onContinue=function(e){h(),i.onRenderContinue?i.onRenderContinue(e):e()},p.promise.then((function(){h(),t.resolve(void 0)}),(function(e){h(),t.reject(e)})),i}paintOnSvg(e){let t=!1;const i=()=>{if(t)throw new s.RenderingCancelledException("Rendering cancelled, page ".concat(this.id),"svg")},a=this.pdfPage,o=this.viewport.clone({scale:n.CSS_UNITS});return{promise:a.getOperatorList().then((t=>(i(),new s.SVGGraphics(a.commonObjs,a.objs).getSVG(t,o).then((t=>{i(),this.svg=t,this.paintedViewportMap.set(t,o),t.style.width=e.style.width,t.style.height=e.style.height,this.renderingState=r.RenderingStates.FINISHED,e.appendChild(t)}))))),onRenderContinue(e){e()},cancel(){t=!0}}}setPageLabel(e){this.pageLabel="string"===typeof e?e:null,null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFRenderingQueue=t.RenderingStates=void 0;const n={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};t.RenderingStates=n,t.PDFRenderingQueue=class{constructor(){this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1}setViewer(e){this.pdfViewer=e}setThumbnailViewer(e){this.pdfThumbnailViewer=e}isHighestPriority(e){return this.highestPriorityPage===e.renderingId}renderHighestPriority(e){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),this.pdfViewer.forceRendering(e)||this.pdfThumbnailViewer&&this.isThumbnailViewEnabled&&this.pdfThumbnailViewer.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),3e4))}getHighestPriority(e,t,i){const n=e.views,s=n.length;if(0===s)return null;for(let r=0;r<s;++r){const e=n[r].view;if(!this.isViewFinished(e))return e}if(i){const i=e.last.id;if(t[i]&&!this.isViewFinished(t[i]))return t[i]}else{const i=e.first.id-2;if(t[i]&&!this.isViewFinished(t[i]))return t[i]}return null}isViewFinished(e){return e.renderingState===n.FINISHED}renderView(e){switch(e.renderingState){case n.FINISHED:return!1;case n.PAUSED:this.highestPriorityPage=e.renderingId,e.resume();break;case n.RUNNING:this.highestPriorityPage=e.renderingId;break;case n.INITIAL:this.highestPriorityPage=e.renderingId,e.draw().finally((()=>{this.renderHighestPriority()})).catch((e=>{console.error('renderView: "'.concat(e,'"'))}))}return!0}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFSinglePageViewer=void 0;var n=i(16),s=i(2);class r extends n.BaseViewer{constructor(e){super(e),this.eventBus._on("pagesinit",(e=>{this._ensurePageViewVisible()}))}get _viewerElement(){return(0,s.shadow)(this,"_viewerElement",this._shadowViewer)}_resetView(){super._resetView(),this._previousPageNumber=1,this._shadowViewer=document.createDocumentFragment(),this._updateScrollDown=null}_ensurePageViewVisible(){const e=this._pages[this._currentPageNumber-1],t=this._pages[this._previousPageNumber-1],i=this.viewer.childNodes;switch(i.length){case 0:this.viewer.appendChild(e.div);break;case 1:if(i[0]!==t.div)throw new Error("_ensurePageViewVisible: Unexpected previously visible page.");if(e===t)break;this._shadowViewer.appendChild(t.div),this.viewer.appendChild(e.div),this.container.scrollTop=0;break;default:throw new Error("_ensurePageViewVisible: Only one page should be visible at a time.")}this._previousPageNumber=this._currentPageNumber}_scrollUpdate(){this._updateScrollDown&&this._updateScrollDown(),super._scrollUpdate()}_scrollIntoView(e){let{pageDiv:t,pageSpot:i=null,pageNumber:n=null}=e;n&&this._setCurrentPageNumber(n);const s=this._currentPageNumber>=this._previousPageNumber;this._ensurePageViewVisible(),this.update(),super._scrollIntoView({pageDiv:t,pageSpot:i,pageNumber:n}),this._updateScrollDown=()=>{this.scroll.down=s,this._updateScrollDown=null}}_getVisiblePages(){return this._getCurrentVisiblePage()}_updateHelper(e){}get _isScrollModeHorizontal(){return(0,s.shadow)(this,"_isScrollModeHorizontal",!1)}_updateScrollMode(){}_updateSpreadMode(){}}t.PDFSinglePageViewer=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseViewer=void 0;var n=i(3),s=i(14),r=i(1),a=i(2),o=i(13),h=i(4),l=i(5);function c(e){const t=[];this.push=function(i){const n=t.indexOf(i);n>=0&&t.splice(n,1),t.push(i),t.length>e&&t.shift().destroy()},this.resize=function(i,s){if(e=i,s){const e=new Set;for(let t=0,i=s.length;t<i;++t)e.add(s[t].id);(0,n.moveToEndOfArray)(t,(function(t){return e.has(t.id)}))}for(;t.length>e;)t.shift().destroy()}}class u{constructor(e){if(this.constructor===u)throw new Error("Cannot initialize BaseViewer.");this._name=this.constructor.name,this.container=e.container,this.viewer=e.viewer||e.container.firstElementChild,this.eventBus=e.eventBus,this.linkService=e.linkService||new h.SimpleLinkService,this.downloadManager=e.downloadManager||null,this.findController=e.findController||null,this.removePageBorders=e.removePageBorders||!1,this.textLayerMode=Number.isInteger(e.textLayerMode)?e.textLayerMode:n.TextLayerMode.ENABLE,this.imageResourcesPath=e.imageResourcesPath||"",this.renderInteractiveForms=e.renderInteractiveForms||!1,this.enablePrintAutoRotate=e.enablePrintAutoRotate||!1,this.renderer=e.renderer||n.RendererType.CANVAS,this.enableWebGL=e.enableWebGL||!1,this.useOnlyCssZoom=e.useOnlyCssZoom||!1,this.maxCanvasPixels=e.maxCanvasPixels,this.l10n=e.l10n||n.NullL10n,this.defaultRenderingQueue=!e.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new s.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=e.renderingQueue,this.scroll=(0,n.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=n.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),Promise.resolve().then((()=>{this.eventBus.dispatch("baseviewerinit",{source:this})}))}get pagesCount(){return this._pages.length}getPageView(e){return this._pages[e]}get pageViewsReady(){return!!this._pagesCapability.settled&&this._pages.every((function(e){return e&&e.pdfPage}))}get currentPageNumber(){return this._currentPageNumber}set currentPageNumber(e){if(!Number.isInteger(e))throw new Error("Invalid page number.");this.pdfDocument&&(this._setCurrentPageNumber(e,!0)||console.error("".concat(this._name,'.currentPageNumber: "').concat(e,'" is not a valid page.')))}_setCurrentPageNumber(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._currentPageNumber===e?(t&&this._resetCurrentPageView(),!0):0<e&&e<=this.pagesCount&&(this._currentPageNumber=e,this.eventBus.dispatch("pagechanging",{source:this,pageNumber:e,pageLabel:this._pageLabels&&this._pageLabels[e-1]}),t&&this._resetCurrentPageView(),!0)}get currentPageLabel(){return this._pageLabels&&this._pageLabels[this._currentPageNumber-1]}set currentPageLabel(e){if(!this.pdfDocument)return;let t=0|e;if(this._pageLabels){const i=this._pageLabels.indexOf(e);i>=0&&(t=i+1)}this._setCurrentPageNumber(t,!0)||console.error("".concat(this._name,'.currentPageLabel: "').concat(e,'" is not a valid page.'))}get currentScale(){return this._currentScale!==n.UNKNOWN_SCALE?this._currentScale:n.DEFAULT_SCALE}set currentScale(e){if(isNaN(e))throw new Error("Invalid numeric scale.");this.pdfDocument&&this._setScale(e,!1)}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(e){this.pdfDocument&&this._setScale(e,!1)}get pagesRotation(){return this._pagesRotation}set pagesRotation(e){if(!(0,n.isValidRotation)(e))throw new Error("Invalid pages rotation angle.");if(!this.pdfDocument)return;if(this._pagesRotation===e)return;this._pagesRotation=e;const t=this._currentPageNumber;for(let i=0,n=this._pages.length;i<n;i++){const t=this._pages[i];t.update(t.scale,e)}this._currentScaleValue&&this._setScale(this._currentScaleValue,!0),this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:e,pageNumber:t}),this.defaultRenderingQueue&&this.update()}get firstPagePromise(){return this.pdfDocument?this._firstPageCapability.promise:null}get onePageRendered(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}get pagesPromise(){return this.pdfDocument?this._pagesCapability.promise:null}get _viewerElement(){throw new Error("Not implemented: _viewerElement")}_onePageRenderedOrForceFetch(){return this.container.offsetParent&&0!==this._getVisiblePages().views.length?this._onePageRenderedCapability.promise:Promise.resolve()}setDocument(e){if(this.pdfDocument&&(this._cancelRendering(),this._resetView(),this.findController&&this.findController.setDocument(null)),this.pdfDocument=e,!e)return;const t=e.numPages,i=e.getPage(1);this._pagesCapability.promise.then((()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:t})})),this._onBeforeDraw=e=>{const t=this._pages[e.pageNumber-1];t&&this._buffer.push(t)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=e=>{e.cssTransform||this._onePageRenderedCapability.settled||(this._onePageRenderedCapability.resolve(),this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null)},this.eventBus._on("pagerendered",this._onAfterDraw),i.then((i=>{this._firstPageCapability.resolve(i);const s=this.currentScale,r=i.getViewport({scale:s*n.CSS_UNITS}),a=this.textLayerMode!==n.TextLayerMode.DISABLE?this:null;for(let e=1;e<=t;++e){const t=new o.PDFPageView({container:this._viewerElement,eventBus:this.eventBus,id:e,scale:s,defaultViewport:r.clone(),renderingQueue:this.renderingQueue,textLayerFactory:a,textLayerMode:this.textLayerMode,annotationLayerFactory:this,imageResourcesPath:this.imageResourcesPath,renderInteractiveForms:this.renderInteractiveForms,renderer:this.renderer,enableWebGL:this.enableWebGL,useOnlyCssZoom:this.useOnlyCssZoom,maxCanvasPixels:this.maxCanvasPixels,l10n:this.l10n});this._pages.push(t)}const h=this._pages[0];h&&(h.setPdfPage(i),this.linkService.cachePageRef(1,i.ref)),this._spreadMode!==n.SpreadMode.NONE&&this._updateSpreadMode(),this._onePageRenderedOrForceFetch().then((()=>{if(this.findController&&this.findController.setDocument(e),e.loadingParams.disableAutoFetch||t>7500)return void this._pagesCapability.resolve();let i=t-1;if(i<=0)this._pagesCapability.resolve();else for(let n=2;n<=t;++n)e.getPage(n).then((e=>{const t=this._pages[n-1];t.pdfPage||t.setPdfPage(e),this.linkService.cachePageRef(n,e.ref),0===--i&&this._pagesCapability.resolve()}),(e=>{console.error("Unable to get page ".concat(n," to initialize viewer"),e),0===--i&&this._pagesCapability.resolve()}))})),this.eventBus.dispatch("pagesinit",{source:this}),this.defaultRenderingQueue&&this.update()})).catch((e=>{console.error("Unable to initialize viewer",e)}))}setPageLabels(e){if(this.pdfDocument){e?Array.isArray(e)&&this.pdfDocument.numPages===e.length?this._pageLabels=e:(this._pageLabels=null,console.error("".concat(this._name,".setPageLabels: Invalid page labels."))):this._pageLabels=null;for(let e=0,t=this._pages.length;e<t;e++){const t=this._pages[e],i=this._pageLabels&&this._pageLabels[e];t.setPageLabel(i)}}}_resetView(){this._pages=[],this._currentPageNumber=1,this._currentScale=n.UNKNOWN_SCALE,this._currentScaleValue=null,this._pageLabels=null,this._buffer=new c(10),this._location=null,this._pagesRotation=0,this._pagesRequests=new WeakMap,this._firstPageCapability=(0,a.createPromiseCapability)(),this._onePageRenderedCapability=(0,a.createPromiseCapability)(),this._pagesCapability=(0,a.createPromiseCapability)(),this._scrollMode=n.ScrollMode.VERTICAL,this._spreadMode=n.SpreadMode.NONE,this._onBeforeDraw&&(this.eventBus._off("pagerender",this._onBeforeDraw),this._onBeforeDraw=null),this._onAfterDraw&&(this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null),this.viewer.textContent="",this._updateScrollMode()}_scrollUpdate(){0!==this.pagesCount&&this.update()}_scrollIntoView(e){let{pageDiv:t,pageSpot:i=null,pageNumber:s=null}=e;(0,n.scrollIntoView)(t,i)}_setScaleUpdatePages(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this._currentScaleValue=t.toString(),function(e,t){return t===e||Math.abs(t-e)<1e-15}(this._currentScale,e))n&&this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:t});else{for(let t=0,i=this._pages.length;t<i;t++)this._pages[t].update(e);if(this._currentScale=e,!i){let e,t=this._currentPageNumber;!this._location||this.isInPresentationMode||this.isChangingPresentationMode||(t=this._location.pageNumber,e=[null,{name:"XYZ"},this._location.left,this._location.top,null]),this.scrollPageIntoView({pageNumber:t,destArray:e,allowNegativeOffset:!0})}this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:n?t:void 0}),this.defaultRenderingQueue&&this.update()}}_setScale(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=parseFloat(e);if(i>0)this._setScaleUpdatePages(i,e,t,!1);else{const s=this._pages[this._currentPageNumber-1];if(!s)return;const r=this.isInPresentationMode||this.removePageBorders;let a=r?0:n.SCROLLBAR_PADDING,o=r?0:n.VERTICAL_PADDING;!r&&this._isScrollModeHorizontal&&([a,o]=[o,a]);const h=(this.container.clientWidth-a)/s.width*s.scale,l=(this.container.clientHeight-o)/s.height*s.scale;switch(e){case"page-actual":i=1;break;case"page-width":i=h;break;case"page-height":i=l;break;case"page-fit":i=Math.min(h,l);break;case"auto":const t=(0,n.isPortraitOrientation)(s)?h:Math.min(l,h);i=Math.min(n.MAX_AUTO_SCALE,t);break;default:return void console.error("".concat(this._name,'._setScale: "').concat(e,'" is an unknown zoom value.'))}this._setScaleUpdatePages(i,e,t,!0)}}_resetCurrentPageView(){this.isInPresentationMode&&this._setScale(this._currentScaleValue,!0);const e=this._pages[this._currentPageNumber-1];this._scrollIntoView({pageDiv:e.div})}scrollPageIntoView(e){let{pageNumber:t,destArray:i=null,allowNegativeOffset:s=!1,ignoreDestinationZoom:r=!1}=e;if(!this.pdfDocument)return;const a=Number.isInteger(t)&&this._pages[t-1];if(!a)return void console.error("".concat(this._name,".scrollPageIntoView: ")+'"'.concat(t,'" is not a valid pageNumber parameter.'));if(this.isInPresentationMode||!i)return void this._setCurrentPageNumber(t,!0);let o,h,l=0,c=0,u=0,d=0;const g=a.rotation%180!==0,p=(g?a.height:a.width)/a.scale/n.CSS_UNITS,f=(g?a.width:a.height)/a.scale/n.CSS_UNITS;let _=0;switch(i[1].name){case"XYZ":l=i[2],c=i[3],_=i[4],l=null!==l?l:0,c=null!==c?c:f;break;case"Fit":case"FitB":_="page-fit";break;case"FitH":case"FitBH":c=i[2],_="page-width",null===c&&this._location&&(l=this._location.left,c=this._location.top);break;case"FitV":case"FitBV":l=i[2],u=p,d=f,_="page-height";break;case"FitR":l=i[2],c=i[3],u=i[4]-l,d=i[5]-c;const e=this.removePageBorders?0:n.SCROLLBAR_PADDING,t=this.removePageBorders?0:n.VERTICAL_PADDING;o=(this.container.clientWidth-e)/u/n.CSS_UNITS,h=(this.container.clientHeight-t)/d/n.CSS_UNITS,_=Math.min(Math.abs(o),Math.abs(h));break;default:return void console.error("".concat(this._name,".scrollPageIntoView: ")+'"'.concat(i[1].name,'" is not a valid destination type.'))}if(r||(_&&_!==this._currentScale?this.currentScaleValue=_:this._currentScale===n.UNKNOWN_SCALE&&(this.currentScaleValue=n.DEFAULT_SCALE_VALUE)),"page-fit"===_&&!i[4])return void this._scrollIntoView({pageDiv:a.div,pageNumber:t});const m=[a.viewport.convertToViewportPoint(l,c),a.viewport.convertToViewportPoint(l+u,c+d)];let v=Math.min(m[0][0],m[1][0]),y=Math.min(m[0][1],m[1][1]);s||(v=Math.max(v,0),y=Math.max(y,0)),this._scrollIntoView({pageDiv:a.div,pageSpot:{left:v,top:y},pageNumber:t})}_updateLocation(e){const t=this._currentScale,i=this._currentScaleValue,n=parseFloat(i)===t?Math.round(1e4*t)/100:i,s=e.id;let r="#page="+s;r+="&zoom="+n;const a=this._pages[s-1],o=this.container,h=a.getPagePoint(o.scrollLeft-e.x,o.scrollTop-e.y),l=Math.round(h[0]),c=Math.round(h[1]);r+=","+l+","+c,this._location={pageNumber:s,scale:n,top:c,left:l,rotation:this._pagesRotation,pdfOpenParams:r}}_updateHelper(e){throw new Error("Not implemented: _updateHelper")}update(){const e=this._getVisiblePages(),t=e.views,i=t.length;if(0===i)return;const n=Math.max(10,2*i+1);this._buffer.resize(n,t),this.renderingQueue.renderHighestPriority(e),this._updateHelper(t),this._updateLocation(e.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}containsElement(e){return this.container.contains(e)}focus(){this.container.focus()}get _isScrollModeHorizontal(){return!this.isInPresentationMode&&this._scrollMode===n.ScrollMode.HORIZONTAL}get isInPresentationMode(){return this.presentationModeState===n.PresentationModeState.FULLSCREEN}get isChangingPresentationMode(){return this.presentationModeState===n.PresentationModeState.CHANGING}get isHorizontalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollWidth>this.container.clientWidth}get isVerticalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}_getCurrentVisiblePage(){if(!this.pagesCount)return{views:[]};const e=this._pages[this._currentPageNumber-1],t=e.div,i={id:e.id,x:t.offsetLeft+t.clientLeft,y:t.offsetTop+t.clientTop,view:e};return{first:i,last:i,views:[i]}}_getVisiblePages(){return(0,n.getVisibleElements)(this.container,this._pages,!0,this._isScrollModeHorizontal)}isPageVisible(e){return!!this.pdfDocument&&(e<1||e>this.pagesCount?(console.error("".concat(this._name,'.isPageVisible: "').concat(e,'" is out of bounds.')),!1):this._getVisiblePages().views.some((function(t){return t.id===e})))}cleanup(){for(let e=0,t=this._pages.length;e<t;e++)this._pages[e]&&this._pages[e].renderingState!==s.RenderingStates.FINISHED&&this._pages[e].reset()}_cancelRendering(){for(let e=0,t=this._pages.length;e<t;e++)this._pages[e]&&this._pages[e].cancelRendering()}_ensurePdfPageLoaded(e){if(e.pdfPage)return Promise.resolve(e.pdfPage);if(this._pagesRequests.has(e))return this._pagesRequests.get(e);const t=this.pdfDocument.getPage(e.id).then((t=>(e.pdfPage||e.setPdfPage(t),this._pagesRequests.delete(e),t))).catch((t=>{console.error("Unable to get page for page view",t),this._pagesRequests.delete(e)}));return this._pagesRequests.set(e,t),t}forceRendering(e){const t=e||this._getVisiblePages(),i=this._isScrollModeHorizontal?this.scroll.right:this.scroll.down,n=this.renderingQueue.getHighestPriority(t,this._pages,i);return!!n&&(this._ensurePdfPageLoaded(n).then((()=>{this.renderingQueue.renderView(n)})),!0)}createTextLayerBuilder(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4?arguments[4]:void 0;return new l.TextLayerBuilder({textLayerDiv:e,eventBus:s,pageIndex:t,viewport:i,findController:this.isInPresentationMode?null:this.findController,enhanceTextSelection:!this.isInPresentationMode&&n})}createAnnotationLayerBuilder(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.NullL10n;return new r.AnnotationLayerBuilder({pageDiv:e,pdfPage:t,imageResourcesPath:i,renderInteractiveForms:s,linkService:this.linkService,downloadManager:this.downloadManager,l10n:a})}get hasEqualPageSizes(){const e=this._pages[0];for(let t=1,i=this._pages.length;t<i;++t){const i=this._pages[t];if(i.width!==e.width||i.height!==e.height)return!1}return!0}getPagesOverview(){const e=this._pages.map((function(e){const t=e.pdfPage.getViewport({scale:1});return{width:t.width,height:t.height,rotation:t.rotation}}));if(!this.enablePrintAutoRotate)return e;const t=(0,n.isPortraitOrientation)(e[0]);return e.map((function(e){return t===(0,n.isPortraitOrientation)(e)?e:{width:e.height,height:e.width,rotation:(e.rotation+90)%360}}))}get scrollMode(){return this._scrollMode}set scrollMode(e){if(this._scrollMode!==e){if(!(0,n.isValidScrollMode)(e))throw new Error("Invalid scroll mode: ".concat(e));this._scrollMode=e,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:e}),this._updateScrollMode(this._currentPageNumber)}}_updateScrollMode(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this._scrollMode,i=this.viewer;i.classList.toggle("scrollHorizontal",t===n.ScrollMode.HORIZONTAL),i.classList.toggle("scrollWrapped",t===n.ScrollMode.WRAPPED),this.pdfDocument&&e&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&this._setScale(this._currentScaleValue,!0),this._setCurrentPageNumber(e,!0),this.update())}get spreadMode(){return this._spreadMode}set spreadMode(e){if(this._spreadMode!==e){if(!(0,n.isValidSpreadMode)(e))throw new Error("Invalid spread mode: ".concat(e));this._spreadMode=e,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:e}),this._updateSpreadMode(this._currentPageNumber)}}_updateSpreadMode(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!this.pdfDocument)return;const t=this.viewer,i=this._pages;if(t.textContent="",this._spreadMode===n.SpreadMode.NONE)for(let n=0,s=i.length;n<s;++n)t.appendChild(i[n].div);else{const e=this._spreadMode-1;let n=null;for(let s=0,r=i.length;s<r;++s)null===n?(n=document.createElement("div"),n.className="spread",t.appendChild(n)):s%2===e&&(n=n.cloneNode(!1),t.appendChild(n)),n.appendChild(i[s].div)}e&&(this._setCurrentPageNumber(e,!0),this.update())}}t.BaseViewer=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFViewer=void 0;var n=i(16),s=i(2);class r extends n.BaseViewer{get _viewerElement(){return(0,s.shadow)(this,"_viewerElement",this.viewer)}_scrollIntoView(e){let{pageDiv:t,pageSpot:i=null,pageNumber:n=null}=e;if(!i&&!this.isInPresentationMode){const e=t.offsetLeft+t.clientLeft,n=e+t.clientWidth,{scrollLeft:s,clientWidth:r}=this.container;(this._isScrollModeHorizontal||e<s||n>s+r)&&(i={left:0,top:0})}super._scrollIntoView({pageDiv:t,pageSpot:i,pageNumber:n})}_getVisiblePages(){return this.isInPresentationMode?this._getCurrentVisiblePage():super._getVisiblePages()}_updateHelper(e){if(this.isInPresentationMode)return;let t=this._currentPageNumber,i=!1;for(const n of e){if(n.percent<100)break;if(n.id===t){i=!0;break}}i||(t=e[0].id),this._setCurrentPageNumber(t)}}t.PDFViewer=r}])},e.exports=n()},19247:(e,t,i)=>{"use strict";i.d(t,{A:()=>_});var n=i(58168),s=i(98587),r=i(9417),a=i(77387),o=i(9950),h=i(11942),l=i.n(h),c=i(48738),u=i.n(c),d=i(44208),g=["className","cssModule","inline","tag","innerRef"],p={children:l().node,inline:l().bool,tag:d.Wx,innerRef:l().oneOfType([l().object,l().func,l().string]),className:l().string,cssModule:l().object},f=function(e){function t(t){var i;return(i=e.call(this,t)||this).getRef=i.getRef.bind((0,r.A)(i)),i.submit=i.submit.bind((0,r.A)(i)),i}(0,a.A)(t,e);var i=t.prototype;return i.getRef=function(e){this.props.innerRef&&this.props.innerRef(e),this.ref=e},i.submit=function(){this.ref&&this.ref.submit()},i.render=function(){var e=this.props,t=e.className,i=e.cssModule,r=e.inline,a=e.tag,h=e.innerRef,l=(0,s.A)(e,g),c=(0,d.qO)(u()(t,!!r&&"form-inline"),i);return o.createElement(a,(0,n.A)({},l,{ref:h,className:c}))},t}(o.Component);f.propTypes=p,f.defaultProps={tag:"form"};const _=f},85907:(e,t,i)=>{"use strict";i.d(t,{A:()=>p});var n=i(58168),s=i(98587),r=i(9950),a=i(11942),o=i.n(a),h=i(48738),l=i.n(h),c=i(44208),u=["className","cssModule","tag"],d={tag:c.Wx,className:o().string,cssModule:o().object},g=function(e){var t=e.className,i=e.cssModule,a=e.tag,o=(0,s.A)(e,u),h=(0,c.qO)(l()(t,"modal-footer"),i);return r.createElement(a,(0,n.A)({},o,{className:h}))};g.propTypes=d,g.defaultProps={tag:"div"};const p=g},21205:(e,t,i)=>{"use strict";i.d(t,{A:()=>p});var n=i(58168),s=i(98587),r=i(9950),a=i(11942),o=i.n(a),h=i(48738),l=i.n(h),c=i(44208),u=["className","cssModule","size","bordered","borderless","striped","dark","hover","responsive","tag","responsiveTag","innerRef"],d={className:o().string,cssModule:o().object,size:o().string,bordered:o().bool,borderless:o().bool,striped:o().bool,dark:o().bool,hover:o().bool,responsive:o().oneOfType([o().bool,o().string]),tag:c.Wx,responsiveTag:c.Wx,innerRef:o().oneOfType([o().func,o().string,o().object])},g=function(e){var t=e.className,i=e.cssModule,a=e.size,o=e.bordered,h=e.borderless,d=e.striped,g=e.dark,p=e.hover,f=e.responsive,_=e.tag,m=e.responsiveTag,v=e.innerRef,y=(0,s.A)(e,u),b=(0,c.qO)(l()(t,"table",!!a&&"table-"+a,!!o&&"table-bordered",!!h&&"table-borderless",!!d&&"table-striped",!!g&&"table-dark",!!p&&"table-hover"),i),w=r.createElement(_,(0,n.A)({},y,{ref:v,className:b}));if(f){var P=(0,c.qO)(!0===f?"table-responsive":"table-responsive-"+f,i);return r.createElement(m,{className:P},w)}return w};g.propTypes=d,g.defaultProps={tag:"table",responsiveTag:"div"};const p=g}}]);