UNPKG

ngx-extended-pdf-viewer

Version:

Embedding PDF files in your Angular application. Highly configurable viewer including the toolbar, sidebar, and all the features you're used to.

22 lines 436 kB
window.ngxZone.runOutsideAngular(() => { /** * @licstart The following is the entire license notice for the * Javascript code in this page * * Copyright 2022 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 e=[,(e,t,i)=>{var n=i(2),r=i(3),s=i(4),o=i(8),a=i(61),l=i(17),c=l("iterator"),h=l("toStringTag"),d=o.values,handlePrototype=function(e,t){if(e){if(e[c]!==d)try{a(e,c,d)}catch(t){e[c]=d}e[h]||a(e,h,t);if(r[t])for(var i in o)if(e[i]!==o[i])try{a(e,i,o[i])}catch(t){e[i]=o[i]}}};for(var u in r)handlePrototype(n[u]&&n[u].prototype,u);handlePrototype(s,"DOMTokenList")},e=>{var check=function(e){return e&&e.Math==Math&&e};e.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||function(){return this}()||Function("return this")()},e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},(e,t,i)=>{var n=i(5)("span").classList,r=n&&n.constructor&&n.constructor.prototype;e.exports=r===Object.prototype?void 0:r},(e,t,i)=>{var n=i(2),r=i(6),s=n.document,o=r(s)&&r(s.createElement);e.exports=function(e){return o?s.createElement(e):{}}},(e,t,i)=>{var n=i(7);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},e=>{e.exports=function(e){return"function"==typeof e}},(e,t,i)=>{"use strict";var n=i(9),r=i(16),s=i(57),o=i(58),a=i(35).f,l=i(63),c=i(19),h=i(33),d="Array Iterator",u=o.set,p=o.getterFor(d);e.exports=l(Array,"Array",(function(e,t){u(this,{type:d,target:n(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,i=e.kind,n=e.index++;if(!t||n>=t.length){e.target=void 0;return{value:void 0,done:!0}}return"keys"==i?{value:n,done:!1}:"values"==i?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values");var g=s.Arguments=s.Array;r("keys");r("values");r("entries");if(!c&&h&&"values"!==g.name)try{a(g,"name",{value:"values"})}catch(e){}},(e,t,i)=>{var n=i(10),r=i(15);e.exports=function(e){return n(r(e))}},(e,t,i)=>{var n=i(2),r=i(11),s=i(13),o=i(14),a=n.Object,l=r("".split);e.exports=s((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?l(e,""):a(e)}:a},(e,t,i)=>{var n=i(12),r=Function.prototype,s=r.bind,o=r.call,a=n&&s.bind(o,o);e.exports=n?function(e){return e&&a(e)}:function(e){return e&&function(){return o.apply(e,arguments)}}},(e,t,i)=>{var n=i(13);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t,i)=>{var n=i(11),r=n({}.toString),s=n("".slice);e.exports=function(e){return s(r(e),8,-1)}},(e,t,i)=>{var n=i(2).TypeError;e.exports=function(e){if(null==e)throw n("Can't call method on "+e);return e}},(e,t,i)=>{var n=i(17),r=i(30),s=i(35),o=n("unscopables"),a=Array.prototype;null==a[o]&&s.f(a,o,{configurable:!0,value:r(null)});e.exports=function(e){a[o][e]=!0}},(e,t,i)=>{var n=i(2),r=i(18),s=i(22),o=i(24),a=i(25),l=i(29),c=r("wks"),h=n.Symbol,d=h&&h.for,u=l?h:h&&h.withoutSetter||o;e.exports=function(e){if(!s(c,e)||!a&&"string"!=typeof c[e]){var t="Symbol."+e;a&&s(h,e)?c[e]=h[e]:c[e]=l&&d?d(t):u(t)}return c[e]}},(e,t,i)=>{var n=i(19),r=i(20);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.0",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.0/LICENSE",source:"https://github.com/zloirock/core-js"})},e=>{e.exports=!1},(e,t,i)=>{var n=i(2),r=i(21),s="__core-js_shared__",o=n[s]||r(s,{});e.exports=o},(e,t,i)=>{var n=i(2),r=Object.defineProperty;e.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},(e,t,i)=>{var n=i(11),r=i(23),s=n({}.hasOwnProperty);e.exports=Object.hasOwn||function hasOwn(e,t){return s(r(e),t)}},(e,t,i)=>{var n=i(2),r=i(15),s=n.Object;e.exports=function(e){return s(r(e))}},(e,t,i)=>{var n=i(11),r=0,s=Math.random(),o=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++r+s,36)}},(e,t,i)=>{var n=i(26),r=i(13);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},(e,t,i)=>{var n,r,s=i(2),o=i(27),a=s.process,l=s.Deno,c=a&&a.versions||l&&l.version,h=c&&c.v8;h&&(r=(n=h.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1]));!r&&o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(r=+n[1]);e.exports=r},(e,t,i)=>{var n=i(28);e.exports=n("navigator","userAgent")||""},(e,t,i)=>{var n=i(2),r=i(7),aFunction=function(e){return r(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?aFunction(n[e]):n[e]&&n[e][t]}},(e,t,i)=>{var n=i(25);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,i)=>{var n,r=i(31),s=i(32),o=i(54),a=i(53),l=i(55),c=i(5),h=i(56),d=h("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return"<script>"+e+"</"+"script>"},NullProtoObjectViaActiveX=function(e){e.write(scriptTag(""));e.close();var t=e.parentWindow.Object;e=null;return t},NullProtoObject=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&n?NullProtoObjectViaActiveX(n):function(){var e,t=c("iframe");t.style.display="none";l.appendChild(t);t.src=String("javascript:");(e=t.contentWindow.document).open();e.write(scriptTag("document.F=Object"));e.close();return e.F}():NullProtoObjectViaActiveX(n);for(var e=o.length;e--;)delete NullProtoObject.prototype[o[e]];return NullProtoObject()};a[d]=!0;e.exports=Object.create||function create(e,t){var i;if(null!==e){EmptyConstructor.prototype=r(e);i=new EmptyConstructor;EmptyConstructor.prototype=null;i[d]=e}else i=NullProtoObject();return void 0===t?i:s.f(i,t)}},(e,t,i)=>{var n=i(2),r=i(6),s=n.String,o=n.TypeError;e.exports=function(e){if(r(e))return e;throw o(s(e)+" is not an object")}},(e,t,i)=>{var n=i(33),r=i(34),s=i(35),o=i(31),a=i(9),l=i(46);t.f=n&&!r?Object.defineProperties:function defineProperties(e,t){o(e);for(var i,n=a(t),r=l(t),c=r.length,h=0;c>h;)s.f(e,i=r[h++],n[i]);return e}},(e,t,i)=>{var n=i(13);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},(e,t,i)=>{var n=i(33),r=i(13);e.exports=n&&r((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(e,t,i)=>{var n=i(2),r=i(33),s=i(36),o=i(34),a=i(31),l=i(37),c=n.TypeError,h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u="enumerable",p="configurable",g="writable";t.f=r?o?function defineProperty(e,t,i){a(e);t=l(t);a(i);if("function"==typeof e&&"prototype"===t&&"value"in i&&g in i&&!i.writable){var n=d(e,t);if(n&&n.writable){e[t]=i.value;i={configurable:p in i?i.configurable:n.configurable,enumerable:u in i?i.enumerable:n.enumerable,writable:!1}}}return h(e,t,i)}:h:function defineProperty(e,t,i){a(e);t=l(t);a(i);if(s)try{return h(e,t,i)}catch(e){}if("get"in i||"set"in i)throw c("Accessors not supported");"value"in i&&(e[t]=i.value);return e}},(e,t,i)=>{var n=i(33),r=i(13),s=i(5);e.exports=!n&&!r((function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},(e,t,i)=>{var n=i(38),r=i(40);e.exports=function(e){var t=n(e,"string");return r(t)?t:t+""}},(e,t,i)=>{var n=i(2),r=i(39),s=i(6),o=i(40),a=i(42),l=i(45),c=i(17),h=n.TypeError,d=c("toPrimitive");e.exports=function(e,t){if(!s(e)||o(e))return e;var i,n=a(e,d);if(n){void 0===t&&(t="default");i=r(n,e,t);if(!s(i)||o(i))return i;throw h("Can't convert object to primitive value")}void 0===t&&(t="number");return l(e,t)}},(e,t,i)=>{var n=i(12),r=Function.prototype.call;e.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},(e,t,i)=>{var n=i(2),r=i(28),s=i(7),o=i(41),a=i(29),l=n.Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return s(t)&&o(t.prototype,l(e))}},(e,t,i)=>{var n=i(11);e.exports=n({}.isPrototypeOf)},(e,t,i)=>{var n=i(43);e.exports=function(e,t){var i=e[t];return null==i?void 0:n(i)}},(e,t,i)=>{var n=i(2),r=i(7),s=i(44),o=n.TypeError;e.exports=function(e){if(r(e))return e;throw o(s(e)+" is not a function")}},(e,t,i)=>{var n=i(2).String;e.exports=function(e){try{return n(e)}catch(e){return"Object"}}},(e,t,i)=>{var n=i(2),r=i(39),s=i(7),o=i(6),a=n.TypeError;e.exports=function(e,t){var i,n;if("string"===t&&s(i=e.toString)&&!o(n=r(i,e)))return n;if(s(i=e.valueOf)&&!o(n=r(i,e)))return n;if("string"!==t&&s(i=e.toString)&&!o(n=r(i,e)))return n;throw a("Can't convert object to primitive value")}},(e,t,i)=>{var n=i(47),r=i(54);e.exports=Object.keys||function keys(e){return n(e,r)}},(e,t,i)=>{var n=i(11),r=i(22),s=i(9),o=i(48).indexOf,a=i(53),l=n([].push);e.exports=function(e,t){var i,n=s(e),c=0,h=[];for(i in n)!r(a,i)&&r(n,i)&&l(h,i);for(;t.length>c;)r(n,i=t[c++])&&(~o(h,i)||l(h,i));return h}},(e,t,i)=>{var n=i(9),r=i(49),s=i(51),createMethod=function(e){return function(t,i,o){var a,l=n(t),c=s(l),h=r(o,c);if(e&&i!=i){for(;c>h;)if((a=l[h++])!=a)return!0}else for(;c>h;h++)if((e||h in l)&&l[h]===i)return e||h||0;return!e&&-1}};e.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},(e,t,i)=>{var n=i(50),r=Math.max,s=Math.min;e.exports=function(e,t){var i=n(e);return i<0?r(i+t,0):s(i,t)}},e=>{var t=Math.ceil,i=Math.floor;e.exports=function(e){var n=+e;return n!=n||0===n?0:(n>0?i:t)(n)}},(e,t,i)=>{var n=i(52);e.exports=function(e){return n(e.length)}},(e,t,i)=>{var n=i(50),r=Math.min;e.exports=function(e){return e>0?r(n(e),9007199254740991):0}},e=>{e.exports={}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t,i)=>{var n=i(28);e.exports=n("document","documentElement")},(e,t,i)=>{var n=i(18),r=i(24),s=n("keys");e.exports=function(e){return s[e]||(s[e]=r(e))}},e=>{e.exports={}},(e,t,i)=>{var n,r,s,o=i(59),a=i(2),l=i(11),c=i(6),h=i(61),d=i(22),u=i(20),p=i(56),g=i(53),f="Object already initialized",m=a.TypeError,v=a.WeakMap;if(o||u.state){var w=u.state||(u.state=new v),b=l(w.get),y=l(w.has),_=l(w.set);n=function(e,t){if(y(w,e))throw new m(f);t.facade=e;_(w,e,t);return t};r=function(e){return b(w,e)||{}};s=function(e){return y(w,e)}}else{var P=p("state");g[P]=!0;n=function(e,t){if(d(e,P))throw new m(f);t.facade=e;h(e,P,t);return t};r=function(e){return d(e,P)?e[P]:{}};s=function(e){return d(e,P)}}e.exports={set:n,get:r,has:s,enforce:function(e){return s(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var i;if(!c(t)||(i=r(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return i}}}},(e,t,i)=>{var n=i(2),r=i(7),s=i(60),o=n.WeakMap;e.exports=r(o)&&/native code/.test(s(o))},(e,t,i)=>{var n=i(11),r=i(7),s=i(20),o=n(Function.toString);r(s.inspectSource)||(s.inspectSource=function(e){return o(e)});e.exports=s.inspectSource},(e,t,i)=>{var n=i(33),r=i(35),s=i(62);e.exports=n?function(e,t,i){return r.f(e,t,s(1,i))}:function(e,t,i){e[t]=i;return e}},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,i)=>{"use strict";var n=i(64),r=i(39),s=i(19),o=i(68),a=i(7),l=i(74),c=i(76),h=i(79),d=i(78),u=i(61),p=i(67),g=i(17),f=i(57),m=i(75),v=o.PROPER,w=o.CONFIGURABLE,b=m.IteratorPrototype,y=m.BUGGY_SAFARI_ITERATORS,_=g("iterator"),P="keys",S="values",E="entries",returnThis=function(){return this};e.exports=function(e,t,i,o,g,m,x){l(i,t,o);var C,T,L,getIterationMethod=function(e){if(e===g&&O)return O;if(!y&&e in A)return A[e];switch(e){case P:return function keys(){return new i(this,e)};case S:return function values(){return new i(this,e)};case E:return function entries(){return new i(this,e)}}return function(){return new i(this)}},I=t+" Iterator",M=!1,A=e.prototype,D=A[_]||A["@@iterator"]||g&&A[g],O=!y&&D||getIterationMethod(g),k="Array"==t&&A.entries||D;if(k&&(C=c(k.call(new e)))!==Object.prototype&&C.next){s||c(C)===b||(h?h(C,b):a(C[_])||p(C,_,returnThis));d(C,I,!0,!0);s&&(f[I]=returnThis)}if(v&&g==S&&D&&D.name!==S)if(!s&&w)u(A,"name",S);else{M=!0;O=function values(){return r(D,this)}}if(g){T={values:getIterationMethod(S),keys:m?O:getIterationMethod(P),entries:getIterationMethod(E)};if(x)for(L in T)(y||M||!(L in A))&&p(A,L,T[L]);else n({target:t,proto:!0,forced:y||M},T)}s&&!x||A[_]===O||p(A,_,O,{name:g});f[t]=O;return T}},(e,t,i)=>{var n=i(2),r=i(65).f,s=i(61),o=i(67),a=i(21),l=i(69),c=i(73);e.exports=function(e,t){var i,h,d,u,p,g=e.target,f=e.global,m=e.stat;if(i=f?n:m?n[g]||a(g,{}):(n[g]||{}).prototype)for(h in t){u=t[h];d=e.noTargetGet?(p=r(i,h))&&p.value:i[h];if(!c(f?h:g+(m?".":"#")+h,e.forced)&&void 0!==d){if(typeof u==typeof d)continue;l(u,d)}(e.sham||d&&d.sham)&&s(u,"sham",!0);o(i,h,u,e)}}},(e,t,i)=>{var n=i(33),r=i(39),s=i(66),o=i(62),a=i(9),l=i(37),c=i(22),h=i(36),d=Object.getOwnPropertyDescriptor;t.f=n?d:function getOwnPropertyDescriptor(e,t){e=a(e);t=l(t);if(h)try{return d(e,t)}catch(e){}if(c(e,t))return o(!r(s.f,e,t),e[t])}},(e,t)=>{"use strict";var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,r=n&&!i.call({1:2},1);t.f=r?function propertyIsEnumerable(e){var t=n(this,e);return!!t&&t.enumerable}:i},(e,t,i)=>{var n=i(2),r=i(7),s=i(22),o=i(61),a=i(21),l=i(60),c=i(58),h=i(68).CONFIGURABLE,d=c.get,u=c.enforce,p=String(String).split("String");(e.exports=function(e,t,i,l){var c,d=!!l&&!!l.unsafe,g=!!l&&!!l.enumerable,f=!!l&&!!l.noTargetGet,m=l&&void 0!==l.name?l.name:t;if(r(i)){"Symbol("===String(m).slice(0,7)&&(m="["+String(m).replace(/^Symbol\(([^)]*)\)/,"$1")+"]");(!s(i,"name")||h&&i.name!==m)&&o(i,"name",m);(c=u(i)).source||(c.source=p.join("string"==typeof m?m:""))}if(e!==n){d?!f&&e[t]&&(g=!0):delete e[t];g?e[t]=i:o(e,t,i)}else g?e[t]=i:a(t,i)})(Function.prototype,"toString",(function toString(){return r(this)&&d(this).source||l(this)}))},(e,t,i)=>{var n=i(33),r=i(22),s=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,a=r(s,"name"),l=a&&"something"===function something(){}.name,c=a&&(!n||n&&o(s,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},(e,t,i)=>{var n=i(22),r=i(70),s=i(65),o=i(35);e.exports=function(e,t,i){for(var a=r(t),l=o.f,c=s.f,h=0;h<a.length;h++){var d=a[h];n(e,d)||i&&n(i,d)||l(e,d,c(t,d))}}},(e,t,i)=>{var n=i(28),r=i(11),s=i(71),o=i(72),a=i(31),l=r([].concat);e.exports=n("Reflect","ownKeys")||function ownKeys(e){var t=s.f(a(e)),i=o.f;return i?l(t,i(e)):t}},(e,t,i)=>{var n=i(47),r=i(54).concat("length","prototype");t.f=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return n(e,r)}},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,i)=>{var n=i(13),r=i(7),s=/#|\.prototype\./,isForced=function(e,t){var i=a[o(e)];return i==c||i!=l&&(r(t)?n(t):!!t)},o=isForced.normalize=function(e){return String(e).replace(s,".").toLowerCase()},a=isForced.data={},l=isForced.NATIVE="N",c=isForced.POLYFILL="P";e.exports=isForced},(e,t,i)=>{"use strict";var n=i(75).IteratorPrototype,r=i(30),s=i(62),o=i(78),a=i(57),returnThis=function(){return this};e.exports=function(e,t,i,l){var c=t+" Iterator";e.prototype=r(n,{next:s(+!l,i)});o(e,c,!1,!0);a[c]=returnThis;return e}},(e,t,i)=>{"use strict";var n,r,s,o=i(13),a=i(7),l=i(30),c=i(76),h=i(67),d=i(17),u=i(19),p=d("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(r=c(c(s)))!==Object.prototype&&(n=r):g=!0);null==n||o((function(){var e={};return n[p].call(e)!==e}))?n={}:u&&(n=l(n));a(n[p])||h(n,p,(function(){return this}));e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},(e,t,i)=>{var n=i(2),r=i(22),s=i(7),o=i(23),a=i(56),l=i(77),c=a("IE_PROTO"),h=n.Object,d=h.prototype;e.exports=l?h.getPrototypeOf:function(e){var t=o(e);if(r(t,c))return t[c];var i=t.constructor;return s(i)&&t instanceof i?i.prototype:t instanceof h?d:null}},(e,t,i)=>{var n=i(13);e.exports=!n((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},(e,t,i)=>{var n=i(35).f,r=i(22),s=i(17)("toStringTag");e.exports=function(e,t,i){e&&!i&&(e=e.prototype);e&&!r(e,s)&&n(e,s,{configurable:!0,value:t})}},(e,t,i)=>{var n=i(11),r=i(31),s=i(80);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]);t=i instanceof Array}catch(e){}return function setPrototypeOf(i,n){r(i);s(n);t?e(i,n):i.__proto__=n;return i}}():void 0)},(e,t,i)=>{var n=i(2),r=i(7),s=n.String,o=n.TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw o("Can't set "+s(e)+" as a prototype")}},(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.compatibilityParams=t.OptionKind=t.AppOptions=void 0;i(82);const n=Object.create(null);t.compatibilityParams=n;{const e="undefined"!=typeof navigator&&navigator.userAgent||"",t="undefined"!=typeof navigator&&navigator.platform||"",i="undefined"!=typeof navigator&&navigator.maxTouchPoints||1,r=/Android/.test(e),s=/\b(iPad|iPhone|iPod)(?=;)/.test(e)||"MacIntel"===t&&i>1;!function checkCanvasSizeLimitation(){(s||r)&&(n.maxCanvasPixels=5242880)}()}const r={VIEWER:2,API:4,WORKER:8,PREFERENCE:128};t.OptionKind=r;const s={annotationMode:{value:2,kind:r.VIEWER+r.PREFERENCE},cursorToolOnLoad:{value:0,kind:r.VIEWER+r.PREFERENCE},defaultUrl:{value:"",kind:r.VIEWER},defaultZoomValue:{value:"",kind:r.VIEWER+r.PREFERENCE},disableHistory:{value:!1,kind:r.VIEWER},disablePageLabels:{value:!1,kind:r.VIEWER+r.PREFERENCE},enablePermissions:{value:!1,kind:r.VIEWER+r.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:r.VIEWER+r.PREFERENCE},enableScripting:{value:!0,kind:r.VIEWER+r.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:r.VIEWER},externalLinkTarget:{value:0,kind:r.VIEWER+r.PREFERENCE},historyUpdateUrl:{value:!1,kind:r.VIEWER+r.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:r.VIEWER+r.PREFERENCE},imageResourcesPath:{value:"./images/",kind:r.VIEWER},maxCanvasPixels:{value:16777216,compatibility:n.maxCanvasPixels,kind:r.VIEWER},pdfBugEnabled:{value:!1,kind:r.VIEWER+r.PREFERENCE},printResolution:{value:150,kind:r.VIEWER},removePageBorders:{value:!1,kind:r.VIEWER+r.PREFERENCE},renderer:{value:"canvas",kind:r.VIEWER},sidebarViewOnLoad:{value:-1,kind:r.VIEWER+r.PREFERENCE},scrollModeOnLoad:{value:-1,kind:r.VIEWER+r.PREFERENCE},spreadModeOnLoad:{value:-1,kind:r.VIEWER+r.PREFERENCE},textLayerMode:{value:1,kind:r.VIEWER+r.PREFERENCE},useOnlyCssZoom:{value:!1,kind:r.VIEWER+r.PREFERENCE},viewerCssTheme:{value:0,kind:r.VIEWER+r.PREFERENCE},viewOnLoad:{value:0,kind:r.VIEWER+r.PREFERENCE},cMapPacked:{value:!0,kind:r.API},cMapUrl:{value:"../web/cmaps/",kind:r.API},disableAutoFetch:{value:!1,kind:r.API+r.PREFERENCE},disableFontFace:{value:!1,kind:r.API+r.PREFERENCE},disableRange:{value:!1,kind:r.API+r.PREFERENCE},disableStream:{value:!1,kind:r.API+r.PREFERENCE},docBaseUrl:{value:"",kind:r.API},enableXfa:{value:!0,kind:r.API+r.PREFERENCE},fontExtraProperties:{value:!1,kind:r.API},isEvalSupported:{value:!0,kind:r.API},maxImageSize:{value:-1,kind:r.API},pdfBug:{value:!1,kind:r.API},standardFontDataUrl:{value:"../web/standard_fonts/",kind:r.API},verbosity:{value:1,kind:r.API},workerPort:{value:null,kind:r.WORKER},workerSrc:{value:"./assets/pdf.worker.js",kind:r.WORKER}};s.disablePreferences={value:!1,kind:r.VIEWER};s.locale={value:"undefined"!=typeof navigator?navigator.language:"en-US",kind:r.VIEWER};s.sandboxBundleSrc={value:"../build/pdf.sandbox.js",kind:r.VIEWER};s.renderer.kind+=r.PREFERENCE;const o=Object.create(null);if(globalThis.pdfDefaultOptions)for(const e in globalThis.pdfDefaultOptions)o[e]=globalThis.pdfDefaultOptions[e];t.AppOptions=class AppOptions{constructor(){throw new Error("Cannot initialize AppOptions.")}static get(e){const t=o[e];if(void 0!==t)return t;const i=s[e];if(void 0!==i){var n;return null!==(n=i.compatibility)&&void 0!==n?n:i.value}}static getAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=Object.create(null);for(const n in s){var i;const a=s[n];if(e){if(0==(e&a.kind))continue;if(e===r.PREFERENCE){const e=a.value,i=typeof e;if("boolean"===i||"string"===i||"number"===i&&Number.isInteger(e)){t[n]=e;continue}throw new Error("Invalid type for preference: ".concat(n))}}const l=o[n];t[n]=void 0!==l?l:null!==(i=a.compatibility)&&void 0!==i?i:a.value}return t}static set(e,t){o[e]=t}static setAll(e){for(const t in e)o[t]=e[t]}static remove(e){delete o[e]}static _hasUserOptions(){return Object.keys(o).length>0}}},(e,t,i)=>{"use strict";var n=i(64),r=i(83);n({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},(e,t,i)=>{"use strict";var n=i(39),r=i(11),s=i(84),o=i(87),a=i(88),l=i(18),c=i(30),h=i(58).get,d=i(89),u=i(90),p=l("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,f=g,m=r("".charAt),v=r("".indexOf),w=r("".replace),b=r("".slice),y=function(){var e=/a/,t=/b*/g;n(g,e,"a");n(g,t,"a");return 0!==e.lastIndex||0!==t.lastIndex}(),_=a.BROKEN_CARET,P=void 0!==/()??/.exec("")[1];(y||P||_||d||u)&&(f=function exec(e){var t,i,r,a,l,d,u,S=this,E=h(S),x=s(e),C=E.raw;if(C){C.lastIndex=S.lastIndex;t=n(f,C,x);S.lastIndex=C.lastIndex;return t}var T=E.groups,L=_&&S.sticky,I=n(o,S),M=S.source,A=0,D=x;if(L){I=w(I,"y","");-1===v(I,"g")&&(I+="g");D=b(x,S.lastIndex);if(S.lastIndex>0&&(!S.multiline||S.multiline&&"\n"!==m(x,S.lastIndex-1))){M="(?: "+M+")";D=" "+D;A++}i=new RegExp("^(?:"+M+")",I)}P&&(i=new RegExp("^"+M+"$(?!\\s)",I));y&&(r=S.lastIndex);a=n(g,L?i:S,D);if(L)if(a){a.input=b(a.input,A);a[0]=b(a[0],A);a.index=S.lastIndex;S.lastIndex+=a[0].length}else S.lastIndex=0;else y&&a&&(S.lastIndex=S.global?a.index+a[0].length:r);P&&a&&a.length>1&&n(p,a[0],i,(function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(a[l]=void 0)}));if(a&&T){a.groups=d=c(null);for(l=0;l<T.length;l++)d[(u=T[l])[0]]=a[u[1]]}return a});e.exports=f},(e,t,i)=>{var n=i(2),r=i(85),s=n.String;e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return s(e)}},(e,t,i)=>{var n=i(2),r=i(86),s=i(7),o=i(14),a=i(17)("toStringTag"),l=n.Object,c="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=l(e),a))?i:c?o(t):"Object"==(n=o(t))&&s(t.callee)?"Arguments":n}},(e,t,i)=>{var n={};n[i(17)("toStringTag")]="z";e.exports="[object z]"===String(n)},(e,t,i)=>{"use strict";var n=i(31);e.exports=function(){var e=n(this),t="";e.global&&(t+="g");e.ignoreCase&&(t+="i");e.multiline&&(t+="m");e.dotAll&&(t+="s");e.unicode&&(t+="u");e.sticky&&(t+="y");return t}},(e,t,i)=>{var n=i(13),r=i(2).RegExp,s=n((function(){var e=r("a","y");e.lastIndex=2;return null!=e.exec("abcd")})),o=s||n((function(){return!r("a","y").sticky})),a=s||n((function(){var e=r("^r","gy");e.lastIndex=2;return null!=e.exec("str")}));e.exports={BROKEN_CARET:a,MISSED_STICKY:o,UNSUPPORTED_Y:s}},(e,t,i)=>{var n=i(13),r=i(2).RegExp;e.exports=n((function(){var e=r(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},(e,t,i)=>{var n=i(13),r=i(2).RegExp;e.exports=n((function(){var e=r("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.PDFViewerApplication=t.PDFPrintServiceFactory=t.DefaultExternalServices=void 0;i(92);i(1);i(82);i(122);i(128);i(137);var n=i(139),r=i(81),s=i(141),o=i(142),a=i(143),l=i(145),c=i(146),h=i(147),d=i(148),u=i(150),p=i(151),g=i(152),f=i(159),m=i(160),v=i(161),w=i(162),b=i(163),y=i(165),_=i(166),P=i(167),S=i(168),E=i(170),x=i(232),C=i(233),T=i(234);const L=-1,I=1,M={AUTOMATIC:0,LIGHT:1,DARK:2},A=["1.0","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8","1.9","2.0","2.1","2.2","2.3"],D=["acrobat distiller","acrobat pdfwriter","adobe livecycle","adobe pdf library","adobe photoshop","ghostscript","tcpdf","cairo","dvipdfm","dvips","pdftex","pdfkit","itext","prince","quarkxpress","mac os x","microsoft","openoffice","oracle","luradocument","pdf-xchange","antenna house","aspose.cells","fpdf"];class DefaultExternalServices{constructor(){throw new Error("Cannot initialize DefaultExternalServices.")}static updateFindControlState(e){}static updateFindMatchesCount(e){}static initPassiveLoading(e){}static async fallback(e){}static reportTelemetry(e){}static createDownloadManager(e){throw new Error("Not implemented: createDownloadManager")}static createPreferences(){throw new Error("Not implemented: createPreferences")}static createL10n(e){throw new Error("Not implemented: createL10n")}static createScripting(e){throw new Error("Not implemented: createScripting")}static get supportsIntegratedFind(){return(0,o.shadow)(this,"supportsIntegratedFind",!1)}static get supportsDocumentFonts(){return(0,o.shadow)(this,"supportsDocumentFonts",!0)}static get supportedMouseWheelZoomModifierKeys(){return(0,o.shadow)(this,"supportedMouseWheelZoomModifierKeys",{ctrlKey:!0,metaKey:!0})}static get isInAutomation(){return(0,o.shadow)(this,"isInAutomation",!1)}}t.DefaultExternalServices=DefaultExternalServices;const O={initialBookmark:document.location.hash.substring(1),_initializedCapability:(0,o.createPromiseCapability)(),_fellback:!1,appConfig:null,pdfDocument:null,pdfLoadingTask:null,printService:null,pdfViewer:null,pdfThumbnailViewer:null,pdfRenderingQueue:null,pdfPresentationMode:null,pdfDocumentProperties:null,pdfLinkService:null,pdfHistory:null,pdfSidebar:null,pdfSidebarResizer: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,isInitialViewSet:!1,downloadComplete:!1,isViewerEmbedded:window.parent!==window,url:"",baseUrl:"",_downloadUrl:"",externalServices:DefaultExternalServices,_boundEvents:Object.create(null),documentInfo:null,metadata:null,_contentDispositionFilename:null,_contentLength:null,_saveInProgress:!1,_docStats:null,_wheelUnusedTicks:0,_idleCallbacks:new Set,async initialize(e){this.preferences=this.externalServices.createPreferences();this.appConfig=e;await this._readPreferences();await this._parseHashParameters();this._forceCssTheme();await this._initializeL10n();this.isViewerEmbedded&&r.AppOptions.get("externalLinkTarget")===l.LinkTarget.NONE&&r.AppOptions.set("externalLinkTarget",l.LinkTarget.TOP);await this._initializeViewerComponents();this.bindEvents();this.bindWindowEvents();const t=e.appContainer||document.documentElement;this.l10n.translate(t).then((()=>{this.eventBus.dispatch("localized",{source:this})}));this._initializedCapability.resolve();this.initializeLoadingBar()},async _readPreferences(){if(!r.AppOptions.get("disablePreferences")){r.AppOptions._hasUserOptions()&&Window.ngxConsole.warn('_readPreferences: The Preferences may override manually set AppOptions; please use the "disablePreferences"-option in order to prevent that.');try{r.AppOptions.setAll(await this.preferences.getAll())}catch(e){Window.ngxConsole.error('_readPreferences: "'.concat(null==e?void 0:e.message,'".'))}}},async _parseHashParameters(){if(!r.AppOptions.get("pdfBugEnabled"))return;const e=document.location.hash.substring(1);if(!e)return;const t=(0,n.parseQueryString)(e),i=[];"true"===t.get("disableworker")&&i.push(async function loadFakeWorker(){if(!o.GlobalWorkerOptions.workerSrc){o.GlobalWorkerOptions.workerSrc=r.AppOptions.get("workerSrc");"Function"===o.GlobalWorkerOptions.workerSrc.constructor.name&&(o.GlobalWorkerOptions.workerSrc=o.GlobalWorkerOptions.workerSrc())}await(0,o.loadScript)(o.PDFWorker.workerSrc)}());t.has("disablerange")&&r.AppOptions.set("disableRange","true"===t.get("disablerange"));t.has("disablestream")&&r.AppOptions.set("disableStream","true"===t.get("disablestream"));t.has("disableautofetch")&&r.AppOptions.set("disableAutoFetch","true"===t.get("disableautofetch"));t.has("disablefontface")&&r.AppOptions.set("disableFontFace","true"===t.get("disablefontface"));t.has("disablehistory")&&r.AppOptions.set("disableHistory","true"===t.get("disablehistory"));t.has("verbosity")&&r.AppOptions.set("verbosity",0|t.get("verbosity"));if(t.has("textlayer"))switch(t.get("textlayer")){case"off":r.AppOptions.set("textLayerMode",n.TextLayerMode.DISABLE);break;case"visible":case"shadow":case"hover":this.appConfig.viewerContainer.classList.add("textLayer-".concat(t.get("textlayer")))}if(t.has("pdfbug")){r.AppOptions.set("pdfBug",!0);r.AppOptions.set("fontExtraProperties",!0);const e=t.get("pdfbug").split(",");i.push(async function initPDFBug(e){const{debuggerScriptPath:t,mainContainer:i}=O.appConfig;await(0,o.loadScript)(t);PDFBug.init({OPS:o.OPS},i,e)}(e))}t.has("locale")&&r.AppOptions.set("locale",t.get("locale"));if(0!==i.length)try{await Promise.all(i)}catch(e){Window.ngxConsole.error('_parseHashParameters: "'.concat(e.message,'".'))}},async _initializeL10n(){this.l10n=this.externalServices.createL10n({locale:r.AppOptions.get("locale")});const e=await this.l10n.getDirection();document.getElementsByTagName("html")[0].dir=e},_forceCssTheme(){const e=r.AppOptions.get("viewerCssTheme");if(e!==M.AUTOMATIC&&Object.values(M).includes(e))try{const i=document.styleSheets[0],n=(null==i?void 0:i.cssRules)||[];for(let r=0,s=n.length;r<s;r++){var t;const s=n[r];if(s instanceof CSSMediaRule&&"(prefers-color-scheme: dark)"===(null===(t=s.media)||void 0===t?void 0:t[0])){if(e===M.LIGHT){i.deleteRule(r);return}const t=/^@media \(prefers-color-scheme: dark\) {\n\s*([\w\s-.,:;/\\{}()]+)\n}$/.exec(s.cssText);if(null!=t&&t[1]){i.deleteRule(r);i.insertRule(t[1],r)}return}}}catch(e){Window.ngxConsole.error('_forceCssTheme: "'.concat(null==e?void 0:e.message,'".'))}},async _initializeViewerComponents(){const{appConfig:e,externalServices:t}=this,i=t.isInAutomation?new s.AutomationEventBus:new s.EventBus;this.eventBus=i;this.overlayManager=new c.OverlayManager;const n=new b.PDFRenderingQueue;n.onIdle=this._cleanup.bind(this);this.pdfRenderingQueue=n;const o=new l.PDFLinkService({eventBus:i,externalLinkTarget:r.AppOptions.get("externalLinkTarget"),externalLinkRel:r.AppOptions.get("externalLinkRel"),ignoreDestinationZoom:r.AppOptions.get("ignoreDestinationZoom")});this.pdfLinkService=o;const T=t.createDownloadManager();this.downloadManager=T;const L=new g.PDFFindController({linkService:o,eventBus:i,pageViewMode:r.AppOptions.get("pageViewMode")});this.findController=L;const I=new y.PDFScriptingManager({eventBus:i,sandboxBundleSrc:r.AppOptions.get("sandboxBundleSrc"),scriptingFactory:t,docPropertiesLookup:this._scriptingDocProperties.bind(this)});this.pdfScriptingManager=I;const M=e.mainContainer,A=e.viewerContainer;this.pdfViewer=new E.PDFViewer({container:M,viewer:A,eventBus:i,renderingQueue:n,linkService:o,downloadManager:T,findController:L,scriptingManager:r.AppOptions.get("enableScripting")&&I,renderer:r.AppOptions.get("renderer"),l10n:this.l10n,textLayerMode:r.AppOptions.get("textLayerMode"),annotationMode:r.AppOptions.get("annotationMode"),imageResourcesPath:r.AppOptions.get("imageResourcesPath"),removePageBorders:r.AppOptions.get("removePageBorders"),renderInteractiveForms:r.AppOptions.get("renderInteractiveForms"),enablePrintAutoRotate:r.AppOptions.get("enablePrintAutoRotate"),useOnlyCssZoom:r.AppOptions.get("useOnlyCssZoom"),maxCanvasPixels:r.AppOptions.get("maxCanvasPixels"),pageViewMode:r.AppOptions.get("pageViewMode"),enablePermissions:r.AppOptions.get("enablePermissions")});n.setViewer(this.pdfViewer);o.setViewer(this.pdfViewer);I.setViewer(this.pdfViewer);this.pdfThumbnailViewer=new S.PDFThumbnailViewer({container:e.sidebar.thumbnailView,eventBus:i,renderingQueue:n,linkService:o,l10n:this.l10n});n.setThumbnailViewer(this.pdfThumbnailViewer);if(!this.isViewerEmbedded&&!r.AppOptions.get("disableHistory")){this.pdfHistory=new f.PDFHistory({linkService:o,eventBus:i});o.setHistory(this.pdfHistory)}this.supportsIntegratedFind||(this.findBar=new p.PDFFindBar(e.findBar,i,this.l10n));this.pdfDocumentProperties=new u.PDFDocumentProperties(e.documentProperties,this.overlayManager,i,this.l10n);this.pdfCursorTools=new a.PDFCursorTools({container:M,eventBus:i,cursorToolOnLoad:r.AppOptions.get("cursorToolOnLoad")});this.toolbar=new C.Toolbar(e.toolbar,i,this.l10n);this.secondaryToolbar=new x.SecondaryToolbar(e.secondaryToolbar,M,i);this.supportsFullscreen&&(this.pdfPresentationMode=new w.PDFPresentationMode({container:M,pdfViewer:this.pdfViewer,eventBus:i}));let D=r.AppOptions.get("passwordPrompt");D||(D=new h.PasswordPrompt(e.passwordOverlay,this.overlayManager,this.l10n,this.isViewerEmbedded));this.passwordPrompt=D;this.pdfOutlineViewer=new v.PDFOutlineViewer({container:e.sidebar.outlineView,eventBus:i,linkService:o});this.pdfAttachmentViewer=new d.PDFAttachmentViewer({container:e.sidebar.attachmentsView,eventBus:i,downloadManager:T});this.pdfLayerViewer=new m.PDFLayerViewer({container:e.sidebar.layersView,eventBus:i,l10n:this.l10n});this.pdfSidebar=new _.PDFSidebar({elements:e.sidebar,pdfViewer:this.pdfViewer,pdfThumbnailViewer:this.pdfThumbnailViewer,eventBus:i,l10n:this.l10n});this.pdfSidebar.onToggled=this.forceRendering.bind(this);this.pdfSidebarResizer=new P.PDFSidebarResizer(e.sidebarResizer,i,this.l10n)},run(e){this.initialize(e).then(webViewerInitialized)},get initialized(){return this._initializedCapability.settled},get initializedPromise(){return this._initializedCapability.promise},zoomIn(e){this.pdfViewer.isInPresentationMode||this.pdfViewer.increaseScale(e)},zoomOut(e){this.pdfViewer.isInPresentationMode||this.pdfViewer.decreaseScale(e)},zoomReset(){this.pdfViewer.isInPresentationMode||(this.pdfViewer.currentScaleValue=n.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 V.instance.supportsPrinting},get supportsFullscreen(){return(0,o.shadow)(this,"supportsFullscreen",document.fullscreenEnabled||document.webkitFullscreenEnabled)},get supportsIntegratedFind(){return this.externalServices.supportsIntegratedFind},get supportsDocumentFonts(){return this.externalServices.supportsDocumentFonts},initializeLoadingBar(){const e=new n.ProgressBar("#loadingBar");e.hide();return(0,o.shadow)(this,"loadingBar",e)},get supportedMouseWheelZoomModifierKeys(){return this.externalServices.supportedMouseWheelZoomModifierKeys},initPassiveLoading(){throw new Error("Not implemented: initPassiveLoading")},setTitleUsingUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.url=e;this.baseUrl=e.split("#")[0];t&&(this._downloadUrl=t===e?this.baseUrl:t.split("#")[0]);let i=(0,o.getPdfFilenameFromUrl)(e,"");if(!i)try{i=decodeURIComponent((0,o.getFilenameFromUrl)(e))||e}catch(t){i=e}this.setTitle(i)},setTitle(e){this.isViewerEmbedded||(document.title=e)},get _docFilename(){return this._contentDispositionFilename||(0,o.getPdfFilenameFromUrl)(this.url)},_hideViewBookmark(){const{toolbar:e,secondaryToolbar:t}=this.appConfig;e.viewBookmark.hidden=!0;t.viewBookmarkButton.hidden=!0},_cancelIdleCallbacks(){if(this._idleCallbacks.size){for(const e of this._idleCallbacks)window.cancelIdleCallback(e);this._idleCallbacks.clear()}},async close(){var e,t,i;this._unblockDocumentLoadEvent();this._hideViewBookmark();const{container:n}=this.appConfig.errorWrapper;n.hidden=!0;if(!this.pdfLoadingTask)return;if((null===(e=this.pdfDocument)||void 0===e?void 0:e.annotationStorage.size)>0&&this._annotationStorageModified)try{await this.save({sourceEventType:"save"})}catch(e){}const r=[];r.push(this.pdfLoadingTask.destroy());this.pdfLoadingTask=null;if(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._fellback=!1;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._docStats=null;this._cancelIdleCallbacks();r.push(this.pdfScriptingManager.destroyPromise);this.pdfSidebar.reset();this.pdfOutlineViewer.reset();this.pdfAttachmentViewer.reset();this.pdfLayerViewer.reset();null===(t=this.pdfHistory)||void 0===t||t.reset();null===(i=this.findBar)||void 0===i||i.reset();this.toolbar.reset();this.secondaryToolbar.reset();"undefined"!=typeof PDFBug&&PDFBug.cleanup();await Promise.all(r)},async open(e,t){window.ngxZone.runOutsideAngular((async()=>{this.pdfLoadingTask&&await this.close();const i=r.AppOptions.getAll(r.OptionKind.WORKER);for(const e in i)o.GlobalWorkerOptions[e]=i[e];const n=Object.create(null);if("string"==typeof e){this.setTitleUsingUrl(e,e);n.url=e}else if(e&&"byteLength"in e)n.data=e;else if(e.url&&e.originalUrl){this.setTitleUsingUrl(e.originalUrl,e.url);n.url=e.url}const s=r.AppOptions.getAll(r.OptionKind.API);for(const e in s){let t=s[e];n[e]=t}if(t)for(const e in t)n[e]=t[e];const a=(0,o.getDocument)(n);this.pdfLoadingTask=a;a.onPassword=(e,t)=>{this.pdfLinkService.externalLinkEnabled=!1;this.passwordPrompt.setUpdateCallback(e,t);this.passwordPrompt.open()};a.onProgress=e=>{let{loaded:t,total:i}=e;this.progress(t/i);this.eventBus.dispatch("progress",{source:this,type:"load",total:i,loaded:t,percent:100*t/i})};a.onUnsupportedFeature=this.fallback.bind(this);this.loadingBar.show();return a.promise.then((e=>{this.load(e)}),(e=>{if(a!==this.pdfLoadingTask)return;let t="loading_error";e instanceof o.InvalidPDFException?t="invalid_file_error":e instanceof o.MissingPDFException?t="missing_file_error":e instanceof o.UnexpectedResponseException&&(t="unexpected_response_error");return this.l10n.get(t).then((t=>{this._documentError(t,{message:null==e?void 0:e.message});throw e}))}))}))},_ensureDownloadComplete(){if(!this.pdfDocument||!this.downloadComplete)throw new Error("PDF document not downloaded.")},async download(){let{sourceEventType:e="download"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this._downloadUrl,i=this._docFilename;try{this._ensureDownloadComplete();const n=await this.pdfDocument.getData(),r=new Blob([n],{type:"application/pdf"});await this.downloadManager.download(r,t,i,e)}catch(e){await this.downloadManager.downloadUrl(t,i)}},async save(){let{sourceEventType:e="download"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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(),r=new Blob([n],{type:"application/pdf"});await this.downloadManager.download(r,t,i,e)}catch(t){Window.ngxConsole.error("Error when saving the document: ".concat(t.message));await this.download({sourceEventType:e})}finally{await this.pdfScriptingManager.dispatchDidSave();this._saveInProgress=!1}},downloadOrSave(e){var t;(null===(t=this.pdfDocument)||void 0===t?void 0:t.annotationStorage.size)>0?this.save(e):this.download(e)},fallback(e){this.externalServices.reportTelemetry({type:"unsupportedFeature",featureId:e});if(!this._fellback){this._fellback=!0;this.externalServices.fallback({featureId:e,url:this.baseUrl}).then((e=>{e&&this.download({sourceEventType:"download"})}))}},_documentError(e){var t;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this._unblockDocumentLoadEvent();this._otherError(e,i);this.eventBus.dispatch("documenterror",{source:this,message:e,reason:null!==(t=null==i?void 0:i.message)&&void 0!==t?t:null})},_otherError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=[this.l10n.get("error_version_info",{version:o.version||"?",build:o.build||"?"})];if(t){i.push(this.l10n.get("error_message",{message:t.message}));if(t.stack)i.push(this.l10n.get("error_stack",{stack:t.stack}));else{t.filename&&i.push(this.l10n.get("error_file",{file:t.filename}));t.lineNumber&&i.push(this.l10n.get("error_line",{line:t.lineNumber}))}}const r=this.appConfig.errorWrapper,s=r.container;s.hidden=!1;r.errorMessage.textContent=e;const a=r.closeButton;a.onclick=function(){s.hidden=!0};const l=r.errorMoreInfo,c=r.moreInfoButton,h=r.lessInfoButton;c.onclick=function(){l.hidden=!1;c.hidden=!0;h.hidden=!1;l.style.height=l.scrollHeight+"px"};h.onclick=function(){l.hidden=!0;c.hidden=!1;h.hidden=!0};c.oncontextmenu=n.noContextMenuHandler;h.oncontextmenu=n.noContextMenuHandler;a.oncontextmenu=n.noContextMenuHandler;c.hidden=!1;h.hidden=!0;Promise.all(i).then((e=>{l.value=e.join("\n")}))},progress(e){if(this.downloadComplete)return;const t=Math.round(100*e);if(t>this.loadingBar.percent||isNaN(t)){this.loadingBar.percent=t;if((this.pdfDocument?this.pdfDocument.loadingParams.disableAutoFetch:r.AppOptions.get("disableAutoFetch"))&&t){if(this.disableAutoFetchLoadingBarTimeout){clearTimeout(this.disableAutoFetchLoadingBarTimeout);this.disableAutoFetchLoadingBarTimeout=null}this.loadingBar.show();this.disableAutoFetchLoadingBarTimeout=setTimeout((()=>{this.loadingBar.hide();this.disableAutoFetchLoadingBarTimeout=null}),5e3)}}},load(e){this.pdfDocument=e;e.getDownloadInfo().then((e=>{let{length:t}=e;this._contentLength=t;this.downloadComplete=!0;this.loadingBar.hide();l.then((()=>{this.eventBus.dispatch("documentloaded",{source:this})}))}));const t=e.getPageLayout().catch((function(){})),i=e.getPageMode().catch((function(){})),s=e.getOpenAction().catch((function(){}));this.toolbar.setPagesCount(e.numPages,!1);this.secondaryToolbar.setPagesCount(e.numPages);let o;o=null;this.pdfLinkService.setDocument(e,null);this.pdfDocumentProperties.setDocument(e,this.url);const a=this.pdfViewer;a.setDocument(e);const{firstPagePromise:l,onePageRendered:c,pagesPromise:h}=a;this.pdfThumbnailViewer.setDocument(e);const d=(this.store=new T.ViewHistory(e.fingerprints[0])).getMultiple({page:null,zoom:n.DEFAULT_SCALE_VALUE,scrollLeft:"0",scrollTop:"0",rotation:null,sidebarView:n.SidebarView.UNKNOWN,scrollMode:n.ScrollMode.UNKNOWN,spreadMode:n.SpreadMode.UNKNOWN}).catch((()=>Object.create(null)));l.then((o=>{this.loadingBar.setWidth(this.appConfig.viewerContainer);this._initializeAnnotationStorageCallbacks(e);Promise.all([n.animationStarted,d,t,i,s]).then((async t=>{let[i,s,o,l,c]=t;const d=r.AppOptions.get("viewOnLoad");this._initializePdfHistory({fingerprint:e.fingerprints[0],viewOnLoad:d,initialDest:null==c?void 0:c.dest});const u=this.initialBookmark,p=r.AppOptions.get("defaultZoomValue");let g=p?"zoom=".concat(p):null,f=null,m=r.AppOptions.get("sidebarViewOnLoad"),v=r.AppOptions.get("scrollModeOnLoad"),w=r.AppOptions.get("spreadModeOnLoad");if(s.page&&d!==I){g="page=".concat(s.page,"&zoom=").concat(p||s.zoom,",")+"".concat(s.scrollLeft,",").concat(s.scrollTop);f=parseInt(s.rotation,10);m===n.SidebarView.UNKNOWN&&(m=0|s.sidebarView);v===n.ScrollMode.UNKNOWN&&(v=0|s.scrollMode);w===n.SpreadMode.UNKNOWN&&(w=0|s.spreadMode)}l&&m===n.SidebarView.UNKNOWN&&(m=(0,n.apiPageModeToSidebarView)(l));if(o&&v===n.ScrollMode.UNKNOWN&&w===n.SpreadMode.UNKNOWN){w=(0,n.apiPageLayoutToViewerModes)(o).spreadMode}this.setInitialView(g,{rotation:f,sidebarView:m,scrollMode:v,spreadMode:w});this.eventBus.dispatch("documentinit",{source:this});this.isViewerEmbedded||a.focus();await Promise.race([h,new Promise((e=>{setTimeout(e,1e4)}))]);if((u||g)&&!a.hasEqualPageSizes){this.initialBookmark=u;a.currentScaleValue=a.currentScaleValue;this.setInitialView(g)}})).catch((()=>{this.setInitialView()})).then((function(){a.update()}))}));h.then((()=>{this._unblockDocumentLoadEvent();this._initializeAutoPrint(e,s)}),(e=>{this.l10n.get("loading_error").then((t=>{this._documentError(t,{message:null==e?void 0:e.message})}))}));c.then((t=>{this.externalServices.reportTelemetry({type:"pageInfo",timestamp:t.timestamp});e.getOutline().then((t=>{e===this.pdfDocument&&this.pdfOutlineViewer.render({outline:t,pdfDocument:e})}));e.getAttachments().then((t=>{e===this.pdfDocument&&this.pdfAttachmentViewer.render({attachments:t})}));a.optionalContentConfigPromise.then((t=>{e===this.pdfDocument&&this.pdfLayerViewer.render({optionalContentConfig:t,pdfDocument:e})}));if("requestIdleCallback"in window){const t=window.requestIdleCallback((()=>{this._collectTelemetry(e);this._idleCallbacks.delete(t)}),{timeout:1e3});this._idleCallbacks.add(t)}}));this._initializePageLabels(e);this._initializeMetadata(e)},async _scriptingDocProperties(e){var t,i;if(!this.documentInfo){await new Promise((e=>{this.eventBus._on("metadataloaded",e,{once:!0})}));if(e!==this.pdfDocument)return null}if(!this._contentLength){await new Promise((e=>{this.eventBus._on("documentloaded",e,{once:!0})}));if(e!==this.pdfDocument)return null}return{...this.documentInfo,baseURL:this.baseUrl,filesize:this._contentLength,filename:this._docFilename,metadata:null===(t=this.metadata)||void 0===t?void 0:t.getRaw(),authors:null===(i=this.metadata)||void 0===i?void 0:i.get("dc:creator"),numPages:this.pagesCount,URL:this.url}},async _collectTelemetry(e){const t=await this.pdfDocument.getMarkInfo();if(e!==this.pdfDocument)return;const i=(null==t?void 0:t.Marked)||!1;this.externalServices.reportTelemetry({type:"tagged",tagged:i})},async _initializeAutoPrint(e,t){const[i,r]=await Promise.all([t,this.pdfViewer.enableScripting?null:e.getJavaScript()]);if(e!==this.pdfDocument)return;let s=!1;"Print"===(null==i?void 0:i.action)&&(s=!0);if(r){r.some((e=>{if(!e)return!1;Window.ngxConsole.warn("Warning: JavaScript support is not enabled");this.fallback(o.UNSUPPORTED_FEATURES.javaScript);return!0}));if(!s)for(const e of r)if(e&&n.AutoPrintRegExp.test(e)){s=!0;break}}s&&this.triggerPrinting()},async _initializeMetadata(e){var t,i;const{info:n,metadata:r,contentDispositionFilename:s,contentLength:a}=await e.getMetadata();if(e!==this.pdfDocument)return;this.documentInfo=n;this.metadata=r;null!==(t=this._contentDispositionFilename)&&void 0!==t||(this._contentDispositionFilename=s);null!==(i=this._contentLength)&&void 0!==i||(this._contentLength=a);const l=window.PDFViewerApplicationOptions;if(!l||l.get("verbosity")>0){Window.ngxConsole.log("PDF viewer: ngx-extended-pdf-viewer running on pdf.js "+(window["pdfjs-dist/build/pdf"]?window["pdfjs-dist/build/pdf"].version:" developer version (?)"));Window.ngxConsole.log("PDF ".concat(e.fingerprints[0]," [").concat(n.PDFFormatVersion," ")+"".concat((n.Producer||"-").trim()," / ").concat((n.Creator||"-").trim(),"] ")+"(PDF.js: ".concat(o.version||"-")+"".concat(this.pdfViewer.enableWebGL?" [WebGL]":"",") modified by ngx-extended-pdf-viewer)"))}n.Language&&(this.appConfig.viewerContainer.lang=n.Language);let c=null==n?void 0:n.Title;const h=null==r?void 0:r.get("dc:title");h&&("Untitled"===h||/[\uFFF0-\uFFFF]/g.test(h)||(c=h));c?this.setTitle("".concat(c," - ").concat(s||document.title)):s&&this.setTitle(s);if(!n.IsXFAPresent||n.IsAcroFormPresent||e.isPureXfa){if((n.IsAcroFormPresent||n.IsXFAPresent)&&!this.pdfViewer.renderForms){Window.ngxConsole.warn("Warning: Interactive form support is not enabled");this.fallback(o.UNSUPPORTED_FEATURES.forms)}}else{e.loadingParams.enableXfa?Window.ngxConsole.warn("Warning: XFA Foreground documents are not supported"):Window.ngxConsole.warn("Warning: XFA support is not enabled");this.fallback(o.UNSUPPORTED_FEATURES.forms)}if(n.IsSignaturesPresent){Window.ngxConsole.warn("Warning: Digital signatures validation is not supported");this.fallback(o.UNSUPPORTED_FEATURES.signatures)}let d="other";A.includes(n.PDFFormatVersion)&&(d="v".concat(n.PDFFormatVersion.replace(".","_")));let u="other";if(n.Producer){const e=n.Producer.toLowerCase();D.some((function(t){if(!e.includes(t))return!1;u=t.replace(/[ .-]/g,"_");return!0}))}let p=null;n.IsXFAPresent?p="xfa":n.IsAcroFormPresent&&(p="acroform");this.externalServices.reportTelemetry({type:"documentInfo",version:d,generator:u,formType:p});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:o,pdfThumbnailViewer:a,toolbar:l}=this;o.setPageLabels(t);a.setPageLabels(t);l.setPagesCount(i,!0);l.setPageNumber(o.currentPageNumber,o.currentPageLabel)},_initializePdfHistory(e){let{fingerprint:t,viewOnLoad:i,initialDest:n=null}=e;if(this.pdfHistory){this.pdfHistory.initialize({fingerprint:t,resetHistory:i===I,updateUrl:r.AppOptions.get("historyUpdateUrl")});if(this.pdfHistory.initialBookmark){this.initialBookmark=this.pdfHistory.initialBookmark;this.initialRotation=this.pdfHistory.initialRotation}if(n&&!this.initialBookmark&&i===L){this.initialBookmark=JSON.stringify(n);this.pdfHistory.push({explicitDest:n,pageNumber:null})}}},_initializeAnnotationStorageCallbacks(e){if(e!==this.pdfDo