/**
 * @licstart The following is the entire license notice for the
 * JavaScript code in this page
 *
 * Copyright 2023 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @licend The above is the entire license notice for the
 * JavaScript code in this page
*/var __webpack_modules__={8759:(e,t,i)=>{i.d(t,{FluentBundle:()=>P,FluentResource:()=>X});class n{constructor(e){this.value=e}valueOf(){return this.value}}class s extends n{constructor(e="???"){super(e)}toString(e){return`{${this.value}}`}}class a extends n{constructor(e,t={}){super(e),this.opts=t}toString(e){try{return e.memoizeIntlObject(Intl.NumberFormat,this.opts).format(this.value)}catch(t){return e.reportError(t),this.value.toString(10)}}}class r extends n{constructor(e,t={}){super(e),this.opts=t}toString(e){try{return e.memoizeIntlObject(Intl.DateTimeFormat,this.opts).format(this.value)}catch(t){return e.reportError(t),new Date(this.value).toISOString()}}}const o=100,l="⁨",d="⁩";function h(e,t,i){if(i===t)return!0;if(i instanceof a&&t instanceof a&&i.value===t.value)return!0;if(t instanceof a&&"string"==typeof i){if(i===e.memoizeIntlObject(Intl.PluralRules,t.opts).select(t.value))return!0}return!1}function c(e,t,i){return t[i]?f(e,t[i].value):(e.reportError(new RangeError("No default")),new s)}function u(e,t){const i=[],n=Object.create(null);for(const s of t)"narg"===s.type?n[s.name]=p(e,s.value):i.push(p(e,s));return{positional:i,named:n}}function p(e,t){switch(t.type){case"str":return t.value;case"num":return new a(t.value,{minimumFractionDigits:t.precision});case"var":return function(e,{name:t}){let i;if(e.params){if(!Object.prototype.hasOwnProperty.call(e.params,t))return new s(`$${t}`);i=e.params[t]}else{if(!e.args||!Object.prototype.hasOwnProperty.call(e.args,t))return e.reportError(new ReferenceError(`Unknown variable: $${t}`)),new s(`$${t}`);i=e.args[t]}if(i instanceof n)return i;switch(typeof i){case"string":return i;case"number":return new a(i);case"object":if(i instanceof Date)return new r(i.getTime());default:return e.reportError(new TypeError(`Variable type not supported: $${t}, ${typeof i}`)),new s(`$${t}`)}}(e,t);case"mesg":return function(e,{name:t,attr:i}){const n=e.bundle._messages.get(t);if(!n)return e.reportError(new ReferenceError(`Unknown message: ${t}`)),new s(t);if(i){const a=n.attributes[i];return a?f(e,a):(e.reportError(new ReferenceError(`Unknown attribute: ${i}`)),new s(`${t}.${i}`))}if(n.value)return f(e,n.value);return e.reportError(new ReferenceError(`No value: ${t}`)),new s(t)}(e,t);case"term":return function(e,{name:t,attr:i,args:n}){const a=`-${t}`,r=e.bundle._terms.get(a);if(!r)return e.reportError(new ReferenceError(`Unknown term: ${a}`)),new s(a);if(i){const t=r.attributes[i];if(t){e.params=u(e,n).named;const i=f(e,t);return e.params=null,i}return e.reportError(new ReferenceError(`Unknown attribute: ${i}`)),new s(`${a}.${i}`)}e.params=u(e,n).named;const o=f(e,r.value);return e.params=null,o}(e,t);case"func":return function(e,{name:t,args:i}){let n=e.bundle._functions[t];if(!n)return e.reportError(new ReferenceError(`Unknown function: ${t}()`)),new s(`${t}()`);if("function"!=typeof n)return e.reportError(new TypeError(`Function ${t}() is not callable`)),new s(`${t}()`);try{let t=u(e,i);return n(t.positional,t.named)}catch(i){return e.reportError(i),new s(`${t}()`)}}(e,t);case"select":return function(e,{selector:t,variants:i,star:n}){let a=p(e,t);if(a instanceof s)return c(e,i,n);for(const t of i){if(h(e,a,p(e,t.key)))return f(e,t.value)}return c(e,i,n)}(e,t);default:return new s}}function g(e,t){if(e.dirty.has(t))return e.reportError(new RangeError("Cyclic reference")),new s;e.dirty.add(t);const i=[],n=e.bundle._useIsolating&&t.length>1;for(const s of t)if("string"!=typeof s){if(e.placeables++,e.placeables>o)throw e.dirty.delete(t),new RangeError(`Too many placeables expanded: ${e.placeables}, max allowed is ${o}`);n&&i.push(l),i.push(p(e,s).toString(e)),n&&i.push(d)}else i.push(e.bundle._transform(s));return e.dirty.delete(t),i.join("")}function f(e,t){return"string"==typeof t?e.bundle._transform(t):g(e,t)}class m{constructor(e,t,i){this.dirty=new WeakSet,this.params=null,this.placeables=0,this.bundle=e,this.errors=t,this.args=i}reportError(e){if(!(this.errors&&e instanceof Error))throw e;this.errors.push(e)}memoizeIntlObject(e,t){let i=this.bundle._intls.get(e);i||(i={},this.bundle._intls.set(e,i));let n=JSON.stringify(t);return i[n]||(i[n]=new e(this.bundle.locales,t)),i[n]}}function w(e,t){const i=Object.create(null);for(const[n,s]of Object.entries(e))t.includes(n)&&(i[n]=s.valueOf());return i}const v=["unitDisplay","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function b(e,t){let i=e[0];if(i instanceof s)return new s(`NUMBER(${i.valueOf()})`);if(i instanceof a)return new a(i.valueOf(),{...i.opts,...w(t,v)});if(i instanceof r)return new a(i.valueOf(),{...w(t,v)});throw new TypeError("Invalid argument to NUMBER")}const y=["dateStyle","timeStyle","fractionalSecondDigits","dayPeriod","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function _(e,t){let i=e[0];if(i instanceof s)return new s(`DATETIME(${i.valueOf()})`);if(i instanceof r)return new r(i.valueOf(),{...i.opts,...w(t,y)});if(i instanceof a)return new r(i.valueOf(),{...w(t,y)});throw new TypeError("Invalid argument to DATETIME")}const E=new Map;class P{constructor(e,{functions:t,useIsolating:i=!0,transform:n=(e=>e)}={}){this._terms=new Map,this._messages=new Map,this.locales=Array.isArray(e)?e:[e],this._functions={NUMBER:b,DATETIME:_,...t},this._useIsolating=i,this._transform=n,this._intls=function(e){const t=Array.isArray(e)?e.join(" "):e;let i=E.get(t);return void 0===i&&(i=new Map,E.set(t,i)),i}(e)}hasMessage(e){return this._messages.has(e)}getMessage(e){return this._messages.get(e)}addResource(e,{allowOverrides:t=!1}={}){const i=[];for(let n=0;n<e.body.length;n++){let s=e.body[n];if(s.id.startsWith("-")){if(!1===t&&this._terms.has(s.id)){i.push(new Error(`Attempt to override an existing term: "${s.id}"`));continue}this._terms.set(s.id,s)}else{if(!1===t&&this._messages.has(s.id)){i.push(new Error(`Attempt to override an existing message: "${s.id}"`));continue}this._messages.set(s.id,s)}}return i}formatPattern(e,t=null,i=null){if("string"==typeof e)return this._transform(e);let n=new m(this,i,t);try{return g(n,e).toString(n)}catch(e){if(n.errors&&e instanceof Error)return n.errors.push(e),(new s).toString(n);throw e}}}const S=/^(-?[a-zA-Z][\w-]*) *= */gm,C=/\.([a-zA-Z][\w-]*) *= */y,L=/\*?\[/y,T=/(-?[0-9]+(?:\.([0-9]+))?)/y,I=/([a-zA-Z][\w-]*)/y,M=/([$-])?([a-zA-Z][\w-]*)(?:\.([a-zA-Z][\w-]*))?/y,x=/^[A-Z][A-Z0-9_-]*$/,A=/([^{}\n\r]+)/y,D=/([^\\"\n\r]*)/y,N=/\\([\\"])/y,k=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{6})/y,B=/^\n+/,O=/ +$/,R=/ *\r?\n/g,F=/( *)$/,V=/{\s*/y,U=/\s*}/y,j=/\[\s*/y,z=/\s*] */y,H=/\s*\(\s*/y,W=/\s*->\s*/y,$=/\s*:\s*/y,K=/\s*,?\s*/y,G=/\s+/y;class X{constructor(e){this.body=[],S.lastIndex=0;let t=0;for(;;){let i=S.exec(e);if(null===i)break;t=S.lastIndex;try{this.body.push(o(i[1]))}catch(e){if(e instanceof SyntaxError)continue;throw e}}function i(i){return i.lastIndex=t,i.test(e)}function n(i,n){if(e[t]===i)return t++,!0;if(n)throw new n(`Expected ${i}`);return!1}function s(e,n){if(i(e))return t=e.lastIndex,!0;if(n)throw new n(`Expected ${e.toString()}`);return!1}function a(i){i.lastIndex=t;let n=i.exec(e);if(null===n)throw new SyntaxError(`Expected ${i.toString()}`);return t=i.lastIndex,n}function r(e){return a(e)[1]}function o(e){let t=l(),n=function(){let e=Object.create(null);for(;i(C);){let t=r(C),i=l();if(null===i)throw new SyntaxError("Expected attribute value");e[t]=i}return e}();if(null===t&&0===Object.keys(n).length)throw new SyntaxError("Expected message value or attributes");return{id:e,value:t,attributes:n}}function l(){let n;if(i(A)&&(n=r(A)),"{"===e[t]||"}"===e[t])return d(n?[n]:[],1/0);let s=w();return s?n?d([n,s],s.length):(s.value=v(s.value,B),d([s],s.length)):n?v(n,O):null}function d(n=[],s){for(;;){if(i(A)){n.push(r(A));continue}if("{"===e[t]){n.push(h());continue}if("}"===e[t])throw new SyntaxError("Unbalanced closing brace");let a=w();if(!a)break;n.push(a),s=Math.min(s,a.length)}let a=n.length-1,o=n[a];"string"==typeof o&&(n[a]=v(o,O));let l=[];for(let e of n)e instanceof Z&&(e=e.value.slice(0,e.value.length-s)),e&&l.push(e);return l}function h(){s(V,SyntaxError);let e=c();if(s(U))return e;if(s(W)){let t=function(){let e,t=[],s=0;for(;i(L);){n("*")&&(e=s);let i=p(),a=l();if(null===a)throw new SyntaxError("Expected variant value");t[s++]={key:i,value:a}}if(0===s)return null;if(void 0===e)throw new SyntaxError("Expected default variant");return{variants:t,star:e}}();return s(U,SyntaxError),{type:"select",selector:e,...t}}throw new SyntaxError("Unclosed placeable")}function c(){if("{"===e[t])return h();if(i(M)){let[,i,n,r=null]=a(M);if("$"===i)return{type:"var",name:n};if(s(H)){let a=function(){let i=[];for(;;){switch(e[t]){case")":return t++,i;case void 0:throw new SyntaxError("Unclosed argument list")}i.push(u()),s(K)}}();if("-"===i)return{type:"term",name:n,attr:r,args:a};if(x.test(n))return{type:"func",name:n,args:a};throw new SyntaxError("Function names must be all upper-case")}return"-"===i?{type:"term",name:n,attr:r,args:[]}:{type:"mesg",name:n,attr:r}}return g()}function u(){let e=c();return"mesg"!==e.type?e:s($)?{type:"narg",name:e.name,value:g()}:e}function p(){let e;return s(j,SyntaxError),e=i(T)?f():{type:"str",value:r(I)},s(z,SyntaxError),e}function g(){if(i(T))return f();if('"'===e[t])return function(){n('"',SyntaxError);let i="";for(;;){if(i+=r(D),"\\"!==e[t]){if(n('"'))return{type:"str",value:i};throw new SyntaxError("Unclosed string literal")}i+=m()}}();throw new SyntaxError("Invalid expression")}function f(){let[,e,t=""]=a(T),i=t.length;return{type:"num",value:parseFloat(e),precision:i}}function m(){if(i(N))return r(N);if(i(k)){let[,e,t]=a(k),i=parseInt(e||t,16);return i<=55295||57344<=i?String.fromCodePoint(i):"�"}throw new SyntaxError("Unknown escape sequence")}function w(){let i=t;switch(s(G),e[t]){case".":case"[":case"*":case"}":case void 0:return!1;case"{":return b(e.slice(i,t))}return" "===e[t-1]&&b(e.slice(i,t))}function v(e,t){return e.replace(t,"")}function b(e){let t=e.replace(R,"\n"),i=F.exec(e)[1].length;return new Z(t,i)}}}class Z{constructor(e,t){this.value=e,this.length=t}}},8275:(e,t,i)=>{i.d(t,{DOMLocalization:()=>S});const n=/<|&#?\w+;/,s={"http://www.w3.org/1999/xhtml":["em","strong","small","s","cite","q","dfn","abbr","data","time","code","var","samp","kbd","sub","sup","i","b","u","mark","bdi","bdo","span","br","wbr"]},a={"http://www.w3.org/1999/xhtml":{global:["title","aria-label","aria-valuetext"],a:["download"],area:["download","alt"],input:["alt","placeholder"],menuitem:["label"],menu:["label"],optgroup:["label"],option:["label"],track:["label"],img:["alt"],textarea:["placeholder"],th:["abbr"]},"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul":{global:["accesskey","aria-label","aria-valuetext","label","title","tooltiptext"],description:["value"],key:["key","keycode"],label:["value"],textbox:["placeholder","value"]}};function r(e,t){const{value:i}=t;if("string"==typeof i)if("title"===e.localName&&"http://www.w3.org/1999/xhtml"===e.namespaceURI)e.textContent=i;else if(n.test(i)){const t=e.ownerDocument.createElementNS("http://www.w3.org/1999/xhtml","template");t.innerHTML=i,function(e,t){for(const i of e.childNodes)if(i.nodeType!==i.TEXT_NODE)if(i.hasAttribute("data-l10n-name")){const n=d(t,i);e.replaceChild(n,i)}else if(u(i)){const t=h(i);e.replaceChild(t,i)}else console.warn(`An element of forbidden type "${i.localName}" was found in the translation. Only safe text-level elements and elements with data-l10n-name are allowed.`),e.replaceChild(c(i),i);t.textContent="",t.appendChild(e)}(t.content,e)}else e.textContent=i;l(t,e)}function o(e,t){if(!e)return!1;for(let i of e)if(i.name===t)return!0;return!1}function l(e,t){const i=t.hasAttribute("data-l10n-attrs")?t.getAttribute("data-l10n-attrs").split(",").map((e=>e.trim())):null;for(const n of Array.from(t.attributes))p(n.name,t,i)&&!o(e.attributes,n.name)&&t.removeAttribute(n.name);if(e.attributes)for(const n of Array.from(e.attributes))p(n.name,t,i)&&t.getAttribute(n.name)!==n.value&&t.setAttribute(n.name,n.value)}function d(e,t){const i=t.getAttribute("data-l10n-name"),n=e.querySelector(`[data-l10n-name="${i}"]`);if(!n)return console.warn(`An element named "${i}" wasn't found in the source.`),c(t);if(n.localName!==t.localName)return console.warn(`An element named "${i}" was found in the translation but its type ${t.localName} didn't match the element found in the source (${n.localName}).`),c(t);e.removeChild(n);return g(t,n.cloneNode(!1))}function h(e){const t=e.ownerDocument.createElement(e.localName);return g(e,t)}function c(e){return e.ownerDocument.createTextNode(e.textContent)}function u(e){const t=s[e.namespaceURI];return t&&t.includes(e.localName)}function p(e,t,i=null){if(i&&i.includes(e))return!0;const n=a[t.namespaceURI];if(!n)return!1;const s=e.toLowerCase(),r=t.localName;if(n.global.includes(s))return!0;if(!n[r])return!1;if(n[r].includes(s))return!0;if("http://www.w3.org/1999/xhtml"===t.namespaceURI&&"input"===r&&"value"===s){const e=t.type.toLowerCase();if("submit"===e||"button"===e||"reset"===e)return!0}return!1}function g(e,t){return t.textContent=e.textContent,l(e,t),t}class f extends Array{static from(e){return e instanceof this?e:new this(e)}}Symbol.iterator;class m extends f{constructor(e){if(super(),Symbol.asyncIterator in Object(e))this.iterator=e[Symbol.asyncIterator]();else{if(!(Symbol.iterator in Object(e)))throw new TypeError("Argument must implement the iteration protocol.");this.iterator=e[Symbol.iterator]()}}[Symbol.asyncIterator](){const e=this;let t=0;return{next:async()=>(e.length<=t&&e.push(e.iterator.next()),e[t++])}}async touchNext(e=1){let t=0;for(;t++<e;){const e=this[this.length-1];if(e&&(await e).done)break;this.push(this.iterator.next())}return this[this.length-1]}}class w{constructor(e=[],t){this.resourceIds=e,this.generateBundles=t,this.onChange(!0)}addResourceIds(e,t=!1){return this.resourceIds.push(...e),this.onChange(t),this.resourceIds.length}removeResourceIds(e){return this.resourceIds=this.resourceIds.filter((t=>!e.includes(t))),this.onChange(),this.resourceIds.length}async formatWithFallback(e,t){const i=[];let n=!1;for await(const s of this.bundles){n=!0;const a=y(t,s,e,i);if(0===a.size)break;if("undefined"!=typeof console){const e=s.locales[0],t=Array.from(a).join(", ");console.warn(`[fluent] Missing translations in ${e}: ${t}`)}}return n||"undefined"==typeof console||console.warn(`[fluent] Request for keys failed because no resource bundles got generated.\n  keys: ${JSON.stringify(e)}.\n  resourceIds: ${JSON.stringify(this.resourceIds)}.`),i}formatMessages(e){return this.formatWithFallback(e,b)}formatValues(e){return this.formatWithFallback(e,v)}async formatValue(e,t){const[i]=await this.formatValues([{id:e,args:t}]);return i}handleEvent(){this.onChange()}onChange(e=!1){this.bundles=m.from(this.generateBundles(this.resourceIds)),e&&this.bundles.touchNext(2)}}function v(e,t,i,n){return i.value?e.formatPattern(i.value,n,t):null}function b(e,t,i,n){const s={value:null,attributes:null};i.value&&(s.value=e.formatPattern(i.value,n,t));let a=Object.keys(i.attributes);if(a.length>0){s.attributes=new Array(a.length);for(let[r,o]of a.entries()){let a=e.formatPattern(i.attributes[o],n,t);s.attributes[r]={name:o,value:a}}}return s}function y(e,t,i,n){const s=[],a=new Set;return i.forEach((({id:i,args:r},o)=>{if(void 0!==n[o])return;let l=t.getMessage(i);if(l){if(s.length=0,n[o]=e(t,s,l,r),s.length>0&&"undefined"!=typeof console){const e=t.locales[0],n=s.join(", ");console.warn(`[fluent][resolver] errors in ${e}/${i}: ${n}.`)}}else a.add(i)})),a}const _="data-l10n-id",E="data-l10n-args",P=`[${_}]`;class S extends w{constructor(e,t){super(e,t),this.roots=new Set,this.pendingrAF=null,this.pendingElements=new Set,this.windowElement=null,this.mutationObserver=null,this.observerConfig={attributes:!0,characterData:!1,childList:!0,subtree:!0,attributeFilter:[_,E]}}onChange(e=!1){super.onChange(e),this.roots&&this.translateRoots()}setAttributes(e,t,i){return e.setAttribute(_,t),i?e.setAttribute(E,JSON.stringify(i)):e.removeAttribute(E),e}getAttributes(e){return{id:e.getAttribute(_),args:JSON.parse(e.getAttribute(E)||null)}}connectRoot(e){for(const t of this.roots)if(t===e||t.contains(e)||e.contains(t))throw new Error("Cannot add a root that overlaps with existing root.");if(this.windowElement){if(this.windowElement!==e.ownerDocument.defaultView)throw new Error("Cannot connect a root:\n          DOMLocalization already has a root from a different window.")}else this.windowElement=e.ownerDocument.defaultView,this.mutationObserver=new this.windowElement.MutationObserver((e=>this.translateMutations(e)));this.roots.add(e),this.mutationObserver.observe(e,this.observerConfig)}disconnectRoot(e){return this.roots.delete(e),this.pauseObserving(),0===this.roots.size?(this.mutationObserver=null,this.windowElement=null,this.pendingrAF=null,this.pendingElements.clear(),!0):(this.resumeObserving(),!1)}translateRoots(){const e=Array.from(this.roots);return Promise.all(e.map((e=>this.translateFragment(e))))}pauseObserving(){this.mutationObserver&&(this.translateMutations(this.mutationObserver.takeRecords()),this.mutationObserver.disconnect())}resumeObserving(){if(this.mutationObserver)for(const e of this.roots)this.mutationObserver.observe(e,this.observerConfig)}translateMutations(e){for(const t of e)switch(t.type){case"attributes":t.target.hasAttribute("data-l10n-id")&&this.pendingElements.add(t.target);break;case"childList":for(const e of t.addedNodes)if(e.nodeType===e.ELEMENT_NODE)if(e.childElementCount)for(const t of this.getTranslatables(e))this.pendingElements.add(t);else e.hasAttribute(_)&&this.pendingElements.add(e)}this.pendingElements.size>0&&null===this.pendingrAF&&(this.pendingrAF=this.windowElement.requestAnimationFrame((()=>{this.translateElements(Array.from(this.pendingElements)),this.pendingElements.clear(),this.pendingrAF=null})))}translateFragment(e){return this.translateElements(this.getTranslatables(e))}async translateElements(e){if(!e.length)return;const t=e.map(this.getKeysForElement),i=await this.formatMessages(t);return this.applyTranslations(e,i)}applyTranslations(e,t){this.pauseObserving();for(let i=0;i<e.length;i++)void 0!==t[i]&&r(e[i],t[i]);this.resumeObserving()}getTranslatables(e){const t=Array.from(e.querySelectorAll(P));return"function"==typeof e.hasAttribute&&e.hasAttribute(_)&&t.push(e),t}getKeysForElement(e){return{id:e.getAttribute(_),args:JSON.parse(e.getAttribute(E)||null)}}}},631:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{AltTextManager:()=>r});var s=i(1869),a=e([s]);s=(a.then?(await a)():a)[0];class r{#e=this.#t.bind(this);#i=this.#n.bind(this);#s=this.#a.bind(this);#r=null;#o;#l;#d;#h=!1;#c;#u;#p;#g;#f;#m;#w=null;#v=null;#b=null;#y;#_=null;constructor({dialog:e,optionDescription:t,optionDecorative:i,textarea:n,cancelButton:s,saveButton:a},r,o,l){this.#l=e,this.#c=t,this.#u=i,this.#f=n,this.#o=s,this.#g=a,this.#p=o,this.#d=l,this.#y=r,e.addEventListener("close",this.#E.bind(this)),e.addEventListener("contextmenu",(e=>{e.target!==this.#f&&e.preventDefault()})),s.addEventListener("click",this.#P.bind(this)),a.addEventListener("click",this.#S.bind(this)),t.addEventListener("change",this.#e),i.addEventListener("change",this.#e),this.#p.register(e)}get _elements(){return(0,s.shadow)(this,"_elements",[this.#c,this.#u,this.#f,this.#g,this.#o])}#C(){if(this.#v)return;const e=new s.DOMSVGFactory,t=this.#v=e.createElement("svg");t.setAttribute("width","0"),t.setAttribute("height","0");const i=e.createElement("defs");t.append(i);const n=e.createElement("mask");i.append(n),n.setAttribute("id","alttext-manager-mask"),n.setAttribute("maskContentUnits","objectBoundingBox");let a=e.createElement("rect");n.append(a),a.setAttribute("fill","white"),a.setAttribute("width","1"),a.setAttribute("height","1"),a.setAttribute("x","0"),a.setAttribute("y","0"),a=this.#b=e.createElement("rect"),n.append(a),a.setAttribute("fill","black"),this.#l.append(t)}async editAltText(e,t){if(this.#r||!t)return;this.#C(),this.#h=!1;for(const e of this._elements)e.addEventListener("click",this.#s);const{altText:i,decorative:n}=t.altTextData;!0===n?(this.#u.checked=!0,this.#c.checked=!1):(this.#u.checked=!1,this.#c.checked=!0),this.#w=this.#f.value=i?.trim()||"",this.#t(),this.#r=t,this.#m=e,this.#m.removeEditListeners(),this.#d._on("resize",this.#i);try{await this.#p.open(this.#l),this.#n()}catch(e){throw this.#E(),e}}#n(){if(!this.#r)return;const e=this.#l,{style:t}=e,{x:i,y:n,width:s,height:a}=this.#y.getBoundingClientRect(),{innerWidth:r,innerHeight:o}=window,{width:l,height:d}=e.getBoundingClientRect(),{x:h,y:c,width:u,height:p}=this.#r.getClientDimensions(),g=10,f="ltr"===this.#m.direction,m=Math.max(h,i),w=Math.min(h+u,i+s),v=Math.max(c,n),b=Math.min(c+p,n+a);this.#b.setAttribute("width",""+(w-m)/r),this.#b.setAttribute("height",""+(b-v)/o),this.#b.setAttribute("x",""+m/r),this.#b.setAttribute("y",""+v/o);let y=null,_=Math.max(c,0);_+=Math.min(o-(_+d),0),f?h+u+g+l<r?y=h+u+g:h>l+g&&(y=h-l-g):h>l+g?y=h-l-g:h+u+g+l<r&&(y=h+u+g),null===y&&(_=null,y=Math.max(h,0),y+=Math.min(r-(y+l),0),c>d+g?_=c-d-g:c+p+g+d<o&&(_=c+p+g)),null!==_?(e.classList.add("positioned"),f?t.left=`${y}px`:t.right=r-y-l+"px",t.top=`${_}px`):(e.classList.remove("positioned"),t.left="",t.top="")}#P(){this.#p.active===this.#l&&this.#p.close(this.#l)}#E(){this.#d.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.#r.editorType,data:this.#_||{action:"alt_text_cancel",alt_text_keyboard:!this.#h}}}),this.#_=null,this.#L(),this.#m?.addEditListeners(),this.#d._off("resize",this.#i),this.#r.altTextFinish(),this.#r=null,this.#m=null}#t(){this.#f.disabled=this.#u.checked}#S(){const e=this.#f.value.trim(),t=this.#u.checked;this.#r.altTextData={altText:e,decorative:t},this.#_={action:"alt_text_save",alt_text_description:!!e,alt_text_edit:!!this.#w&&this.#w!==e,alt_text_decorative:t,alt_text_keyboard:!this.#h},this.#P()}#a(e){0!==e.detail&&(this.#h=!0,this.#L())}#L(){for(const e of this._elements)e.removeEventListener("click",this.#s)}destroy(){this.#m=null,this.#P(),this.#v?.remove(),this.#v=this.#b=null}}n()}catch(e){n(e)}}))},2640:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{AnnotationEditorLayerBuilder:()=>o});var s=i(1869),a=i(7910),r=e([s,a]);[s,a]=r.then?(await r)():r;class o{#T=null;#I=null;#M=null;#m;constructor(e){this.pageDiv=e.pageDiv,this.pdfPage=e.pdfPage,this.accessibilityManager=e.accessibilityManager,this.l10n=e.l10n||a.NullL10n,this.annotationEditorLayer=null,this.div=null,this._cancelled=!1,this.#m=e.uiManager,this.#T=e.annotationLayer||null,this.#M=e.textLayer||null,this.#I=e.drawLayer||null}async render(e,t="display"){if("display"!==t)return;if(this._cancelled)return;const i=e.clone({dontFlip:!0});if(this.div)return this.annotationEditorLayer.update({viewport:i}),void this.show();const n=this.div=document.createElement("div");n.className="annotationEditorLayer",n.tabIndex=0,n.hidden=!0,n.dir=this.#m.direction,this.pageDiv.append(n),this.annotationEditorLayer=new s.AnnotationEditorLayer({uiManager:this.#m,div:n,accessibilityManager:this.accessibilityManager,pageIndex:this.pdfPage.pageNumber-1,l10n:this.l10n,viewport:i,annotationLayer:this.#T,textLayer:this.#M,drawLayer:this.#I});const a={viewport:i,div:n,annotations:null,intent:t};this.annotationEditorLayer.render(a),this.show()}cancel(){this._cancelled=!0,this.div&&(this.pageDiv=null,this.annotationEditorLayer.destroy(),this.div.remove())}hide(){this.div&&(this.div.hidden=!0)}show(){this.div&&!this.annotationEditorLayer.isEmpty&&(this.div.hidden=!1)}}n()}catch(e){n(e)}}))},1296:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{AnnotationEditorParams:()=>r});var s=i(1869),a=e([s]);s=(a.then?(await a)():a)[0];class r{constructor(e,t){this.eventBus=t,this.#x(e)}#x({editorFreeTextFontSize:e,editorFreeTextColor:t,editorInkColor:i,editorInkThickness:n,editorInkOpacity:a,editorStampAddImage:r}){const o=(e,t)=>{this.eventBus.dispatch("switchannotationeditorparams",{source:this,type:s.AnnotationEditorParamsType[e],value:t})};e.addEventListener("input",(function(){o("FREETEXT_SIZE",this.valueAsNumber)})),t.addEventListener("input",(function(){o("FREETEXT_COLOR",this.value)})),i.addEventListener("input",(function(){o("INK_COLOR",this.value)})),n.addEventListener("input",(function(){o("INK_THICKNESS",this.valueAsNumber)})),a.addEventListener("input",(function(){o("INK_OPACITY",this.valueAsNumber)})),r.addEventListener("click",(()=>{o("CREATE")})),this.eventBus._on("annotationeditorparamschanged",(r=>{for(const[o,l]of r.details)switch(o){case s.AnnotationEditorParamsType.FREETEXT_SIZE:e.value=l;break;case s.AnnotationEditorParamsType.FREETEXT_COLOR:t.value=l;break;case s.AnnotationEditorParamsType.INK_COLOR:i.value=l;break;case s.AnnotationEditorParamsType.INK_THICKNESS:n.value=l;break;case s.AnnotationEditorParamsType.INK_OPACITY:a.value=l}}))}}n()}catch(e){n(e)}}))},6735:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{AnnotationLayerBuilder:()=>o});var s=i(1869),a=i(4927),r=e([s]);s=(r.then?(await r)():r)[0];class o{#A=null;constructor({pageDiv:e,pdfPage:t,linkService:i,downloadManager:n,annotationStorage:s=null,imageResourcesPath:a="",renderForms:r=!0,enableScripting:o=!1,hasJSActionsPromise:l=null,fieldObjectsPromise:d=null,annotationCanvasMap:h=null,accessibilityManager:c=null}){this.pageDiv=e,this.pdfPage=t,this.linkService=i,this.downloadManager=n,this.imageResourcesPath=a,this.renderForms=r,this.annotationStorage=s,this.enableScripting=o,this._hasJSActionsPromise=l||Promise.resolve(!1),this._fieldObjectsPromise=d||Promise.resolve(null),this._annotationCanvasMap=h,this._accessibilityManager=c,this.annotationLayer=null,this.div=null,this._cancelled=!1,this._eventBus=i.eventBus}async render(e,t="display"){if(this.div){if(this._cancelled||!this.annotationLayer)return;return void this.annotationLayer.update({viewport:e.clone({dontFlip:!0})})}const[i,n,r]=await Promise.all([this.pdfPage.getAnnotations({intent:t}),this._hasJSActionsPromise,this._fieldObjectsPromise]);if(this._cancelled)return;const o=this.div=document.createElement("div");o.className="annotationLayer",this.pageDiv.append(o),0!==i.length?(this.annotationLayer=new s.AnnotationLayer({div:o,accessibilityManager:this._accessibilityManager,annotationCanvasMap:this._annotationCanvasMap,page:this.pdfPage,viewport:e.clone({dontFlip:!0})}),await this.annotationLayer.render({annotations:i,imageResourcesPath:this.imageResourcesPath,renderForms:this.renderForms,linkService:this.linkService,downloadManager:this.downloadManager,annotationStorage:this.annotationStorage,enableScripting:this.enableScripting,hasJSActions:n,fieldObjects:r}),this.linkService.isInPresentationMode&&this.#D(a.PresentationModeState.FULLSCREEN),this.#A||(this.#A=e=>{this.#D(e.state)},this._eventBus?._on("presentationmodechanged",this.#A))):this.hide()}cancel(){this._cancelled=!0,this.#A&&(this._eventBus?._off("presentationmodechanged",this.#A),this.#A=null)}hide(){this.div&&(this.div.hidden=!0)}#D(e){if(!this.div)return;let t=!1;switch(e){case a.PresentationModeState.FULLSCREEN:t=!0;break;case a.PresentationModeState.NORMAL:break;default:return}for(const e of this.div.childNodes)e.hasAttribute("data-internal-link")||(e.inert=t)}}n()}catch(e){n(e)}}))},39:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{DefaultExternalServices:()=>Ne,PDFPrintServiceFactory:()=>Oe,PDFViewerApplication:()=>ke});var s=i(4927),a=i(1869),r=i(8961),o=i(6554),l=i(3234),d=i(631),h=i(1296),c=i(1996),u=i(6329),p=i(716),g=i(3611),f=i(6312),m=i(1795),w=i(3557),v=i(6418),b=i(3706),y=i(1141),_=i(323),E=i(5119),P=i(2599),S=i(4487),C=i(3510),L=i(9290),T=i(1544),I=i(276),M=i(1096),x=e([a,d,h,u,p,g,f,m,w,y,_,E,P,C,L,T,I]);[a,d,h,u,p,g,f,m,w,y,_,E,P,C,L,T,I]=x.then?(await x)():x;const xe=1e4,Ae=1e3,De={UNKNOWN:-1,PREVIOUS:0,INITIAL:1};class Ne{constructor(){throw new Error("Cannot initialize DefaultExternalServices.")}static updateFindControlState(e){}static updateFindMatchesCount(e){}static initPassiveLoading(e){}static reportTelemetry(e){}static createDownloadManager(){throw new Error("Not implemented: createDownloadManager")}static createPreferences(){throw new Error("Not implemented: createPreferences")}static async createL10n(){throw new Error("Not implemented: createL10n")}static createScripting(){throw new Error("Not implemented: createScripting")}static updateEditorStates(e){throw new Error("Not implemented: updateEditorStates")}static getNimbusExperimentData(){return(0,a.shadow)(this,"getNimbusExperimentData",Promise.resolve(null))}}const ke={initialBookmark:document.location.hash.substring(1),_initializedCapability:new a.PromiseCapability,appConfig:null,pdfDocument:null,pdfLoadingTask:null,printService:null,pdfViewer:null,pdfThumbnailViewer:null,pdfRenderingQueue:null,pdfPresentationMode:null,pdfDocumentProperties:null,pdfLinkService:null,pdfHistory:null,pdfSidebar:null,pdfOutlineViewer:null,pdfAttachmentViewer:null,pdfLayerViewer:null,pdfCursorTools:null,pdfScriptingManager:null,store:null,downloadManager:null,overlayManager:null,preferences:null,toolbar:null,secondaryToolbar:null,eventBus:null,l10n:null,annotationEditorParams:null,isInitialViewSet:!1,downloadComplete:!1,isViewerEmbedded:window.parent!==window,url:"",baseUrl:"",_downloadUrl:"",externalServices:Ne,_boundEvents:Object.create(null),documentInfo:null,metadata:null,_contentDispositionFilename:null,_contentLength:null,_saveInProgress:!1,_wheelUnusedTicks:0,_wheelUnusedFactor:1,_touchUnusedTicks:0,_touchUnusedFactor:1,_PDFBug:null,_hasAnnotationEditors:!1,_title:document.title,_printAnnotationStoragePromise:null,_touchInfo:null,_isCtrlKeyDown:!1,_nimbusDataPromise:null,async initialize(e){let t,i;this.appConfig=e;try{await this.preferences.initializedPromise}catch(e){console.error(`initialize: "${e.message}".`)}switch(r.AppOptions.get("pdfBugEnabled")&&await this._parseHashParams(),r.AppOptions.get("viewerCssTheme")){case 1:i="is-light";break;case 2:i="is-dark"}i&&document.documentElement.classList.add(i),t=this.externalServices.createL10n(),this.l10n=await t,document.getElementsByTagName("html")[0].dir=this.l10n.getDirection(),this.l10n.translate(e.appContainer||document.documentElement),this.isViewerEmbedded&&r.AppOptions.get("externalLinkTarget")===l.LinkTarget.NONE&&r.AppOptions.set("externalLinkTarget",l.LinkTarget.TOP),await this._initializeViewerComponents(),this.bindEvents(),this.bindWindowEvents(),this._initializedCapability.resolve()},async _parseHashParams(){const e=document.location.hash.substring(1);if(!e)return;const{mainContainer:t,viewerContainer:i}=this.appConfig,n=(0,s.parseQueryString)(e);if("true"===n.get("disableworker"))try{await async function(){a.GlobalWorkerOptions.workerSrc||=r.AppOptions.get("workerSrc"),await import(a.PDFWorker.workerSrc)}()}catch(e){console.error(`_parseHashParams: "${e.message}".`)}if(n.has("disablerange")&&r.AppOptions.set("disableRange","true"===n.get("disablerange")),n.has("disablestream")&&r.AppOptions.set("disableStream","true"===n.get("disablestream")),n.has("disableautofetch")&&r.AppOptions.set("disableAutoFetch","true"===n.get("disableautofetch")),n.has("disablefontface")&&r.AppOptions.set("disableFontFace","true"===n.get("disablefontface")),n.has("disablehistory")&&r.AppOptions.set("disableHistory","true"===n.get("disablehistory")),n.has("verbosity")&&r.AppOptions.set("verbosity",0|n.get("verbosity")),n.has("textlayer"))switch(n.get("textlayer")){case"off":r.AppOptions.set("textLayerMode",s.TextLayerMode.DISABLE);break;case"visible":case"shadow":case"hover":i.classList.add(`textLayer-${n.get("textlayer")}`);try{await D(this),this._PDFBug.loadCSS()}catch(e){console.error(`_parseHashParams: "${e.message}".`)}}if(n.has("pdfbug")){r.AppOptions.set("pdfBug",!0),r.AppOptions.set("fontExtraProperties",!0);const e=n.get("pdfbug").split(",");try{await D(this),this._PDFBug.init(t,e)}catch(e){console.error(`_parseHashParams: "${e.message}".`)}}n.has("locale")&&r.AppOptions.set("locale",n.get("locale"))},async _initializeViewerComponents(){const{appConfig:e,externalServices:t,l10n:i}=this,n=r.AppOptions.get("isInAutomation")?new o.AutomationEventBus:new o.EventBus;this.eventBus=n,this.overlayManager=new c.OverlayManager;const M=new E.PDFRenderingQueue;M.onIdle=this._cleanup.bind(this),this.pdfRenderingQueue=M;const x=new l.PDFLinkService({eventBus:n,externalLinkTarget:r.AppOptions.get("externalLinkTarget"),externalLinkRel:r.AppOptions.get("externalLinkRel"),ignoreDestinationZoom:r.AppOptions.get("ignoreDestinationZoom")});this.pdfLinkService=x;const A=t.createDownloadManager();this.downloadManager=A;const D=new w.PDFFindController({linkService:x,eventBus:n,updateMatchesCountOnProgress:!0});this.findController=D;const N=new P.PDFScriptingManager({eventBus:n,externalServices:t,docProperties:this._scriptingDocProperties.bind(this)});this.pdfScriptingManager=N;const k=e.mainContainer,B=e.viewerContainer,O=r.AppOptions.get("annotationEditorMode"),R=r.AppOptions.get("isOffscreenCanvasSupported")&&a.FeatureTest.isOffscreenCanvasSupported,F=r.AppOptions.get("forcePageColors")||window.matchMedia("(forced-colors: active)").matches?{background:r.AppOptions.get("pageColorsBackground"),foreground:r.AppOptions.get("pageColorsForeground")}:null,V=e.altTextDialog?new d.AltTextManager(e.altTextDialog,k,this.overlayManager,n):null,U=new L.PDFViewer({container:k,viewer:B,eventBus:n,renderingQueue:M,linkService:x,downloadManager:A,altTextManager:V,findController:D,scriptingManager:r.AppOptions.get("enableScripting")&&N,l10n:i,textLayerMode:r.AppOptions.get("textLayerMode"),annotationMode:r.AppOptions.get("annotationMode"),annotationEditorMode:O,annotationEditorHighlightColors:r.AppOptions.get("highlightEditorColors"),imageResourcesPath:r.AppOptions.get("imageResourcesPath"),enablePrintAutoRotate:r.AppOptions.get("enablePrintAutoRotate"),isOffscreenCanvasSupported:R,maxCanvasPixels:r.AppOptions.get("maxCanvasPixels"),enablePermissions:r.AppOptions.get("enablePermissions"),pageColors:F});if(this.pdfViewer=U,M.setViewer(U),x.setViewer(U),N.setViewer(U),e.sidebar?.thumbnailView&&(this.pdfThumbnailViewer=new C.PDFThumbnailViewer({container:e.sidebar.thumbnailView,eventBus:n,renderingQueue:M,linkService:x,pageColors:F}),M.setThumbnailViewer(this.pdfThumbnailViewer)),this.isViewerEmbedded||r.AppOptions.get("disableHistory")||(this.pdfHistory=new v.PDFHistory({linkService:x,eventBus:n}),x.setHistory(this.pdfHistory)),!this.supportsIntegratedFind&&e.findBar&&(this.findBar=new m.PDFFindBar(e.findBar,n)),e.annotationEditorParams)if(O!==a.AnnotationEditorType.DISABLE){R||e.toolbar?.editorStampButton?.classList.add("hidden");const t=e.toolbar?.editorHighlightButton;t&&r.AppOptions.get("enableHighlightEditor")&&(t.hidden=!1),this.annotationEditorParams=new h.AnnotationEditorParams(e.annotationEditorParams,n)}else for(const e of["editorModeButtons","editorModeSeparator"])document.getElementById(e)?.classList.add("hidden");e.documentProperties&&(this.pdfDocumentProperties=new f.PDFDocumentProperties(e.documentProperties,this.overlayManager,n,i,(()=>this._docFilename))),e.secondaryToolbar?.cursorHandToolButton&&(this.pdfCursorTools=new g.PDFCursorTools({container:k,eventBus:n,cursorToolOnLoad:r.AppOptions.get("cursorToolOnLoad")})),e.toolbar&&(this.toolbar=new I.Toolbar(e.toolbar,n)),e.secondaryToolbar&&(this.secondaryToolbar=new T.SecondaryToolbar(e.secondaryToolbar,n)),this.supportsFullscreen&&e.secondaryToolbar?.presentationModeButton&&(this.pdfPresentationMode=new _.PDFPresentationMode({container:k,pdfViewer:U,eventBus:n})),e.passwordOverlay&&(this.passwordPrompt=new u.PasswordPrompt(e.passwordOverlay,this.overlayManager,this.isViewerEmbedded)),e.sidebar?.outlineView&&(this.pdfOutlineViewer=new y.PDFOutlineViewer({container:e.sidebar.outlineView,eventBus:n,l10n:i,linkService:x,downloadManager:A})),e.sidebar?.attachmentsView&&(this.pdfAttachmentViewer=new p.PDFAttachmentViewer({container:e.sidebar.attachmentsView,eventBus:n,l10n:i,downloadManager:A})),e.sidebar?.layersView&&(this.pdfLayerViewer=new b.PDFLayerViewer({container:e.sidebar.layersView,eventBus:n,l10n:i})),e.sidebar&&(this.pdfSidebar=new S.PDFSidebar({elements:e.sidebar,eventBus:n,l10n:i}),this.pdfSidebar.onToggled=this.forceRendering.bind(this),this.pdfSidebar.onUpdateThumbnails=()=>{for(const e of U.getCachedPageViews())e.renderingState===s.RenderingStates.FINISHED&&this.pdfThumbnailViewer.getThumbnail(e.id-1)?.setImage(e);this.pdfThumbnailViewer.scrollThumbnailIntoView(U.currentPageNumber)})},async run(e){this.preferences=this.externalServices.createPreferences(),await this.initialize(e);const{appConfig:t,eventBus:i}=this;let n;const a=document.location.search.substring(1);n=(0,s.parseQueryString)(a).get("file")??r.AppOptions.get("defaultUrl"),A(n);const o=t.openFileInput;o.value=null,o.addEventListener("change",(function(e){const{files:t}=e.target;t&&0!==t.length&&i.dispatch("fileinputchange",{source:this,fileInput:e.target})})),t.mainContainer.addEventListener("dragover",(function(e){e.preventDefault(),e.dataTransfer.dropEffect="copy"===e.dataTransfer.effectAllowed?"copy":"move"})),t.mainContainer.addEventListener("drop",(function(e){e.preventDefault();const{files:t}=e.dataTransfer;t&&0!==t.length&&i.dispatch("fileinputchange",{source:this,fileInput:e.dataTransfer})})),r.AppOptions.get("supportsDocumentFonts")||(r.AppOptions.set("disableFontFace",!0),this.l10n.get("pdfjs-web-fonts-disabled").then((e=>{console.warn(e)}))),this.supportsPrinting||(t.toolbar?.print?.classList.add("hidden"),t.secondaryToolbar?.printButton.classList.add("hidden")),this.supportsFullscreen||t.secondaryToolbar?.presentationModeButton.classList.add("hidden"),this.supportsIntegratedFind&&t.toolbar?.viewFind?.classList.add("hidden"),n?this.open({url:n}):this._hideViewBookmark()},get initialized(){return this._initializedCapability.settled},get initializedPromise(){return this._initializedCapability.promise},zoomIn(e,t){this.pdfViewer.isInPresentationMode||this.pdfViewer.increaseScale({drawingDelay:r.AppOptions.get("defaultZoomDelay"),steps:e,scaleFactor:t})},zoomOut(e,t){this.pdfViewer.isInPresentationMode||this.pdfViewer.decreaseScale({drawingDelay:r.AppOptions.get("defaultZoomDelay"),steps:e,scaleFactor:t})},zoomReset(){this.pdfViewer.isInPresentationMode||(this.pdfViewer.currentScaleValue=s.DEFAULT_SCALE_VALUE)},get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0},get page(){return this.pdfViewer.currentPageNumber},set page(e){this.pdfViewer.currentPageNumber=e},get supportsPrinting(){return Oe.instance.supportsPrinting},get supportsFullscreen(){return(0,a.shadow)(this,"supportsFullscreen",document.fullscreenEnabled)},get supportsPinchToZoom(){return(0,a.shadow)(this,"supportsPinchToZoom",r.AppOptions.get("supportsPinchToZoom"))},get supportsIntegratedFind(){return(0,a.shadow)(this,"supportsIntegratedFind",r.AppOptions.get("supportsIntegratedFind"))},get loadingBar(){const e=document.getElementById("loadingBar"),t=e?new s.ProgressBar(e):null;return(0,a.shadow)(this,"loadingBar",t)},get supportsMouseWheelZoomCtrlKey(){return(0,a.shadow)(this,"supportsMouseWheelZoomCtrlKey",r.AppOptions.get("supportsMouseWheelZoomCtrlKey"))},get supportsMouseWheelZoomMetaKey(){return(0,a.shadow)(this,"supportsMouseWheelZoomMetaKey",r.AppOptions.get("supportsMouseWheelZoomMetaKey"))},initPassiveLoading(e){throw new Error("Not implemented: initPassiveLoading")},setTitleUsingUrl(e="",t=null){this.url=e,this.baseUrl=e.split("#",1)[0],t&&(this._downloadUrl=t===e?this.baseUrl:t.split("#",1)[0]),(0,a.isDataScheme)(e)&&this._hideViewBookmark();let i=(0,a.getPdfFilenameFromUrl)(e,"");if(!i)try{i=decodeURIComponent((0,a.getFilenameFromUrl)(e))||e}catch{i=e}this.setTitle(i)},setTitle(e=this._title){if(this._title=e,this.isViewerEmbedded)return;const t=this._hasAnnotationEditors&&!this.pdfRenderingQueue.printing;document.title=`${t?"* ":""}${e}`},get _docFilename(){return this._contentDispositionFilename||(0,a.getPdfFilenameFromUrl)(this.url)},_hideViewBookmark(){const{secondaryToolbar:e}=this.appConfig;e?.viewBookmarkButton.classList.add("hidden"),e?.presentationModeButton.classList.contains("hidden")&&document.getElementById("viewBookmarkSeparator")?.classList.add("hidden")},async close(){if(this._unblockDocumentLoadEvent(),this._hideViewBookmark(),!this.pdfLoadingTask)return;if(this.pdfDocument?.annotationStorage.size>0&&this._annotationStorageModified)try{await this.save()}catch{}const e=[];e.push(this.pdfLoadingTask.destroy()),this.pdfLoadingTask=null,this.pdfDocument&&(this.pdfDocument=null,this.pdfThumbnailViewer?.setDocument(null),this.pdfViewer.setDocument(null),this.pdfLinkService.setDocument(null),this.pdfDocumentProperties?.setDocument(null)),this.pdfLinkService.externalLinkEnabled=!0,this.store=null,this.isInitialViewSet=!1,this.downloadComplete=!1,this.url="",this.baseUrl="",this._downloadUrl="",this.documentInfo=null,this.metadata=null,this._contentDispositionFilename=null,this._contentLength=null,this._saveInProgress=!1,this._hasAnnotationEditors=!1,e.push(this.pdfScriptingManager.destroyPromise,this.passwordPrompt.close()),this.setTitle(),this.pdfSidebar?.reset(),this.pdfOutlineViewer?.reset(),this.pdfAttachmentViewer?.reset(),this.pdfLayerViewer?.reset(),this.pdfHistory?.reset(),this.findBar?.reset(),this.toolbar?.reset(),this.secondaryToolbar?.reset(),this._PDFBug?.cleanup(),await Promise.all(e)},async open(e){this.pdfLoadingTask&&await this.close();const t=r.AppOptions.getAll(r.OptionKind.WORKER);Object.assign(a.GlobalWorkerOptions,t),e.url&&this.setTitleUsingUrl(e.originalUrl||e.url,e.url);const i=r.AppOptions.getAll(r.OptionKind.API),n=(0,a.getDocument)({...i,...e});return this.pdfLoadingTask=n,n.onPassword=(e,t)=>{this.isViewerEmbedded&&this._unblockDocumentLoadEvent(),this.pdfLinkService.externalLinkEnabled=!1,this.passwordPrompt.setUpdateCallback(e,t),this.passwordPrompt.open()},n.onProgress=({loaded:e,total:t})=>{this.progress(e/t)},n.promise.then((e=>{this.load(e)}),(e=>{if(n!==this.pdfLoadingTask)return;let t="pdfjs-loading-error";return e instanceof a.InvalidPDFException?t="pdfjs-invalid-file-error":e instanceof a.MissingPDFException?t="pdfjs-missing-file-error":e instanceof a.UnexpectedResponseException&&(t="pdfjs-unexpected-response-error"),this.l10n.get(t).then((t=>{throw this._documentError(t,{message:e?.message}),e}))}))},_ensureDownloadComplete(){if(!this.pdfDocument||!this.downloadComplete)throw new Error("PDF document not downloaded.")},async download(e={}){const t=this._downloadUrl,i=this._docFilename;try{this._ensureDownloadComplete();const n=await this.pdfDocument.getData(),s=new Blob([n],{type:"application/pdf"});await this.downloadManager.download(s,t,i,e)}catch{await this.downloadManager.downloadUrl(t,i,e)}},async save(e={}){if(this._saveInProgress)return;this._saveInProgress=!0,await this.pdfScriptingManager.dispatchWillSave();const t=this._downloadUrl,i=this._docFilename;try{this._ensureDownloadComplete();const n=await this.pdfDocument.saveDocument(),s=new Blob([n],{type:"application/pdf"});await this.downloadManager.download(s,t,i,e)}catch(t){console.error(`Error when saving the document: ${t.message}`),await this.download(e)}finally{await this.pdfScriptingManager.dispatchDidSave(),this._saveInProgress=!1}this._hasAnnotationEditors&&this.externalServices.reportTelemetry({type:"editing",data:{type:"save"}})},downloadOrSave(e={}){this.pdfDocument?.annotationStorage.size>0?this.save(e):this.download(e)},openInExternalApp(){this.downloadOrSave({openInExternalApp:!0})},_documentError(e,t=null){this._unblockDocumentLoadEvent(),this._otherError(e,t),this.eventBus.dispatch("documenterror",{source:this,message:e,reason:t?.message??null})},_otherError(e,t=null){const i=[`PDF.js v${a.version||"?"} (build: ${a.build||"?"})`];t&&(i.push(`Message: ${t.message}`),t.stack?i.push(`Stack: ${t.stack}`):(t.filename&&i.push(`File: ${t.filename}`),t.lineNumber&&i.push(`Line: ${t.lineNumber}`))),console.error(`${e}\n\n${i.join("\n")}`)},progress(e){if(!this.loadingBar||this.downloadComplete)return;const t=Math.round(100*e);t<=this.loadingBar.percent||(this.loadingBar.percent=t,(this.pdfDocument?.loadingParams.disableAutoFetch??r.AppOptions.get("disableAutoFetch"))&&this.loadingBar.setDisableAutoFetch())},load(e){this.pdfDocument=e,e.getDownloadInfo().then((({length:e})=>{this._contentLength=e,this.downloadComplete=!0,this.loadingBar?.hide(),o.then((()=>{this.eventBus.dispatch("documentloaded",{source:this})}))}));const t=e.getPageLayout().catch((()=>{})),i=e.getPageMode().catch((()=>{})),n=e.getOpenAction().catch((()=>{}));this.toolbar?.setPagesCount(e.numPages,!1),this.secondaryToolbar?.setPagesCount(e.numPages),this.pdfLinkService.setDocument(e),this.pdfDocumentProperties?.setDocument(e);const a=this.pdfViewer;a.setDocument(e);const{firstPagePromise:o,onePageRendered:l,pagesPromise:d}=a;this.pdfThumbnailViewer?.setDocument(e);const h=(this.store=new M.ViewHistory(e.fingerprints[0])).getMultiple({page:null,zoom:s.DEFAULT_SCALE_VALUE,scrollLeft:"0",scrollTop:"0",rotation:null,sidebarView:s.SidebarView.UNKNOWN,scrollMode:s.ScrollMode.UNKNOWN,spreadMode:s.SpreadMode.UNKNOWN}).catch((()=>{}));o.then((o=>{this.loadingBar?.setWidth(this.appConfig.viewerContainer),this._initializeAnnotationStorageCallbacks(e),Promise.all([s.animationStarted,h,t,i,n]).then((async([t,i,n,o,l])=>{const h=r.AppOptions.get("viewOnLoad");this._initializePdfHistory({fingerprint:e.fingerprints[0],viewOnLoad:h,initialDest:l?.dest});const c=this.initialBookmark,u=r.AppOptions.get("defaultZoomValue");let p=u?`zoom=${u}`:null,g=null,f=r.AppOptions.get("sidebarViewOnLoad"),m=r.AppOptions.get("scrollModeOnLoad"),w=r.AppOptions.get("spreadModeOnLoad");if(i?.page&&h!==De.INITIAL&&(p=`page=${i.page}&zoom=${u||i.zoom},${i.scrollLeft},${i.scrollTop}`,g=parseInt(i.rotation,10),f===s.SidebarView.UNKNOWN&&(f=0|i.sidebarView),m===s.ScrollMode.UNKNOWN&&(m=0|i.scrollMode),w===s.SpreadMode.UNKNOWN&&(w=0|i.spreadMode)),o&&f===s.SidebarView.UNKNOWN&&(f=(0,s.apiPageModeToSidebarView)(o)),n&&m===s.ScrollMode.UNKNOWN&&w===s.SpreadMode.UNKNOWN){w=(0,s.apiPageLayoutToViewerModes)(n).spreadMode}this.setInitialView(p,{rotation:g,sidebarView:f,scrollMode:m,spreadMode:w}),this.eventBus.dispatch("documentinit",{source:this}),this.isViewerEmbedded||a.focus(),await Promise.race([d,new Promise((e=>{setTimeout(e,xe)}))]),(c||p)&&(a.hasEqualPageSizes||(this.initialBookmark=c,a.currentScaleValue=a.currentScaleValue,this.setInitialView(p)))})).catch((()=>{this.setInitialView()})).then((function(){a.update()}))})),d.then((()=>{this._unblockDocumentLoadEvent(),this._initializeAutoPrint(e,n)}),(e=>{this.l10n.get("pdfjs-loading-error").then((t=>{this._documentError(t,{message:e?.message})}))})),l.then((t=>{this.externalServices.reportTelemetry({type:"pageInfo",timestamp:t.timestamp}),this.pdfOutlineViewer&&e.getOutline().then((t=>{e===this.pdfDocument&&this.pdfOutlineViewer.render({outline:t,pdfDocument:e})})),this.pdfAttachmentViewer&&e.getAttachments().then((t=>{e===this.pdfDocument&&this.pdfAttachmentViewer.render({attachments:t})})),this.pdfLayerViewer&&a.optionalContentConfigPromise.then((t=>{e===this.pdfDocument&&this.pdfLayerViewer.render({optionalContentConfig:t,pdfDocument:e})}))})),this._initializePageLabels(e),this._initializeMetadata(e)},async _scriptingDocProperties(e){return(this.documentInfo||(await new Promise((e=>{this.eventBus._on("metadataloaded",e,{once:!0})})),e===this.pdfDocument))&&(this._contentLength||(await new Promise((e=>{this.eventBus._on("documentloaded",e,{once:!0})})),e===this.pdfDocument))?{...this.documentInfo,baseURL:this.baseUrl,filesize:this._contentLength,filename:this._docFilename,metadata:this.metadata?.getRaw(),authors:this.metadata?.get("dc:creator"),numPages:this.pagesCount,URL:this.url}:null},async _initializeAutoPrint(e,t){const[i,n]=await Promise.all([t,this.pdfViewer.enableScripting?null:e.getJSActions()]);if(e!==this.pdfDocument)return;let a="Print"===i?.action;if(n){console.warn("Warning: JavaScript support is not enabled");for(const e in n){if(a)break;switch(e){case"WillClose":case"WillSave":case"DidSave":case"WillPrint":case"DidPrint":continue}a=n[e].some((e=>s.AutoPrintRegExp.test(e)))}}a&&this.triggerPrinting()},async _initializeMetadata(e){const{info:t,metadata:i,contentDispositionFilename:n,contentLength:s}=await e.getMetadata();if(e!==this.pdfDocument)return;this.documentInfo=t,this.metadata=i,this._contentDispositionFilename??=n,this._contentLength??=s,console.log(`PDF ${e.fingerprints[0]} [${t.PDFFormatVersion} ${(t.Producer||"-").trim()} / ${(t.Creator||"-").trim()}] (PDF.js: ${a.version||"?"} [${a.build||"?"}])`);let r=t.Title;const o=i?.get("dc:title");o&&("Untitled"===o||/[\uFFF0-\uFFFF]/g.test(o)||(r=o)),r?this.setTitle(`${r} - ${this._contentDispositionFilename||this._title}`):this._contentDispositionFilename&&this.setTitle(this._contentDispositionFilename),!t.IsXFAPresent||t.IsAcroFormPresent||e.isPureXfa?!t.IsAcroFormPresent&&!t.IsXFAPresent||this.pdfViewer.renderForms||console.warn("Warning: Interactive form support is not enabled"):e.loadingParams.enableXfa?console.warn("Warning: XFA Foreground documents are not supported"):console.warn("Warning: XFA support is not enabled"),t.IsSignaturesPresent&&console.warn("Warning: Digital signatures validation is not supported"),this.eventBus.dispatch("metadataloaded",{source:this})},async _initializePageLabels(e){const t=await e.getPageLabels();if(e!==this.pdfDocument)return;if(!t||r.AppOptions.get("disablePageLabels"))return;const i=t.length;let n=0,s=0;for(let e=0;e<i;e++){const i=t[e];if(i===(e+1).toString())n++;else{if(""!==i)break;s++}}if(n>=i||s>=i)return;const{pdfViewer:a,pdfThumbnailViewer:o,toolbar:l}=this;a.setPageLabels(t),o?.setPageLabels(t),l?.setPagesCount(i,!0),l?.setPageNumber(a.currentPageNumber,a.currentPageLabel)},_initializePdfHistory({fingerprint:e,viewOnLoad:t,initialDest:i=null}){this.pdfHistory&&(this.pdfHistory.initialize({fingerprint:e,resetHistory:t===De.INITIAL,updateUrl:r.AppOptions.get("historyUpdateUrl")}),this.pdfHistory.initialBookmark&&(this.initialBookmark=this.pdfHistory.initialBookmark,this.initialRotation=this.pdfHistory.initialRotation),i&&!this.initialBookmark&&t===De.UNKNOWN&&(this.initialBookmark=JSON.stringify(i),this.pdfHistory.push({explicitDest:i,pageNumber:null})))},_initializeAnnotationStorageCallbacks(e){if(e!==this.pdfDocument)return;const{annotationStorage:t}=e;t.onSetModified=()=>{window.addEventListener("beforeunload",Me),this._annotationStorageModified=!0},t.onResetModified=()=>{window.removeEventListener("beforeunload",Me),delete this._annotationStorageModified},t.onAnnotationEditor=e=>{this._hasAnnotationEditors=!!e,this.setTitle(),e&&this.externalServices.reportTelemetry({type:"editing",data:{type:e}})}},setInitialView(e,{rotation:t,sidebarView:i,scrollMode:n,spreadMode:a}={}){const r=e=>{(0,s.isValidRotation)(e)&&(this.pdfViewer.pagesRotation=e)};this.isInitialViewSet=!0,this.pdfSidebar?.setInitialView(i),((e,t)=>{(0,s.isValidScrollMode)(e)&&(this.pdfViewer.scrollMode=e),(0,s.isValidSpreadMode)(t)&&(this.pdfViewer.spreadMode=t)})(n,a),this.initialBookmark?(r(this.initialRotation),delete this.initialRotation,this.pdfLinkService.setHash(this.initialBookmark),this.initialBookmark=null):e&&(r(t),this.pdfLinkService.setHash(e)),this.toolbar?.setPageNumber(this.pdfViewer.currentPageNumber,this.pdfViewer.currentPageLabel),this.secondaryToolbar?.setPageNumber(this.pdfViewer.currentPageNumber),this.pdfViewer.currentScaleValue||(this.pdfViewer.currentScaleValue=s.DEFAULT_SCALE_VALUE)},_cleanup(){this.pdfDocument&&(this.pdfViewer.cleanup(),this.pdfThumbnailViewer?.cleanup(),this.pdfDocument.cleanup(r.AppOptions.get("fontExtraProperties")))},forceRendering(){this.pdfRenderingQueue.printing=!!this.printService,this.pdfRenderingQueue.isThumbnailViewEnabled=this.pdfSidebar?.visibleView===s.SidebarView.THUMBS,this.pdfRenderingQueue.renderHighestPriority()},beforePrint(){if(this._printAnnotationStoragePromise=this.pdfScriptingManager.dispatchWillPrint().catch((()=>{})).then((()=>this.pdfDocument?.annotationStorage.print)),this.printService)return;if(!this.supportsPrinting)return void this.l10n.get("pdfjs-printing-not-supported").then((e=>{this._otherError(e)}));if(!this.pdfViewer.pageViewsReady)return void this.l10n.get("pdfjs-printing-not-ready").then((e=>{window.alert(e)}));const e=this.pdfViewer.getPagesOverview(),t=this.appConfig.printContainer,i=r.AppOptions.get("printResolution"),n=this.pdfViewer.optionalContentConfigPromise,s=Oe.instance.createPrintService(this.pdfDocument,e,t,i,n,this._printAnnotationStoragePromise);this.printService=s,this.forceRendering(),this.setTitle(),s.layout(),this._hasAnnotationEditors&&this.externalServices.reportTelemetry({type:"editing",data:{type:"print"}})},afterPrint(){this._printAnnotationStoragePromise&&(this._printAnnotationStoragePromise.then((()=>{this.pdfScriptingManager.dispatchDidPrint()})),this._printAnnotationStoragePromise=null),this.printService&&(this.printService.destroy(),this.printService=null,this.pdfDocument?.annotationStorage.resetModified()),this.forceRendering(),this.setTitle()},rotatePages(e){this.pdfViewer.pagesRotation+=e},requestPresentationMode(){this.pdfPresentationMode?.request()},triggerPrinting(){this.supportsPrinting&&window.print()},bindEvents(){const{eventBus:e,_boundEvents:t}=this;t.beforePrint=this.beforePrint.bind(this),t.afterPrint=this.afterPrint.bind(this),e._on("resize",H),e._on("hashchange",W),e._on("beforeprint",t.beforePrint),e._on("afterprint",t.afterPrint),e._on("pagerender",k),e._on("pagerendered",B),e._on("updateviewarea",U),e._on("pagechanging",be),e._on("scalechanging",we),e._on("rotationchanging",ve),e._on("sidebarviewchanged",V),e._on("pagemode",O),e._on("namedaction",R),e._on("presentationmodechanged",F),e._on("presentationmode",G),e._on("switchannotationeditormode",X),e._on("switchannotationeditorparams",Z),e._on("print",q),e._on("download",Q),e._on("openinexternalapp",Y),e._on("firstpage",J),e._on("lastpage",ee),e._on("nextpage",te),e._on("previouspage",ie),e._on("zoomin",ne),e._on("zoomout",se),e._on("zoomreset",ae),e._on("pagenumberchanged",re),e._on("scalechanged",oe),e._on("rotatecw",le),e._on("rotateccw",de),e._on("optionalcontentconfig",he),e._on("switchscrollmode",ce),e._on("scrollmodechanged",j),e._on("switchspreadmode",ue),e._on("spreadmodechanged",z),e._on("documentproperties",pe),e._on("findfromurlhash",ge),e._on("updatefindmatchescount",fe),e._on("updatefindcontrolstate",me),r.AppOptions.get("pdfBug")&&(t.reportPageStatsPDFBug=N,e._on("pagerendered",t.reportPageStatsPDFBug),e._on("pagechanging",t.reportPageStatsPDFBug)),e._on("fileinputchange",$),e._on("openfile",K)},bindWindowEvents(){const{eventBus:e,_boundEvents:t}=this;!function e(i=null){i&&ke.pdfViewer.refresh();const n=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`);n.addEventListener("change",e,{once:!0}),t.removeWindowResolutionChange||=function(){n.removeEventListener("change",e),t.removeWindowResolutionChange=null}}(),t.windowResize=()=>{e.dispatch("resize",{source:window})},t.windowHashChange=()=>{e.dispatch("hashchange",{source:window,hash:document.location.hash.substring(1)})},t.windowBeforePrint=()=>{e.dispatch("beforeprint",{source:window})},t.windowAfterPrint=()=>{e.dispatch("afterprint",{source:window})},t.windowUpdateFromSandbox=t=>{e.dispatch("updatefromsandbox",{source:window,detail:t.detail})},window.addEventListener("visibilitychange",ye),window.addEventListener("wheel",Ee,{passive:!1}),window.addEventListener("touchstart",Pe,{passive:!1}),window.addEventListener("touchmove",Se,{passive:!1}),window.addEventListener("touchend",Ce,{passive:!1}),window.addEventListener("click",Le),window.addEventListener("keydown",Ie),window.addEventListener("keyup",Te),window.addEventListener("resize",t.windowResize),window.addEventListener("hashchange",t.windowHashChange),window.addEventListener("beforeprint",t.windowBeforePrint),window.addEventListener("afterprint",t.windowAfterPrint),window.addEventListener("updatefromsandbox",t.windowUpdateFromSandbox)},unbindEvents(){const{eventBus:e,_boundEvents:t}=this;e._off("resize",H),e._off("hashchange",W),e._off("beforeprint",t.beforePrint),e._off("afterprint",t.afterPrint),e._off("pagerender",k),e._off("pagerendered",B),e._off("updateviewarea",U),e._off("pagechanging",be),e._off("scalechanging",we),e._off("rotationchanging",ve),e._off("sidebarviewchanged",V),e._off("pagemode",O),e._off("namedaction",R),e._off("presentationmodechanged",F),e._off("presentationmode",G),e._off("print",q),e._off("download",Q),e._off("openinexternalapp",Y),e._off("firstpage",J),e._off("lastpage",ee),e._off("nextpage",te),e._off("previouspage",ie),e._off("zoomin",ne),e._off("zoomout",se),e._off("zoomreset",ae),e._off("pagenumberchanged",re),e._off("scalechanged",oe),e._off("rotatecw",le),e._off("rotateccw",de),e._off("optionalcontentconfig",he),e._off("switchscrollmode",ce),e._off("scrollmodechanged",j),e._off("switchspreadmode",ue),e._off("spreadmodechanged",z),e._off("documentproperties",pe),e._off("findfromurlhash",ge),e._off("updatefindmatchescount",fe),e._off("updatefindcontrolstate",me),t.reportPageStatsPDFBug&&(e._off("pagerendered",t.reportPageStatsPDFBug),e._off("pagechanging",t.reportPageStatsPDFBug),t.reportPageStatsPDFBug=null),e._off("fileinputchange",$),e._off("openfile",K),t.beforePrint=null,t.afterPrint=null},unbindWindowEvents(){const{_boundEvents:e}=this;window.removeEventListener("visibilitychange",ye),window.removeEventListener("wheel",Ee,{passive:!1}),window.removeEventListener("touchstart",Pe,{passive:!1}),window.removeEventListener("touchmove",Se,{passive:!1}),window.removeEventListener("touchend",Ce,{passive:!1}),window.removeEventListener("click",Le),window.removeEventListener("keydown",Ie),window.removeEventListener("keyup",Te),window.removeEventListener("resize",e.windowResize),window.removeEventListener("hashchange",e.windowHashChange),window.removeEventListener("beforeprint",e.windowBeforePrint),window.removeEventListener("afterprint",e.windowAfterPrint),window.removeEventListener("updatefromsandbox",e.windowUpdateFromSandbox),e.removeWindowResolutionChange?.(),e.windowResize=null,e.windowHashChange=null,e.windowBeforePrint=null,e.windowAfterPrint=null,e.windowUpdateFromSandbox=null},_accumulateTicks(e,t){(this[t]>0&&e<0||this[t]<0&&e>0)&&(this[t]=0),this[t]+=e;const i=Math.trunc(this[t]);return this[t]-=i,i},_accumulateFactor(e,t,i){if(1===t)return 1;(this[i]>1&&t<1||this[i]<1&&t>1)&&(this[i]=1);const n=Math.floor(e*t*this[i]*100)/(100*e);return this[i]=t/n,n},_centerAtPos(e,t,i){const{pdfViewer:n}=this,s=n.currentScale/e-1;if(0!==s){const[e,a]=n.containerTopLeft;n.container.scrollLeft+=(t-a)*s,n.container.scrollTop+=(i-e)*s}},_unblockDocumentLoadEvent(){document.blockUnblockOnload?.(!1),this._unblockDocumentLoadEvent=()=>{}},get scriptingReady(){return this.pdfScriptingManager.ready}};{const Re=["null","http://mozilla.github.io","https://mozilla.github.io"];var A=function(e){if(e)try{const t=new URL(window.location.href).origin||"null";if(Re.includes(t))return;if(new URL(e,window.location.href).origin!==t)throw new Error("file origin does not match viewer's")}catch(e){throw ke.l10n.get("pdfjs-loading-error").then((t=>{ke._documentError(t,{message:e?.message})})),e}}}async function D(e){const{debuggerScriptPath:t}=e.appConfig,{PDFBug:i}=await import(t);e._PDFBug=i}function N({pageNumber:e}){if(!globalThis.Stats?.enabled)return;const t=ke.pdfViewer.getPageView(e-1);globalThis.Stats.add(e,t?.pdfPage?.stats)}function k({pageNumber:e}){e===ke.page&&ke.toolbar?.updateLoadingIndicatorState(!0)}function B({pageNumber:e,error:t}){if(e===ke.page&&ke.toolbar?.updateLoadingIndicatorState(!1),ke.pdfSidebar?.visibleView===s.SidebarView.THUMBS){const t=ke.pdfViewer.getPageView(e-1),i=ke.pdfThumbnailViewer?.getThumbnail(e-1);t&&i?.setImage(t)}t&&ke.l10n.get("pdfjs-rendering-error").then((e=>{ke._otherError(e,t)}))}function O({mode:e}){let t;switch(e){case"thumbs":t=s.SidebarView.THUMBS;break;case"bookmarks":case"outline":t=s.SidebarView.OUTLINE;break;case"attachments":t=s.SidebarView.ATTACHMENTS;break;case"layers":t=s.SidebarView.LAYERS;break;case"none":t=s.SidebarView.NONE;break;default:return void console.error('Invalid "pagemode" hash parameter: '+e)}ke.pdfSidebar?.switchView(t,!0)}function R(e){switch(e.action){case"GoToPage":ke.appConfig.toolbar?.pageNumber.select();break;case"Find":ke.supportsIntegratedFind||ke?.findBar.toggle();break;case"Print":ke.triggerPrinting();break;case"SaveAs":ke.downloadOrSave()}}function F(e){ke.pdfViewer.presentationModeState=e.state}function V({view:e}){ke.pdfRenderingQueue.isThumbnailViewEnabled=e===s.SidebarView.THUMBS,ke.isInitialViewSet&&ke.store?.set("sidebarView",e).catch((()=>{}))}function U({location:e}){if(ke.isInitialViewSet&&ke.store?.setMultiple({page:e.pageNumber,zoom:e.scale,scrollLeft:e.left,scrollTop:e.top,rotation:e.rotation}).catch((()=>{})),ke.appConfig.secondaryToolbar){const t=ke.pdfLinkService.getAnchorUrl(e.pdfOpenParams);ke.appConfig.secondaryToolbar.viewBookmarkButton.href=t}}function j(e){ke.isInitialViewSet&&!ke.pdfViewer.isInPresentationMode&&ke.store?.set("scrollMode",e.mode).catch((()=>{}))}function z(e){ke.isInitialViewSet&&!ke.pdfViewer.isInPresentationMode&&ke.store?.set("spreadMode",e.mode).catch((()=>{}))}function H(){const{pdfDocument:e,pdfViewer:t,pdfRenderingQueue:i}=ke;if(i.printing&&window.matchMedia("print").matches)return;if(!e)return;const n=t.currentScaleValue;"auto"!==n&&"page-fit"!==n&&"page-width"!==n||(t.currentScaleValue=n),t.update()}function W(e){const t=e.hash;t&&(ke.isInitialViewSet?ke.pdfHistory?.popStateInProgress||ke.pdfLinkService.setHash(t):ke.initialBookmark=t)}var $=function(e){if(ke.pdfViewer?.isInPresentationMode)return;const t=e.fileInput.files[0];ke.open({url:URL.createObjectURL(t),originalUrl:t.name})},K=function(e){ke.appConfig.openFileInput.click()};function G(){ke.requestPresentationMode()}function X(e){ke.pdfViewer.annotationEditorMode=e}function Z(e){ke.pdfViewer.annotationEditorParams=e}function q(){ke.triggerPrinting()}function Q(){ke.downloadOrSave()}function Y(){ke.openInExternalApp()}function J(){ke.page=1}function ee(){ke.page=ke.pagesCount}function te(){ke.pdfViewer.nextPage()}function ie(){ke.pdfViewer.previousPage()}function ne(){ke.zoomIn()}function se(){ke.zoomOut()}function ae(){ke.zoomReset()}function re(e){const t=ke.pdfViewer;""!==e.value&&ke.pdfLinkService.goToPage(e.value),e.value!==t.currentPageNumber.toString()&&e.value!==t.currentPageLabel&&ke.toolbar?.setPageNumber(t.currentPageNumber,t.currentPageLabel)}function oe(e){ke.pdfViewer.currentScaleValue=e.value}function le(){ke.rotatePages(90)}function de(){ke.rotatePages(-90)}function he(e){ke.pdfViewer.optionalContentConfigPromise=e.promise}function ce(e){ke.pdfViewer.scrollMode=e.mode}function ue(e){ke.pdfViewer.spreadMode=e.mode}function pe(){ke.pdfDocumentProperties?.open()}function ge(e){ke.eventBus.dispatch("find",{source:e.source,type:"",query:e.query,caseSensitive:!1,entireWord:!1,highlightAll:!0,findPrevious:!1,matchDiacritics:!0})}function fe({matchesCount:e}){ke.supportsIntegratedFind?ke.externalServices.updateFindMatchesCount(e):ke.findBar.updateResultsCount(e)}function me({state:e,previous:t,matchesCount:i,rawQuery:n}){ke.supportsIntegratedFind?ke.externalServices.updateFindControlState({result:e,findPrevious:t,matchesCount:i,rawQuery:n}):ke.findBar?.updateUIState(e,t,i)}function we(e){ke.toolbar?.setPageScale(e.presetValue,e.scale),ke.pdfViewer.update()}function ve(e){ke.pdfThumbnailViewer&&(ke.pdfThumbnailViewer.pagesRotation=e.pagesRotation),ke.forceRendering(),ke.pdfViewer.currentPageNumber=e.pageNumber}function be({pageNumber:e,pageLabel:t}){ke.toolbar?.setPageNumber(e,t),ke.secondaryToolbar?.setPageNumber(e),ke.pdfSidebar?.visibleView===s.SidebarView.THUMBS&&ke.pdfThumbnailViewer?.scrollThumbnailIntoView(e);const i=ke.pdfViewer.getPageView(e-1);ke.toolbar?.updateLoadingIndicatorState(i?.renderingState===s.RenderingStates.RUNNING)}function ye(e){"visible"===document.visibilityState&&_e()}let Be=null;function _e(){Be&&clearTimeout(Be),Be=setTimeout((function(){Be=null}),Ae)}function Ee(e){const{pdfViewer:t,supportsMouseWheelZoomCtrlKey:i,supportsMouseWheelZoomMetaKey:n,supportsPinchToZoom:a}=ke;if(t.isInPresentationMode)return;const r=e.deltaMode;let o=Math.exp(-e.deltaY/100);const l=e.ctrlKey&&!ke._isCtrlKeyDown&&r===WheelEvent.DOM_DELTA_PIXEL&&0===e.deltaX&&(Math.abs(o-1)<.05||!1)&&0===e.deltaZ;if(l||e.ctrlKey&&i||e.metaKey&&n){if(e.preventDefault(),Be||"hidden"===document.visibilityState||ke.overlayManager.active)return;const i=t.currentScale;if(l&&a)if(o=ke._accumulateFactor(i,o,"_wheelUnusedFactor"),o<1)ke.zoomOut(null,o);else{if(!(o>1))return;ke.zoomIn(null,o)}else{const t=(0,s.normalizeWheelEventDirection)(e);let i=0;if(r===WheelEvent.DOM_DELTA_LINE||r===WheelEvent.DOM_DELTA_PAGE)i=Math.abs(t)>=1?Math.sign(t):ke._accumulateTicks(t,"_wheelUnusedTicks");else{const e=30;i=ke._accumulateTicks(t/e,"_wheelUnusedTicks")}if(i<0)ke.zoomOut(-i);else{if(!(i>0))return;ke.zoomIn(i)}}ke._centerAtPos(i,e.clientX,e.clientY)}else _e()}function Pe(e){if(ke.pdfViewer.isInPresentationMode||e.touches.length<2)return;if(e.preventDefault(),2!==e.touches.length||ke.overlayManager.active)return void(ke._touchInfo=null);let[t,i]=e.touches;t.identifier>i.identifier&&([t,i]=[i,t]),ke._touchInfo={touch0X:t.pageX,touch0Y:t.pageY,touch1X:i.pageX,touch1Y:i.pageY}}function Se(e){if(!ke._touchInfo||2!==e.touches.length)return;const{pdfViewer:t,_touchInfo:i,supportsPinchToZoom:n}=ke;let[s,a]=e.touches;s.identifier>a.identifier&&([s,a]=[a,s]);const{pageX:r,pageY:o}=s,{pageX:l,pageY:d}=a,{touch0X:h,touch0Y:c,touch1X:u,touch1Y:p}=i;if(Math.abs(h-r)<=1&&Math.abs(c-o)<=1&&Math.abs(u-l)<=1&&Math.abs(p-d)<=1)return;if(i.touch0X=r,i.touch0Y=o,i.touch1X=l,i.touch1Y=d,h===r&&c===o){const e=u-r,t=p-o,i=l-r,n=d-o,s=e*n-t*i;if(Math.abs(s)>.02*Math.hypot(e,t)*Math.hypot(i,n))return}else if(u===l&&p===d){const e=h-l,t=c-d,i=r-l,n=o-d,s=e*n-t*i;if(Math.abs(s)>.02*Math.hypot(e,t)*Math.hypot(i,n))return}else{if((r-h)*(l-u)+(o-c)*(d-p)>=0)return}e.preventDefault();const g=Math.hypot(r-l,o-d)||1,f=Math.hypot(h-u,c-p)||1,m=t.currentScale;if(n){const e=ke._accumulateFactor(m,g/f,"_touchUnusedFactor");if(e<1)ke.zoomOut(null,e);else{if(!(e>1))return;ke.zoomIn(null,e)}}else{const e=30,t=ke._accumulateTicks((g-f)/e,"_touchUnusedTicks");if(t<0)ke.zoomOut(-t);else{if(!(t>0))return;ke.zoomIn(t)}}ke._centerAtPos(m,(r+l)/2,(o+d)/2)}function Ce(e){ke._touchInfo&&(e.preventDefault(),ke._touchInfo=null,ke._touchUnusedTicks=0,ke._touchUnusedFactor=1)}function Le(e){if(!ke.secondaryToolbar?.isOpen)return;const t=ke.appConfig;(ke.pdfViewer.containsElement(e.target)||t.toolbar?.container.contains(e.target)&&e.target!==t.secondaryToolbar?.toggleButton)&&ke.secondaryToolbar.close()}function Te(e){"Control"===e.key&&(ke._isCtrlKeyDown=!1)}function Ie(e){if(ke._isCtrlKeyDown="Control"===e.key,ke.overlayManager.active)return;const{eventBus:t,pdfViewer:i}=ke,n=i.isInPresentationMode;let a=!1,r=!1;const o=(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0);if(1===o||8===o||5===o||12===o)switch(e.keyCode){case 70:ke.supportsIntegratedFind||e.shiftKey||(ke.findBar?.open(),a=!0);break;case 71:if(!ke.supportsIntegratedFind){const{state:e}=ke.findController;if(e){const i={source:window,type:"again",findPrevious:5===o||12===o};t.dispatch("find",{...e,...i})}a=!0}break;case 61:case 107:case 187:case 171:ke.zoomIn(),a=!0;break;case 173:case 109:case 189:ke.zoomOut(),a=!0;break;case 48:case 96:n||(setTimeout((function(){ke.zoomReset()})),a=!1);break;case 38:(n||ke.page>1)&&(ke.page=1,a=!0,r=!0);break;case 40:(n||ke.page<ke.pagesCount)&&(ke.page=ke.pagesCount,a=!0,r=!0)}if(1===o||8===o)switch(e.keyCode){case 83:t.dispatch("download",{source:window}),a=!0;break;case 79:t.dispatch("openfile",{source:window}),a=!0}if(3===o||10===o)switch(e.keyCode){case 80:ke.requestPresentationMode(),a=!0,ke.externalServices.reportTelemetry({type:"buttons",data:{id:"presentationModeKeyboard"}});break;case 71:ke.appConfig.toolbar&&(ke.appConfig.toolbar.pageNumber.select(),a=!0)}if(a)return r&&!n&&i.focus(),void e.preventDefault();const l=(0,s.getActiveOrFocusedElement)(),d=l?.tagName.toUpperCase();if("INPUT"!==d&&"TEXTAREA"!==d&&"SELECT"!==d&&("BUTTON"!==d||13!==e.keyCode&&32!==e.keyCode)&&!l?.isContentEditable||27===e.keyCode){if(0===o){let t=0,o=!1;switch(e.keyCode){case 38:case 33:i.isVerticalScrollbarEnabled&&(o=!0),t=-1;break;case 8:n||(o=!0),t=-1;break;case 37:i.isHorizontalScrollbarEnabled&&(o=!0);case 75:case 80:t=-1;break;case 27:ke.secondaryToolbar?.isOpen&&(ke.secondaryToolbar.close(),a=!0),!ke.supportsIntegratedFind&&ke.findBar?.opened&&(ke.findBar.close(),a=!0);break;case 40:case 34:i.isVerticalScrollbarEnabled&&(o=!0),t=1;break;case 13:case 32:n||(o=!0),t=1;break;case 39:i.isHorizontalScrollbarEnabled&&(o=!0);case 74:case 78:t=1;break;case 36:(n||ke.page>1)&&(ke.page=1,a=!0,r=!0);break;case 35:(n||ke.page<ke.pagesCount)&&(ke.page=ke.pagesCount,a=!0,r=!0);break;case 83:ke.pdfCursorTools?.switchTool(s.CursorTool.SELECT);break;case 72:ke.pdfCursorTools?.switchTool(s.CursorTool.HAND);break;case 82:ke.rotatePages(90);break;case 115:ke.pdfSidebar?.toggle()}0===t||o&&"page-fit"!==i.currentScaleValue||(t>0?i.nextPage():i.previousPage(),a=!0)}if(4===o)switch(e.keyCode){case 13:case 32:if(!n&&"page-fit"!==i.currentScaleValue)break;i.previousPage(),a=!0;break;case 82:ke.rotatePages(-90)}a||n||(e.keyCode>=33&&e.keyCode<=40||32===e.keyCode&&"BUTTON"!==d)&&(r=!0),r&&!i.containsElement(l)&&i.focus(),a&&e.preventDefault()}}function Me(e){return e.preventDefault(),e.returnValue="",!1}const Oe={instance:{supportsPrinting:!1,createPrintService(){throw new Error("Not implemented: createPrintService")}}};n()}catch(Fe){n(Fe)}}))},8961:(e,t,i)=>{i.d(t,{AppOptions:()=>o,OptionKind:()=>s,compatibilityParams:()=>n});const n=Object.create(null);{const e=navigator.userAgent||"",t=navigator.platform||"",i=navigator.maxTouchPoints||1,s=/Android/.test(e);(/\b(iPad|iPhone|iPod)(?=;)/.test(e)||"MacIntel"===t&&i>1||s)&&(n.maxCanvasPixels=5242880)}const s={BROWSER:1,VIEWER:2,API:4,WORKER:8,PREFERENCE:128},a={canvasMaxAreaInBytes:{value:-1,kind:s.BROWSER+s.API},isInAutomation:{value:!1,kind:s.BROWSER},supportsDocumentFonts:{value:!0,kind:s.BROWSER},supportsIntegratedFind:{value:!1,kind:s.BROWSER},supportsMouseWheelZoomCtrlKey:{value:!0,kind:s.BROWSER},supportsMouseWheelZoomMetaKey:{value:!0,kind:s.BROWSER},supportsPinchToZoom:{value:!0,kind:s.BROWSER},annotationEditorMode:{value:0,kind:s.VIEWER+s.PREFERENCE},annotationMode:{value:2,kind:s.VIEWER+s.PREFERENCE},cursorToolOnLoad:{value:0,kind:s.VIEWER+s.PREFERENCE},defaultZoomDelay:{value:400,kind:s.VIEWER+s.PREFERENCE},defaultZoomValue:{value:"",kind:s.VIEWER+s.PREFERENCE},disableHistory:{value:!1,kind:s.VIEWER},disablePageLabels:{value:!1,kind:s.VIEWER+s.PREFERENCE},enableHighlightEditor:{value:!1,kind:s.VIEWER+s.PREFERENCE},enablePermissions:{value:!1,kind:s.VIEWER+s.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:s.VIEWER+s.PREFERENCE},enableScripting:{value:!0,kind:s.VIEWER+s.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:s.VIEWER},externalLinkTarget:{value:0,kind:s.VIEWER+s.PREFERENCE},highlightEditorColors:{value:"yellow=#FFFF98,green=#53FFBC,blue=#80EBFF,pink=#FFCBE6,red=#FF4F5F",kind:s.VIEWER+s.PREFERENCE},historyUpdateUrl:{value:!1,kind:s.VIEWER+s.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:s.VIEWER+s.PREFERENCE},imageResourcesPath:{value:"./images/",kind:s.VIEWER},maxCanvasPixels:{value:16777216,kind:s.VIEWER},forcePageColors:{value:!1,kind:s.VIEWER+s.PREFERENCE},pageColorsBackground:{value:"Canvas",kind:s.VIEWER+s.PREFERENCE},pageColorsForeground:{value:"CanvasText",kind:s.VIEWER+s.PREFERENCE},pdfBugEnabled:{value:!1,kind:s.VIEWER+s.PREFERENCE},printResolution:{value:150,kind:s.VIEWER},sidebarViewOnLoad:{value:-1,kind:s.VIEWER+s.PREFERENCE},scrollModeOnLoad:{value:-1,kind:s.VIEWER+s.PREFERENCE},spreadModeOnLoad:{value:-1,kind:s.VIEWER+s.PREFERENCE},textLayerMode:{value:1,kind:s.VIEWER+s.PREFERENCE},viewOnLoad:{value:0,kind:s.VIEWER+s.PREFERENCE},cMapPacked:{value:!0,kind:s.API},cMapUrl:{value:"../web/cmaps/",kind:s.API},disableAutoFetch:{value:!1,kind:s.API+s.PREFERENCE},disableFontFace:{value:!1,kind:s.API+s.PREFERENCE},disableRange:{value:!1,kind:s.API+s.PREFERENCE},disableStream:{value:!1,kind:s.API+s.PREFERENCE},docBaseUrl:{value:"",kind:s.API},enableXfa:{value:!0,kind:s.API+s.PREFERENCE},fontExtraProperties:{value:!1,kind:s.API},isEvalSupported:{value:!0,kind:s.API},isOffscreenCanvasSupported:{value:!0,kind:s.API},maxImageSize:{value:-1,kind:s.API},pdfBug:{value:!1,kind:s.API},standardFontDataUrl:{value:"../web/standard_fonts/",kind:s.API},verbosity:{value:1,kind:s.API},workerPort:{value:null,kind:s.WORKER},workerSrc:{value:"/components/pdfjs/build/pdf.worker.js",kind:s.WORKER}};a.defaultUrl={value:"compressed.tracemonkey-pldi-09.pdf",kind:s.VIEWER},a.sandboxBundleSrc={value:"/components/pdfjs/build/pdf.sandbox.js",kind:s.VIEWER},a.viewerCssTheme={value:0,kind:s.VIEWER+s.PREFERENCE},a.disablePreferences={value:!1,kind:s.VIEWER},a.locale={value:navigator.language||"en-US",kind:s.VIEWER};const r=Object.create(null);class o{constructor(){throw new Error("Cannot initialize AppOptions.")}static get(e){const t=r[e];if(void 0!==t)return t;const i=a[e];return void 0!==i?n[e]??i.value:void 0}static getAll(e=null){const t=Object.create(null);for(const i in a){const s=a[i];if(e&&!(e&s.kind))continue;const o=r[i];t[i]=void 0!==o?o:n[i]??s.value}return t}static set(e,t){r[e]=t}static setAll(e,t=!1){if(t){if(this.get("disablePreferences"))return;Object.keys(r).length&&console.warn('setAll: The Preferences may override manually set AppOptions; please use the "disablePreferences"-option in order to prevent that.')}for(const t in e)r[t]=e[t]}static remove(e){delete r[e]}}},9415:(e,t,i)=>{i.d(t,{BaseTreeViewer:()=>a});var n=i(4927);const s="selected";class a{constructor(e){if(this.constructor===a)throw new Error("Cannot initialize BaseTreeViewer.");this.container=e.container,this.eventBus=e.eventBus,this._l10n=e.l10n,this.reset()}reset(){this._pdfDocument=null,this._lastToggleIsShow=!0,this._currentTreeItem=null,this.container.textContent="",this.container.classList.remove("treeWithDeepNesting")}_dispatchEvent(e){throw new Error("Not implemented: _dispatchEvent")}_bindLink(e,t){throw new Error("Not implemented: _bindLink")}_normalizeTextContent(e){return(0,n.removeNullCharacters)(e,!0)||"–"}_addToggleButton(e,t=!1){const i=document.createElement("div");i.className="treeItemToggler",t&&i.classList.add("treeItemsHidden"),i.onclick=t=>{if(t.stopPropagation(),i.classList.toggle("treeItemsHidden"),t.shiftKey){const t=!i.classList.contains("treeItemsHidden");this._toggleTreeItem(e,t)}},e.prepend(i)}_toggleTreeItem(e,t=!1){this._l10n.pause(),this._lastToggleIsShow=t;for(const i of e.querySelectorAll(".treeItemToggler"))i.classList.toggle("treeItemsHidden",!t);this._l10n.resume()}_toggleAllTreeItems(){this._toggleTreeItem(this.container,!this._lastToggleIsShow)}_finishRendering(e,t,i=!1){i&&(this.container.classList.add("treeWithDeepNesting"),this._lastToggleIsShow=!e.querySelector(".treeItemsHidden")),this._l10n.pause(),this.container.append(e),this._l10n.resume(),this._dispatchEvent(t)}render(e){throw new Error("Not implemented: render")}_updateCurrentTreeItem(e=null){this._currentTreeItem&&(this._currentTreeItem.classList.remove(s),this._currentTreeItem=null),e&&(e.classList.add(s),this._currentTreeItem=e)}_scrollToCurrentTreeItem(e){if(!e)return;this._l10n.pause();let t=e.parentNode;for(;t&&t!==this.container;){if(t.classList.contains("treeItem")){const e=t.firstElementChild;e?.classList.remove("treeItemsHidden")}t=t.parentNode}this._l10n.resume(),this._updateCurrentTreeItem(e),this.container.scrollTo(e.offsetLeft,e.offsetTop+-100)}}},4397:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{DownloadManager:()=>o});var s=i(1869),a=e([s]);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).append(i),i.click(),i.remove()}s=(a.then?(await a)():a)[0];class o{#N=new WeakMap;downloadUrl(e,t,i){(0,s.createValidAbsoluteUrl)(e,"http://example.com")?r(e+"#pdfjs.action=download",t):console.error(`downloadUrl - not a valid URL: ${e}`)}downloadData(e,t,i){r(URL.createObjectURL(new Blob([e],{type:i})),t)}openOrDownloadData(e,t,i=null){const n=(0,s.isPdfFile)(t),a=n?"application/pdf":"";if(n){let n,s=this.#N.get(e);s||(s=URL.createObjectURL(new Blob([e],{type:a})),this.#N.set(e,s)),n="?file="+encodeURIComponent(s+"#"+t),i&&(n+=`#${escape(i)}`);try{return window.open(n),!0}catch(t){console.error(`openOrDownloadData: ${t}`),URL.revokeObjectURL(s),this.#N.delete(e)}}return this.downloadData(e,t,a),!1}download(e,t,i,n){r(URL.createObjectURL(e),i)}}n()}catch(l){n(l)}}))},758:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{DrawLayerBuilder:()=>r});var s=i(1869),a=e([s]);s=(a.then?(await a)():a)[0];class r{#I=null;constructor(e){this.pageIndex=e.pageIndex}async render(e="display"){"display"!==e||this.#I||this._cancelled||(this.#I=new s.DrawLayer({pageIndex:this.pageIndex}))}cancel(){this._cancelled=!0,this.#I&&(this.#I.destroy(),this.#I=null)}setParent(e){this.#I?.setParent(e)}getDrawLayer(){return this.#I}}n()}catch(e){n(e)}}))},6554:(e,t,i)=>{i.d(t,{AutomationEventBus:()=>r,EventBus:()=>a,waitOnEventOrTimeout:()=>s});const n={EVENT:"event",TIMEOUT:"timeout"};function s({target:e,name:t,delay:i=0}){return new Promise((function(s,r){if("object"!=typeof e||!t||"string"!=typeof t||!(Number.isInteger(i)&&i>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function o(i){e instanceof a?e._off(t,l):e.removeEventListener(t,l),h&&clearTimeout(h),s(i)}const l=o.bind(null,n.EVENT);e instanceof a?e._on(t,l):e.addEventListener(t,l);const d=o.bind(null,n.TIMEOUT),h=setTimeout(d,i)}))}class a{#k=Object.create(null);on(e,t,i=null){this._on(e,t,{external:!0,once:i?.once})}off(e,t,i=null){this._off(e,t,{external:!0,once:i?.once})}dispatch(e,t){const i=this.#k[e];if(!i||0===i.length)return;let n;for(const{listener:s,external:a,once:r}of i.slice(0))r&&this._off(e,s),a?(n||=[]).push(s):s(t);if(n){for(const e of n)e(t);n=null}}_on(e,t,i=null){(this.#k[e]||=[]).push({listener:t,external:!0===i?.external,once:!0===i?.once})}_off(e,t,i=null){const n=this.#k[e];if(n)for(let e=0,i=n.length;e<i;e++)if(n[e].listener===t)return void n.splice(e,1)}}class r extends a{dispatch(e,t){throw new Error("Not implemented: AutomationEventBus.dispatch")}}},9170:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{GenericScripting:()=>r});var s=i(1869),a=e([s]);s=(a.then?(await a)():a)[0];class r{constructor(e){this._ready=new Promise(((t,i)=>{import(e).then((e=>{t(e.QuickJSSandbox())})).catch(i)}))}async createSandbox(e){(await this._ready).create(e)}async dispatchEventInSandbox(e){const t=await this._ready;setTimeout((()=>t.dispatchEvent(e)),0)}async destroySandbox(){(await this._ready).nukeSandbox()}}n()}catch(e){n(e)}}))},1546:(e,t,i)=>{i.a(e,(async(e,t)=>{try{var n=i(39),s=i(8961),a=i(216),r=i(4397),o=i(450),l=i(9170),d=e([n,r,o,l]);[n,r,o,l]=d.then?(await d)():d;class h extends a.BasePreferences{async _writeToStorage(e){localStorage.setItem("pdfjs.preferences",JSON.stringify(e))}async _readFromStorage(e){return{prefs:JSON.parse(localStorage.getItem("pdfjs.preferences"))}}}class c extends n.DefaultExternalServices{static createDownloadManager(){return new r.DownloadManager}static createPreferences(){return new h}static async createL10n(){return new o.GenericL10n(s.AppOptions.get("locale"))}static createScripting(){return new l.GenericScripting(s.AppOptions.get("sandboxBundleSrc"))}}n.PDFViewerApplication.externalServices=c,t()}catch(e){t(e)}}))},450:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{GenericL10n:()=>d});var s=i(8759),a=i(8275),r=i(1869),o=i(4065),l=e([r]);r=(l.then?(await l)():l)[0];class d extends o.L10n{constructor(e){super({lang:e}),this._setL10n(new a.DOMLocalization([],d.#B.bind(d,"en-us",this.getLanguage())))}static async*#B(e,t){const{baseURL:i,paths:n}=await this.#O(),s=[t];if(e!==t){const i=t.split("-",1)[0];i!==t&&s.push(i),s.push(e)}for(const e of s){const t=await this.#R(e,i,n);t&&(yield t)}}static async#R(e,t,i){const n=i[e];if(!n)return null;const a=new URL(n,t),o=await(0,r.fetchData)(a,"text"),l=new s.FluentResource(o),d=new s.FluentBundle(e),h=d.addResource(l);return h.length&&console.error("L10n errors",h),d}static async#O(){const{href:e}=document.querySelector('link[type="application/l10n"]'),t=await(0,r.fetchData)(e,"json");return{baseURL:e.replace(/[^/]*$/,"")||"./",paths:t}}}n()}catch(e){n(e)}}))},6143:(e,t,i)=>{i.d(t,{GrabToPan:()=>s});const n="grab-to-pan-grab";class s{constructor({element:e}){this.element=e,this.document=e.ownerDocument,this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.toggle=this.toggle.bind(this),this._onMouseDown=this.#F.bind(this),this._onMouseMove=this.#V.bind(this),this._endPan=this.#U.bind(this);(this.overlay=document.createElement("div")).className="grab-to-pan-grabbing"}activate(){this.active||(this.active=!0,this.element.addEventListener("mousedown",this._onMouseDown,!0),this.element.classList.add(n))}deactivate(){this.active&&(this.active=!1,this.element.removeEventListener("mousedown",this._onMouseDown,!0),this._endPan(),this.element.classList.remove(n))}toggle(){this.active?this.deactivate():this.activate()}ignoreTarget(e){return e.matches("a[href], a[href] *, input, textarea, button, button *, select, option")}#F(e){if(0!==e.button||this.ignoreTarget(e.target))return;if(e.originalTarget)try{e.originalTarget.tagName}catch{return}this.scrollLeftStart=this.element.scrollLeft,this.scrollTopStart=this.element.scrollTop,this.clientXStart=e.clientX,this.clientYStart=e.clientY,this.document.addEventListener("mousemove",this._onMouseMove,!0),this.document.addEventListener("mouseup",this._endPan,!0),this.element.addEventListener("scroll",this._endPan,!0),e.preventDefault(),e.stopPropagation();const t=document.activeElement;t&&!t.contains(e.target)&&t.blur()}#V(e){if(this.element.removeEventListener("scroll",this._endPan,!0),!(1&e.buttons))return void this._endPan();const t=e.clientX-this.clientXStart,i=e.clientY-this.clientYStart;this.element.scrollTo({top:this.scrollTopStart-i,left:this.scrollLeftStart-t,behavior:"instant"}),this.overlay.parentNode||document.body.append(this.overlay)}#U(){this.element.removeEventListener("scroll",this._endPan,!0),this.document.removeEventListener("mousemove",this._onMouseMove,!0),this.document.removeEventListener("mouseup",this._endPan,!0),this.overlay.remove()}}},4065:(e,t,i)=>{i.d(t,{L10n:()=>n});class n{#j;#z;#H;constructor({lang:e,isRTL:t},i=null){this.#z=n.#W(e),this.#H=i,this.#j=t??n.#$(this.#z)?"rtl":"ltr"}_setL10n(e){this.#H=e}getLanguage(){return this.#z}getDirection(){return this.#j}async get(e,t=null,i){if(Array.isArray(e)){e=e.map((e=>({id:e})));return(await this.#H.formatMessages(e)).map((e=>e.value))}const n=await this.#H.formatMessages([{id:e,args:t}]);return n?.[0].value||i}async translate(e){try{this.#H.connectRoot(e),await this.#H.translateRoots()}catch{}}pause(){this.#H.pauseObserving()}resume(){this.#H.resumeObserving()}static#W(e){return{en:"en-us",es:"es-es",fy:"fy-nl",ga:"ga-ie",gu:"gu-in",hi:"hi-in",hy:"hy-am",nb:"nb-no",ne:"ne-np",nn:"nn-no",pa:"pa-in",pt:"pt-pt",sv:"sv-se",zh:"zh-cn"}[e=e?.toLowerCase()||"en-us"]||e}static#$(e){const t=e.split("-",1)[0];return["ar","he","fa","ps","ur"].includes(t)}}},7910:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{NullL10n:()=>h});var s=i(1869),a=i(8759),r=i(8275),o=i(4065),l=e([s]);s=(l.then?(await l)():l)[0];class d extends o.L10n{constructor(e){super({lang:e}),this._setL10n(new r.DOMLocalization([],d.#B.bind(d,e)))}static async*#B(e){const t=new a.FluentResource("pdfjs-previous-button =\n    .title = Previous Page\npdfjs-previous-button-label = Previous\npdfjs-next-button =\n    .title = Next Page\npdfjs-next-button-label = Next\npdfjs-page-input =\n    .title = Page\npdfjs-of-pages = of { $pagesCount }\npdfjs-page-of-pages = ({ $pageNumber } of { $pagesCount })\npdfjs-zoom-out-button =\n    .title = Zoom Out\npdfjs-zoom-out-button-label = Zoom Out\npdfjs-zoom-in-button =\n    .title = Zoom In\npdfjs-zoom-in-button-label = Zoom In\npdfjs-zoom-select =\n    .title = Zoom\npdfjs-presentation-mode-button =\n    .title = Switch to Presentation Mode\npdfjs-presentation-mode-button-label = Presentation Mode\npdfjs-open-file-button =\n    .title = Open File\npdfjs-open-file-button-label = Open\npdfjs-print-button =\n    .title = Print\npdfjs-print-button-label = Print\npdfjs-save-button =\n    .title = Save\npdfjs-save-button-label = Save\npdfjs-download-button =\n    .title = Download\npdfjs-download-button-label = Download\npdfjs-bookmark-button =\n    .title = Current Page (View URL from Current Page)\npdfjs-bookmark-button-label = Current Page\npdfjs-open-in-app-button =\n    .title = Open in app\npdfjs-open-in-app-button-label = Open in app\npdfjs-tools-button =\n    .title = Tools\npdfjs-tools-button-label = Tools\npdfjs-first-page-button =\n    .title = Go to First Page\npdfjs-first-page-button-label = Go to First Page\npdfjs-last-page-button =\n    .title = Go to Last Page\npdfjs-last-page-button-label = Go to Last Page\npdfjs-page-rotate-cw-button =\n    .title = Rotate Clockwise\npdfjs-page-rotate-cw-button-label = Rotate Clockwise\npdfjs-page-rotate-ccw-button =\n    .title = Rotate Counterclockwise\npdfjs-page-rotate-ccw-button-label = Rotate Counterclockwise\npdfjs-cursor-text-select-tool-button =\n    .title = Enable Text Selection Tool\npdfjs-cursor-text-select-tool-button-label = Text Selection Tool\npdfjs-cursor-hand-tool-button =\n    .title = Enable Hand Tool\npdfjs-cursor-hand-tool-button-label = Hand Tool\npdfjs-scroll-page-button =\n    .title = Use Page Scrolling\npdfjs-scroll-page-button-label = Page Scrolling\npdfjs-scroll-vertical-button =\n    .title = Use Vertical Scrolling\npdfjs-scroll-vertical-button-label = Vertical Scrolling\npdfjs-scroll-horizontal-button =\n    .title = Use Horizontal Scrolling\npdfjs-scroll-horizontal-button-label = Horizontal Scrolling\npdfjs-scroll-wrapped-button =\n    .title = Use Wrapped Scrolling\npdfjs-scroll-wrapped-button-label = Wrapped Scrolling\npdfjs-spread-none-button =\n    .title = Do not join page spreads\npdfjs-spread-none-button-label = No Spreads\npdfjs-spread-odd-button =\n    .title = Join page spreads starting with odd-numbered pages\npdfjs-spread-odd-button-label = Odd Spreads\npdfjs-spread-even-button =\n    .title = Join page spreads starting with even-numbered pages\npdfjs-spread-even-button-label = Even Spreads\npdfjs-document-properties-button =\n    .title = Document Properties…\npdfjs-document-properties-button-label = Document Properties…\npdfjs-document-properties-file-name = File name:\npdfjs-document-properties-file-size = File size:\npdfjs-document-properties-kb = { $size_kb } KB ({ $size_b } bytes)\npdfjs-document-properties-mb = { $size_mb } MB ({ $size_b } bytes)\npdfjs-document-properties-title = Title:\npdfjs-document-properties-author = Author:\npdfjs-document-properties-subject = Subject:\npdfjs-document-properties-keywords = Keywords:\npdfjs-document-properties-creation-date = Creation Date:\npdfjs-document-properties-modification-date = Modification Date:\npdfjs-document-properties-date-string = { $date }, { $time }\npdfjs-document-properties-creator = Creator:\npdfjs-document-properties-producer = PDF Producer:\npdfjs-document-properties-version = PDF Version:\npdfjs-document-properties-page-count = Page Count:\npdfjs-document-properties-page-size = Page Size:\npdfjs-document-properties-page-size-unit-inches = in\npdfjs-document-properties-page-size-unit-millimeters = mm\npdfjs-document-properties-page-size-orientation-portrait = portrait\npdfjs-document-properties-page-size-orientation-landscape = landscape\npdfjs-document-properties-page-size-name-a-three = A3\npdfjs-document-properties-page-size-name-a-four = A4\npdfjs-document-properties-page-size-name-letter = Letter\npdfjs-document-properties-page-size-name-legal = Legal\npdfjs-document-properties-page-size-dimension-string = { $width } × { $height } { $unit } ({ $orientation })\npdfjs-document-properties-page-size-dimension-name-string = { $width } × { $height } { $unit } ({ $name }, { $orientation })\npdfjs-document-properties-linearized = Fast Web View:\npdfjs-document-properties-linearized-yes = Yes\npdfjs-document-properties-linearized-no = No\npdfjs-document-properties-close-button = Close\npdfjs-print-progress-message = Preparing document for printing…\npdfjs-print-progress-percent = { $progress }%\npdfjs-print-progress-close-button = Cancel\npdfjs-printing-not-supported = Warning: Printing is not fully supported by this browser.\npdfjs-printing-not-ready = Warning: The PDF is not fully loaded for printing.\npdfjs-toggle-sidebar-button =\n    .title = Toggle Sidebar\npdfjs-toggle-sidebar-notification-button =\n    .title = Toggle Sidebar (document contains outline/attachments/layers)\npdfjs-toggle-sidebar-button-label = Toggle Sidebar\npdfjs-document-outline-button =\n    .title = Show Document Outline (double-click to expand/collapse all items)\npdfjs-document-outline-button-label = Document Outline\npdfjs-attachments-button =\n    .title = Show Attachments\npdfjs-attachments-button-label = Attachments\npdfjs-layers-button =\n    .title = Show Layers (double-click to reset all layers to the default state)\npdfjs-layers-button-label = Layers\npdfjs-thumbs-button =\n    .title = Show Thumbnails\npdfjs-thumbs-button-label = Thumbnails\npdfjs-current-outline-item-button =\n    .title = Find Current Outline Item\npdfjs-current-outline-item-button-label = Current Outline Item\npdfjs-findbar-button =\n    .title = Find in Document\npdfjs-findbar-button-label = Find\npdfjs-additional-layers = Additional Layers\npdfjs-thumb-page-title =\n    .title = Page { $page }\npdfjs-thumb-page-canvas =\n    .aria-label = Thumbnail of Page { $page }\npdfjs-find-input =\n    .title = Find\n    .placeholder = Find in document…\npdfjs-find-previous-button =\n    .title = Find the previous occurrence of the phrase\npdfjs-find-previous-button-label = Previous\npdfjs-find-next-button =\n    .title = Find the next occurrence of the phrase\npdfjs-find-next-button-label = Next\npdfjs-find-highlight-checkbox = Highlight All\npdfjs-find-match-case-checkbox-label = Match Case\npdfjs-find-match-diacritics-checkbox-label = Match Diacritics\npdfjs-find-entire-word-checkbox-label = Whole Words\npdfjs-find-reached-top = Reached top of document, continued from bottom\npdfjs-find-reached-bottom = Reached end of document, continued from top\npdfjs-find-match-count =\n    { $total ->\n        [one] { $current } of { $total } match\n       *[other] { $current } of { $total } matches\n    }\npdfjs-find-match-count-limit =\n    { $limit ->\n        [one] More than { $limit } match\n       *[other] More than { $limit } matches\n    }\npdfjs-find-not-found = Phrase not found\npdfjs-page-scale-width = Page Width\npdfjs-page-scale-fit = Page Fit\npdfjs-page-scale-auto = Automatic Zoom\npdfjs-page-scale-actual = Actual Size\npdfjs-page-scale-percent = { $scale }%\npdfjs-page-landmark =\n    .aria-label = Page { $page }\npdfjs-loading-error = An error occurred while loading the PDF.\npdfjs-invalid-file-error = Invalid or corrupted PDF file.\npdfjs-missing-file-error = Missing PDF file.\npdfjs-unexpected-response-error = Unexpected server response.\npdfjs-rendering-error = An error occurred while rendering the page.\npdfjs-annotation-date-string = { $date }, { $time }\npdfjs-text-annotation-type =\n    .alt = [{ $type } Annotation]\npdfjs-password-label = Enter the password to open this PDF file.\npdfjs-password-invalid = Invalid password. Please try again.\npdfjs-password-ok-button = OK\npdfjs-password-cancel-button = Cancel\npdfjs-web-fonts-disabled = Web fonts are disabled: unable to use embedded PDF fonts.\npdfjs-editor-free-text-button =\n    .title = Text\npdfjs-editor-free-text-button-label = Text\npdfjs-editor-ink-button =\n    .title = Draw\npdfjs-editor-ink-button-label = Draw\npdfjs-editor-stamp-button =\n    .title = Add or edit images\npdfjs-editor-stamp-button-label = Add or edit images\npdfjs-editor-highlight-button =\n    .title = Highlight\npdfjs-editor-highlight-button-label = Highlight\npdfjs-editor-remove-ink-button =\n    .title = Remove drawing\npdfjs-editor-remove-freetext-button =\n    .title = Remove text\npdfjs-editor-remove-stamp-button =\n    .title = Remove image\npdfjs-editor-remove-highlight-button =\n    .title = Remove highlight\npdfjs-editor-free-text-color-input = Color\npdfjs-editor-free-text-size-input = Size\npdfjs-editor-ink-color-input = Color\npdfjs-editor-ink-thickness-input = Thickness\npdfjs-editor-ink-opacity-input = Opacity\npdfjs-editor-stamp-add-image-button =\n    .title = Add image\npdfjs-editor-stamp-add-image-button-label = Add image\npdfjs-free-text =\n    .aria-label = Text Editor\npdfjs-free-text-default-content = Start typing…\npdfjs-ink =\n    .aria-label = Draw Editor\npdfjs-ink-canvas =\n    .aria-label = User-created image\npdfjs-editor-alt-text-button-label = Alt text\npdfjs-editor-alt-text-edit-button-label = Edit alt text\npdfjs-editor-alt-text-dialog-label = Choose an option\npdfjs-editor-alt-text-dialog-description = Alt text (alternative text) helps when people can’t see the image or when it doesn’t load.\npdfjs-editor-alt-text-add-description-label = Add a description\npdfjs-editor-alt-text-add-description-description = Aim for 1-2 sentences that describe the subject, setting, or actions.\npdfjs-editor-alt-text-mark-decorative-label = Mark as decorative\npdfjs-editor-alt-text-mark-decorative-description = This is used for ornamental images, like borders or watermarks.\npdfjs-editor-alt-text-cancel-button = Cancel\npdfjs-editor-alt-text-save-button = Save\npdfjs-editor-alt-text-decorative-tooltip = Marked as decorative\npdfjs-editor-alt-text-textarea =\n    .placeholder = For example, “A young man sits down at a table to eat a meal”\npdfjs-editor-resizer-label-top-left = Top left corner — resize\npdfjs-editor-resizer-label-top-middle = Top middle — resize\npdfjs-editor-resizer-label-top-right = Top right corner — resize\npdfjs-editor-resizer-label-middle-right = Middle right — resize\npdfjs-editor-resizer-label-bottom-right = Bottom right corner — resize\npdfjs-editor-resizer-label-bottom-middle = Bottom middle — resize\npdfjs-editor-resizer-label-bottom-left = Bottom left corner — resize\npdfjs-editor-resizer-label-middle-left = Middle left — resize\npdfjs-editor-highlight-colorpicker-label = Highlight color\npdfjs-editor-colorpicker-button =\n    .title = Change color\npdfjs-editor-colorpicker-dropdown =\n    .aria-label = Color choices\npdfjs-editor-colorpicker-yellow =\n    .title = Yellow\npdfjs-editor-colorpicker-green =\n    .title = Green\npdfjs-editor-colorpicker-blue =\n    .title = Blue\npdfjs-editor-colorpicker-pink =\n    .title = Pink\npdfjs-editor-colorpicker-red =\n    .title = Red"),i=new a.FluentBundle(e),n=i.addResource(t);n.length&&console.error("L10n errors",n),yield i}static get instance(){return(0,s.shadow)(this,"instance",new d("en-us"))}}const h={getLanguage:()=>d.instance.getLanguage(),getDirection:()=>d.instance.getDirection(),get:async(e,t=null,i)=>d.instance.get(e,t,i),translate:async e=>d.instance.translate(e),pause:()=>d.instance.pause(),resume:()=>d.instance.resume()};n()}catch(e){n(e)}}))},1996:(e,t,i)=>{i.d(t,{OverlayManager:()=>n});class n{#K=new WeakMap;#G=null;get active(){return this.#G}async register(e,t=!1){if("object"!=typeof e)throw new Error("Not enough parameters.");if(this.#K.has(e))throw new Error("The overlay is already registered.");this.#K.set(e,{canForceClose:t}),e.addEventListener("cancel",(e=>{this.#G=null}))}async open(e){if(!this.#K.has(e))throw new Error("The overlay does not exist.");if(this.#G){if(this.#G===e)throw new Error("The overlay is already active.");if(!this.#K.get(e).canForceClose)throw new Error("Another overlay is currently active.");await this.close()}this.#G=e,e.showModal()}async close(e=this.#G){if(!this.#K.has(e))throw new Error("The overlay does not exist.");if(!this.#G)throw new Error("The overlay is currently not active.");if(this.#G!==e)throw new Error("Another overlay is currently active.");e.close(),this.#G=null}}},6329:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PasswordPrompt:()=>r});var s=i(1869),a=e([s]);s=(a.then?(await a)():a)[0];class r{#X=null;#Z=null;#q=null;constructor(e,t,i=!1){this.dialog=e.dialog,this.label=e.label,this.input=e.input,this.submitButton=e.submitButton,this.cancelButton=e.cancelButton,this.overlayManager=t,this._isViewerEmbedded=i,this.submitButton.addEventListener("click",this.#Q.bind(this)),this.cancelButton.addEventListener("click",this.close.bind(this)),this.input.addEventListener("keydown",(e=>{13===e.keyCode&&this.#Q()})),this.overlayManager.register(this.dialog,!0),this.dialog.addEventListener("close",this.#Y.bind(this))}async open(){this.#X&&await this.#X.promise,this.#X=new s.PromiseCapability;try{await this.overlayManager.open(this.dialog)}catch(e){throw this.#X.resolve(),e}const e=this.#q===s.PasswordResponses.INCORRECT_PASSWORD;this._isViewerEmbedded&&!e||this.input.focus(),this.label.setAttribute("data-l10n-id","pdfjs-password-"+(e?"invalid":"label"))}async close(){this.overlayManager.active===this.dialog&&this.overlayManager.close(this.dialog)}#Q(){const e=this.input.value;e?.length>0&&this.#J(e)}#Y(){this.#J(new Error("PasswordPrompt cancelled.")),this.#X.resolve()}#J(e){this.#Z&&(this.close(),this.input.value="",this.#Z(e),this.#Z=null)}async setUpdateCallback(e,t){this.#X&&await this.#X.promise,this.#Z=e,this.#q=t}}n()}catch(e){n(e)}}))},716:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFAttachmentViewer:()=>l});var s=i(1869),a=i(9415),r=i(6554),o=e([s]);s=(o.then?(await o)():o)[0];class l extends a.BaseTreeViewer{constructor(e){super(e),this.downloadManager=e.downloadManager,this.eventBus._on("fileattachmentannotation",this.#ee.bind(this))}reset(e=!1){super.reset(),this._attachments=null,e||(this._renderedCapability=new s.PromiseCapability),this._pendingDispatchEvent=!1}async _dispatchEvent(e){this._renderedCapability.resolve(),(0!==e||this._pendingDispatchEvent||(this._pendingDispatchEvent=!0,await(0,r.waitOnEventOrTimeout)({target:this.eventBus,name:"annotationlayerrendered",delay:1e3}),this._pendingDispatchEvent))&&(this._pendingDispatchEvent=!1,this.eventBus.dispatch("attachmentsloaded",{source:this,attachmentsCount:e}))}_bindLink(e,{content:t,filename:i}){e.onclick=()=>(this.downloadManager.openOrDownloadData(t,i),!1)}render({attachments:e,keepRenderedCapability:t=!1}){if(this._attachments&&this.reset(t),this._attachments=e||null,!e)return void this._dispatchEvent(0);const i=document.createDocumentFragment();let n=0;for(const t in e){const a=e[t],r=a.content,o=(0,s.getFilenameFromUrl)(a.filename,!0),l=document.createElement("div");l.className="treeItem";const d=document.createElement("a");this._bindLink(d,{content:r,filename:o}),d.textContent=this._normalizeTextContent(o),l.append(d),i.append(l),n++}this._finishRendering(i,n)}#ee({filename:e,content:t}){const i=this._renderedCapability.promise;i.then((()=>{if(i!==this._renderedCapability.promise)return;const n=this._attachments||Object.create(null);for(const t in n)if(e===t)return;n[e]={filename:e,content:t},this.render({attachments:n,keepRenderedCapability:!0})}))}}n()}catch(e){n(e)}}))},3611:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFCursorTools:()=>l});var s=i(1869),a=i(4927),r=i(6143),o=e([s]);s=(o.then?(await o)():o)[0];class l{#G=a.CursorTool.SELECT;#te=null;constructor({container:e,eventBus:t,cursorToolOnLoad:i=a.CursorTool.SELECT}){this.container=e,this.eventBus=t,this.#ie(),Promise.resolve().then((()=>{this.switchTool(i)}))}get activeTool(){return this.#G}switchTool(e){if(null!==this.#te)return;if(e===this.#G)return;const t=()=>{switch(this.#G){case a.CursorTool.SELECT:break;case a.CursorTool.HAND:this._handTool.deactivate();case a.CursorTool.ZOOM:}};switch(e){case a.CursorTool.SELECT:t();break;case a.CursorTool.HAND:t(),this._handTool.activate();break;case a.CursorTool.ZOOM:default:return void console.error(`switchTool: "${e}" is an unsupported value.`)}this.#G=e,this.eventBus.dispatch("cursortoolchanged",{source:this,tool:e})}#ie(){this.eventBus._on("switchcursortool",(e=>{this.switchTool(e.tool)}));let e=s.AnnotationEditorType.NONE,t=a.PresentationModeState.NORMAL;const i=()=>{const e=this.#G;this.switchTool(a.CursorTool.SELECT),this.#te??=e},n=()=>{const i=this.#te;null!==i&&e===s.AnnotationEditorType.NONE&&t===a.PresentationModeState.NORMAL&&(this.#te=null,this.switchTool(i))};this.eventBus._on("secondarytoolbarreset",(i=>{null!==this.#te&&(e=s.AnnotationEditorType.NONE,t=a.PresentationModeState.NORMAL,n())})),this.eventBus._on("annotationeditormodechanged",(({mode:t})=>{e=t,t===s.AnnotationEditorType.NONE?n():i()})),this.eventBus._on("presentationmodechanged",(({state:e})=>{t=e,e===a.PresentationModeState.NORMAL?n():e===a.PresentationModeState.FULLSCREEN&&i()}))}get _handTool(){return(0,s.shadow)(this,"_handTool",new r.GrabToPan({element:this.container}))}}n()}catch(e){n(e)}}))},6312:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFDocumentProperties:()=>u});var s=i(4927),a=i(1869),r=e([a]);a=(r.then?(await r)():r)[0];const l="-",d=["en-us","en-lr","my"],h={"8.5x11":"letter","8.5x14":"legal"},c={"297x420":"a-three","210x297":"a-four"};function o(e,t,i){return i[`${t?e.width:e.height}x${t?e.height:e.width}`]}class u{#ne=null;constructor({dialog:e,fields:t,closeButton:i},n,s,a,r){this.dialog=e,this.fields=t,this.overlayManager=n,this.l10n=a,this._fileNameLookup=r,this.#se(),i.addEventListener("click",this.close.bind(this)),this.overlayManager.register(this.dialog),s._on("pagechanging",(e=>{this._currentPageNumber=e.pageNumber})),s._on("rotationchanging",(e=>{this._pagesRotation=e.pagesRotation})),this._isNonMetricLocale=d.includes(a.getLanguage())}async open(){await Promise.all([this.overlayManager.open(this.dialog),this._dataAvailableCapability.promise]);const e=this._currentPageNumber,t=this._pagesRotation;if(this.#ne&&e===this.#ne._currentPageNumber&&t===this.#ne._pagesRotation)return void this.#ae();const{info:i,contentLength:n}=await this.pdfDocument.getMetadata(),[a,r,o,l,d,h]=await Promise.all([this._fileNameLookup(),this.#re(n),this.#oe(i.CreationDate),this.#oe(i.ModDate),this.pdfDocument.getPage(e).then((e=>this.#le((0,s.getPageSizeInches)(e),t))),this.#de(i.IsLinearized)]);this.#ne=Object.freeze({fileName:a,fileSize:r,title:i.Title,author:i.Author,subject:i.Subject,keywords:i.Keywords,creationDate:o,modificationDate:l,creator:i.Creator,producer:i.Producer,version:i.PDFFormatVersion,pageCount:this.pdfDocument.numPages,pageSize:d,linearized:h,_currentPageNumber:e,_pagesRotation:t}),this.#ae();const{length:c}=await this.pdfDocument.getDownloadInfo();if(n===c)return;const u=Object.assign(Object.create(null),this.#ne);u.fileSize=await this.#re(c),this.#ne=Object.freeze(u),this.#ae()}async close(){this.overlayManager.close(this.dialog)}setDocument(e){this.pdfDocument&&(this.#se(),this.#ae(!0)),e&&(this.pdfDocument=e,this._dataAvailableCapability.resolve())}#se(){this.pdfDocument=null,this.#ne=null,this._dataAvailableCapability=new a.PromiseCapability,this._currentPageNumber=1,this._pagesRotation=0}#ae(e=!1){if(!e&&this.#ne){if(this.overlayManager.active===this.dialog)for(const e in this.fields){const t=this.#ne[e];this.fields[e].textContent=t||0===t?t:l}}else for(const e in this.fields)this.fields[e].textContent=l}async#re(e=0){const t=e/1024,i=t/1024;if(t)return this.l10n.get("pdfjs-document-properties-"+(i>=1?"mb":"kb"),{size_mb:i>=1&&(+i.toPrecision(3)).toLocaleString(),size_kb:i<1&&(+t.toPrecision(3)).toLocaleString(),size_b:e.toLocaleString()})}async#le(e,t){if(!e)return;t%180!=0&&(e={width:e.height,height:e.width});const i=(0,s.isPortraitOrientation)(e);let n={width:Math.round(100*e.width)/100,height:Math.round(100*e.height)/100},a={width:Math.round(25.4*e.width*10)/10,height:Math.round(25.4*e.height*10)/10},r=o(n,i,h)||o(a,i,c);if(!(r||Number.isInteger(a.width)&&Number.isInteger(a.height))){const t={width:25.4*e.width,height:25.4*e.height},s={width:Math.round(a.width),height:Math.round(a.height)};Math.abs(t.width-s.width)<.1&&Math.abs(t.height-s.height)<.1&&(r=o(s,i,c),r&&(n={width:Math.round(s.width/25.4*100)/100,height:Math.round(s.height/25.4*100)/100},a=s))}const[{width:l,height:d},u,p,g]=await Promise.all([this._isNonMetricLocale?n:a,this.l10n.get("pdfjs-document-properties-page-size-unit-"+(this._isNonMetricLocale?"inches":"millimeters")),r&&this.l10n.get(`pdfjs-document-properties-page-size-name-${r}`),this.l10n.get("pdfjs-document-properties-page-size-orientation-"+(i?"portrait":"landscape"))]);return this.l10n.get(`pdfjs-document-properties-page-size-dimension-${p?"name-":""}string`,{width:l.toLocaleString(),height:d.toLocaleString(),unit:u,name:p,orientation:g})}async#oe(e){const t=a.PDFDateString.toDateObject(e);if(t)return this.l10n.get("pdfjs-document-properties-date-string",{date:t.toLocaleDateString(),time:t.toLocaleTimeString()})}#de(e){return this.l10n.get("pdfjs-document-properties-linearized-"+(e?"yes":"no"))}}n()}catch(p){n(p)}}))},1795:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFFindBar:()=>l});var s=i(3557),a=i(4927),r=e([s]);s=(r.then?(await r)():r)[0];const o=1e3;class l{#he=new ResizeObserver(this.#ce.bind(this));constructor(e,t){this.opened=!1,this.bar=e.bar,this.toggleButton=e.toggleButton,this.findField=e.findField,this.highlightAll=e.highlightAllCheckbox,this.caseSensitive=e.caseSensitiveCheckbox,this.matchDiacritics=e.matchDiacriticsCheckbox,this.entireWord=e.entireWordCheckbox,this.findMsg=e.findMsg,this.findResultsCount=e.findResultsCount,this.findPreviousButton=e.findPreviousButton,this.findNextButton=e.findNextButton,this.eventBus=t,this.toggleButton.addEventListener("click",(()=>{this.toggle()})),this.findField.addEventListener("input",(()=>{this.dispatchEvent("")})),this.bar.addEventListener("keydown",(e=>{switch(e.keyCode){case 13:e.target===this.findField&&this.dispatchEvent("again",e.shiftKey);break;case 27:this.close()}})),this.findPreviousButton.addEventListener("click",(()=>{this.dispatchEvent("again",!0)})),this.findNextButton.addEventListener("click",(()=>{this.dispatchEvent("again",!1)})),this.highlightAll.addEventListener("click",(()=>{this.dispatchEvent("highlightallchange")})),this.caseSensitive.addEventListener("click",(()=>{this.dispatchEvent("casesensitivitychange")})),this.entireWord.addEventListener("click",(()=>{this.dispatchEvent("entirewordchange")})),this.matchDiacritics.addEventListener("click",(()=>{this.dispatchEvent("diacriticmatchingchange")}))}reset(){this.updateUIState()}dispatchEvent(e,t=!1){this.eventBus.dispatch("find",{source:this,type:e,query:this.findField.value,caseSensitive:this.caseSensitive.checked,entireWord:this.entireWord.checked,highlightAll:this.highlightAll.checked,findPrevious:t,matchDiacritics:this.matchDiacritics.checked})}updateUIState(e,t,i){const{findField:n,findMsg:a}=this;let r="",o="";switch(e){case s.FindState.FOUND:break;case s.FindState.PENDING:o="pending";break;case s.FindState.NOT_FOUND:r="pdfjs-find-not-found",o="notFound";break;case s.FindState.WRAPPED:r="pdfjs-find-reached-"+(t?"top":"bottom")}n.setAttribute("data-status",o),n.setAttribute("aria-invalid",e===s.FindState.NOT_FOUND),a.setAttribute("data-status",o),r?a.setAttribute("data-l10n-id",r):(a.removeAttribute("data-l10n-id"),a.textContent=""),this.updateResultsCount(i)}updateResultsCount({current:e=0,total:t=0}={}){const{findResultsCount:i}=this;if(t>0){const n=o;i.setAttribute("data-l10n-id","pdfjs-find-match-count"+(t>n?"-limit":"")),i.setAttribute("data-l10n-args",JSON.stringify({limit:n,current:e,total:t}))}else i.removeAttribute("data-l10n-id"),i.textContent=""}open(){this.opened||(this.#he.observe(this.bar.parentNode),this.#he.observe(this.bar),this.opened=!0,(0,a.toggleExpandedBtn)(this.toggleButton,!0,this.bar)),this.findField.select(),this.findField.focus()}close(){this.opened&&(this.#he.disconnect(),this.opened=!1,(0,a.toggleExpandedBtn)(this.toggleButton,!1,this.bar),this.eventBus.dispatch("findbarclose",{source:this}))}toggle(){this.opened?this.close():this.open()}#ce(e){const{bar:t}=this;t.classList.remove("wrapContainers");t.clientHeight>t.firstElementChild.clientHeight&&t.classList.add("wrapContainers")}}n()}catch(e){n(e)}}))},3557:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{FindState:()=>h,PDFFindController:()=>T});var s=i(4927),a=i(6839),r=i(1869),o=e([r]);r=(o.then?(await o)():o)[0];const h={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3},c=250,u=-50,p=-400,g={"‐":"-","‘":"'","’":"'","‚":"'","‛":"'","“":'"',"”":'"',"„":'"',"‟":'"',"¼":"1/4","½":"1/2","¾":"3/4"},f=new Set([12441,12442,2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,3158,3953,3954,3962,3963,3964,3965,3968,3956]);let m;const w=/\p{M}+/gu,v=/([.*+?^${}()|[\]\\])|(\p{P})|(\s+)|(\p{M})|(\p{L})/gu,b=/([^\p{M}])\p{M}*$/u,y=/^\p{M}*([^\p{M}])/u,_=/[\uAC00-\uD7AF\uFA6C\uFACF-\uFAD1\uFAD5-\uFAD7]+/g,E=new Map,P="[\\u1100-\\u1112\\ud7a4-\\ud7af\\ud84a\\ud84c\\ud850\\ud854\\ud857\\ud85f]",S=new Map;let C=null,L=null;function l(e){const t=[];let i,n;for(;null!==(i=_.exec(e));){let{index:e}=i;for(const n of i[0]){let i=E.get(n);i||(i=n.normalize("NFD").length,E.set(n,i)),t.push([i,e++])}}if(0===t.length&&C)n=C;else if(t.length>0&&L)n=L;else{const e=`([${Object.keys(g).join("")}])|([${(0,a.getNormalizeWithNFKC)()}])|(${"(?:゙|゚)"}\\n)|(\\p{M}+(?:-\\n)?)|(\\S-\\n)|(${"(?:\\p{Ideographic}|[぀-ヿ])"}\\n)|(\\n)`;n=0===t.length?C=new RegExp(e+"|(\\u0000)","gum"):L=new RegExp(e+`|(${P})`,"gum")}const s=[];for(;null!==(i=w.exec(e));)s.push([i[0].length,i.index]);let r=e.normalize("NFD");const o=[[0,0]];let l=0,d=0,h=0,c=0,u=0,p=!1;return r=r.replace(n,((e,i,n,a,r,f,m,w,v,b)=>{if(b-=c,i){const e=g[i],t=e.length;for(let e=1;e<t;e++)o.push([b-h+e,h-e]);return h-=t-1,e}if(n){let e=S.get(n);e||(e=n.normalize("NFKC"),S.set(n,e));const t=e.length;for(let e=1;e<t;e++)o.push([b-h+e,h-e]);return h-=t-1,e}if(a)return p=!0,b+u===s[l]?.[1]?++l:(o.push([b-1-h+1,h-1]),h-=1,c+=1),o.push([b-h+1,h]),c+=1,u+=1,a.charAt(0);if(r){const e=r.endsWith("\n"),t=e?r.length-2:r.length;p=!0;let i=t;b+u===s[l]?.[1]&&(i-=s[l][0],++l);for(let e=1;e<=i;e++)o.push([b-1-h+e,h-e]);return h-=i,c+=i,e?(b+=t-1,o.push([b-h+1,1+h]),h+=1,c+=1,u+=1,r.slice(0,t)):r}if(f){const e=f.length-2;return o.push([b-h+e,1+h]),h+=1,c+=1,u+=1,f.slice(0,-2)}if(m){const e=m.length-1;return o.push([b-h+e,h]),c+=1,u+=1,m.slice(0,-1)}if(w)return o.push([b-h+1,h-1]),h-=1,c+=1,u+=1," ";if(b+u===t[d]?.[1]){const e=t[d][0]-1;++d;for(let t=1;t<=e;t++)o.push([b-(h-t),h-t]);h-=e,c+=e}return v})),o.push([r.length,h]),[r,o,p]}function d(e,t,i){if(!e)return[t,i];const n=t,a=t+i-1;let r=(0,s.binarySearchFirstItem)(e,(e=>e[0]>=n));e[r][0]>n&&--r;let o=(0,s.binarySearchFirstItem)(e,(e=>e[0]>=a),r);e[o][0]>a&&--o;const l=n+e[r][1];return[l,a+e[o][1]+1-l]}class T{#ue=null;#pe=!0;#ge=0;constructor({linkService:e,eventBus:t,updateMatchesCountOnProgress:i=!0}){this._linkService=e,this._eventBus=t,this.#pe=i,this.onIsPageVisible=null,this.#se(),t._on("find",this.#fe.bind(this)),t._on("findbarclose",this.#me.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.#ue}setDocument(e){this._pdfDocument&&this.#se(),e&&(this._pdfDocument=e,this._firstPageCapability.resolve())}#fe(e){if(!e)return;const t=this._pdfDocument,{type:i}=e;(null===this.#ue||this.#we(e))&&(this._dirtyMatch=!0),this.#ue=e,"highlightallchange"!==i&&this.#t(h.PENDING),this._firstPageCapability.promise.then((()=>{if(!this._pdfDocument||t&&this._pdfDocument!==t)return;this.#ve();const e=!this._highlightMatches,n=!!this._findTimeout;this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),i?this._dirtyMatch?this.#be():"again"===i?(this.#be(),e&&this.#ue.highlightAll&&this.#ye()):"highlightallchange"===i?(n?this.#be():this._highlightMatches=!0,this.#ye()):this.#be():this._findTimeout=setTimeout((()=>{this.#be(),this._findTimeout=null}),c)}))}scrollMatchIntoView({element:e=null,selectedLeft:t=0,pageIndex:i=-1,matchIndex:n=-1}){if(!this._scrollMatches||!e)return;if(-1===n||n!==this._selected.matchIdx)return;if(-1===i||i!==this._selected.pageIdx)return;this._scrollMatches=!1;const a={top:u,left:t+p};(0,s.scrollIntoView)(e,a,!0)}#se(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],this.#ge=0,this.#ue=null,this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._pageDiffs=[],this._hasDiacritics=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=new Set,this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=new r.PromiseCapability}get#_e(){const{query:e}=this.#ue;return"string"==typeof e?(e!==this._rawQuery&&(this._rawQuery=e,[this._normalizedQuery]=l(e)),this._normalizedQuery):(e||[]).filter((e=>!!e)).map((e=>l(e)[0]))}#we(e){const t=e.query,i=this.#ue.query,n=typeof t;if(n!==typeof i)return!0;if("string"===n){if(t!==i)return!0}else if(JSON.stringify(t)!==JSON.stringify(i))return!0;switch(e.type){case"again":const e=this._selected.pageIdx+1,t=this._linkService;return e>=1&&e<=t.pagesCount&&e!==t.page&&!(this.onIsPageVisible?.(e)??1);case"highlightallchange":return!1}return!0}#Ee(e,t,i){let n=e.slice(0,t).match(b);if(n){const i=e.charCodeAt(t),s=n[1].charCodeAt(0);if((0,a.getCharacterType)(i)===(0,a.getCharacterType)(s))return!1}if(n=e.slice(t+i).match(y),n){const s=e.charCodeAt(t+i-1),r=n[1].charCodeAt(0);if((0,a.getCharacterType)(s)===(0,a.getCharacterType)(r))return!1}return!0}#Pe(e,t,i,n){const s=this._pageMatches[i]=[],a=this._pageMatchesLength[i]=[];if(!e)return;const r=this._pageDiffs[i];let o;for(;null!==(o=e.exec(n));){if(t&&!this.#Ee(n,o.index,o[0].length))continue;const[e,i]=d(r,o.index,o[0].length);i&&(s.push(e),a.push(i))}}#Se(e,t){const{matchDiacritics:i}=this.#ue;let n=!1;const s="[ ]*";return(e=e.replaceAll(v,((e,s,a,r,o,l)=>s?`[ ]*\\${s}[ ]*`:a?`[ ]*${a}[ ]*`:r?"[ ]+":i?o||l:o?f.has(o.charCodeAt(0))?o:"":t?(n=!0,`${l}\\p{M}*`):l))).endsWith(s)&&(e=e.slice(0,e.length-4)),i&&t&&(m||=String.fromCharCode(...f),n=!0,e=`${e}(?=[${m}]|[^\\p{M}]|$)`),[n,e]}#Ce(e){let t=this.#_e;if(0===t.length)return;const{caseSensitive:i,entireWord:n}=this.#ue,s=this._pageContents[e],a=this._hasDiacritics[e];let r=!1;"string"==typeof t?[r,t]=this.#Se(t,a):t=t.sort().reverse().map((e=>{const[t,i]=this.#Se(e,a);return r||=t,`(${i})`})).join("|");t=t?new RegExp(t,`g${r?"u":""}${i?"":"i"}`):null,this.#Pe(t,n,e,s),this.#ue.highlightAll&&this.#Le(e),this._resumePageIdx===e&&(this._resumePageIdx=null,this.#Te());const o=this._pageMatches[e].length;this._matchesCountTotal+=o,this.#pe?o>0&&this.#Ie():++this.#ge===this._linkService.pagesCount&&this.#Ie()}#ve(){if(this._extractTextPromises.length>0)return;let e=Promise.resolve();const t={disableNormalization:!0};for(let i=0,n=this._linkService.pagesCount;i<n;i++){const n=new r.PromiseCapability;this._extractTextPromises[i]=n.promise,e=e.then((()=>this._pdfDocument.getPage(i+1).then((e=>e.getTextContent(t))).then((e=>{const t=[];for(const i of e.items)t.push(i.str),i.hasEOL&&t.push("\n");[this._pageContents[i],this._pageDiffs[i],this._hasDiacritics[i]]=l(t.join("")),n.resolve()}),(e=>{console.error(`Unable to get text content for page ${i+1}`,e),this._pageContents[i]="",this._pageDiffs[i]=null,this._hasDiacritics[i]=!1,n.resolve()}))))}}#Le(e){this._scrollMatches&&this._selected.pageIdx===e&&(this._linkService.page=e+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:e})}#ye(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}#be(){const e=this.#ue.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.#ge=0,this._matchesCountTotal=0,this.#ye();for(let e=0;e<i;e++)this._pendingFindMatches.has(e)||(this._pendingFindMatches.add(e),this._extractTextPromises[e].then((()=>{this._pendingFindMatches.delete(e),this.#Ce(e)})))}if(0===this.#_e.length)return void this.#t(h.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.#Me(!0);this.#xe(e)}this.#Te()}#Ae(e){const t=this._offset,i=e.length,n=this.#ue.findPrevious;return i?(t.matchIdx=n?i-1:0,this.#Me(!0),!0):(this.#xe(n),!!(t.wrapped&&(t.matchIdx=null,this._pagesToSearch<0))&&(this.#Me(!1),!0))}#Te(){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.#Ae(e))}#xe(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)}#Me(e=!1){let t=h.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?h.WRAPPED:h.FOUND,-1!==e&&e!==this._selected.pageIdx&&this.#Le(e)}this.#t(t,this.#ue.findPrevious),-1!==this._selected.pageIdx&&(this._scrollMatches=!0,this.#Le(this._selected.pageIdx))}#me(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.#t(h.FOUND),this._highlightMatches=!1,this.#ye())}))}#De(){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]?.length||0;i+=t+1}return(i<1||i>n)&&(i=n=0),{current:i,total:n}}#Ie(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:this.#De()})}#t(e,t=!1){(this.#pe||this.#ge===this._linkService.pagesCount&&e!==h.PENDING)&&this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:e,previous:t,matchesCount:this.#De(),rawQuery:this.#ue?.query??null})}}n()}catch(I){n(I)}}))},6839:(e,t,i)=>{i.d(t,{getCharacterType:()=>s,getNormalizeWithNFKC:()=>r});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};function s(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}let a;function r(){return a||=" ¨ª¯²-µ¸-º¼-¾Ĳ-ĳĿ-ŀŉſǄ-ǌǱ-ǳʰ-ʸ˘-˝ˠ-ˤʹͺ;΄-΅·ϐ-ϖϰ-ϲϴ-ϵϹևٵ-ٸक़-य़ড়-ঢ়য়ਲ਼ਸ਼ਖ਼-ਜ਼ਫ਼ଡ଼-ଢ଼ำຳໜ-ໝ༌གྷཌྷདྷབྷཛྷཀྵჼᴬ-ᴮᴰ-ᴺᴼ-ᵍᵏ-ᵪᵸᶛ-ᶿẚ-ẛάέήίόύώΆ᾽-῁ΈΉ῍-῏ΐΊ῝-῟ΰΎ῭-`ΌΏ´-῾ - ‑‗․-… ″-‴‶-‷‼‾⁇-⁉⁗ ⁰-ⁱ⁴-₎ₐ-ₜ₨℀-℃℅-ℇ℉-ℓℕ-№ℙ-ℝ℠-™ℤΩℨK-ℭℯ-ℱℳ-ℹ℻-⅀ⅅ-ⅉ⅐-ⅿ↉∬-∭∯-∰〈-〉①-⓪⨌⩴-⩶⫝̸ⱼ-ⱽⵯ⺟⻳⼀-⿕　〶〸-〺゛-゜ゟヿㄱ-ㆎ㆒-㆟㈀-㈞㈠-㉇㉐-㉾㊀-㏿ꚜ-ꚝꝰꟲ-ꟴꟸ-ꟹꭜ-ꭟꭩ豈-嗀塚晴凞-羽蘒諸逸-都飯-舘並-龎ﬀ-ﬆﬓ-ﬗיִײַ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-﷼︐-︙︰-﹄﹇-﹒﹔-﹦﹨-﹫ﹰ-ﹲﹴﹶ-ﻼ！-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ￠-￦",a}},6418:(e,t,i)=>{i.d(t,{PDFHistory:()=>r});var n=i(4927),s=i(6554);function a(){return document.location.hash}class r{constructor({linkService:e,eventBus:t}){this.linkService=e,this.eventBus=t,this._initialized=!1,this._fingerprint="",this.reset(),this._boundEvents=null,this.eventBus._on("pagesinit",(()=>{this._isPagesLoaded=!1,this.eventBus._on("pagesloaded",(e=>{this._isPagesLoaded=!!e.pagesCount}),{once:!0})}))}initialize({fingerprint:e,resetHistory:t=!1,updateUrl:i=!1}){if(!e||"string"!=typeof e)return void console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');this._initialized&&this.reset();const n=""!==this._fingerprint&&this._fingerprint!==e;this._fingerprint=e,this._updateUrl=!0===i,this._initialized=!0,this._bindEvents();const s=window.history.state;if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=a(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this._isValidState(s,!0)||t){const{hash:e,page:i,rotation:s}=this._parseCurrentHash(!0);return!e||n||t?void this._pushOrReplaceState(null,!0):void this._pushOrReplaceState({hash:e,page:i,rotation:s},!0)}const r=s.destination;this._updateInternalState(r,s.uid,!0),void 0!==r.rotation&&(this._initialRotation=r.rotation),r.dest?(this._initialBookmark=JSON.stringify(r.dest),this._destination.page=null):r.hash?this._initialBookmark=r.hash:r.page&&(this._initialBookmark=`page=${r.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({namedDest:e=null,explicitDest:t,pageNumber:i}){if(!this._initialized)return;if(e&&"string"!=typeof e)return void console.error(`PDFHistory.push: "${e}" is not a valid namedDest parameter.`);if(!Array.isArray(t))return void console.error(`PDFHistory.push: "${t}" is not a valid explicitDest parameter.`);if(!this._isValidPage(i)&&(null!==i||this._destination))return void console.error(`PDFHistory.push: "${i}" is not a valid pageNumber parameter.`);const s=e||JSON.stringify(t);if(!s)return;let a=!1;if(this._destination&&(function(e,t){if("string"!=typeof e||"string"!=typeof t)return!1;if(e===t)return!0;if((0,n.parseQueryString)(e).get("nameddest")===t)return!0;return!1}(this._destination.hash,s)||function(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}(this._destination.dest,t))){if(this._destination.page)return;a=!0}this._popStateInProgress&&!a||(this._pushOrReplaceState({dest:t,hash:s,page:i,rotation:this.linkService.rotation},a),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then((()=>{this._popStateInProgress=!1}))))}pushPage(e){this._initialized&&(this._isValidPage(e)?this._destination?.page!==e&&(this._popStateInProgress||(this._pushOrReplaceState({dest:null,hash:`page=${e}`,page:e,rotation:this.linkService.rotation}),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then((()=>{this._popStateInProgress=!1}))))):console.error(`PDFHistory.pushPage: "${e}" is not a valid page number.`))}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,t=!1){const i=t||!this._destination,n={fingerprint:this._fingerprint,uid:i?this._uid:this._uid+1,destination:e};let s;if(this._updateInternalState(e,n.uid),this._updateUrl&&e?.hash){const t=document.location.href.split("#")[0];t.startsWith("file://")||(s=`${t}#${e.hash}`)}i?window.history.replaceState(n,"",s):window.history.pushState(n,"",s)}_tryPushCurrentPosition(e=!1){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(void 0!==this._destination.dest||!this._destination.first)return;i=!0}this._pushOrReplaceState(t,i)}_isValidPage(e){return Number.isInteger(e)&&e>0&&e<=this.linkService.pagesCount}_isValidState(e,t=!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("reload"!==t?.type)return!1}}return!(!Number.isInteger(e.uid)||e.uid<0)&&(null!==e.destination&&"object"==typeof e.destination)}_updateInternalState(e,t,i=!1){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),i&&e?.temporary&&delete e.temporary,this._destination=e,this._uid=t,this._maxUid=Math.max(this._maxUid,t),this._numPositionUpdates=0}_parseCurrentHash(e=!1){const t=unescape(a()).substring(1),i=(0,n.parseQueryString)(t),s=i.get("nameddest")||"";let r=0|i.get("page");return(!this._isValidPage(r)||e&&s.length>0)&&(r=null),{hash:t,page:r,rotation:this.linkService.rotation}}_updateViewarea({location:e}){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:e.pdfOpenParams.substring(1),page:this.linkService.page,first:e.pageNumber,rotation:e.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({state:e}){const t=a(),i=this._currentHash!==t;if(this._currentHash=t,!e){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(e))return;this._popStateInProgress=!0,i&&(this._blockHashChange++,(0,s.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:1e3}).then((()=>{this._blockHashChange--})));const r=e.destination;this._updateInternalState(r,e.uid,!0),(0,n.isValidRotation)(r.rotation)&&(this.linkService.rotation=r.rotation),r.dest?this.linkService.goToDestination(r.dest):r.hash?this.linkService.setHash(r.hash):r.page&&(this.linkService.page=r.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)}}},3706:(e,t,i)=>{i.d(t,{PDFLayerViewer:()=>s});var n=i(9415);class s extends n.BaseTreeViewer{constructor(e){super(e),this.eventBus._on("optionalcontentconfigchanged",(e=>{this.#Ne(e.promise)})),this.eventBus._on("resetlayers",(()=>{this.#Ne()})),this.eventBus._on("togglelayerstree",this._toggleAllTreeItems.bind(this))}reset(){super.reset(),this._optionalContentConfig=null,this._optionalContentHash=null}_dispatchEvent(e){this.eventBus.dispatch("layersloaded",{source:this,layersCount:e})}_bindLink(e,{groupId:t,input:i}){const n=()=>{this._optionalContentConfig.setVisibility(t,i.checked),this._optionalContentHash=this._optionalContentConfig.getHash(),this.eventBus.dispatch("optionalcontentconfig",{source:this,promise:Promise.resolve(this._optionalContentConfig)})};e.onclick=t=>t.target===i?(n(),!0):t.target!==e||(i.checked=!i.checked,n(),!1)}async _setNestedName(e,{name:t=null}){"string"!=typeof t?(e.textContent=await this._l10n.get("pdfjs-additional-layers"),e.style.fontStyle="italic"):e.textContent=this._normalizeTextContent(t)}_addToggleButton(e,{name:t=null}){super._addToggleButton(e,null===t)}_toggleAllTreeItems(){this._optionalContentConfig&&super._toggleAllTreeItems()}render({optionalContentConfig:e,pdfDocument:t}){this._optionalContentConfig&&this.reset(),this._optionalContentConfig=e||null,this._pdfDocument=t||null;const i=e?.getOrder();if(!i)return void this._dispatchEvent(0);this._optionalContentHash=e.getHash();const n=document.createDocumentFragment(),s=[{parent:n,groups:i}];let a=0,r=!1;for(;s.length>0;){const t=s.shift();for(const i of t.groups){const n=document.createElement("div");n.className="treeItem";const o=document.createElement("a");if(n.append(o),"object"==typeof i){r=!0,this._addToggleButton(n,i),this._setNestedName(o,i);const e=document.createElement("div");e.className="treeItems",n.append(e),s.push({parent:e,groups:i.order})}else{const t=e.getGroup(i),n=document.createElement("input");this._bindLink(o,{groupId:i,input:n}),n.type="checkbox",n.checked=t.visible;const s=document.createElement("label");s.textContent=this._normalizeTextContent(t.name),s.append(n),o.append(s),a++}t.parent.append(n)}}this._finishRendering(n,a,r)}async#Ne(e=null){if(!this._optionalContentConfig)return;const t=this._pdfDocument,i=await(e||t.getOptionalContentConfig());if(t===this._pdfDocument){if(e){if(i.getHash()===this._optionalContentHash)return}else this.eventBus.dispatch("optionalcontentconfig",{source:this,promise:Promise.resolve(i)});this.render({optionalContentConfig:i,pdfDocument:this._pdfDocument})}}}},3234:(e,t,i)=>{i.d(t,{LinkTarget:()=>s,PDFLinkService:()=>r,SimpleLinkService:()=>o});var n=i(4927);const s={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function a(e,{url:t,target:i,rel:n,enabled:a=!0}={}){if(!t||"string"!=typeof t)throw new Error('A valid "url" parameter must provided.');a?e.href=e.title=t:(e.href="",e.title=`Disabled: ${t}`,e.onclick=()=>!1);let r="";switch(i){case s.NONE:break;case s.SELF:r="_self";break;case s.BLANK:r="_blank";break;case s.PARENT:r="_parent";break;case s.TOP:r="_top"}e.target=r,e.rel="string"==typeof n?n:"noopener noreferrer nofollow"}class r{#ke=new Map;constructor({eventBus:e,externalLinkTarget:t=null,externalLinkRel:i=null,ignoreDestinationZoom:n=!1}={}){this.eventBus=e,this.externalLinkTarget=t,this.externalLinkRel=i,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=n,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null}setDocument(e,t=null){this.baseUrl=t,this.pdfDocument=e,this.#ke.clear()}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}get isInPresentationMode(){return this.pdfViewer.isInPresentationMode}#Be(e,t=null,i){const n=i[0];let s;if("object"==typeof n&&null!==n){if(s=this._cachedPageNumber(n),!s)return void this.pdfDocument.getPageIndex(n).then((s=>{this.cachePageRef(s+1,n),this.#Be(e,t,i)})).catch((()=>{console.error(`PDFLinkService.#goToDestinationHelper: "${n}" is not a valid page reference, for dest="${e}".`)}))}else{if(!Number.isInteger(n))return void console.error(`PDFLinkService.#goToDestinationHelper: "${n}" is not a valid destination reference, for dest="${e}".`);s=n+1}!s||s<1||s>this.pagesCount?console.error(`PDFLinkService.#goToDestinationHelper: "${s}" is not a valid page number, for dest="${e}".`):(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:t,explicitDest:i,pageNumber:s})),this.pdfViewer.scrollPageIntoView({pageNumber:s,destArray:i,ignoreDestinationZoom:this._ignoreDestinationZoom}))}async goToDestination(e){if(!this.pdfDocument)return;let t,i;"string"==typeof e?(t=e,i=await this.pdfDocument.getDestination(e)):(t=null,i=await e),Array.isArray(i)?this.#Be(e,t,i):console.error(`PDFLinkService.goToDestination: "${i}" is not a valid destination array, for dest="${e}".`)}goToPage(e){if(!this.pdfDocument)return;const t="string"==typeof e&&this.pdfViewer.pageLabelToPageNumber(e)||0|e;Number.isInteger(t)&&t>0&&t<=this.pagesCount?(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.pushPage(t)),this.pdfViewer.scrollPageIntoView({pageNumber:t})):console.error(`PDFLinkService.goToPage: "${e}" is not a valid page.`)}addLinkAttributes(e,t,i=!1){a(e,{url:t,target:i?s.BLANK:this.externalLinkTarget,rel:this.externalLinkRel,enabled:this.externalLinkEnabled})}getDestinationHash(e){if("string"==typeof e){if(e.length>0)return this.getAnchorUrl("#"+escape(e))}else if(Array.isArray(e)){const t=JSON.stringify(e);if(t.length>0)return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}getAnchorUrl(e){return this.baseUrl?this.baseUrl+e:e}setHash(e){if(!this.pdfDocument)return;let t,i;if(e.includes("=")){const s=(0,n.parseQueryString)(e);if(s.has("search")){const e=s.get("search").replaceAll('"',""),t="true"===s.get("phrase");this.eventBus.dispatch("findfromurlhash",{source:this,query:t?e:e.match(/\S+/g)})}if(s.has("page")&&(t=0|s.get("page")||1),s.has("zoom")){const e=s.get("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: "${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]}return i?this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:i,allowNegativeOffset:!0}):t&&(this.page=t),s.has("pagemode")&&this.eventBus.dispatch("pagemode",{source:this,mode:s.get("pagemode")}),void(s.has("nameddest")&&this.goToDestination(s.get("nameddest")))}i=unescape(e);try{i=JSON.parse(i),Array.isArray(i)||(i=i.toString())}catch{}"string"==typeof i||r.#Oe(i)?this.goToDestination(i):console.error(`PDFLinkService.setHash: "${unescape(e)}" is not a valid destination.`)}executeNamedAction(e){switch(e){case"GoBack":this.pdfHistory?.back();break;case"GoForward":this.pdfHistory?.forward();break;case"NextPage":this.pdfViewer.nextPage();break;case"PrevPage":this.pdfViewer.previousPage();break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}this.eventBus.dispatch("namedaction",{source:this,action:e})}async executeSetOCGState(e){const t=this.pdfDocument,i=await this.pdfViewer.optionalContentConfigPromise;if(t!==this.pdfDocument)return;let n;for(const t of e.state){switch(t){case"ON":case"OFF":case"Toggle":n=t;continue}switch(n){case"ON":i.setVisibility(t,!0);break;case"OFF":i.setVisibility(t,!1);break;case"Toggle":const e=i.getGroup(t);e&&i.setVisibility(t,!e.visible)}}this.pdfViewer.optionalContentConfigPromise=Promise.resolve(i)}cachePageRef(e,t){if(!t)return;const i=0===t.gen?`${t.num}R`:`${t.num}R${t.gen}`;this.#ke.set(i,e)}_cachedPageNumber(e){if(!e)return null;const t=0===e.gen?`${e.num}R`:`${e.num}R${e.gen}`;return this.#ke.get(t)||null}static#Oe(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 i=2;i<t;i++){const t=e[i];if(!("number"==typeof t||s&&null===t))return!1}return!0}}class o{constructor(){this.externalLinkEnabled=!0}get pagesCount(){return 0}get page(){return 0}set page(e){}get rotation(){return 0}set rotation(e){}get isInPresentationMode(){return!1}async goToDestination(e){}goToPage(e){}addLinkAttributes(e,t,i=!1){a(e,{url:t,enabled:this.externalLinkEnabled})}getDestinationHash(e){return"#"}getAnchorUrl(e){return"#"}setHash(e){}executeNamedAction(e){}executeSetOCGState(e){}cachePageRef(e,t){}}},1141:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFOutlineViewer:()=>l});var s=i(9415),a=i(1869),r=i(4927),o=e([a]);a=(o.then?(await o)():o)[0];class l extends s.BaseTreeViewer{constructor(e){super(e),this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.eventBus._on("toggleoutlinetree",this._toggleAllTreeItems.bind(this)),this.eventBus._on("currentoutlineitem",this._currentOutlineItem.bind(this)),this.eventBus._on("pagechanging",(e=>{this._currentPageNumber=e.pageNumber})),this.eventBus._on("pagesloaded",(e=>{this._isPagesLoaded=!!e.pagesCount,this._currentOutlineItemCapability&&!this._currentOutlineItemCapability.settled&&this._currentOutlineItemCapability.resolve(this._isPagesLoaded)})),this.eventBus._on("sidebarviewchanged",(e=>{this._sidebarView=e.view}))}reset(){super.reset(),this._outline=null,this._pageNumberToDestHashCapability=null,this._currentPageNumber=1,this._isPagesLoaded=null,this._currentOutlineItemCapability&&!this._currentOutlineItemCapability.settled&&this._currentOutlineItemCapability.resolve(!1),this._currentOutlineItemCapability=null}_dispatchEvent(e){this._currentOutlineItemCapability=new a.PromiseCapability,0===e||this._pdfDocument?.loadingParams.disableAutoFetch?this._currentOutlineItemCapability.resolve(!1):null!==this._isPagesLoaded&&this._currentOutlineItemCapability.resolve(this._isPagesLoaded),this.eventBus.dispatch("outlineloaded",{source:this,outlineCount:e,currentOutlineItemPromise:this._currentOutlineItemCapability.promise})}_bindLink(e,{url:t,newWindow:i,action:n,attachment:s,dest:a,setOCGState:r}){const{linkService:o}=this;if(t)o.addLinkAttributes(e,t,i);else{if(n)return e.href=o.getAnchorUrl(""),void(e.onclick=()=>(o.executeNamedAction(n),!1));if(s)return e.href=o.getAnchorUrl(""),void(e.onclick=()=>(this.downloadManager.openOrDownloadData(s.content,s.filename),!1));if(r)return e.href=o.getAnchorUrl(""),void(e.onclick=()=>(o.executeSetOCGState(r),!1));e.href=o.getDestinationHash(a),e.onclick=e=>(this._updateCurrentTreeItem(e.target.parentNode),a&&o.goToDestination(a),!1)}}_setStyles(e,{bold:t,italic:i}){t&&(e.style.fontWeight="bold"),i&&(e.style.fontStyle="italic")}_addToggleButton(e,{count:t,items:i}){let n=!1;if(t<0){let e=i.length;if(e>0){const t=[...i];for(;t.length>0;){const{count:i,items:n}=t.shift();i>0&&n.length>0&&(e+=n.length,t.push(...n))}}Math.abs(t)===e&&(n=!0)}super._addToggleButton(e,n)}_toggleAllTreeItems(){this._outline&&super._toggleAllTreeItems()}render({outline:e,pdfDocument:t}){if(this._outline&&this.reset(),this._outline=e||null,this._pdfDocument=t||null,!e)return void this._dispatchEvent(0);const i=document.createDocumentFragment(),n=[{parent:i,items:e}];let s=0,a=!1;for(;n.length>0;){const e=n.shift();for(const t of e.items){const i=document.createElement("div");i.className="treeItem";const r=document.createElement("a");if(this._bindLink(r,t),this._setStyles(r,t),r.textContent=this._normalizeTextContent(t.title),i.append(r),t.items.length>0){a=!0,this._addToggleButton(i,t);const e=document.createElement("div");e.className="treeItems",i.append(e),n.push({parent:e,items:t.items})}e.parent.append(i),s++}}this._finishRendering(i,s,a)}async _currentOutlineItem(){if(!this._isPagesLoaded)throw new Error("_currentOutlineItem: All pages have not been loaded.");if(!this._outline||!this._pdfDocument)return;const e=await this._getPageNumberToDestHash(this._pdfDocument);if(e&&(this._updateCurrentTreeItem(null),this._sidebarView===r.SidebarView.OUTLINE))for(let t=this._currentPageNumber;t>0;t--){const i=e.get(t);if(!i)continue;const n=this.container.querySelector(`a[href="${i}"]`);if(n){this._scrollToCurrentTreeItem(n.parentNode);break}}}async _getPageNumberToDestHash(e){if(this._pageNumberToDestHashCapability)return this._pageNumberToDestHashCapability.promise;this._pageNumberToDestHashCapability=new a.PromiseCapability;const t=new Map,i=new Map,n=[{nesting:0,items:this._outline}];for(;n.length>0;){const s=n.shift(),a=s.nesting;for(const{dest:r,items:o}of s.items){let s,l;if("string"==typeof r){if(s=await e.getDestination(r),e!==this._pdfDocument)return null}else s=r;if(Array.isArray(s)){const[n]=s;if("object"==typeof n&&null!==n){if(l=this.linkService._cachedPageNumber(n),!l)try{if(l=await e.getPageIndex(n)+1,e!==this._pdfDocument)return null;this.linkService.cachePageRef(l,n)}catch{}}else Number.isInteger(n)&&(l=n+1);if(Number.isInteger(l)&&(!t.has(l)||a>i.get(l))){const e=this.linkService.getDestinationHash(r);t.set(l,e),i.set(l,a)}}o.length>0&&n.push({nesting:a+1,items:o})}}return this._pageNumberToDestHashCapability.resolve(t.size>0?t:null),this._pageNumberToDestHashCapability.promise}}n()}catch(e){n(e)}}))},6732:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFPageView:()=>b});var s=i(1869),a=i(4927),r=i(2640),o=i(6735),l=i(8961),d=i(758),h=i(7910),c=(i(3234),i(7498)),u=i(4630),p=i(4274),g=i(1013),f=i(8012),m=e([s,r,o,d,h,g,f]);[s,r,o,d,h,g,f]=m.then?(await m)():m;const w=l.compatibilityParams.maxCanvasPixels||16777216,v=null;class b{#Re=s.AnnotationMode.ENABLE_FORMS;#Fe=!1;#Ve=null;#Ue=null;#je=null;#ze=null;#He=a.RenderingStates.INITIAL;#We=a.TextLayerMode.ENABLE;#$e={directDrawing:!0,initialOptionalContent:!0,regularAnnotations:!0};#Ke=new WeakMap;constructor(e){const t=e.container,i=e.defaultViewport;this.id=e.id,this.renderingId="page"+this.id,this.#Ve=e.layerProperties||v,this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=e.scale||a.DEFAULT_SCALE,this.viewport=i,this.pdfPageRotate=i.rotation,this._optionalContentConfigPromise=e.optionalContentConfigPromise||null,this.#We=e.textLayerMode??a.TextLayerMode.ENABLE,this.#Re=e.annotationMode??s.AnnotationMode.ENABLE_FORMS,this.imageResourcesPath=e.imageResourcesPath||"",this.isOffscreenCanvasSupported=e.isOffscreenCanvasSupported??!0,this.maxCanvasPixels=e.maxCanvasPixels??w,this.pageColors=e.pageColors||null,this.eventBus=e.eventBus,this.renderingQueue=e.renderingQueue,this.l10n=e.l10n||h.NullL10n,this.renderTask=null,this.resume=null,this._isStandalone=!this.renderingQueue?.hasViewer(),this._container=t,this._annotationCanvasMap=null,this.annotationLayer=null,this.annotationEditorLayer=null,this.textLayer=null,this.zoomLayer=null,this.xfaLayer=null,this.structTreeLayer=null,this.drawLayer=null;const n=document.createElement("div");if(n.className="page",n.setAttribute("data-page-number",this.id),n.setAttribute("role","region"),n.setAttribute("data-l10n-id","pdfjs-page-landmark"),n.setAttribute("data-l10n-args",JSON.stringify({page:this.id})),this.div=n,this.#Ge(),t?.append(n),this._isStandalone){t?.style.setProperty("--scale-factor",this.scale*s.PixelsPerInch.PDF_TO_CSS_UNITS);const{optionalContentConfigPromise:i}=e;i&&i.then((e=>{i===this._optionalContentConfigPromise&&(this.#$e.initialOptionalContent=e.hasInitialVisibility)})),this.l10n===h.NullL10n&&this.l10n.translate(this.div)}}get renderingState(){return this.#He}set renderingState(e){if(e!==this.#He)switch(this.#He=e,this.#Ue&&(clearTimeout(this.#Ue),this.#Ue=null),e){case a.RenderingStates.PAUSED:this.div.classList.remove("loading");break;case a.RenderingStates.RUNNING:this.div.classList.add("loadingIcon"),this.#Ue=setTimeout((()=>{this.div.classList.add("loading"),this.#Ue=null}),0);break;case a.RenderingStates.INITIAL:case a.RenderingStates.FINISHED:this.div.classList.remove("loadingIcon","loading")}}#Ge(){const{viewport:e}=this;if(this.pdfPage){if(this.#je===e.rotation)return;this.#je=e.rotation}(0,s.setLayerDimensions)(this.div,e,!0,!1)}setPdfPage(e){!this._isStandalone||"CanvasText"!==this.pageColors?.foreground&&"Canvas"!==this.pageColors?.background||this._container?.style.setProperty("--hcm-highlight-filter",e.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight")),this.pdfPage=e,this.pdfPageRotate=e.rotate;const t=(this.rotation+this.pdfPageRotate)%360;this.viewport=e.getViewport({scale:this.scale*s.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:t}),this.#Ge(),this.reset()}destroy(){this.reset(),this.pdfPage?.cleanup()}get _textHighlighter(){return(0,s.shadow)(this,"_textHighlighter",new p.TextHighlighter({pageIndex:this.id-1,eventBus:this.eventBus,findController:this.#Ve.findController}))}async#Xe(){let e=null;try{await this.annotationLayer.render(this.viewport,"display")}catch(t){console.error(`#renderAnnotationLayer: "${t}".`),e=t}finally{this.eventBus.dispatch("annotationlayerrendered",{source:this,pageNumber:this.id,error:e})}}async#Ze(){let e=null;try{await this.annotationEditorLayer.render(this.viewport,"display")}catch(t){console.error(`#renderAnnotationEditorLayer: "${t}".`),e=t}finally{this.eventBus.dispatch("annotationeditorlayerrendered",{source:this,pageNumber:this.id,error:e})}}async#qe(){try{await this.drawLayer.render("display")}catch(e){console.error(`#renderDrawLayer: "${e}".`)}}async#Qe(){let e=null;try{const e=await this.xfaLayer.render(this.viewport,"display");e?.textDivs&&this._textHighlighter&&this.#Ye(e.textDivs)}catch(t){console.error(`#renderXfaLayer: "${t}".`),e=t}finally{this.xfaLayer?.div&&(this.l10n.pause(),this.div.append(this.xfaLayer.div),this.l10n.resume()),this.eventBus.dispatch("xfalayerrendered",{source:this,pageNumber:this.id,error:e})}}async#Je(){const{pdfPage:e,textLayer:t,viewport:i}=this;if(!t)return;let n=null;try{if(!t.renderingDone){const i=e.streamTextContent({includeMarkedContent:!0,disableNormalization:!0});t.setTextContentSource(i)}await t.render(i)}catch(e){if(e instanceof s.AbortException)return;console.error(`#renderTextLayer: "${e}".`),n=e}this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.id,numTextDivs:t.numTextDivs,error:n}),this.#et()}async#et(){if(!this.textLayer)return;this.structTreeLayer||=new c.StructTreeLayerBuilder;const e=await(this.structTreeLayer.renderingDone?null:this.pdfPage.getStructTree()),t=this.structTreeLayer?.render(e);t&&(this.l10n.pause(),this.canvas?.append(t),this.l10n.resume()),this.structTreeLayer?.show()}async#Ye(e){const t=await this.pdfPage.getTextContent(),i=[];for(const e of t.items)i.push(e.str);this._textHighlighter.setTextMapping(e,i),this._textHighlighter.enable()}_resetZoomLayer(e=!1){if(!this.zoomLayer)return;const t=this.zoomLayer.firstChild;this.#Ke.delete(t),t.width=0,t.height=0,e&&this.zoomLayer.remove(),this.zoomLayer=null}reset({keepZoomLayer:e=!1,keepAnnotationLayer:t=!1,keepAnnotationEditorLayer:i=!1,keepXfaLayer:n=!1,keepTextLayer:s=!1}={}){this.cancelRendering({keepAnnotationLayer:t,keepAnnotationEditorLayer:i,keepXfaLayer:n,keepTextLayer:s}),this.renderingState=a.RenderingStates.INITIAL;const r=this.div,o=r.childNodes,l=e&&this.zoomLayer||null,d=t&&this.annotationLayer?.div||null,h=i&&this.annotationEditorLayer?.div||null,c=n&&this.xfaLayer?.div||null,u=s&&this.textLayer?.div||null;for(let e=o.length-1;e>=0;e--){const t=o[e];switch(t){case l:case d:case h:case c:case u:continue}t.remove()}r.removeAttribute("data-loaded"),d&&this.annotationLayer.hide(),h&&this.annotationEditorLayer.hide(),c&&this.xfaLayer.hide(),u&&this.textLayer.hide(),this.structTreeLayer?.hide(),l||(this.canvas&&(this.#Ke.delete(this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer())}update({scale:e=0,rotation:t=null,optionalContentConfigPromise:i=null,drawingDelay:n=-1}){this.scale=e||this.scale,"number"==typeof t&&(this.rotation=t),i instanceof Promise&&(this._optionalContentConfigPromise=i,i.then((e=>{i===this._optionalContentConfigPromise&&(this.#$e.initialOptionalContent=e.hasInitialVisibility)}))),this.#$e.directDrawing=!0;const r=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*s.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:r}),this.#Ge(),this._isStandalone&&this._container?.style.setProperty("--scale-factor",this.viewport.scale),this.canvas){let e=!1;if(this.#Fe)if(0===this.maxCanvasPixels)e=!0;else if(this.maxCanvasPixels>0){const{width:t,height:i}=this.viewport,{sx:n,sy:s}=this.outputScale;e=(Math.floor(t)*n|0)*(Math.floor(i)*s|0)>this.maxCanvasPixels}const t=!e&&n>=0&&n<1e3;if(t||e){if(t&&this.renderingState!==a.RenderingStates.FINISHED&&(this.cancelRendering({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0,cancelExtraDelay:n}),this.renderingState=a.RenderingStates.FINISHED,this.#$e.directDrawing=!1),this.cssTransform({target:this.canvas,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0,redrawTextLayer:!t,hideTextLayer:t}),t)return;return void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:this.#ze})}this.zoomLayer||this.canvas.hidden||(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform({target:this.zoomLayer.firstChild}),this.reset({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0})}cancelRendering({keepAnnotationLayer:e=!1,keepAnnotationEditorLayer:t=!1,keepXfaLayer:i=!1,keepTextLayer:n=!1,cancelExtraDelay:s=0}={}){this.renderTask&&(this.renderTask.cancel(s),this.renderTask=null),this.resume=null,!this.textLayer||n&&this.textLayer.div||(this.textLayer.cancel(),this.textLayer=null),this.structTreeLayer&&!this.textLayer&&(this.structTreeLayer=null),!this.annotationLayer||e&&this.annotationLayer.div||(this.annotationLayer.cancel(),this.annotationLayer=null,this._annotationCanvasMap=null),!this.annotationEditorLayer||t&&this.annotationEditorLayer.div||(this.drawLayer&&(this.drawLayer.cancel(),this.drawLayer=null),this.annotationEditorLayer.cancel(),this.annotationEditorLayer=null),!this.xfaLayer||i&&this.xfaLayer.div||(this.xfaLayer.cancel(),this.xfaLayer=null,this._textHighlighter?.disable())}cssTransform({target:e,redrawAnnotationLayer:t=!1,redrawAnnotationEditorLayer:i=!1,redrawXfaLayer:n=!1,redrawTextLayer:s=!1,hideTextLayer:a=!1}){if(!e.hasAttribute("zooming")){e.setAttribute("zooming",!0);const{style:t}=e;t.width=t.height=""}const r=this.#Ke.get(e);if(this.viewport!==r){const t=this.viewport.rotation-r.rotation,i=Math.abs(t);let n=1,s=1;if(90===i||270===i){const{width:e,height:t}=this.viewport;n=t/e,s=e/t}e.style.transform=`rotate(${t}deg) scale(${n}, ${s})`}t&&this.annotationLayer&&this.#Xe(),i&&this.annotationEditorLayer&&(this.drawLayer&&this.#qe(),this.#Ze()),n&&this.xfaLayer&&this.#Qe(),this.textLayer&&(a?(this.textLayer.hide(),this.structTreeLayer?.hide()):s&&this.#Je())}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(e,t){return this.viewport.convertToPdfPoint(e,t)}async#tt(e,t=null){if(e===this.renderTask&&(this.renderTask=null),t instanceof s.RenderingCancelledException)this.#ze=null;else if(this.#ze=t,this.renderingState=a.RenderingStates.FINISHED,this._resetZoomLayer(!0),this.#$e.regularAnnotations=!e.separateAnnots,this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now(),error:this.#ze}),t)throw t}async draw(){this.renderingState!==a.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());const{div:e,l10n:t,pageColors:i,pdfPage:n,viewport:l}=this;if(!n)throw this.renderingState=a.RenderingStates.FINISHED,new Error("pdfPage is not loaded");this.renderingState=a.RenderingStates.RUNNING;const h=document.createElement("div");if(h.classList.add("canvasWrapper"),e.append(h),this.textLayer||this.#We===a.TextLayerMode.DISABLE||n.isPureXfa||(this._accessibilityManager||=new u.TextAccessibilityManager,this.textLayer=new g.TextLayerBuilder({highlighter:this._textHighlighter,accessibilityManager:this._accessibilityManager,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,enablePermissions:this.#We===a.TextLayerMode.ENABLE_PERMISSIONS}),this.textLayer.onAppend=e=>{this.l10n.pause(),this.div.append(e),this.l10n.resume()}),!this.annotationLayer&&this.#Re!==s.AnnotationMode.DISABLE){const{annotationStorage:t,downloadManager:i,enableScripting:a,fieldObjectsPromise:r,hasJSActionsPromise:l,linkService:d}=this.#Ve;this._annotationCanvasMap||=new Map,this.annotationLayer=new o.AnnotationLayerBuilder({pageDiv:e,pdfPage:n,annotationStorage:t,imageResourcesPath:this.imageResourcesPath,renderForms:this.#Re===s.AnnotationMode.ENABLE_FORMS,linkService:d,downloadManager:i,enableScripting:a,hasJSActionsPromise:l,fieldObjectsPromise:r,annotationCanvasMap:this._annotationCanvasMap,accessibilityManager:this._accessibilityManager})}const{width:c,height:p}=l,m=document.createElement("canvas");m.setAttribute("role","presentation"),m.hidden=!0;const w=!(!i?.background||!i?.foreground);let v=e=>{w&&!e||(m.hidden=!1,v=null)};h.append(m),this.canvas=m;const b=m.getContext("2d",{alpha:!1}),y=this.outputScale=new a.OutputScale;if(0===this.maxCanvasPixels){const e=1/this.scale;y.sx*=e,y.sy*=e,this.#Fe=!0}else if(this.maxCanvasPixels>0){const e=c*p,t=Math.sqrt(this.maxCanvasPixels/e);y.sx>t||y.sy>t?(y.sx=t,y.sy=t,this.#Fe=!0):this.#Fe=!1}const _=(0,a.approximateFraction)(y.sx),E=(0,a.approximateFraction)(y.sy);m.width=(0,a.roundToDivide)(c*y.sx,_[0]),m.height=(0,a.roundToDivide)(p*y.sy,E[0]);const{style:P}=m;P.width=(0,a.roundToDivide)(c,_[1])+"px",P.height=(0,a.roundToDivide)(p,E[1])+"px",this.#Ke.set(m,l);const S={canvasContext:b,transform:y.scaled?[y.sx,0,0,y.sy,0,0]:null,viewport:l,annotationMode:this.#Re,optionalContentConfigPromise:this._optionalContentConfigPromise,annotationCanvasMap:this._annotationCanvasMap,pageColors:i},C=this.renderTask=this.pdfPage.render(S);C.onContinue=e=>{if(v?.(!1),this.renderingQueue&&!this.renderingQueue.isHighestPriority(this))return this.renderingState=a.RenderingStates.PAUSED,void(this.resume=()=>{this.renderingState=a.RenderingStates.RUNNING,e()});e()};const L=C.promise.then((async()=>{v?.(!0),await this.#tt(C),this.#Je(),this.annotationLayer&&await this.#Xe();const{annotationEditorUIManager:i}=this.#Ve;i&&(this.drawLayer||=new d.DrawLayerBuilder({pageIndex:this.id}),await this.#qe(),this.drawLayer.setParent(h),this.annotationEditorLayer||(this.annotationEditorLayer=new r.AnnotationEditorLayerBuilder({uiManager:i,pageDiv:e,pdfPage:n,l10n:t,accessibilityManager:this._accessibilityManager,annotationLayer:this.annotationLayer?.annotationLayer,textLayer:this.textLayer,drawLayer:this.drawLayer.getDrawLayer()})),this.#Ze())}),(e=>(e instanceof s.RenderingCancelledException||v?.(!0),this.#tt(C,e))));if(n.isPureXfa){if(!this.xfaLayer){const{annotationStorage:e,linkService:t}=this.#Ve;this.xfaLayer=new f.XfaLayerBuilder({pdfPage:n,annotationStorage:e,linkService:t})}this.#Qe()}return e.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),L}setPageLabel(e){this.pageLabel="string"==typeof e?e:null,this.div.setAttribute("data-l10n-args",JSON.stringify({page:this.pageLabel??this.id})),null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}get thumbnailCanvas(){const{directDrawing:e,initialOptionalContent:t,regularAnnotations:i}=this.#$e;return e&&t&&i?this.canvas:null}}n()}catch(e){n(e)}}))},323:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFPresentationMode:()=>g});var s=i(4927),a=i(1869),r=e([a]);a=(r.then?(await r)():r)[0];const o=3e3,l="pdfPresentationMode",d="pdfPresentationModeControls",h=50,c=.1,u=50,p=Math.PI/6;class g{#ue=s.PresentationModeState.UNKNOWN;#it=null;constructor({container:e,pdfViewer:t,eventBus:i}){this.container=e,this.pdfViewer=t,this.eventBus=i,this.contextMenuOpen=!1,this.mouseScrollTimeStamp=0,this.mouseScrollDelta=0,this.touchSwipeState=null}async request(){const{container:e,pdfViewer:t}=this;if(this.active||!t.pagesCount||!e.requestFullscreen)return!1;this.#nt(),this.#st(s.PresentationModeState.CHANGING);const i=e.requestFullscreen();this.#it={pageNumber:t.currentPageNumber,scaleValue:t.currentScaleValue,scrollMode:t.scrollMode,spreadMode:null,annotationEditorMode:null},t.spreadMode===s.SpreadMode.NONE||t.pageViewsReady&&t.hasEqualPageSizes||(console.warn("Ignoring Spread modes when entering PresentationMode, since the document may contain varying page sizes."),this.#it.spreadMode=t.spreadMode),t.annotationEditorMode!==a.AnnotationEditorType.DISABLE&&(this.#it.annotationEditorMode=t.annotationEditorMode);try{return await i,t.focus(),!0}catch{this.#at(),this.#st(s.PresentationModeState.NORMAL)}return!1}get active(){return this.#ue===s.PresentationModeState.CHANGING||this.#ue===s.PresentationModeState.FULLSCREEN}#rt(e){if(!this.active)return;e.preventDefault();const t=(0,s.normalizeWheelEventDelta)(e),i=Date.now(),n=this.mouseScrollTimeStamp;if(!(i>n&&i-n<h)&&((this.mouseScrollDelta>0&&t<0||this.mouseScrollDelta<0&&t>0)&&this.#ot(),this.mouseScrollDelta+=t,Math.abs(this.mouseScrollDelta)>=c)){const e=this.mouseScrollDelta;this.#ot();(e>0?this.pdfViewer.previousPage():this.pdfViewer.nextPage())&&(this.mouseScrollTimeStamp=i)}}#st(e){this.#ue=e,this.eventBus.dispatch("presentationmodechanged",{source:this,state:e})}#lt(){this.#st(s.PresentationModeState.FULLSCREEN),this.container.classList.add(l),setTimeout((()=>{this.pdfViewer.scrollMode=s.ScrollMode.PAGE,null!==this.#it.spreadMode&&(this.pdfViewer.spreadMode=s.SpreadMode.NONE),this.pdfViewer.currentPageNumber=this.#it.pageNumber,this.pdfViewer.currentScaleValue="page-fit",null!==this.#it.annotationEditorMode&&(this.pdfViewer.annotationEditorMode={mode:a.AnnotationEditorType.NONE})}),0),this.#dt(),this.#ht(),this.contextMenuOpen=!1,window.getSelection().removeAllRanges()}#ct(){const e=this.pdfViewer.currentPageNumber;this.container.classList.remove(l),setTimeout((()=>{this.#at(),this.#st(s.PresentationModeState.NORMAL),this.pdfViewer.scrollMode=this.#it.scrollMode,null!==this.#it.spreadMode&&(this.pdfViewer.spreadMode=this.#it.spreadMode),this.pdfViewer.currentScaleValue=this.#it.scaleValue,this.pdfViewer.currentPageNumber=e,null!==this.#it.annotationEditorMode&&(this.pdfViewer.annotationEditorMode={mode:this.#it.annotationEditorMode}),this.#it=null}),0),this.#ut(),this.#pt(),this.#ot(),this.contextMenuOpen=!1}#gt(e){if(this.contextMenuOpen)return this.contextMenuOpen=!1,void e.preventDefault();0===e.button&&(e.target.href&&e.target.parentNode?.hasAttribute("data-internal-link")||(e.preventDefault(),e.shiftKey?this.pdfViewer.previousPage():this.pdfViewer.nextPage()))}#ft(){this.contextMenuOpen=!0}#ht(){this.controlsTimeout?clearTimeout(this.controlsTimeout):this.container.classList.add(d),this.controlsTimeout=setTimeout((()=>{this.container.classList.remove(d),delete this.controlsTimeout}),o)}#pt(){this.controlsTimeout&&(clearTimeout(this.controlsTimeout),this.container.classList.remove(d),delete this.controlsTimeout)}#ot(){this.mouseScrollTimeStamp=0,this.mouseScrollDelta=0}#mt(e){if(this.active)if(e.touches.length>1)this.touchSwipeState=null;else switch(e.type){case"touchstart":this.touchSwipeState={startX:e.touches[0].pageX,startY:e.touches[0].pageY,endX:e.touches[0].pageX,endY:e.touches[0].pageY};break;case"touchmove":if(null===this.touchSwipeState)return;this.touchSwipeState.endX=e.touches[0].pageX,this.touchSwipeState.endY=e.touches[0].pageY,e.preventDefault();break;case"touchend":if(null===this.touchSwipeState)return;let t=0;const i=this.touchSwipeState.endX-this.touchSwipeState.startX,n=this.touchSwipeState.endY-this.touchSwipeState.startY,s=Math.abs(Math.atan2(n,i));Math.abs(i)>u&&(s<=p||s>=Math.PI-p)?t=i:Math.abs(n)>u&&Math.abs(s-Math.PI/2)<=p&&(t=n),t>0?this.pdfViewer.previousPage():t<0&&this.pdfViewer.nextPage()}}#dt(){this.showControlsBind=this.#ht.bind(this),this.mouseDownBind=this.#gt.bind(this),this.mouseWheelBind=this.#rt.bind(this),this.resetMouseScrollStateBind=this.#ot.bind(this),this.contextMenuBind=this.#ft.bind(this),this.touchSwipeBind=this.#mt.bind(this),window.addEventListener("mousemove",this.showControlsBind),window.addEventListener("mousedown",this.mouseDownBind),window.addEventListener("wheel",this.mouseWheelBind,{passive:!1}),window.addEventListener("keydown",this.resetMouseScrollStateBind),window.addEventListener("contextmenu",this.contextMenuBind),window.addEventListener("touchstart",this.touchSwipeBind),window.addEventListener("touchmove",this.touchSwipeBind),window.addEventListener("touchend",this.touchSwipeBind)}#ut(){window.removeEventListener("mousemove",this.showControlsBind),window.removeEventListener("mousedown",this.mouseDownBind),window.removeEventListener("wheel",this.mouseWheelBind,{passive:!1}),window.removeEventListener("keydown",this.resetMouseScrollStateBind),window.removeEventListener("contextmenu",this.contextMenuBind),window.removeEventListener("touchstart",this.touchSwipeBind),window.removeEventListener("touchmove",this.touchSwipeBind),window.removeEventListener("touchend",this.touchSwipeBind),delete this.showControlsBind,delete this.mouseDownBind,delete this.mouseWheelBind,delete this.resetMouseScrollStateBind,delete this.contextMenuBind,delete this.touchSwipeBind}#wt(){document.fullscreenElement?this.#lt():this.#ct()}#nt(){this.fullscreenChangeBind=this.#wt.bind(this),window.addEventListener("fullscreenchange",this.fullscreenChangeBind)}#at(){window.removeEventListener("fullscreenchange",this.fullscreenChangeBind),delete this.fullscreenChangeBind}}n()}catch(e){n(e)}}))},1834:(e,t,i)=>{i.a(e,(async(e,t)=>{try{var n=i(1869),s=i(39),a=i(4552),r=e([n,s,a]);[n,s,a]=r.then?(await r)():r;let c=null,u=null,p=null;class g{constructor(e,t,i,n,s=null,a=null){this.pdfDocument=e,this.pagesOverview=t,this.printContainer=i,this._printResolution=n||150,this._optionalContentConfigPromise=s||e.getOptionalContentConfig(),this._printAnnotationStoragePromise=a||Promise.resolve(),this.currentPage=-1,this.scratchCanvas=document.createElement("canvas")}layout(){this.throwIfInactive();const e=document.querySelector("body");e.setAttribute("data-pdfjsprinting",!0);const{width:t,height:i}=this.pagesOverview[0];this.pagesOverview.every((e=>e.width===t&&e.height===i))||console.warn("Not all pages have the same size. The printed result may be incorrect!"),this.pageStyleSheet=document.createElement("style"),this.pageStyleSheet.textContent=`@page { size: ${t}pt ${i}pt;}`,e.append(this.pageStyleSheet)}destroy(){if(c!==this)return;this.printContainer.textContent="";document.querySelector("body").removeAttribute("data-pdfjsprinting"),this.pageStyleSheet&&(this.pageStyleSheet.remove(),this.pageStyleSheet=null),this.scratchCanvas.width=this.scratchCanvas.height=0,this.scratchCanvas=null,c=null,h().then((function(){p.active===u&&p.close(u)}))}renderPages(){if(this.pdfDocument.isPureXfa)return(0,a.getXfaHtmlForPrinting)(this.printContainer,this.pdfDocument),Promise.resolve();const e=this.pagesOverview.length,t=(i,s)=>{if(this.throwIfInactive(),++this.currentPage>=e)return d(e,e),void i();const a=this.currentPage;d(a,e),function(e,t,i,s,a,r,o){const l=c.scratchCanvas,d=a/n.PixelsPerInch.PDF;l.width=Math.floor(s.width*d),l.height=Math.floor(s.height*d);const h=l.getContext("2d");return h.save(),h.fillStyle="rgb(255, 255, 255)",h.fillRect(0,0,l.width,l.height),h.restore(),Promise.all([t.getPage(i),o]).then((function([e,t]){const i={canvasContext:h,transform:[d,0,0,d,0,0],viewport:e.getViewport({scale:1,rotation:s.rotation}),intent:"print",annotationMode:n.AnnotationMode.ENABLE_STORAGE,optionalContentConfigPromise:r,printAnnotationStorage:t};return e.render(i).promise}))}(0,this.pdfDocument,a+1,this.pagesOverview[a],this._printResolution,this._optionalContentConfigPromise,this._printAnnotationStoragePromise).then(this.useRenderedPage.bind(this)).then((function(){t(i,s)}),s)};return new Promise(t)}useRenderedPage(){this.throwIfInactive();const e=document.createElement("img"),t=this.scratchCanvas;"toBlob"in t?t.toBlob((function(t){e.src=URL.createObjectURL(t)})):e.src=t.toDataURL();const i=document.createElement("div");return i.className="printedPage",i.append(e),this.printContainer.append(i),new Promise((function(t,i){e.onload=t,e.onerror=i}))}performPrint(){return this.throwIfInactive(),new Promise((e=>{setTimeout((()=>{this.active?(f.call(window),setTimeout(e,20)):e()}),0)}))}get active(){return this===c}throwIfInactive(){if(!this.active)throw new Error("This print request was cancelled or completed.")}}const f=window.print;function o(e){const t=new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:"custom"});window.dispatchEvent(t)}function l(){c&&(c.destroy(),o("afterprint"))}function d(e,t){u||=document.getElementById("printServiceDialog");const i=Math.round(100*e/t),n=u.querySelector("progress"),s=u.querySelector(".relative-progress");n.value=i,s.setAttribute("data-l10n-args",JSON.stringify({progress:i}))}if(window.print=function(){if(c)console.warn("Ignored window.print() because of a pending print job.");else{h().then((function(){c&&p.open(u)}));try{o("beforeprint")}finally{if(!c)return console.error("Expected print service to be initialized."),void h().then((function(){p.active===u&&p.close(u)}));const e=c;c.renderPages().then((function(){return e.performPrint()})).catch((function(){})).then((function(){e.active&&l()}))}}},window.addEventListener("keydown",(function(e){80!==e.keyCode||!e.ctrlKey&&!e.metaKey||e.altKey||e.shiftKey&&!window.chrome&&!window.opera||(window.print(),e.preventDefault(),e.stopImmediatePropagation())}),!0),"onbeforeprint"in window){const w=function(e){"custom"!==e.detail&&e.stopImmediatePropagation()};window.addEventListener("beforeprint",w),window.addEventListener("afterprint",w)}let m;function h(){if(!m){if(p=s.PDFViewerApplication.overlayManager,!p)throw new Error("The overlay manager has not yet been initialized.");u||=document.getElementById("printServiceDialog"),m=p.register(u,!0),document.getElementById("printCancel").onclick=l,u.addEventListener("close",l)}return m}s.PDFPrintServiceFactory.instance={supportsPrinting:!0,createPrintService(e,t,i,n,s,a){if(c)throw new Error("The print service is created and active.");return c=new g(e,t,i,n,s,a),c}},t()}catch(v){t(v)}}))},5119:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFRenderingQueue:()=>l});var s=i(1869),a=i(4927),r=e([s]);s=(r.then?(await r)():r)[0];const o=3e4;class l{constructor(){this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1,Object.defineProperty(this,"hasViewer",{value:()=>!!this.pdfViewer})}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.isThumbnailViewEnabled&&this.pdfThumbnailViewer?.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),o))}getHighestPriority(e,t,i,n=!1){const s=e.views,a=s.length;if(0===a)return null;for(let e=0;e<a;e++){const t=s[e].view;if(!this.isViewFinished(t))return t}const r=e.first.id,o=e.last.id;if(o-r+1>a){const n=e.ids;for(let e=1,s=o-r;e<s;e++){const s=i?r+e:o-e;if(n.has(s))continue;const a=t[s-1];if(!this.isViewFinished(a))return a}}let l=i?o:r-2,d=t[l];return d&&!this.isViewFinished(d)||n&&(l+=i?1:-1,d=t[l],d&&!this.isViewFinished(d))?d:null}isViewFinished(e){return e.renderingState===a.RenderingStates.FINISHED}renderView(e){switch(e.renderingState){case a.RenderingStates.FINISHED:return!1;case a.RenderingStates.PAUSED:this.highestPriorityPage=e.renderingId,e.resume();break;case a.RenderingStates.RUNNING:this.highestPriorityPage=e.renderingId;break;case a.RenderingStates.INITIAL:this.highestPriorityPage=e.renderingId,e.draw().finally((()=>{this.renderHighestPriority()})).catch((e=>{e instanceof s.RenderingCancelledException||console.error(`renderView: "${e}"`)}))}return!0}}n()}catch(e){n(e)}}))},2599:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFScriptingManager:()=>o});var s=i(4927),a=i(1869),r=e([a]);a=(r.then?(await r)():r)[0];class o{#vt=null;#bt=null;#yt=null;#d=null;#_t=null;#Et=null;#Pt=null;#St=!1;#Ct=null;#Lt=null;constructor({eventBus:e,externalServices:t=null,docProperties:i=null}){this.#d=e,this.#_t=t,this.#yt=i}setViewer(e){this.#Pt=e}async setDocument(e){if(this.#Et&&await this.#Tt(),this.#Et=e,!e)return;const[t,i,n]=await Promise.all([e.getFieldObjects(),e.getCalculationOrderIds(),e.getJSActions()]);if(t||n){if(e===this.#Et){try{this.#Ct=this.#It()}catch(e){return console.error(`setDocument: "${e.message}".`),void await this.#Tt()}this._internalEvents.set("updatefromsandbox",(e=>{e?.source===window&&this.#Mt(e.detail)})),this._internalEvents.set("dispatcheventinsandbox",(e=>{this.#Ct?.dispatchEventInSandbox(e.detail)})),this._internalEvents.set("pagechanging",(({pageNumber:e,previous:t})=>{e!==t&&(this.#xt(t),this.#At(e))})),this._internalEvents.set("pagerendered",(({pageNumber:e})=>{this._pageOpenPending.has(e)&&e===this.#Pt.currentPageNumber&&this.#At(e)})),this._internalEvents.set("pagesdestroy",(async()=>{await this.#xt(this.#Pt.currentPageNumber),await(this.#Ct?.dispatchEventInSandbox({id:"doc",name:"WillClose"})),this.#vt?.resolve()}));for(const[e,t]of this._internalEvents)this.#d._on(e,t);try{const s=await this.#yt(e);if(e!==this.#Et)return;await this.#Ct.createSandbox({objects:t,calculationOrder:i,appInfo:{platform:navigator.platform,language:navigator.language},docInfo:{...s,actions:n}}),this.#d.dispatch("sandboxcreated",{source:this})}catch(e){return console.error(`setDocument: "${e.message}".`),void await this.#Tt()}await(this.#Ct?.dispatchEventInSandbox({id:"doc",name:"Open"})),await this.#At(this.#Pt.currentPageNumber,!0),Promise.resolve().then((()=>{e===this.#Et&&(this.#St=!0)}))}}else await this.#Tt()}async dispatchWillSave(){return this.#Ct?.dispatchEventInSandbox({id:"doc",name:"WillSave"})}async dispatchDidSave(){return this.#Ct?.dispatchEventInSandbox({id:"doc",name:"DidSave"})}async dispatchWillPrint(){if(this.#Ct){await(this.#Lt?.promise),this.#Lt=new a.PromiseCapability;try{await this.#Ct.dispatchEventInSandbox({id:"doc",name:"WillPrint"})}catch(e){throw this.#Lt.resolve(),this.#Lt=null,e}await this.#Lt.promise}}async dispatchDidPrint(){return this.#Ct?.dispatchEventInSandbox({id:"doc",name:"DidPrint"})}get destroyPromise(){return this.#bt?.promise||null}get ready(){return this.#St}get _internalEvents(){return(0,a.shadow)(this,"_internalEvents",new Map)}get _pageOpenPending(){return(0,a.shadow)(this,"_pageOpenPending",new Set)}get _visitedPages(){return(0,a.shadow)(this,"_visitedPages",new Map)}async#Mt(e){const t=this.#Pt,i=t.isInPresentationMode||t.isChangingPresentationMode,{id:n,siblings:a,command:r,value:o}=e;if(!n){switch(r){case"clear":console.clear();break;case"error":console.error(o);break;case"layout":if(!i){const e=(0,s.apiPageLayoutToViewerModes)(o);t.spreadMode=e.spreadMode}break;case"page-num":t.currentPageNumber=o+1;break;case"print":await t.pagesPromise,this.#d.dispatch("print",{source:this});break;case"println":console.log(o);break;case"zoom":i||(t.currentScaleValue=o);break;case"SaveAs":this.#d.dispatch("download",{source:this});break;case"FirstPage":t.currentPageNumber=1;break;case"LastPage":t.currentPageNumber=t.pagesCount;break;case"NextPage":t.nextPage();break;case"PrevPage":t.previousPage();break;case"ZoomViewIn":i||t.increaseScale();break;case"ZoomViewOut":i||t.decreaseScale();break;case"WillPrintFinished":this.#Lt?.resolve(),this.#Lt=null}return}if(i&&e.focus)return;delete e.id,delete e.siblings;const l=a?[n,...a]:[n];for(const t of l){const i=document.querySelector(`[data-element-id="${t}"]`);i?i.dispatchEvent(new CustomEvent("updatefromsandbox",{detail:e})):this.#Et?.annotationStorage.setValue(t,e)}}async#At(e,t=!1){const i=this.#Et,n=this._visitedPages;if(t&&(this.#vt=new a.PromiseCapability),!this.#vt)return;const r=this.#Pt.getPageView(e-1);if(r?.renderingState!==s.RenderingStates.FINISHED)return void this._pageOpenPending.add(e);this._pageOpenPending.delete(e);const o=(async()=>{const t=await(n.has(e)?null:r.pdfPage?.getJSActions());i===this.#Et&&await(this.#Ct?.dispatchEventInSandbox({id:"page",name:"PageOpen",pageNumber:e,actions:t}))})();n.set(e,o)}async#xt(e){const t=this.#Et,i=this._visitedPages;if(!this.#vt)return;if(this._pageOpenPending.has(e))return;const n=i.get(e);n&&(i.set(e,null),await n,t===this.#Et&&await(this.#Ct?.dispatchEventInSandbox({id:"page",name:"PageClose",pageNumber:e})))}#It(){if(this.#bt=new a.PromiseCapability,this.#Ct)throw new Error("#initScripting: Scripting already exists.");return this.#_t.createScripting()}async#Tt(){if(!this.#Ct)return this.#Et=null,void this.#bt?.resolve();this.#vt&&(await Promise.race([this.#vt.promise,new Promise((e=>{setTimeout(e,1e3)}))]).catch((()=>{})),this.#vt=null),this.#Et=null;try{await this.#Ct.destroySandbox()}catch{}this.#Lt?.reject(new Error("Scripting destroyed.")),this.#Lt=null;for(const[e,t]of this._internalEvents)this.#d._off(e,t);this._internalEvents.clear(),this._pageOpenPending.clear(),this._visitedPages.clear(),this.#Ct=null,this.#St=!1,this.#bt?.resolve()}}n()}catch(e){n(e)}}))},4487:(e,t,i)=>{i.d(t,{PDFSidebar:()=>r});var n=i(4927);const s="sidebarResizing",a="pdfSidebarNotification";class r{#$=!1;#Dt=this.#Nt.bind(this);#kt=this.#Bt.bind(this);#Ot=null;#Rt=null;constructor({elements:e,eventBus:t,l10n:i}){this.isOpen=!1,this.active=n.SidebarView.THUMBS,this.isInitialViewSet=!1,this.isInitialEventDispatched=!1,this.onToggled=null,this.onUpdateThumbnails=null,this.outerContainer=e.outerContainer,this.sidebarContainer=e.sidebarContainer,this.toggleButton=e.toggleButton,this.resizer=e.resizer,this.thumbnailButton=e.thumbnailButton,this.outlineButton=e.outlineButton,this.attachmentsButton=e.attachmentsButton,this.layersButton=e.layersButton,this.thumbnailView=e.thumbnailView,this.outlineView=e.outlineView,this.attachmentsView=e.attachmentsView,this.layersView=e.layersView,this._currentOutlineItemButton=e.currentOutlineItemButton,this.eventBus=t,this.#$="rtl"===i.getDirection(),this.#ie()}reset(){this.isInitialViewSet=!1,this.isInitialEventDispatched=!1,this.#Ft(!0),this.switchView(n.SidebarView.THUMBS),this.outlineButton.disabled=!1,this.attachmentsButton.disabled=!1,this.layersButton.disabled=!1,this._currentOutlineItemButton.disabled=!0}get visibleView(){return this.isOpen?this.active:n.SidebarView.NONE}setInitialView(e=n.SidebarView.NONE){this.isInitialViewSet||(this.isInitialViewSet=!0,e!==n.SidebarView.NONE&&e!==n.SidebarView.UNKNOWN?(this.switchView(e,!0),this.isInitialEventDispatched||this.#Vt()):this.#Vt())}switchView(e,t=!1){const i=e!==this.active;let s=!1;switch(e){case n.SidebarView.NONE:return void(this.isOpen&&this.close());case n.SidebarView.THUMBS:this.isOpen&&i&&(s=!0);break;case n.SidebarView.OUTLINE:if(this.outlineButton.disabled)return;break;case n.SidebarView.ATTACHMENTS:if(this.attachmentsButton.disabled)return;break;case n.SidebarView.LAYERS:if(this.layersButton.disabled)return;break;default:return void console.error(`PDFSidebar.switchView: "${e}" is not a valid view.`)}this.active=e,(0,n.toggleCheckedBtn)(this.thumbnailButton,e===n.SidebarView.THUMBS,this.thumbnailView),(0,n.toggleCheckedBtn)(this.outlineButton,e===n.SidebarView.OUTLINE,this.outlineView),(0,n.toggleCheckedBtn)(this.attachmentsButton,e===n.SidebarView.ATTACHMENTS,this.attachmentsView),(0,n.toggleCheckedBtn)(this.layersButton,e===n.SidebarView.LAYERS,this.layersView),!t||this.isOpen?(s&&(this.onUpdateThumbnails(),this.onToggled()),i&&this.#Vt()):this.open()}open(){this.isOpen||(this.isOpen=!0,(0,n.toggleExpandedBtn)(this.toggleButton,!0),this.outerContainer.classList.add("sidebarMoving","sidebarOpen"),this.active===n.SidebarView.THUMBS&&this.onUpdateThumbnails(),this.onToggled(),this.#Vt(),this.#Ft())}close(e=null){this.isOpen&&(this.isOpen=!1,(0,n.toggleExpandedBtn)(this.toggleButton,!1),this.outerContainer.classList.add("sidebarMoving"),this.outerContainer.classList.remove("sidebarOpen"),this.onToggled(),this.#Vt(),e?.detail>0&&this.toggleButton.blur())}toggle(e=null){this.isOpen?this.close(e):this.open()}#Vt(){this.isInitialViewSet&&(this.isInitialEventDispatched||=!0),this.eventBus.dispatch("sidebarviewchanged",{source:this,view:this.visibleView})}#Ut(){this.toggleButton.setAttribute("data-l10n-id","pdfjs-toggle-sidebar-notification-button"),this.isOpen||this.toggleButton.classList.add(a)}#Ft(e=!1){(this.isOpen||e)&&this.toggleButton.classList.remove(a),e&&this.toggleButton.setAttribute("data-l10n-id","pdfjs-toggle-sidebar-button")}#ie(){this.sidebarContainer.addEventListener("transitionend",(e=>{e.target===this.sidebarContainer&&(this.outerContainer.classList.remove("sidebarMoving"),this.eventBus.dispatch("resize",{source:this}))})),this.toggleButton.addEventListener("click",(e=>{this.toggle(e)})),this.thumbnailButton.addEventListener("click",(()=>{this.switchView(n.SidebarView.THUMBS)})),this.outlineButton.addEventListener("click",(()=>{this.switchView(n.SidebarView.OUTLINE)})),this.outlineButton.addEventListener("dblclick",(()=>{this.eventBus.dispatch("toggleoutlinetree",{source:this})})),this.attachmentsButton.addEventListener("click",(()=>{this.switchView(n.SidebarView.ATTACHMENTS)})),this.layersButton.addEventListener("click",(()=>{this.switchView(n.SidebarView.LAYERS)})),this.layersButton.addEventListener("dblclick",(()=>{this.eventBus.dispatch("resetlayers",{source:this})})),this._currentOutlineItemButton.addEventListener("click",(()=>{this.eventBus.dispatch("currentoutlineitem",{source:this})}));const e=(e,t,i)=>{t.disabled=!e,e?this.#Ut():this.active===i&&this.switchView(n.SidebarView.THUMBS)};this.eventBus._on("outlineloaded",(t=>{e(t.outlineCount,this.outlineButton,n.SidebarView.OUTLINE),t.currentOutlineItemPromise.then((e=>{this.isInitialViewSet&&(this._currentOutlineItemButton.disabled=!e)}))})),this.eventBus._on("attachmentsloaded",(t=>{e(t.attachmentsCount,this.attachmentsButton,n.SidebarView.ATTACHMENTS)})),this.eventBus._on("layersloaded",(t=>{e(t.layersCount,this.layersButton,n.SidebarView.LAYERS)})),this.eventBus._on("presentationmodechanged",(e=>{e.state===n.PresentationModeState.NORMAL&&this.visibleView===n.SidebarView.THUMBS&&this.onUpdateThumbnails()})),this.resizer.addEventListener("mousedown",(e=>{0===e.button&&(this.outerContainer.classList.add(s),window.addEventListener("mousemove",this.#Dt),window.addEventListener("mouseup",this.#kt))})),this.eventBus._on("resize",(e=>{if(e.source!==window)return;if(this.#Ot=null,!this.#Rt)return;if(!this.isOpen)return void this.#jt(this.#Rt);this.outerContainer.classList.add(s);const t=this.#jt(this.#Rt);Promise.resolve().then((()=>{this.outerContainer.classList.remove(s),t&&this.eventBus.dispatch("resize",{source:this})}))}))}get outerContainerWidth(){return this.#Ot||=this.outerContainer.clientWidth}#jt(e=0){const t=Math.floor(this.outerContainerWidth/2);return e>t&&(e=t),e<200&&(e=200),e!==this.#Rt&&(this.#Rt=e,n.docStyle.setProperty("--sidebar-width",`${e}px`),!0)}#Nt(e){let t=e.clientX;this.#$&&(t=this.outerContainerWidth-t),this.#jt(t)}#Bt(e){this.outerContainer.classList.remove(s),this.eventBus.dispatch("resize",{source:this}),window.removeEventListener("mousemove",this.#Dt),window.removeEventListener("mouseup",this.#kt)}}},3346:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFThumbnailView:()=>c,TempImageFactory:()=>h});var s=i(4927),a=i(1869),r=e([a]);a=(r.then?(await r)():r)[0];const o=2,l=3,d=98;class h{static#zt=null;static getCanvas(e,t){const i=this.#zt||=document.createElement("canvas");i.width=e,i.height=t;const n=i.getContext("2d",{alpha:!1});return n.save(),n.fillStyle="rgb(255, 255, 255)",n.fillRect(0,0,e,t),n.restore(),[i,i.getContext("2d")]}static destroyCanvas(){const e=this.#zt;e&&(e.width=0,e.height=0),this.#zt=null}}class c{constructor({container:e,eventBus:t,id:i,defaultViewport:n,optionalContentConfigPromise:a,linkService:r,renderingQueue:o,pageColors:l}){this.id=i,this.renderingId="thumbnail"+i,this.pageLabel=null,this.pdfPage=null,this.rotation=0,this.viewport=n,this.pdfPageRotate=n.rotation,this._optionalContentConfigPromise=a||null,this.pageColors=l||null,this.eventBus=t,this.linkService=r,this.renderingQueue=o,this.renderTask=null,this.renderingState=s.RenderingStates.INITIAL,this.resume=null;const d=document.createElement("a");d.href=r.getAnchorUrl("#page="+i),d.setAttribute("data-l10n-id","pdfjs-thumb-page-title"),d.setAttribute("data-l10n-args",this.#Ht),d.onclick=function(){return r.goToPage(i),!1},this.anchor=d;const h=document.createElement("div");h.className="thumbnail",h.setAttribute("data-page-number",this.id),this.div=h,this.#Wt();const c=document.createElement("div");c.className="thumbnailImage",this._placeholderImg=c,h.append(c),d.append(h),e.append(d)}#Wt(){const{width:e,height:t}=this.viewport,i=e/t;this.canvasWidth=d,this.canvasHeight=this.canvasWidth/i|0,this.scale=this.canvasWidth/e;const{style:n}=this.div;n.setProperty("--thumbnail-width",`${this.canvasWidth}px`),n.setProperty("--thumbnail-height",`${this.canvasHeight}px`)}setPdfPage(e){this.pdfPage=e,this.pdfPageRotate=e.rotate;const t=(this.rotation+this.pdfPageRotate)%360;this.viewport=e.getViewport({scale:1,rotation:t}),this.reset()}reset(){this.cancelRendering(),this.renderingState=s.RenderingStates.INITIAL,this.div.removeAttribute("data-loaded"),this.image?.replaceWith(this._placeholderImg),this.#Wt(),this.image&&(this.image.removeAttribute("src"),delete this.image)}update({rotation:e=null}){"number"==typeof e&&(this.rotation=e);const t=(this.rotation+this.pdfPageRotate)%360;this.viewport=this.viewport.clone({scale:1,rotation:t}),this.reset()}cancelRendering(){this.renderTask&&(this.renderTask.cancel(),this.renderTask=null),this.resume=null}_getPageDrawContext(e=1){const t=document.createElement("canvas"),i=t.getContext("2d",{alpha:!1}),n=new s.OutputScale;t.width=e*this.canvasWidth*n.sx|0,t.height=e*this.canvasHeight*n.sy|0;return{ctx:i,canvas:t,transform:n.scaled?[n.sx,0,0,n.sy,0,0]:null}}_convertCanvasToImage(e){if(this.renderingState!==s.RenderingStates.FINISHED)throw new Error("_convertCanvasToImage: Rendering has not finished.");const t=this._reduceImage(e),i=document.createElement("img");i.className="thumbnailImage",i.setAttribute("data-l10n-id","pdfjs-thumb-page-canvas"),i.setAttribute("data-l10n-args",this.#Ht),i.src=t.toDataURL(),this.image=i,this.div.setAttribute("data-loaded",!0),this._placeholderImg.replaceWith(i),t.width=0,t.height=0}async#tt(e,t,i=null){if(e===this.renderTask&&(this.renderTask=null),!(i instanceof a.RenderingCancelledException)&&(this.renderingState=s.RenderingStates.FINISHED,this._convertCanvasToImage(t),i))throw i}async draw(){if(this.renderingState!==s.RenderingStates.INITIAL)return void console.error("Must be in new state before drawing");const{pdfPage:e}=this;if(!e)throw this.renderingState=s.RenderingStates.FINISHED,new Error("pdfPage is not loaded");this.renderingState=s.RenderingStates.RUNNING;const{ctx:t,canvas:i,transform:n}=this._getPageDrawContext(o),a={canvasContext:t,transform:n,viewport:this.viewport.clone({scale:o*this.scale}),optionalContentConfigPromise:this._optionalContentConfigPromise,pageColors:this.pageColors},r=this.renderTask=e.render(a);r.onContinue=e=>{if(!this.renderingQueue.isHighestPriority(this))return this.renderingState=s.RenderingStates.PAUSED,void(this.resume=()=>{this.renderingState=s.RenderingStates.RUNNING,e()});e()};const l=r.promise.then((()=>this.#tt(r,i)),(e=>this.#tt(r,i,e)));return l.finally((()=>{i.width=0,i.height=0,this.eventBus.dispatch("thumbnailrendered",{source:this,pageNumber:this.id,pdfPage:this.pdfPage})})),l}setImage(e){if(this.renderingState!==s.RenderingStates.INITIAL)return;const{thumbnailCanvas:t,pdfPage:i,scale:n}=e;t&&(this.pdfPage||this.setPdfPage(i),n<this.scale||(this.renderingState=s.RenderingStates.FINISHED,this._convertCanvasToImage(t)))}_reduceImage(e){const{ctx:t,canvas:i}=this._getPageDrawContext();if(e.width<=2*i.width)return t.drawImage(e,0,0,e.width,e.height,0,0,i.width,i.height),i;let n=i.width<<l,s=i.height<<l;const[a,r]=h.getCanvas(n,s);for(;n>e.width||s>e.height;)n>>=1,s>>=1;for(r.drawImage(e,0,0,e.width,e.height,0,0,n,s);n>2*i.width;)r.drawImage(a,0,0,n,s,0,0,n>>1,s>>1),n>>=1,s>>=1;return t.drawImage(a,0,0,n,s,0,0,i.width,i.height),i}get#Ht(){return JSON.stringify({page:this.pageLabel??this.id})}setPageLabel(e){this.pageLabel="string"==typeof e?e:null,this.anchor.setAttribute("data-l10n-args",this.#Ht),this.renderingState===s.RenderingStates.FINISHED&&this.image?.setAttribute("data-l10n-args",this.#Ht)}}n()}catch(e){n(e)}}))},3510:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFThumbnailViewer:()=>d});var s=i(4927),a=i(3346),r=e([a]);a=(r.then?(await r)():r)[0];const o=-19,l="selected";class d{constructor({container:e,eventBus:t,linkService:i,renderingQueue:n,pageColors:a}){this.container=e,this.eventBus=t,this.linkService=i,this.renderingQueue=n,this.pageColors=a||null,this.scroll=(0,s.watchScroll)(this.container,this._scrollUpdated.bind(this)),this._resetView()}_scrollUpdated(){this.renderingQueue.renderHighestPriority()}getThumbnail(e){return this._thumbnails[e]}_getVisibleThumbs(){return(0,s.getVisibleElements)({scrollEl:this.container,views:this._thumbnails})}scrollThumbnailIntoView(e){if(!this.pdfDocument)return;const t=this._thumbnails[e-1];if(!t)return void console.error('scrollThumbnailIntoView: Invalid "pageNumber" parameter.');if(e!==this._currentPageNumber){this._thumbnails[this._currentPageNumber-1].div.classList.remove(l),t.div.classList.add(l)}const{first:i,last:n,views:a}=this._getVisibleThumbs();if(a.length>0){let r=!1;if(e<=i.id||e>=n.id)r=!0;else for(const{id:t,percent:i}of a)if(t===e){r=i<100;break}r&&(0,s.scrollIntoView)(t.div,{top:o})}this._currentPageNumber=e}get pagesRotation(){return this._pagesRotation}set pagesRotation(e){if(!(0,s.isValidRotation)(e))throw new Error("Invalid thumbnails rotation angle.");if(!this.pdfDocument)return;if(this._pagesRotation===e)return;this._pagesRotation=e;const t={rotation:e};for(const e of this._thumbnails)e.update(t)}cleanup(){for(const e of this._thumbnails)e.renderingState!==s.RenderingStates.FINISHED&&e.reset();a.TempImageFactory.destroyCanvas()}_resetView(){this._thumbnails=[],this._currentPageNumber=1,this._pageLabels=null,this._pagesRotation=0,this.container.textContent=""}setDocument(e){if(this.pdfDocument&&(this._cancelRendering(),this._resetView()),this.pdfDocument=e,!e)return;const t=e.getPage(1),i=e.getOptionalContentConfig();t.then((t=>{const n=e.numPages,s=t.getViewport({scale:1});for(let e=1;e<=n;++e){const t=new a.PDFThumbnailView({container:this.container,eventBus:this.eventBus,id:e,defaultViewport:s.clone(),optionalContentConfigPromise:i,linkService:this.linkService,renderingQueue:this.renderingQueue,pageColors:this.pageColors});this._thumbnails.push(t)}this._thumbnails[0]?.setPdfPage(t);this._thumbnails[this._currentPageNumber-1].div.classList.add(l)})).catch((e=>{console.error("Unable to initialize thumbnail viewer",e)}))}_cancelRendering(){for(const e of this._thumbnails)e.cancelRendering()}setPageLabels(e){if(this.pdfDocument){e?Array.isArray(e)&&this.pdfDocument.numPages===e.length?this._pageLabels=e:(this._pageLabels=null,console.error("PDFThumbnailViewer_setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let e=0,t=this._thumbnails.length;e<t;e++)this._thumbnails[e].setPageLabel(this._pageLabels?.[e]??null)}}async#$t(e){if(e.pdfPage)return e.pdfPage;try{const t=await this.pdfDocument.getPage(e.id);return e.pdfPage||e.setPdfPage(t),t}catch(e){return console.error("Unable to get page for thumb view",e),null}}#Kt(e){return 1===e.first?.id||e.last?.id!==this._thumbnails.length&&this.scroll.down}forceRendering(){const e=this._getVisibleThumbs(),t=this.#Kt(e),i=this.renderingQueue.getHighestPriority(e,this._thumbnails,t);return!!i&&(this.#$t(i).then((()=>{this.renderingQueue.renderView(i)})),!0)}}n()}catch(e){n(e)}}))},9290:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFViewer:()=>f,PagesCountLimit:()=>p});var s=i(1869),a=i(4927),r=i(7910),o=i(6732),l=i(5119),d=i(3234),h=e([s,r,o,l]);[s,r,o,l]=h.then?(await h)():h;const u=10,p={FORCE_SCROLL_MODE_PAGE:15e3,FORCE_LAZY_PAGE_INIT:7500,PAUSE_EAGER_PAGE_INIT:250};function c(e){return Object.values(s.AnnotationEditorType).includes(e)&&e!==s.AnnotationEditorType.DISABLE}class g{#Gt=new Set;#Xt=0;constructor(e){this.#Xt=e}push(e){const t=this.#Gt;t.has(e)&&t.delete(e),t.add(e),t.size>this.#Xt&&this.#Zt()}resize(e,t=null){this.#Xt=e;const i=this.#Gt;if(t){const e=i.size;let n=1;for(const s of i)if(t.has(s.id)&&(i.delete(s),i.add(s)),++n>e)break}for(;i.size>this.#Xt;)this.#Zt()}has(e){return this.#Gt.has(e)}[Symbol.iterator](){return this.#Gt.keys()}#Zt(){const e=this.#Gt.keys().next().value;e?.destroy(),this.#Gt.delete(e)}}class f{#qt=null;#Qt=null;#Yt=null;#Jt=s.AnnotationEditorType.NONE;#ei=null;#Re=s.AnnotationMode.ENABLE_FORMS;#ti=null;#ii=null;#ni=!1;#si=!1;#ai=null;#ri=!1;#oi=0;#he=new ResizeObserver(this.#ce.bind(this));#li=null;#di=null;#hi=null;#We=a.TextLayerMode.ENABLE;constructor(e){const t="4.0.379";if(s.version!==t)throw new Error(`The API version "${s.version}" does not match the Viewer version "${t}".`);if(this.container=e.container,this.viewer=e.viewer||e.container.firstElementChild,"DIV"!==this.container?.tagName||"DIV"!==this.viewer?.tagName)throw new Error("Invalid `container` and/or `viewer` option.");if(this.container.offsetParent&&"absolute"!==getComputedStyle(this.container).position)throw new Error("The `container` must be absolutely positioned.");this.#he.observe(this.container),this.eventBus=e.eventBus,this.linkService=e.linkService||new d.SimpleLinkService,this.downloadManager=e.downloadManager||null,this.findController=e.findController||null,this.#Qt=e.altTextManager||null,this.findController&&(this.findController.onIsPageVisible=e=>this._getVisiblePages().ids.has(e)),this._scriptingManager=e.scriptingManager||null,this.#We=e.textLayerMode??a.TextLayerMode.ENABLE,this.#Re=e.annotationMode??s.AnnotationMode.ENABLE_FORMS,this.#Jt=e.annotationEditorMode??s.AnnotationEditorType.NONE,this.#Yt=e.annotationEditorHighlightColors||null,this.imageResourcesPath=e.imageResourcesPath||"",this.enablePrintAutoRotate=e.enablePrintAutoRotate||!1,this.removePageBorders=e.removePageBorders||!1,this.isOffscreenCanvasSupported=e.isOffscreenCanvasSupported??!0,this.maxCanvasPixels=e.maxCanvasPixels,this.l10n=e.l10n||r.NullL10n,this.#ni=e.enablePermissions||!1,this.pageColors=e.pageColors||null,this.defaultRenderingQueue=!e.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new l.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=e.renderingQueue,this.scroll=(0,a.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=a.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),this.#ci(),this.eventBus._on("thumbnailrendered",(({pageNumber:e,pdfPage:t})=>{const i=this._pages[e-1];this.#qt.has(i)||t?.cleanup()})),this.l10n===r.NullL10n&&this.l10n.translate(this.container)}get pagesCount(){return this._pages.length}getPageView(e){return this._pages[e]}getCachedPageViews(){return new Set(this.#qt)}get pageViewsReady(){return this._pagesCapability.settled&&this._pages.every((e=>e?.pdfPage))}get renderForms(){return this.#Re===s.AnnotationMode.ENABLE_FORMS}get enableScripting(){return!!this._scriptingManager}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(`currentPageNumber: "${e}" is not a valid page.`))}_setCurrentPageNumber(e,t=!1){if(this._currentPageNumber===e)return t&&this.#ui(),!0;if(!(0<e&&e<=this.pagesCount))return!1;const i=this._currentPageNumber;return this._currentPageNumber=e,this.eventBus.dispatch("pagechanging",{source:this,pageNumber:e,pageLabel:this._pageLabels?.[e-1]??null,previous:i}),t&&this.#ui(),!0}get currentPageLabel(){return this._pageLabels?.[this._currentPageNumber-1]??null}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(`currentPageLabel: "${e}" is not a valid page.`)}get currentScale(){return this._currentScale!==a.UNKNOWN_SCALE?this._currentScale:a.DEFAULT_SCALE}set currentScale(e){if(isNaN(e))throw new Error("Invalid numeric scale.");this.pdfDocument&&this.#pi(e,{noScroll:!1})}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(e){this.pdfDocument&&this.#pi(e,{noScroll:!1})}get pagesRotation(){return this._pagesRotation}set pagesRotation(e){if(!(0,a.isValidRotation)(e))throw new Error("Invalid pages rotation angle.");if(!this.pdfDocument)return;if((e%=360)<0&&(e+=360),this._pagesRotation===e)return;this._pagesRotation=e;const t=this._currentPageNumber;this.refresh(!0,{rotation:e}),this._currentScaleValue&&this.#pi(this._currentScaleValue,{noScroll:!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 _layerProperties(){const e=this;return(0,s.shadow)(this,"_layerProperties",{get annotationEditorUIManager(){return e.#ei},get annotationStorage(){return e.pdfDocument?.annotationStorage},get downloadManager(){return e.downloadManager},get enableScripting(){return!!e._scriptingManager},get fieldObjectsPromise(){return e.pdfDocument?.getFieldObjects()},get findController(){return e.findController},get hasJSActionsPromise(){return e.pdfDocument?.hasJSActions()},get linkService(){return e.linkService}})}#gi(e){const t={annotationEditorMode:this.#Jt,annotationMode:this.#Re,textLayerMode:this.#We};return e?(e.includes(s.PermissionFlag.COPY)||this.#We!==a.TextLayerMode.ENABLE||(t.textLayerMode=a.TextLayerMode.ENABLE_PERMISSIONS),e.includes(s.PermissionFlag.MODIFY_CONTENTS)||(t.annotationEditorMode=s.AnnotationEditorType.DISABLE),e.includes(s.PermissionFlag.MODIFY_ANNOTATIONS)||e.includes(s.PermissionFlag.FILL_INTERACTIVE_FORMS)||this.#Re!==s.AnnotationMode.ENABLE_FORMS||(t.annotationMode=s.AnnotationMode.ENABLE),t):t}#fi(){if("hidden"===document.visibilityState||!this.container.offsetParent||0===this._getVisiblePages().views.length)return Promise.resolve();const e=new Promise((e=>{this.#di=()=>{"hidden"===document.visibilityState&&(e(),document.removeEventListener("visibilitychange",this.#di),this.#di=null)},document.addEventListener("visibilitychange",this.#di)}));return Promise.race([this._onePageRenderedCapability.promise,e])}async getAllText(){const e=[],t=[];for(let i=1,n=this.pdfDocument.numPages;i<=n;++i){if(this.#ri)return null;t.length=0;const n=await this.pdfDocument.getPage(i),{items:s}=await n.getTextContent();for(const e of s)e.str&&t.push(e.str),e.hasEOL&&t.push("\n");e.push((0,a.removeNullCharacters)(t.join("")))}return e.join("\n")}#mi(e,t){const i=document.getSelection(),{focusNode:n,anchorNode:s}=i;if(s&&n&&i.containsNode(this.#ai)){if(this.#si||e===a.TextLayerMode.ENABLE_PERMISSIONS)return t.preventDefault(),void t.stopPropagation();this.#si=!0;const i=this.container.style.cursor;this.container.style.cursor="wait";const n=e=>this.#ri="Escape"===e.key;window.addEventListener("keydown",n),this.getAllText().then((async e=>{null!==e&&await navigator.clipboard.writeText(e)})).catch((e=>{console.warn(`Something goes wrong when extracting the text: ${e.message}`)})).finally((()=>{this.#si=!1,this.#ri=!1,window.removeEventListener("keydown",n),this.container.style.cursor=i})),t.preventDefault(),t.stopPropagation()}}setDocument(e){if(this.pdfDocument&&(this.eventBus.dispatch("pagesdestroy",{source:this}),this._cancelRendering(),this._resetView(),this.findController?.setDocument(null),this._scriptingManager?.setDocument(null),this.#ei&&(this.#ei.destroy(),this.#ei=null)),this.pdfDocument=e,!e)return;const t=e.numPages,i=e.getPage(1),n=e.getOptionalContentConfig(),r=this.#ni?e.getPermissions():Promise.resolve();if(t>p.FORCE_SCROLL_MODE_PAGE){console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document.");const e=this._scrollMode=a.ScrollMode.PAGE;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:e})}this._pagesCapability.promise.then((()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:t})}),(()=>{})),this._onBeforeDraw=e=>{const t=this._pages[e.pageNumber-1];t&&this.#qt.push(t)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=e=>{e.cssTransform||this._onePageRenderedCapability.settled||(this._onePageRenderedCapability.resolve({timestamp:e.timestamp}),this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null,this.#di&&(document.removeEventListener("visibilitychange",this.#di),this.#di=null))},this.eventBus._on("pagerendered",this._onAfterDraw),Promise.all([i,r]).then((([i,r])=>{if(e!==this.pdfDocument)return;this._firstPageCapability.resolve(i),this._optionalContentConfigPromise=n;const{annotationEditorMode:l,annotationMode:d,textLayerMode:h}=this.#gi(r);if(h!==a.TextLayerMode.DISABLE){const e=this.#ai=document.createElement("div");e.id="hiddenCopyElement",this.viewer.before(e)}if(l!==s.AnnotationEditorType.DISABLE){const t=l;e.isPureXfa?console.warn("Warning: XFA-editing is not implemented."):c(t)?(this.#ei=new s.AnnotationEditorUIManager(this.container,this.viewer,this.#Qt,this.eventBus,e,this.pageColors,this.#Yt),this.eventBus.dispatch("annotationeditoruimanager",{source:this,uiManager:this.#ei}),t!==s.AnnotationEditorType.NONE&&this.#ei.updateMode(t)):console.error(`Invalid AnnotationEditor mode: ${t}`)}const u=this._scrollMode===a.ScrollMode.PAGE?null:this.viewer,g=this.currentScale,f=i.getViewport({scale:g*s.PixelsPerInch.PDF_TO_CSS_UNITS});this.viewer.style.setProperty("--scale-factor",f.scale),"CanvasText"!==this.pageColors?.foreground&&"Canvas"!==this.pageColors?.background||this.viewer.style.setProperty("--hcm-highlight-filter",e.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"));for(let e=1;e<=t;++e){const t=new o.PDFPageView({container:u,eventBus:this.eventBus,id:e,scale:g,defaultViewport:f.clone(),optionalContentConfigPromise:n,renderingQueue:this.renderingQueue,textLayerMode:h,annotationMode:d,imageResourcesPath:this.imageResourcesPath,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,maxCanvasPixels:this.maxCanvasPixels,pageColors:this.pageColors,l10n:this.l10n,layerProperties:this._layerProperties});this._pages.push(t)}const m=this._pages[0];m&&(m.setPdfPage(i),this.linkService.cachePageRef(1,i.ref)),this._scrollMode===a.ScrollMode.PAGE?this.#wi():this._spreadMode!==a.SpreadMode.NONE&&this._updateSpreadMode(),this.#fi().then((async()=>{if(this.findController?.setDocument(e),this._scriptingManager?.setDocument(e),this.#ai&&(this.#ii=this.#mi.bind(this,h),document.addEventListener("copy",this.#ii)),this.#ei&&this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:this.#Jt}),e.loadingParams.disableAutoFetch||t>p.FORCE_LAZY_PAGE_INIT)return void this._pagesCapability.resolve();let i=t-1;if(i<=0)this._pagesCapability.resolve();else for(let n=2;n<=t;++n){const t=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 ${n} to initialize viewer`,e),0==--i&&this._pagesCapability.resolve()}));n%p.PAUSE_EAGER_PAGE_INIT==0&&await t}})),this.eventBus.dispatch("pagesinit",{source:this}),e.getMetadata().then((({info:t})=>{e===this.pdfDocument&&t.Language&&(this.viewer.lang=t.Language)})),this.defaultRenderingQueue&&this.update()})).catch((e=>{console.error("Unable to initialize viewer",e),this._pagesCapability.reject(e)}))}setPageLabels(e){if(this.pdfDocument){e?Array.isArray(e)&&this.pdfDocument.numPages===e.length?this._pageLabels=e:(this._pageLabels=null,console.error("setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let e=0,t=this._pages.length;e<t;e++)this._pages[e].setPageLabel(this._pageLabels?.[e]??null)}}_resetView(){this._pages=[],this._currentPageNumber=1,this._currentScale=a.UNKNOWN_SCALE,this._currentScaleValue=null,this._pageLabels=null,this.#qt=new g(u),this._location=null,this._pagesRotation=0,this._optionalContentConfigPromise=null,this._firstPageCapability=new s.PromiseCapability,this._onePageRenderedCapability=new s.PromiseCapability,this._pagesCapability=new s.PromiseCapability,this._scrollMode=a.ScrollMode.VERTICAL,this._previousScrollMode=a.ScrollMode.UNKNOWN,this._spreadMode=a.SpreadMode.NONE,this.#li={previousPageNumber:1,scrollDown:!0,pages:[]},this._onBeforeDraw&&(this.eventBus._off("pagerender",this._onBeforeDraw),this._onBeforeDraw=null),this._onAfterDraw&&(this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null),this.#di&&(document.removeEventListener("visibilitychange",this.#di),this.#di=null),this.viewer.textContent="",this._updateScrollMode(),this.viewer.removeAttribute("lang"),this.#ai&&(document.removeEventListener("copy",this.#ii),this.#ii=null,this.#ai.remove(),this.#ai=null)}#wi(){if(this._scrollMode!==a.ScrollMode.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");const e=this._currentPageNumber,t=this.#li,i=this.viewer;if(i.textContent="",t.pages.length=0,this._spreadMode!==a.SpreadMode.NONE||this.isInPresentationMode){const n=new Set,s=this._spreadMode-1;-1===s?n.add(e-1):e%2!==s?(n.add(e-1),n.add(e)):(n.add(e-2),n.add(e-1));const a=document.createElement("div");if(a.className="spread",this.isInPresentationMode){const e=document.createElement("div");e.className="dummyPage",a.append(e)}for(const e of n){const i=this._pages[e];i&&(a.append(i.div),t.pages.push(i))}i.append(a)}else{const n=this._pages[e-1];i.append(n.div),t.pages.push(n)}t.scrollDown=e>=t.previousPageNumber,t.previousPageNumber=e}_scrollUpdate(){0!==this.pagesCount&&this.update()}#vi(e,t=null){const{div:i,id:n}=e;if(this._currentPageNumber!==n&&this._setCurrentPageNumber(n),this._scrollMode===a.ScrollMode.PAGE&&(this.#wi(),this.update()),!t&&!this.isInPresentationMode){const e=i.offsetLeft+i.clientLeft,n=e+i.clientWidth,{scrollLeft:s,clientWidth:r}=this.container;(this._scrollMode===a.ScrollMode.HORIZONTAL||e<s||n>s+r)&&(t={left:0,top:0})}(0,a.scrollIntoView)(i,t),!this._currentScaleValue&&this._location&&(this._location=null)}#bi(e){return e===this._currentScale||Math.abs(e-this._currentScale)<1e-15}#yi(e,t,{noScroll:i=!1,preset:n=!1,drawingDelay:a=-1}){if(this._currentScaleValue=t.toString(),this.#bi(e))return void(n&&this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:t}));this.viewer.style.setProperty("--scale-factor",e*s.PixelsPerInch.PDF_TO_CSS_UNITS);const r=a>=0&&a<1e3;if(this.refresh(!0,{scale:e,drawingDelay:r?a:-1}),r&&(this.#hi=setTimeout((()=>{this.#hi=null,this.refresh()}),a)),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()}get#_i(){return this._spreadMode!==a.SpreadMode.NONE&&this._scrollMode!==a.ScrollMode.HORIZONTAL?2:1}#pi(e,t){let i=parseFloat(e);if(i>0)t.preset=!1,this.#yi(i,e,t);else{const n=this._pages[this._currentPageNumber-1];if(!n)return;let s=a.SCROLLBAR_PADDING,r=a.VERTICAL_PADDING;this.isInPresentationMode?(s=r=4,this._spreadMode!==a.SpreadMode.NONE&&(s*=2)):this.removePageBorders?s=r=0:this._scrollMode===a.ScrollMode.HORIZONTAL&&([s,r]=[r,s]);const o=(this.container.clientWidth-s)/n.width*n.scale/this.#_i,l=(this.container.clientHeight-r)/n.height*n.scale;switch(e){case"page-actual":i=1;break;case"page-width":i=o;break;case"page-height":i=l;break;case"page-fit":i=Math.min(o,l);break;case"auto":const t=(0,a.isPortraitOrientation)(n)?o:Math.min(l,o);i=Math.min(a.MAX_AUTO_SCALE,t);break;default:return void console.error(`#setScale: "${e}" is an unknown zoom value.`)}t.preset=!0,this.#yi(i,e,t)}}#ui(){const e=this._pages[this._currentPageNumber-1];this.isInPresentationMode&&this.#pi(this._currentScaleValue,{noScroll:!0}),this.#vi(e)}pageLabelToPageNumber(e){if(!this._pageLabels)return null;const t=this._pageLabels.indexOf(e);return t<0?null:t+1}scrollPageIntoView({pageNumber:e,destArray:t=null,allowNegativeOffset:i=!1,ignoreDestinationZoom:n=!1}){if(!this.pdfDocument)return;const r=Number.isInteger(e)&&this._pages[e-1];if(!r)return void console.error(`scrollPageIntoView: "${e}" is not a valid pageNumber parameter.`);if(this.isInPresentationMode||!t)return void this._setCurrentPageNumber(e,!0);let o,l,d=0,h=0,c=0,u=0;const p=r.rotation%180!=0,g=(p?r.height:r.width)/r.scale/s.PixelsPerInch.PDF_TO_CSS_UNITS,f=(p?r.width:r.height)/r.scale/s.PixelsPerInch.PDF_TO_CSS_UNITS;let m=0;switch(t[1].name){case"XYZ":d=t[2],h=t[3],m=t[4],d=null!==d?d:0,h=null!==h?h:f;break;case"Fit":case"FitB":m="page-fit";break;case"FitH":case"FitBH":h=t[2],m="page-width",null===h&&this._location?(d=this._location.left,h=this._location.top):("number"!=typeof h||h<0)&&(h=f);break;case"FitV":case"FitBV":d=t[2],c=g,u=f,m="page-height";break;case"FitR":d=t[2],h=t[3],c=t[4]-d,u=t[5]-h;let e=a.SCROLLBAR_PADDING,i=a.VERTICAL_PADDING;this.removePageBorders&&(e=i=0),o=(this.container.clientWidth-e)/c/s.PixelsPerInch.PDF_TO_CSS_UNITS,l=(this.container.clientHeight-i)/u/s.PixelsPerInch.PDF_TO_CSS_UNITS,m=Math.min(Math.abs(o),Math.abs(l));break;default:return void console.error(`scrollPageIntoView: "${t[1].name}" is not a valid destination type.`)}if(n||(m&&m!==this._currentScale?this.currentScaleValue=m:this._currentScale===a.UNKNOWN_SCALE&&(this.currentScaleValue=a.DEFAULT_SCALE_VALUE)),"page-fit"===m&&!t[4])return void this.#vi(r);const w=[r.viewport.convertToViewportPoint(d,h),r.viewport.convertToViewportPoint(d+c,h+u)];let v=Math.min(w[0][0],w[1][0]),b=Math.min(w[0][1],w[1][1]);i||(v=Math.max(v,0),b=Math.max(b,0)),this.#vi(r,{left:v,top:b})}_updateLocation(e){const t=this._currentScale,i=this._currentScaleValue,n=parseFloat(i)===t?Math.round(1e4*t)/100:i,s=e.id,a=this._pages[s-1],r=this.container,o=a.getPagePoint(r.scrollLeft-e.x,r.scrollTop-e.y),l=Math.round(o[0]),d=Math.round(o[1]);let h=`#page=${s}`;this.isInPresentationMode||(h+=`&zoom=${n},${l},${d}`),this._location={pageNumber:s,scale:n,top:d,left:l,rotation:this._pagesRotation,pdfOpenParams:h}}update(){const e=this._getVisiblePages(),t=e.views,i=t.length;if(0===i)return;const n=Math.max(u,2*i+1);this.#qt.resize(n,e.ids),this.renderingQueue.renderHighestPriority(e);const s=this._spreadMode===a.SpreadMode.NONE&&(this._scrollMode===a.ScrollMode.PAGE||this._scrollMode===a.ScrollMode.VERTICAL),r=this._currentPageNumber;let o=!1;for(const e of t){if(e.percent<100)break;if(e.id===r&&s){o=!0;break}}this._setCurrentPageNumber(o?r:t[0].id),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 _isContainerRtl(){return"rtl"===getComputedStyle(this.container).direction}get isInPresentationMode(){return this.presentationModeState===a.PresentationModeState.FULLSCREEN}get isChangingPresentationMode(){return this.presentationModeState===a.PresentationModeState.CHANGING}get isHorizontalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollWidth>this.container.clientWidth}get isVerticalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}_getVisiblePages(){const e=this._scrollMode===a.ScrollMode.PAGE?this.#li.pages:this._pages,t=this._scrollMode===a.ScrollMode.HORIZONTAL,i=t&&this._isContainerRtl;return(0,a.getVisibleElements)({scrollEl:this.container,views:e,sortByVisibility:!0,horizontal:t,rtl:i})}cleanup(){for(const e of this._pages)e.renderingState!==a.RenderingStates.FINISHED&&e.reset()}_cancelRendering(){for(const e of this._pages)e.cancelRendering()}async#$t(e){if(e.pdfPage)return e.pdfPage;try{const t=await this.pdfDocument.getPage(e.id);return e.pdfPage||e.setPdfPage(t),this.linkService._cachedPageNumber?.(t.ref)||this.linkService.cachePageRef(e.id,t.ref),t}catch(e){return console.error("Unable to get page for page view",e),null}}#Kt(e){if(1===e.first?.id)return!0;if(e.last?.id===this.pagesCount)return!1;switch(this._scrollMode){case a.ScrollMode.PAGE:return this.#li.scrollDown;case a.ScrollMode.HORIZONTAL:return this.scroll.right}return this.scroll.down}forceRendering(e){const t=e||this._getVisiblePages(),i=this.#Kt(t),n=this._spreadMode!==a.SpreadMode.NONE&&this._scrollMode!==a.ScrollMode.HORIZONTAL,s=this.renderingQueue.getHighestPriority(t,this._pages,i,n);return!!s&&(this.#$t(s).then((()=>{this.renderingQueue.renderView(s)})),!0)}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(){let e;return this._pages.map((t=>{const i=t.pdfPage.getViewport({scale:1}),n=(0,a.isPortraitOrientation)(i);if(void 0===e)e=n;else if(this.enablePrintAutoRotate&&n!==e)return{width:i.height,height:i.width,rotation:(i.rotation-90)%360};return{width:i.width,height:i.height,rotation:i.rotation}}))}get optionalContentConfigPromise(){return this.pdfDocument?this._optionalContentConfigPromise?this._optionalContentConfigPromise:(console.error("optionalContentConfigPromise: Not initialized yet."),this.pdfDocument.getOptionalContentConfig()):Promise.resolve(null)}set optionalContentConfigPromise(e){if(!(e instanceof Promise))throw new Error(`Invalid optionalContentConfigPromise: ${e}`);this.pdfDocument&&this._optionalContentConfigPromise&&(this._optionalContentConfigPromise=e,this.refresh(!1,{optionalContentConfigPromise:e}),this.eventBus.dispatch("optionalcontentconfigchanged",{source:this,promise:e}))}get scrollMode(){return this._scrollMode}set scrollMode(e){if(this._scrollMode!==e){if(!(0,a.isValidScrollMode)(e))throw new Error(`Invalid scroll mode: ${e}`);this.pagesCount>p.FORCE_SCROLL_MODE_PAGE||(this._previousScrollMode=this._scrollMode,this._scrollMode=e,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:e}),this._updateScrollMode(this._currentPageNumber))}}_updateScrollMode(e=null){const t=this._scrollMode,i=this.viewer;i.classList.toggle("scrollHorizontal",t===a.ScrollMode.HORIZONTAL),i.classList.toggle("scrollWrapped",t===a.ScrollMode.WRAPPED),this.pdfDocument&&e&&(t===a.ScrollMode.PAGE?this.#wi():this._previousScrollMode===a.ScrollMode.PAGE&&this._updateSpreadMode(),this._currentScaleValue&&isNaN(this._currentScaleValue)&&this.#pi(this._currentScaleValue,{noScroll:!0}),this._setCurrentPageNumber(e,!0),this.update())}get spreadMode(){return this._spreadMode}set spreadMode(e){if(this._spreadMode!==e){if(!(0,a.isValidSpreadMode)(e))throw new Error(`Invalid spread mode: ${e}`);this._spreadMode=e,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:e}),this._updateSpreadMode(this._currentPageNumber)}}_updateSpreadMode(e=null){if(!this.pdfDocument)return;const t=this.viewer,i=this._pages;if(this._scrollMode===a.ScrollMode.PAGE)this.#wi();else if(t.textContent="",this._spreadMode===a.SpreadMode.NONE)for(const e of this._pages)t.append(e.div);else{const e=this._spreadMode-1;let n=null;for(let s=0,a=i.length;s<a;++s)null===n?(n=document.createElement("div"),n.className="spread",t.append(n)):s%2===e&&(n=n.cloneNode(!1),t.append(n)),n.append(i[s].div)}e&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&this.#pi(this._currentScaleValue,{noScroll:!0}),this._setCurrentPageNumber(e,!0),this.update())}_getPageAdvance(e,t=!1){switch(this._scrollMode){case a.ScrollMode.WRAPPED:{const{views:i}=this._getVisiblePages(),n=new Map;for(const{id:e,y:t,percent:s,widthPercent:a}of i){if(0===s||a<100)continue;let i=n.get(t);i||n.set(t,i||=[]),i.push(e)}for(const i of n.values()){const n=i.indexOf(e);if(-1===n)continue;const s=i.length;if(1===s)break;if(t)for(let t=n-1,s=0;t>=s;t--){const n=i[t],s=i[t+1]-1;if(n<s)return e-s}else for(let t=n+1,a=s;t<a;t++){const n=i[t],s=i[t-1]+1;if(n>s)return s-e}if(t){const t=i[0];if(t<e)return e-t+1}else{const t=i[s-1];if(t>e)return t-e+1}break}break}case a.ScrollMode.HORIZONTAL:break;case a.ScrollMode.PAGE:case a.ScrollMode.VERTICAL:{if(this._spreadMode===a.SpreadMode.NONE)break;const i=this._spreadMode-1;if(t&&e%2!==i)break;if(!t&&e%2===i)break;const{views:n}=this._getVisiblePages(),s=t?e-1:e+1;for(const{id:e,percent:t,widthPercent:i}of n)if(e===s){if(t>0&&100===i)return 2;break}break}}return 1}nextPage(){const e=this._currentPageNumber,t=this.pagesCount;if(e>=t)return!1;const i=this._getPageAdvance(e,!1)||1;return this.currentPageNumber=Math.min(e+i,t),!0}previousPage(){const e=this._currentPageNumber;if(e<=1)return!1;const t=this._getPageAdvance(e,!0)||1;return this.currentPageNumber=Math.max(e-t,1),!0}increaseScale({drawingDelay:e,scaleFactor:t,steps:i}={}){if(!this.pdfDocument)return;let n=this._currentScale;if(t>1)n=Math.round(n*t*100)/100;else{i??=1;do{n=Math.ceil(10*(n*a.DEFAULT_SCALE_DELTA).toFixed(2))/10}while(--i>0&&n<a.MAX_SCALE)}this.#pi(Math.min(a.MAX_SCALE,n),{noScroll:!1,drawingDelay:e})}decreaseScale({drawingDelay:e,scaleFactor:t,steps:i}={}){if(!this.pdfDocument)return;let n=this._currentScale;if(t>0&&t<1)n=Math.round(n*t*100)/100;else{i??=1;do{n=Math.floor(10*(n/a.DEFAULT_SCALE_DELTA).toFixed(2))/10}while(--i>0&&n>a.MIN_SCALE)}this.#pi(Math.max(a.MIN_SCALE,n),{noScroll:!1,drawingDelay:e})}#ci(e=this.container.clientHeight){e!==this.#oi&&(this.#oi=e,a.docStyle.setProperty("--viewer-container-height",`${e}px`))}#ce(e){for(const t of e)if(t.target===this.container){this.#ci(Math.floor(t.borderBoxSize[0].blockSize)),this.#ti=null;break}}get containerTopLeft(){return this.#ti||=[this.container.offsetTop,this.container.offsetLeft]}get annotationEditorMode(){return this.#ei?this.#Jt:s.AnnotationEditorType.DISABLE}set annotationEditorMode({mode:e,editId:t=null,isFromKeyboard:i=!1}){if(!this.#ei)throw new Error("The AnnotationEditor is not enabled.");if(this.#Jt!==e){if(!c(e))throw new Error(`Invalid AnnotationEditor mode: ${e}`);this.pdfDocument&&(this.#Jt=e,this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:e}),this.#ei.updateMode(e,t,i))}}set annotationEditorParams({type:e,value:t}){if(!this.#ei)throw new Error("The AnnotationEditor is not enabled.");this.#ei.updateParams(e,t)}refresh(e=!1,t=Object.create(null)){if(this.pdfDocument){for(const e of this._pages)e.update(t);null!==this.#hi&&(clearTimeout(this.#hi),this.#hi=null),e||this.update()}}}n()}catch(m){n(m)}}))},1869:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{AbortException:()=>e,AnnotationEditorLayer:()=>s,AnnotationEditorParamsType:()=>a,AnnotationEditorType:()=>r,AnnotationEditorUIManager:()=>o,AnnotationLayer:()=>l,AnnotationMode:()=>d,ColorPicker:()=>u,DOMSVGFactory:()=>g,DrawLayer:()=>f,FeatureTest:()=>m,GlobalWorkerOptions:()=>E,InvalidPDFException:()=>S,MissingPDFException:()=>T,PDFDateString:()=>k,PDFWorker:()=>B,PasswordResponses:()=>D,PermissionFlag:()=>O,PixelsPerInch:()=>R,PromiseCapability:()=>F,RenderingCancelledException:()=>V,UnexpectedResponseException:()=>H,XfaLayer:()=>X,build:()=>h,createValidAbsoluteUrl:()=>p,fetchData:()=>w,getDocument:()=>v,getFilenameFromUrl:()=>b,getPdfFilenameFromUrl:()=>y,getXfaPageViewport:()=>_,isDataScheme:()=>C,isPdfFile:()=>L,noContextMenu:()=>I,normalizeUnicode:()=>M,renderTextLayer:()=>U,setLayerDimensions:()=>j,shadow:()=>z,updateTextLayer:()=>W,version:()=>G}),globalThis.pdfjsLib||await globalThis.pdfjsLibPromise;const{AbortException:e,AnnotationEditorLayer:s,AnnotationEditorParamsType:a,AnnotationEditorType:r,AnnotationEditorUIManager:o,AnnotationLayer:l,AnnotationMode:d,build:h,CMapCompressionType:c,ColorPicker:u,createValidAbsoluteUrl:p,DOMSVGFactory:g,DrawLayer:f,FeatureTest:m,fetchData:w,getDocument:v,getFilenameFromUrl:b,getPdfFilenameFromUrl:y,getXfaPageViewport:_,GlobalWorkerOptions:E,ImageKind:P,InvalidPDFException:S,isDataScheme:C,isPdfFile:L,MissingPDFException:T,noContextMenu:I,normalizeUnicode:M,OPS:x,Outliner:A,PasswordResponses:D,PDFDataRangeTransport:N,PDFDateString:k,PDFWorker:B,PermissionFlag:O,PixelsPerInch:R,PromiseCapability:F,RenderingCancelledException:V,renderTextLayer:U,setLayerDimensions:j,shadow:z,UnexpectedResponseException:H,updateTextLayer:W,Util:$,VerbosityLevel:K,version:G,XfaLayer:X}=globalThis.pdfjsLib;n()}catch(e){n(e)}}),1)},216:(e,t,i)=>{i.d(t,{BasePreferences:()=>s});var n=i(8961);class s{#Ei=Object.freeze({annotationEditorMode:0,annotationMode:2,cursorToolOnLoad:0,defaultZoomDelay:400,defaultZoomValue:"",disablePageLabels:!1,enableHighlightEditor:!1,enablePermissions:!1,enablePrintAutoRotate:!0,enableScripting:!0,externalLinkTarget:0,highlightEditorColors:"yellow=#FFFF98,green=#53FFBC,blue=#80EBFF,pink=#FFCBE6,red=#FF4F5F",historyUpdateUrl:!1,ignoreDestinationZoom:!1,forcePageColors:!1,pageColorsBackground:"Canvas",pageColorsForeground:"CanvasText",pdfBugEnabled:!1,sidebarViewOnLoad:-1,scrollModeOnLoad:-1,spreadModeOnLoad:-1,textLayerMode:1,viewOnLoad:0,disableAutoFetch:!1,disableFontFace:!1,disableRange:!1,disableStream:!1,enableXfa:!0,viewerCssTheme:0});#Pi=Object.create(null);#Si=null;constructor(){if(this.constructor===s)throw new Error("Cannot initialize BasePreferences.");this.#Si=this._readFromStorage(this.#Ei).then((({browserPrefs:e,prefs:t})=>{const i={canvasMaxAreaInBytes:-1,isInAutomation:!1,supportsDocumentFonts:!0,supportsIntegratedFind:!1,supportsMouseWheelZoomCtrlKey:!0,supportsMouseWheelZoomMetaKey:!0,supportsPinchToZoom:!0},s=Object.create(null);for(const[t,n]of Object.entries(i)){const i=e?.[t];s[t]=typeof i==typeof n?i:n}for(const[e,i]of Object.entries(this.#Ei)){const n=t?.[e];s[e]=this.#Pi[e]=typeof n==typeof i?n:i}n.AppOptions.setAll(s,!0)}))}async _writeToStorage(e){throw new Error("Not implemented: _writeToStorage")}async _readFromStorage(e){throw new Error("Not implemented: _readFromStorage")}async reset(){await this.#Si;const e=this.#Pi;return this.#Pi=Object.create(null),this._writeToStorage(this.#Ei).catch((t=>{throw this.#Pi=e,t}))}async set(e,t){await this.#Si;const i=this.#Ei[e],n=this.#Pi;if(void 0===i)throw new Error(`Set preference: "${e}" is undefined.`);if(void 0===t)throw new Error("Set preference: no value is specified.");const s=typeof t,a=typeof i;if(s!==a){if("number"!==s||"string"!==a)throw new Error(`Set preference: "${t}" is a ${s}, expected a ${a}.`);t=t.toString()}else if("number"===s&&!Number.isInteger(t))throw new Error(`Set preference: "${t}" must be an integer.`);return this.#Pi[e]=t,this._writeToStorage(this.#Pi).catch((e=>{throw this.#Pi=n,e}))}async get(e){await this.#Si;const t=this.#Ei[e];if(void 0===t)throw new Error(`Get preference: "${e}" is undefined.`);return this.#Pi[e]??t}get initializedPromise(){return this.#Si}}},4552:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{getXfaHtmlForPrinting:()=>l});var s=i(1869),a=i(3234),r=i(8012),o=e([s,r]);function l(e,t){const i=t.allXfaHtml,n=new a.SimpleLinkService,o=Math.round(100*s.PixelsPerInch.PDF_TO_CSS_UNITS)/100;for(const a of i.children){const i=document.createElement("div");i.className="xfaPrintedPage",e.append(i);const l=new r.XfaLayerBuilder({pdfPage:null,annotationStorage:t.annotationStorage,linkService:n,xfaHtml:a}),d=(0,s.getXfaPageViewport)(a,{scale:o});l.render(d,"print"),i.append(l.div)}}[s,r]=o.then?(await o)():o,n()}catch(d){n(d)}}))},1544:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{SecondaryToolbar:()=>o});var s=i(4927),a=i(9290),r=e([a]);a=(r.then?(await r)():r)[0];class o{#Ci;constructor(e,t){this.#Ci=e;const i=[{element:e.presentationModeButton,eventName:"presentationmode",close:!0},{element:e.printButton,eventName:"print",close:!0},{element:e.downloadButton,eventName:"download",close:!0},{element:e.viewBookmarkButton,eventName:null,close:!0},{element:e.firstPageButton,eventName:"firstpage",close:!0},{element:e.lastPageButton,eventName:"lastpage",close:!0},{element:e.pageRotateCwButton,eventName:"rotatecw",close:!1},{element:e.pageRotateCcwButton,eventName:"rotateccw",close:!1},{element:e.cursorSelectToolButton,eventName:"switchcursortool",eventDetails:{tool:s.CursorTool.SELECT},close:!0},{element:e.cursorHandToolButton,eventName:"switchcursortool",eventDetails:{tool:s.CursorTool.HAND},close:!0},{element:e.scrollPageButton,eventName:"switchscrollmode",eventDetails:{mode:s.ScrollMode.PAGE},close:!0},{element:e.scrollVerticalButton,eventName:"switchscrollmode",eventDetails:{mode:s.ScrollMode.VERTICAL},close:!0},{element:e.scrollHorizontalButton,eventName:"switchscrollmode",eventDetails:{mode:s.ScrollMode.HORIZONTAL},close:!0},{element:e.scrollWrappedButton,eventName:"switchscrollmode",eventDetails:{mode:s.ScrollMode.WRAPPED},close:!0},{element:e.spreadNoneButton,eventName:"switchspreadmode",eventDetails:{mode:s.SpreadMode.NONE},close:!0},{element:e.spreadOddButton,eventName:"switchspreadmode",eventDetails:{mode:s.SpreadMode.ODD},close:!0},{element:e.spreadEvenButton,eventName:"switchspreadmode",eventDetails:{mode:s.SpreadMode.EVEN},close:!0},{element:e.documentPropertiesButton,eventName:"documentproperties",close:!0}];i.push({element:e.openFileButton,eventName:"openfile",close:!0}),this.eventBus=t,this.opened=!1,this.#x(i),this.reset()}get isOpen(){return this.opened}setPageNumber(e){this.pageNumber=e,this.#t()}setPagesCount(e){this.pagesCount=e,this.#t()}reset(){this.pageNumber=0,this.pagesCount=0,this.#t(),this.#Li({mode:s.ScrollMode.VERTICAL}),this.#Ti({mode:s.SpreadMode.NONE})}#t(){const{firstPageButton:e,lastPageButton:t,pageRotateCwButton:i,pageRotateCcwButton:n}=this.#Ci;e.disabled=this.pageNumber<=1,t.disabled=this.pageNumber>=this.pagesCount,i.disabled=0===this.pagesCount,n.disabled=0===this.pagesCount}#x(e){const{eventBus:t}=this,{toggleButton:i}=this.#Ci;i.addEventListener("click",this.toggle.bind(this));for(const{element:i,eventName:n,close:s,eventDetails:a}of e)i.addEventListener("click",(e=>{null!==n&&t.dispatch(n,{source:this,...a}),s&&this.close(),t.dispatch("reporttelemetry",{source:this,details:{type:"buttons",data:{id:i.id}}})}));t._on("cursortoolchanged",this.#Ii.bind(this)),t._on("scrollmodechanged",this.#Li.bind(this)),t._on("spreadmodechanged",this.#Ti.bind(this))}#Ii({tool:e}){const{cursorSelectToolButton:t,cursorHandToolButton:i}=this.#Ci;(0,s.toggleCheckedBtn)(t,e===s.CursorTool.SELECT),(0,s.toggleCheckedBtn)(i,e===s.CursorTool.HAND)}#Li({mode:e}){const{scrollPageButton:t,scrollVerticalButton:i,scrollHorizontalButton:n,scrollWrappedButton:r,spreadNoneButton:o,spreadOddButton:l,spreadEvenButton:d}=this.#Ci;(0,s.toggleCheckedBtn)(t,e===s.ScrollMode.PAGE),(0,s.toggleCheckedBtn)(i,e===s.ScrollMode.VERTICAL),(0,s.toggleCheckedBtn)(n,e===s.ScrollMode.HORIZONTAL),(0,s.toggleCheckedBtn)(r,e===s.ScrollMode.WRAPPED);const h=this.pagesCount>a.PagesCountLimit.FORCE_SCROLL_MODE_PAGE;t.disabled=h,i.disabled=h,n.disabled=h,r.disabled=h;const c=e===s.ScrollMode.HORIZONTAL;o.disabled=c,l.disabled=c,d.disabled=c}#Ti({mode:e}){const{spreadNoneButton:t,spreadOddButton:i,spreadEvenButton:n}=this.#Ci;(0,s.toggleCheckedBtn)(t,e===s.SpreadMode.NONE),(0,s.toggleCheckedBtn)(i,e===s.SpreadMode.ODD),(0,s.toggleCheckedBtn)(n,e===s.SpreadMode.EVEN)}open(){if(this.opened)return;this.opened=!0;const{toggleButton:e,toolbar:t}=this.#Ci;(0,s.toggleExpandedBtn)(e,!0,t)}close(){if(!this.opened)return;this.opened=!1;const{toggleButton:e,toolbar:t}=this.#Ci;(0,s.toggleExpandedBtn)(e,!1,t)}toggle(){this.opened?this.close():this.open()}}n()}catch(e){n(e)}}))},7498:(e,t,i)=>{i.d(t,{StructTreeLayerBuilder:()=>r});var n=i(4927);const s={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},a=/^H(\d+)$/;class r{#Mi=void 0;get renderingDone(){return void 0!==this.#Mi}render(e){if(void 0!==this.#Mi)return this.#Mi;const t=this.#xi(e);return t?.classList.add("structTree"),this.#Mi=t}hide(){this.#Mi&&!this.#Mi.hidden&&(this.#Mi.hidden=!0)}show(){this.#Mi?.hidden&&(this.#Mi.hidden=!1)}#Ai(e,t){const{alt:i,id:s,lang:a}=e;void 0!==i&&t.setAttribute("aria-label",(0,n.removeNullCharacters)(i)),void 0!==s&&t.setAttribute("aria-owns",s),void 0!==a&&t.setAttribute("lang",(0,n.removeNullCharacters)(a,!0))}#xi(e){if(!e)return null;const t=document.createElement("span");if("role"in e){const{role:i}=e,n=i.match(a);n?(t.setAttribute("role","heading"),t.setAttribute("aria-level",n[1])):s[i]&&t.setAttribute("role",s[i])}if(this.#Ai(e,t),e.children)if(1===e.children.length&&"id"in e.children[0])this.#Ai(e.children[0],t);else for(const i of e.children)t.append(this.#xi(i));return t}}},4630:(e,t,i)=>{i.d(t,{TextAccessibilityManager:()=>s});var n=i(4927);class s{#Di=!1;#Ni=null;#ki=new Map;#Bi=new Map;setTextMapping(e){this.#Ni=e}static#Oi(e,t){const i=e.getBoundingClientRect(),n=t.getBoundingClientRect();if(0===i.width&&0===i.height)return 1;if(0===n.width&&0===n.height)return-1;const s=i.y,a=i.y+i.height,r=i.y+i.height/2,o=n.y,l=n.y+n.height,d=n.y+n.height/2;if(r<=o&&d>=a)return-1;if(d<=s&&r>=l)return 1;return i.x+i.width/2-(n.x+n.width/2)}enable(){if(this.#Di)throw new Error("TextAccessibilityManager is already enabled.");if(!this.#Ni)throw new Error("Text divs and strings have not been set.");if(this.#Di=!0,this.#Ni=this.#Ni.slice(),this.#Ni.sort(s.#Oi),this.#ki.size>0){const e=this.#Ni;for(const[t,i]of this.#ki){document.getElementById(t)?this.#Ri(t,e[i]):this.#ki.delete(t)}}for(const[e,t]of this.#Bi)this.addPointerInTextLayer(e,t);this.#Bi.clear()}disable(){this.#Di&&(this.#Bi.clear(),this.#Ni=null,this.#Di=!1)}removePointerInTextLayer(e){if(!this.#Di)return void this.#Bi.delete(e);const t=this.#Ni;if(!t||0===t.length)return;const{id:i}=e,n=this.#ki.get(i);if(void 0===n)return;const s=t[n];this.#ki.delete(i);let a=s.getAttribute("aria-owns");a?.includes(i)&&(a=a.split(" ").filter((e=>e!==i)).join(" "),a?s.setAttribute("aria-owns",a):(s.removeAttribute("aria-owns"),s.setAttribute("role","presentation")))}#Ri(e,t){const i=t.getAttribute("aria-owns");i?.includes(e)||t.setAttribute("aria-owns",i?`${i} ${e}`:e),t.removeAttribute("role")}addPointerInTextLayer(e,t){const{id:i}=e;if(!i)return null;if(!this.#Di)return this.#Bi.set(e,t),null;t&&this.removePointerInTextLayer(e);const a=this.#Ni;if(!a||0===a.length)return null;const r=(0,n.binarySearchFirstItem)(a,(t=>s.#Oi(e,t)<0)),o=Math.max(0,r-1),l=a[o];this.#Ri(i,l),this.#ki.set(i,o);const d=l.parentNode;return d?.classList.contains("markedContent")?d.id:null}moveElementInDOM(e,t,i,a){const r=this.addPointerInTextLayer(i,a);if(!e.hasChildNodes())return e.append(t),r;const o=Array.from(e.childNodes).filter((e=>e!==t));if(0===o.length)return r;const l=i||t,d=(0,n.binarySearchFirstItem)(o,(e=>s.#Oi(l,e)<0));return 0===d?o[0].before(t):o[d-1].after(t),r}}},4274:(e,t,i)=>{i.d(t,{TextHighlighter:()=>n});class n{constructor({findController:e,eventBus:t,pageIndex:i}){this.findController=e,this.matches=[],this.eventBus=t,this.pageIdx=i,this._onUpdateTextLayerMatches=null,this.textDivs=null,this.textContentItemsStr=null,this.enabled=!1}setTextMapping(e,t){this.textDivs=e,this.textContentItemsStr=t}enable(){if(!this.textDivs||!this.textContentItemsStr)throw new Error("Text divs and strings have not been set.");if(this.enabled)throw new Error("TextHighlighter is already enabled.");this.enabled=!0,this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=e=>{e.pageIndex!==this.pageIdx&&-1!==e.pageIndex||this._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches)),this._updateMatches()}disable(){this.enabled&&(this.enabled=!1,this._onUpdateTextLayerMatches&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null),this._updateMatches(!0))}_convertMatches(e,t){if(!e)return[];const{textContentItemsStr:i}=this;let n=0,s=0;const a=i.length-1,r=[];for(let o=0,l=e.length;o<l;o++){let l=e[o];for(;n!==a&&l>=s+i[n].length;)s+=i[n].length,n++;n===i.length&&console.error("Could not find a matching mapping");const d={begin:{divIdx:n,offset:l-s}};for(l+=t[o];n!==a&&l>s+i[n].length;)s+=i[n].length,n++;d.end={divIdx:n,offset:l-s},r.push(d)}return r}_renderMatches(e){if(0===e.length)return;const{findController:t,pageIdx:i}=this,{textContentItemsStr:n,textDivs:s}=this,a=i===t.selected.pageIdx,r=t.selected.matchIdx;let o=null;const l={divIdx:-1,offset:void 0};function d(e,t){const i=e.divIdx;return s[i].textContent="",h(i,0,e.offset,t)}function h(e,t,i,a){let r=s[e];if(r.nodeType===Node.TEXT_NODE){const t=document.createElement("span");r.before(t),t.append(r),s[e]=t,r=t}const o=n[e].substring(t,i),l=document.createTextNode(o);if(a){const e=document.createElement("span");return e.className=`${a} appended`,e.append(l),r.append(e),a.includes("selected")?e.offsetLeft:0}return r.append(l),0}let c=r,u=c+1;if(t.state.highlightAll)c=0,u=e.length;else if(!a)return;let p=-1,g=-1;for(let n=c;n<u;n++){const c=e[n],u=c.begin;if(u.divIdx===p&&u.offset===g)continue;p=u.divIdx,g=u.offset;const f=c.end,m=a&&n===r,w=m?" selected":"";let v=0;if(o&&u.divIdx===o.divIdx?h(o.divIdx,o.offset,u.offset):(null!==o&&h(o.divIdx,o.offset,l.offset),d(u)),u.divIdx===f.divIdx)v=h(u.divIdx,u.offset,f.offset,"highlight"+w);else{v=h(u.divIdx,u.offset,l.offset,"highlight begin"+w);for(let e=u.divIdx+1,t=f.divIdx;e<t;e++)s[e].className="highlight middle"+w;d(f,"highlight end"+w)}o=f,m&&t.scrollMatchIntoView({element:s[u.divIdx],selectedLeft:v,pageIndex:i,matchIndex:r})}o&&h(o.divIdx,o.offset,l.offset)}_updateMatches(e=!1){if(!this.enabled&&!e)return;const{findController:t,matches:i,pageIdx:n}=this,{textContentItemsStr:s,textDivs:a}=this;let r=-1;for(const e of i){for(let t=Math.max(r,e.begin.divIdx),i=e.end.divIdx;t<=i;t++){const e=a[t];e.textContent=s[t],e.className=""}r=e.end.divIdx+1}if(!t?.highlightMatches||e)return;const o=t.pageMatches[n]||null,l=t.pageMatchesLength[n]||null;this.matches=this._convertMatches(o,l),this._renderMatches(this.matches)}}},1013:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{TextLayerBuilder:()=>o});var s=i(1869),a=i(4927),r=e([s]);s=(r.then?(await r)():r)[0];class o{#ni=!1;#Fi=0;#Vi=0;#Ui=null;constructor({highlighter:e=null,accessibilityManager:t=null,isOffscreenCanvasSupported:i=!0,enablePermissions:n=!1}){this.textContentItemsStr=[],this.renderingDone=!1,this.textDivs=[],this.textDivProperties=new WeakMap,this.textLayerRenderTask=null,this.highlighter=e,this.accessibilityManager=t,this.isOffscreenCanvasSupported=i,this.#ni=!0===n,this.onAppend=null,this.div=document.createElement("div"),this.div.className="textLayer"}#ji(){this.renderingDone=!0;const e=document.createElement("div");e.className="endOfContent",this.div.append(e),this.#zi()}get numTextDivs(){return this.textDivs.length}async render(e){if(!this.#Ui)throw new Error('No "textContentSource" parameter specified.');const t=e.scale*(globalThis.devicePixelRatio||1),{rotation:i}=e;if(this.renderingDone){const n=i!==this.#Fi,a=t!==this.#Vi;return(n||a)&&(this.hide(),(0,s.updateTextLayer)({container:this.div,viewport:e,textDivs:this.textDivs,textDivProperties:this.textDivProperties,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,mustRescale:a,mustRotate:n}),this.#Vi=t,this.#Fi=i),void this.show()}this.cancel(),this.highlighter?.setTextMapping(this.textDivs,this.textContentItemsStr),this.accessibilityManager?.setTextMapping(this.textDivs),this.textLayerRenderTask=(0,s.renderTextLayer)({textContentSource:this.#Ui,container:this.div,viewport:e,textDivs:this.textDivs,textDivProperties:this.textDivProperties,textContentItemsStr:this.textContentItemsStr,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported}),await this.textLayerRenderTask.promise,this.#ji(),this.#Vi=t,this.#Fi=i,this.onAppend(this.div),this.highlighter?.enable(),this.accessibilityManager?.enable()}hide(){!this.div.hidden&&this.renderingDone&&(this.highlighter?.disable(),this.div.hidden=!0)}show(){this.div.hidden&&this.renderingDone&&(this.div.hidden=!1,this.highlighter?.enable())}cancel(){this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),this.highlighter?.disable(),this.accessibilityManager?.disable(),this.textContentItemsStr.length=0,this.textDivs.length=0,this.textDivProperties=new WeakMap}setTextContentSource(e){this.cancel(),this.#Ui=e}#zi(){const{div:e}=this;e.addEventListener("mousedown",(t=>{const i=e.querySelector(".endOfContent");if(!i)return;let n=t.target!==e;if(n&&="none"!==getComputedStyle(i).getPropertyValue("-moz-user-select"),n){const n=e.getBoundingClientRect(),s=Math.max(0,(t.pageY-n.top)/n.height);i.style.top=(100*s).toFixed(2)+"%"}i.classList.add("active")})),e.addEventListener("mouseup",(()=>{const t=e.querySelector(".endOfContent");t&&(t.style.top="",t.classList.remove("active"))})),e.addEventListener("copy",(e=>{if(!this.#ni){const t=document.getSelection();e.clipboardData.setData("text/plain",(0,a.removeNullCharacters)((0,s.normalizeUnicode)(t.toString())))}e.preventDefault(),e.stopPropagation()}))}}n()}catch(e){n(e)}}))},276:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{Toolbar:()=>o});var s=i(1869),a=i(4927),r=e([s]);s=(r.then?(await r)():r)[0];class o{#Ci;constructor(e,t){this.#Ci=e,this.eventBus=t;const i=[{element:e.previous,eventName:"previouspage"},{element:e.next,eventName:"nextpage"},{element:e.zoomIn,eventName:"zoomin"},{element:e.zoomOut,eventName:"zoomout"},{element:e.print,eventName:"print"},{element:e.download,eventName:"download"},{element:e.editorFreeTextButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){const{classList:t}=e.editorFreeTextButton;return t.contains("toggled")?s.AnnotationEditorType.NONE:s.AnnotationEditorType.FREETEXT}}},{element:e.editorHighlightButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){const{classList:t}=e.editorHighlightButton;return t.contains("toggled")?s.AnnotationEditorType.NONE:s.AnnotationEditorType.HIGHLIGHT}}},{element:e.editorInkButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){const{classList:t}=e.editorInkButton;return t.contains("toggled")?s.AnnotationEditorType.NONE:s.AnnotationEditorType.INK}}},{element:e.editorStampButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){const{classList:t}=e.editorStampButton;return t.contains("toggled")?s.AnnotationEditorType.NONE:s.AnnotationEditorType.STAMP}}}];this.#x(i),e.editorHighlightColorPicker&&t._on("annotationeditoruimanager",(({uiManager:t})=>{this.#Hi(t,e.editorHighlightColorPicker)}),{once:!0}),this.reset()}#Hi(e,t){const i=new s.ColorPicker({uiManager:e});e.setMainHighlightColorPicker(i),t.append(i.renderMainDropdown())}setPageNumber(e,t){this.pageNumber=e,this.pageLabel=t,this.#t(!1)}setPagesCount(e,t){this.pagesCount=e,this.hasPageLabels=t,this.#t(!0)}setPageScale(e,t){this.pageScaleValue=(e||t).toString(),this.pageScale=t,this.#t(!1)}reset(){this.pageNumber=0,this.pageLabel=null,this.hasPageLabels=!1,this.pagesCount=0,this.pageScaleValue=a.DEFAULT_SCALE_VALUE,this.pageScale=a.DEFAULT_SCALE,this.#t(!0),this.updateLoadingIndicatorState(),this.#Wi({mode:s.AnnotationEditorType.DISABLE})}#x(e){const{eventBus:t}=this,{pageNumber:i,scaleSelect:n}=this.#Ci,a=this;for(const{element:i,eventName:n,eventDetails:s}of e)i.addEventListener("click",(e=>{null!==n&&t.dispatch(n,{source:this,...s,isFromKeyboard:0===e.detail})}));i.addEventListener("click",(function(){this.select()})),i.addEventListener("change",(function(){t.dispatch("pagenumberchanged",{source:a,value:this.value})})),n.addEventListener("change",(function(){"custom"!==this.value&&t.dispatch("scalechanged",{source:a,value:this.value})})),n.addEventListener("click",(function({target:e}){this.value===a.pageScaleValue&&"OPTION"===e.tagName.toUpperCase()&&this.blur()})),n.oncontextmenu=s.noContextMenu,t._on("annotationeditormodechanged",this.#Wi.bind(this))}#Wi({mode:e}){const{editorFreeTextButton:t,editorFreeTextParamsToolbar:i,editorHighlightButton:n,editorHighlightParamsToolbar:r,editorInkButton:o,editorInkParamsToolbar:l,editorStampButton:d,editorStampParamsToolbar:h}=this.#Ci;(0,a.toggleCheckedBtn)(t,e===s.AnnotationEditorType.FREETEXT,i),(0,a.toggleCheckedBtn)(n,e===s.AnnotationEditorType.HIGHLIGHT,r),(0,a.toggleCheckedBtn)(o,e===s.AnnotationEditorType.INK,l),(0,a.toggleCheckedBtn)(d,e===s.AnnotationEditorType.STAMP,h);const c=e===s.AnnotationEditorType.DISABLE;t.disabled=c,n.disabled=c,o.disabled=c,d.disabled=c}#t(e=!1){const{pageNumber:t,pagesCount:i,pageScaleValue:n,pageScale:s}=this,r=this.#Ci;e&&(this.hasPageLabels?(r.pageNumber.type="text",r.numPages.setAttribute("data-l10n-id","pdfjs-page-of-pages")):(r.pageNumber.type="number",r.numPages.setAttribute("data-l10n-id","pdfjs-of-pages"),r.numPages.setAttribute("data-l10n-args",JSON.stringify({pagesCount:i}))),r.pageNumber.max=i),this.hasPageLabels?(r.pageNumber.value=this.pageLabel,r.numPages.setAttribute("data-l10n-args",JSON.stringify({pageNumber:t,pagesCount:i}))):r.pageNumber.value=t,r.previous.disabled=t<=1,r.next.disabled=t>=i,r.zoomOut.disabled=s<=a.MIN_SCALE,r.zoomIn.disabled=s>=a.MAX_SCALE;let o=!1;for(const e of r.scaleSelect.options)e.value===n?(e.selected=!0,o=!0):e.selected=!1;o||(r.customScaleOption.selected=!0,r.customScaleOption.setAttribute("data-l10n-args",JSON.stringify({scale:Math.round(1e4*s)/100})))}updateLoadingIndicatorState(e=!1){const{pageNumber:t}=this.#Ci;t.classList.toggle("loading",e)}}n()}catch(e){n(e)}}))},4927:(e,t,i)=>{i.d(t,{AutoPrintRegExp:()=>b,CursorTool:()=>v,DEFAULT_SCALE:()=>s,DEFAULT_SCALE_DELTA:()=>a,DEFAULT_SCALE_VALUE:()=>n,MAX_AUTO_SCALE:()=>d,MAX_SCALE:()=>o,MIN_SCALE:()=>r,OutputScale:()=>y,PresentationModeState:()=>p,ProgressBar:()=>V,RenderingStates:()=>u,SCROLLBAR_PADDING:()=>h,ScrollMode:()=>m,SidebarView:()=>g,SpreadMode:()=>w,TextLayerMode:()=>f,UNKNOWN_SCALE:()=>l,VERTICAL_PADDING:()=>c,animationStarted:()=>R,apiPageLayoutToViewerModes:()=>j,apiPageModeToSidebarView:()=>z,approximateFraction:()=>T,binarySearchFirstItem:()=>L,docStyle:()=>F,getActiveOrFocusedElement:()=>U,getPageSizeInches:()=>M,getVisibleElements:()=>x,isPortraitOrientation:()=>O,isValidRotation:()=>N,isValidScrollMode:()=>k,isValidSpreadMode:()=>B,normalizeWheelEventDelta:()=>D,normalizeWheelEventDirection:()=>A,parseQueryString:()=>P,removeNullCharacters:()=>C,roundToDivide:()=>I,scrollIntoView:()=>_,toggleCheckedBtn:()=>H,toggleExpandedBtn:()=>W,watchScroll:()=>E});const n="auto",s=1,a=1.1,r=.1,o=10,l=0,d=1.25,h=40,c=5,u={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},p={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3},g={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4},f={DISABLE:0,ENABLE:1,ENABLE_PERMISSIONS:2},m={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3},w={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2},v={SELECT:0,HAND:1,ZOOM:2},b=/\bprint\s*\(/;class y{constructor(){const e=window.devicePixelRatio||1;this.sx=e,this.sy=e}get scaled(){return 1!==this.sx||1!==this.sy}}function _(e,t,i=!1){let n=e.offsetParent;if(!n)return void console.error("offsetParent is not set -- cannot scroll");let s=e.offsetTop+e.clientTop,a=e.offsetLeft+e.clientLeft;for(;n.clientHeight===n.scrollHeight&&n.clientWidth===n.scrollWidth||i&&(n.classList.contains("markedContent")||"hidden"===getComputedStyle(n).overflow);)if(s+=n.offsetTop,a+=n.offsetLeft,n=n.offsetParent,!n)return;t&&(void 0!==t.top&&(s+=t.top),void 0!==t.left&&(a+=t.left,n.scrollLeft=a)),n.scrollTop=s}function E(e,t){const i=function(i){s||(s=window.requestAnimationFrame((function(){s=null;const i=e.scrollLeft,a=n.lastX;i!==a&&(n.right=i>a),n.lastX=i;const r=e.scrollTop,o=n.lastY;r!==o&&(n.down=r>o),n.lastY=r,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}function P(e){const t=new Map;for(const[i,n]of new URLSearchParams(e))t.set(i.toLowerCase(),n);return t}const S=/[\x00-\x1F]/g;function C(e,t=!1){return S.test(e)?t?e.replaceAll(S,(e=>"\0"===e?"":" ")):e.replaceAll("\0",""):e}function L(e,t,i=0){let n=i,s=e.length-1;if(s<0||!t(e[s]))return e.length;if(t(e[n]))return n;for(;n<s;){const i=n+s>>1;t(e[i])?s=i:n=i+1}return n}function T(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,a=1,r=1,o=1;for(;;){const e=s+r,t=a+o;if(t>8)break;i<=e/t?(r=e,o=t):(s=e,a=t)}return n=i-s/a<r/o-i?i===e?[s,a]:[a,s]:i===e?[r,o]:[o,r],n}function I(e,t){const i=e%t;return 0===i?e:Math.round(e-i+t)}function M({view:e,userUnit:t,rotate:i}){const[n,s,a,r]=e,o=i%180!=0,l=(a-n)/72*t,d=(r-s)/72*t;return{width:o?d:l,height:o?l:d}}function x({scrollEl:e,views:t,sortByVisibility:i=!1,horizontal:n=!1,rtl:s=!1}){const a=e.scrollTop,r=a+e.clientHeight,o=e.scrollLeft,l=o+e.clientWidth;const d=[],h=new Set,c=t.length;let u=L(t,n?function(e){const t=e.div,i=t.offsetLeft+t.clientLeft,n=i+t.clientWidth;return s?i<l:n>o}:function(e){const t=e.div;return t.offsetTop+t.clientTop+t.clientHeight>a});u>0&&u<c&&!n&&(u=function(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 i=e-2;i>=0&&(n=t[i].div,!(n.offsetTop+n.clientTop+n.clientHeight<=s));--i)e=i;return e}(u,t,a));let p=n?l:-1;for(let e=u;e<c;e++){const i=t[e],s=i.div,c=s.offsetLeft+s.clientLeft,u=s.offsetTop+s.clientTop,g=s.clientWidth,f=s.clientHeight,m=c+g,w=u+f;if(-1===p)w>=r&&(p=w);else if((n?c:u)>p)break;if(w<=a||u>=r||m<=o||c>=l)continue;const v=Math.max(0,a-u)+Math.max(0,w-r),b=(g-(Math.max(0,o-c)+Math.max(0,m-l)))/g,y=(f-v)/f*b*100|0;d.push({id:i.id,x:c,y:u,view:i,percent:y,widthPercent:100*b|0}),h.add(i.id)}const g=d[0],f=d.at(-1);return i&&d.sort((function(e,t){const i=e.percent-t.percent;return Math.abs(i)>.001?-i:e.id-t.id})),{first:g,last:f,views:d,ids:h}}function A(e){let t=Math.hypot(e.deltaX,e.deltaY);const i=Math.atan2(e.deltaY,e.deltaX);return-.25*Math.PI<i&&i<.75*Math.PI&&(t=-t),t}function D(e){const t=e.deltaMode;let i=A(e);return t===WheelEvent.DOM_DELTA_PIXEL?i/=900:t===WheelEvent.DOM_DELTA_LINE&&(i/=30),i}function N(e){return Number.isInteger(e)&&e%90==0}function k(e){return Number.isInteger(e)&&Object.values(m).includes(e)&&e!==m.UNKNOWN}function B(e){return Number.isInteger(e)&&Object.values(w).includes(e)&&e!==w.UNKNOWN}function O(e){return e.width<=e.height}const R=new Promise((function(e){window.requestAnimationFrame(e)})),F=document.documentElement.style;class V{#$i=null;#Ki=null;#Gi=0;#Xi=null;#Zi=!0;constructor(e){this.#$i=e.classList,this.#Xi=e.style}get percent(){return this.#Gi}set percent(e){var t,i,n;this.#Gi=(t=e,i=0,n=100,Math.min(Math.max(t,i),n)),isNaN(e)?this.#$i.add("indeterminate"):(this.#$i.remove("indeterminate"),this.#Xi.setProperty("--progressBar-percent",`${this.#Gi}%`))}setWidth(e){if(!e)return;const t=e.parentNode.offsetWidth-e.offsetWidth;t>0&&this.#Xi.setProperty("--progressBar-end-offset",`${t}px`)}setDisableAutoFetch(e=5e3){isNaN(this.#Gi)||(this.#Ki&&clearTimeout(this.#Ki),this.show(),this.#Ki=setTimeout((()=>{this.#Ki=null,this.hide()}),e))}hide(){this.#Zi&&(this.#Zi=!1,this.#$i.add("hidden"))}show(){this.#Zi||(this.#Zi=!0,this.#$i.remove("hidden"))}}function U(){let e=document,t=e.activeElement||e.querySelector(":focus");for(;t?.shadowRoot;)e=t.shadowRoot,t=e.activeElement||e.querySelector(":focus");return t}function j(e){let t=m.VERTICAL,i=w.NONE;switch(e){case"SinglePage":t=m.PAGE;break;case"OneColumn":break;case"TwoPageLeft":t=m.PAGE;case"TwoColumnLeft":i=w.ODD;break;case"TwoPageRight":t=m.PAGE;case"TwoColumnRight":i=w.EVEN}return{scrollMode:t,spreadMode:i}}function z(e){switch(e){case"UseNone":return g.NONE;case"UseThumbs":return g.THUMBS;case"UseOutlines":return g.OUTLINE;case"UseAttachments":return g.ATTACHMENTS;case"UseOC":return g.LAYERS}return g.NONE}function H(e,t,i=null){e.classList.toggle("toggled",t),e.setAttribute("aria-checked",t),i?.classList.toggle("hidden",!t)}function W(e,t,i=null){e.classList.toggle("toggled",t),e.setAttribute("aria-expanded",t),i?.classList.toggle("hidden",!t)}},1096:(e,t,i)=>{i.d(t,{ViewHistory:()=>n});class n{constructor(e,t=20){this.fingerprint=e,this.cacheSize=t,this._initializedPromise=this._readFromStorage().then((e=>{const t=JSON.parse(e||"{}");let i=-1;if(Array.isArray(t.files)){for(;t.files.length>=this.cacheSize;)t.files.shift();for(let e=0,n=t.files.length;e<n;e++){if(t.files[e].fingerprint===this.fingerprint){i=e;break}}}else t.files=[];-1===i&&(i=t.files.push({fingerprint:this.fingerprint})-1),this.file=t.files[i],this.database=t}))}async _writeToStorage(){const e=JSON.stringify(this.database);localStorage.setItem("pdfjs.history",e)}async _readFromStorage(){return localStorage.getItem("pdfjs.history")}async set(e,t){return await this._initializedPromise,this.file[e]=t,this._writeToStorage()}async setMultiple(e){await this._initializedPromise;for(const t in e)this.file[t]=e[t];return this._writeToStorage()}async get(e,t){await this._initializedPromise;const i=this.file[e];return void 0!==i?i:t}async getMultiple(e){await this._initializedPromise;const t=Object.create(null);for(const i in e){const n=this.file[i];t[i]=void 0!==n?n:e[i]}return t}}},6400:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{PDFViewerApplication:()=>d.PDFViewerApplication,PDFViewerApplicationConstants:()=>u,PDFViewerApplicationOptions:()=>o.AppOptions});var s=i(1546),a=i(1834),r=i(4927),o=i(8961),l=i(3234),d=i(39),h=e([s,a,d]);[s,a,d]=h.then?(await h)():h;const u={LinkTarget:l.LinkTarget,RenderingStates:r.RenderingStates,ScrollMode:r.ScrollMode,SpreadMode:r.SpreadMode};function c(){const e={appContainer:document.body,mainContainer:document.getElementById("viewerContainer"),viewerContainer:document.getElementById("viewer"),toolbar:{container:document.getElementById("toolbarViewer"),numPages:document.getElementById("numPages"),pageNumber:document.getElementById("pageNumber"),scaleSelect:document.getElementById("scaleSelect"),customScaleOption:document.getElementById("customScaleOption"),previous:document.getElementById("previous"),next:document.getElementById("next"),zoomIn:document.getElementById("zoomIn"),zoomOut:document.getElementById("zoomOut"),viewFind:document.getElementById("viewFind"),print:document.getElementById("print"),editorFreeTextButton:document.getElementById("editorFreeText"),editorFreeTextParamsToolbar:document.getElementById("editorFreeTextParamsToolbar"),editorHighlightButton:document.getElementById("editorHighlight"),editorHighlightParamsToolbar:document.getElementById("editorHighlightParamsToolbar"),editorHighlightColorPicker:document.getElementById("editorHighlightColorPicker"),editorInkButton:document.getElementById("editorInk"),editorInkParamsToolbar:document.getElementById("editorInkParamsToolbar"),editorStampButton:document.getElementById("editorStamp"),editorStampParamsToolbar:document.getElementById("editorStampParamsToolbar"),download:document.getElementById("download")},secondaryToolbar:{toolbar:document.getElementById("secondaryToolbar"),toggleButton:document.getElementById("secondaryToolbarToggle"),presentationModeButton:document.getElementById("presentationMode"),openFileButton:document.getElementById("secondaryOpenFile"),printButton:document.getElementById("secondaryPrint"),downloadButton:document.getElementById("secondaryDownload"),viewBookmarkButton:document.getElementById("viewBookmark"),firstPageButton:document.getElementById("firstPage"),lastPageButton:document.getElementById("lastPage"),pageRotateCwButton:document.getElementById("pageRotateCw"),pageRotateCcwButton:document.getElementById("pageRotateCcw"),cursorSelectToolButton:document.getElementById("cursorSelectTool"),cursorHandToolButton:document.getElementById("cursorHandTool"),scrollPageButton:document.getElementById("scrollPage"),scrollVerticalButton:document.getElementById("scrollVertical"),scrollHorizontalButton:document.getElementById("scrollHorizontal"),scrollWrappedButton:document.getElementById("scrollWrapped"),spreadNoneButton:document.getElementById("spreadNone"),spreadOddButton:document.getElementById("spreadOdd"),spreadEvenButton:document.getElementById("spreadEven"),documentPropertiesButton:document.getElementById("documentProperties")},sidebar:{outerContainer:document.getElementById("outerContainer"),sidebarContainer:document.getElementById("sidebarContainer"),toggleButton:document.getElementById("sidebarToggle"),resizer:document.getElementById("sidebarResizer"),thumbnailButton:document.getElementById("viewThumbnail"),outlineButton:document.getElementById("viewOutline"),attachmentsButton:document.getElementById("viewAttachments"),layersButton:document.getElementById("viewLayers"),thumbnailView:document.getElementById("thumbnailView"),outlineView:document.getElementById("outlineView"),attachmentsView:document.getElementById("attachmentsView"),layersView:document.getElementById("layersView"),currentOutlineItemButton:document.getElementById("currentOutlineItem")},findBar:{bar:document.getElementById("findbar"),toggleButton:document.getElementById("viewFind"),findField:document.getElementById("findInput"),highlightAllCheckbox:document.getElementById("findHighlightAll"),caseSensitiveCheckbox:document.getElementById("findMatchCase"),matchDiacriticsCheckbox:document.getElementById("findMatchDiacritics"),entireWordCheckbox:document.getElementById("findEntireWord"),findMsg:document.getElementById("findMsg"),findResultsCount:document.getElementById("findResultsCount"),findPreviousButton:document.getElementById("findPrevious"),findNextButton:document.getElementById("findNext")},passwordOverlay:{dialog:document.getElementById("passwordDialog"),label:document.getElementById("passwordText"),input:document.getElementById("password"),submitButton:document.getElementById("passwordSubmit"),cancelButton:document.getElementById("passwordCancel")},documentProperties:{dialog:document.getElementById("documentPropertiesDialog"),closeButton:document.getElementById("documentPropertiesClose"),fields:{fileName:document.getElementById("fileNameField"),fileSize:document.getElementById("fileSizeField"),title:document.getElementById("titleField"),author:document.getElementById("authorField"),subject:document.getElementById("subjectField"),keywords:document.getElementById("keywordsField"),creationDate:document.getElementById("creationDateField"),modificationDate:document.getElementById("modificationDateField"),creator:document.getElementById("creatorField"),producer:document.getElementById("producerField"),version:document.getElementById("versionField"),pageCount:document.getElementById("pageCountField"),pageSize:document.getElementById("pageSizeField"),linearized:document.getElementById("linearizedField")}},altTextDialog:{dialog:document.getElementById("altTextDialog"),optionDescription:document.getElementById("descriptionButton"),optionDecorative:document.getElementById("decorativeButton"),textarea:document.getElementById("descriptionTextarea"),cancelButton:document.getElementById("altTextCancel"),saveButton:document.getElementById("altTextSave")},annotationEditorParams:{editorFreeTextFontSize:document.getElementById("editorFreeTextFontSize"),editorFreeTextColor:document.getElementById("editorFreeTextColor"),editorInkColor:document.getElementById("editorInkColor"),editorInkThickness:document.getElementById("editorInkThickness"),editorInkOpacity:document.getElementById("editorInkOpacity"),editorStampAddImage:document.getElementById("editorStampAddImage")},printContainer:document.getElementById("printContainer"),openFileInput:document.getElementById("fileInput"),debuggerScriptPath:"./debugger.mjs"},t=new CustomEvent("webviewerloaded",{bubbles:!0,cancelable:!0,detail:{source:window}});try{parent.document.dispatchEvent(t)}catch(e){console.error(`webviewerloaded: ${e}`),document.dispatchEvent(t)}d.PDFViewerApplication.run(e)}window.PDFViewerApplication=d.PDFViewerApplication,window.PDFViewerApplicationConstants=u,window.PDFViewerApplicationOptions=o.AppOptions,document.blockUnblockOnload?.(!0),"interactive"===document.readyState||"complete"===document.readyState?c():document.addEventListener("DOMContentLoaded",c,!0),n()}catch(p){n(p)}}))},8012:(e,t,i)=>{i.a(e,(async(e,n)=>{try{i.d(t,{XfaLayerBuilder:()=>r});var s=i(1869),a=e([s]);s=(a.then?(await a)():a)[0];class r{constructor({pdfPage:e,annotationStorage:t=null,linkService:i,xfaHtml:n=null}){this.pdfPage=e,this.annotationStorage=t,this.linkService=i,this.xfaHtml=n,this.div=null,this._cancelled=!1}async render(e,t="display"){if("print"===t){const i={viewport:e.clone({dontFlip:!0}),div:this.div,xfaHtml:this.xfaHtml,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:t};return this.div=document.createElement("div"),i.div=this.div,s.XfaLayer.render(i)}const i=await this.pdfPage.getXfa();if(this._cancelled||!i)return{textDivs:[]};const n={viewport:e.clone({dontFlip:!0}),div:this.div,xfaHtml:i,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:t};return this.div?s.XfaLayer.update(n):(this.div=document.createElement("div"),n.div=this.div,s.XfaLayer.render(n))}cancel(){this._cancelled=!0}hide(){this.div&&(this.div.hidden=!0)}}n()}catch(e){n(e)}}))}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](i,i.exports,__webpack_require__),i.exports}(()=>{var e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",i="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",n=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))};__webpack_require__.a=(s,a,r)=>{var o;r&&((o=[]).d=-1);var l,d,h,c=new Set,u=s.exports,p=new Promise(((e,t)=>{h=t,d=e}));p[t]=u,p[e]=e=>(o&&e(o),c.forEach(e),p.catch((e=>{}))),s.exports=p,a((s=>{var a;l=(s=>s.map((s=>{if(null!==s&&"object"==typeof s){if(s[e])return s;if(s.then){var a=[];a.d=0,s.then((e=>{r[t]=e,n(a)}),(e=>{r[i]=e,n(a)}));var r={};return r[e]=e=>e(a),r}}var o={};return o[e]=e=>{},o[t]=s,o})))(s);var r=()=>l.map((e=>{if(e[i])throw e[i];return e[t]})),d=new Promise((t=>{(a=()=>t(r)).r=0;var i=e=>e!==o&&!c.has(e)&&(c.add(e),e&&!e.d&&(a.r++,e.push(a)));l.map((t=>t[e](i)))}));return a.r?d:r()}),(e=>(e?h(p[i]=e):d(u),n(o)))),o&&o.d<0&&(o.d=0)}})(),__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var __webpack_exports__=__webpack_require__(6400),__webpack_exports__=await __webpack_exports__,__webpack_exports__PDFViewerApplication=__webpack_exports__.PDFViewerApplication,__webpack_exports__PDFViewerApplicationConstants=__webpack_exports__.PDFViewerApplicationConstants,__webpack_exports__PDFViewerApplicationOptions=__webpack_exports__.PDFViewerApplicationOptions;export{__webpack_exports__PDFViewerApplication as PDFViewerApplication,__webpack_exports__PDFViewerApplicationConstants as PDFViewerApplicationConstants,__webpack_exports__PDFViewerApplicationOptions as PDFViewerApplicationOptions};