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.

24 lines 953 kB
window.ngxZone.runOutsideAngular(() => {
/**
 * @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
 */(()=>{"use strict";var t=[,(t,r,i)=>{i(2)("iterator")},(t,r,i)=>{var o=i(3),a=i(5),u=i(12),l=i(23).f;t.exports=function(t){var r=o.Symbol||(o.Symbol={});a(r,t)||l(r,t,{value:u.f(t)})}},(t,r,i)=>{var o=i(4);t.exports=o},function(t){var check=function(t){return t&&t.Math===Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},(t,r,i)=>{var o=i(6),a=i(9),u=o({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,r){return u(a(t),r)}},(t,r,i)=>{var o=i(7),a=Function.prototype,u=a.call,l=o&&a.bind.bind(u,u);t.exports=o?l:function(t){return function(){return u.apply(t,arguments)}}},(t,r,i)=>{var o=i(8);t.exports=!o((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},(t,r,i)=>{var o=i(10),a=Object;t.exports=function(t){return a(o(t))}},(t,r,i)=>{var o=i(11),a=TypeError;t.exports=function(t){if(o(t))throw new a("Can't call method on "+t);return t}},t=>{t.exports=function(t){return null==t}},(t,r,i)=>{var o=i(13);r.f=o},(t,r,i)=>{var o=i(4),a=i(14),u=i(5),l=i(18),c=i(19),h=i(22),d=o.Symbol,p=a("wks"),v=h?d.for||d:d&&d.withoutSetter||l;t.exports=function(t){u(p,t)||(p[t]=c&&u(d,t)?d[t]:v("Symbol."+t));return p[t]}},(t,r,i)=>{var o=i(15),a=i(16);(t.exports=function(t,r){return a[t]||(a[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.33.3",mode:o?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE",source:"https://github.com/zloirock/core-js"})},t=>{t.exports=!1},(t,r,i)=>{var o=i(4),a=i(17),u="__core-js_shared__",l=o[u]||a(u,{});t.exports=l},(t,r,i)=>{var o=i(4),a=Object.defineProperty;t.exports=function(t,r){try{a(o,t,{value:r,configurable:!0,writable:!0})}catch(i){o[t]=r}return r}},(t,r,i)=>{var o=i(6),a=0,u=Math.random(),l=o(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+l(++a+u,36)}},(t,r,i)=>{var o=i(20),a=i(8),u=i(4).String;t.exports=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol("symbol detection");return!u(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},(t,r,i)=>{var o,a,u=i(4),l=i(21),c=u.process,h=u.Deno,d=c&&c.versions||h&&h.version,p=d&&d.v8;p&&(a=(o=p.split("."))[0]>0&&o[0]<4?1:+(o[0]+o[1]));!a&&l&&(!(o=l.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=l.match(/Chrome\/(\d+)/))&&(a=+o[1]);t.exports=a},t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(t,r,i)=>{var o=i(19);t.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(t,r,i)=>{var o=i(24),a=i(25),u=i(30),l=i(31),c=i(32),h=TypeError,d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,v="enumerable",g="configurable",y="writable";r.f=o?u?function defineProperty(t,r,i){l(t);r=c(r);l(i);if("function"==typeof t&&"prototype"===r&&"value"in i&&y in i&&!i[y]){var o=p(t,r);if(o&&o[y]){t[r]=i.value;i={configurable:g in i?i[g]:o[g],enumerable:v in i?i[v]:o[v],writable:!1}}}return d(t,r,i)}:d:function defineProperty(t,r,i){l(t);r=c(r);l(i);if(a)try{return d(t,r,i)}catch(t){}if("get"in i||"set"in i)throw new h("Accessors not supported");"value"in i&&(t[r]=i.value);return t}},(t,r,i)=>{var o=i(8);t.exports=!o((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},(t,r,i)=>{var o=i(24),a=i(8),u=i(26);t.exports=!o&&!a((function(){return 7!==Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a}))},(t,r,i)=>{var o=i(4),a=i(27),u=o.document,l=a(u)&&a(u.createElement);t.exports=function(t){return l?u.createElement(t):{}}},(t,r,i)=>{var o=i(28),a=i(29),u=a.all;t.exports=a.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:o(t)||t===u}:function(t){return"object"==typeof t?null!==t:o(t)}},(t,r,i)=>{var o=i(29),a=o.all;t.exports=o.IS_HTMLDDA?function(t){return"function"==typeof t||t===a}:function(t){return"function"==typeof t}},t=>{var r="object"==typeof document&&document.all,i=void 0===r&&void 0!==r;t.exports={all:r,IS_HTMLDDA:i}},(t,r,i)=>{var o=i(24),a=i(8);t.exports=o&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(t,r,i)=>{var o=i(27),a=String,u=TypeError;t.exports=function(t){if(o(t))return t;throw new u(a(t)+" is not an object")}},(t,r,i)=>{var o=i(33),a=i(35);t.exports=function(t){var r=o(t,"string");return a(r)?r:r+""}},(t,r,i)=>{var o=i(34),a=i(27),u=i(35),l=i(38),c=i(41),h=i(13),d=TypeError,p=h("toPrimitive");t.exports=function(t,r){if(!a(t)||u(t))return t;var i,h=l(t,p);if(h){void 0===r&&(r="default");i=o(h,t,r);if(!a(i)||u(i))return i;throw new d("Can't convert object to primitive value")}void 0===r&&(r="number");return c(t,r)}},(t,r,i)=>{var o=i(7),a=Function.prototype.call;t.exports=o?a.bind(a):function(){return a.apply(a,arguments)}},(t,r,i)=>{var o=i(36),a=i(28),u=i(37),l=i(22),c=Object;t.exports=l?function(t){return"symbol"==typeof t}:function(t){var r=o("Symbol");return a(r)&&u(r.prototype,c(t))}},(t,r,i)=>{var o=i(4),a=i(28);t.exports=function(t,r){return arguments.length<2?(i=o[t],a(i)?i:void 0):o[t]&&o[t][r];var i}},(t,r,i)=>{var o=i(6);t.exports=o({}.isPrototypeOf)},(t,r,i)=>{var o=i(39),a=i(11);t.exports=function(t,r){var i=t[r];return a(i)?void 0:o(i)}},(t,r,i)=>{var o=i(28),a=i(40),u=TypeError;t.exports=function(t){if(o(t))return t;throw new u(a(t)+" is not a function")}},t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},(t,r,i)=>{var o=i(34),a=i(28),u=i(27),l=TypeError;t.exports=function(t,r){var i,c;if("string"===r&&a(i=t.toString)&&!u(c=o(i,t)))return c;if(a(i=t.valueOf)&&!u(c=o(i,t)))return c;if("string"!==r&&a(i=t.toString)&&!u(c=o(i,t)))return c;throw new l("Can't convert object to primitive value")}},(t,r,i)=>{var o=i(43),a=i(46),u=i(61),l=i(62),c=i(23).f,h=i(66),d=i(87),p=i(15),v=i(24),g="Array Iterator",y=l.set,m=l.getterFor(g);t.exports=h(Array,"Array",(function(t,r){y(this,{type:g,target:o(t),index:0,kind:r})}),(function(){var t=m(this),r=t.target,i=t.index++;if(!r||i>=r.length){t.target=void 0;return d(void 0,!0)}switch(t.kind){case"keys":return d(i,!1);case"values":return d(r[i],!1)}return d([i,r[i]],!1)}),"values");var w=u.Arguments=u.Array;a("keys");a("values");a("entries");if(!p&&v&&"values"!==w.name)try{c(w,"name",{value:"values"})}catch(t){}},(t,r,i)=>{var o=i(44),a=i(10);t.exports=function(t){return o(a(t))}},(t,r,i)=>{var o=i(6),a=i(8),u=i(45),l=Object,c=o("".split);t.exports=a((function(){return!l("z").propertyIsEnumerable(0)}))?function(t){return"String"===u(t)?c(t,""):l(t)}:l},(t,r,i)=>{var o=i(6),a=o({}.toString),u=o("".slice);t.exports=function(t){return u(a(t),8,-1)}},(t,r,i)=>{var o=i(13),a=i(47),u=i(23).f,l=o("unscopables"),c=Array.prototype;void 0===c[l]&&u(c,l,{configurable:!0,value:a(null)});t.exports=function(t){c[l][t]=!0}},(t,r,i)=>{var o,a=i(31),u=i(48),l=i(58),c=i(57),h=i(59),d=i(26),p=i(60),v="prototype",g="script",y=p("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<"+g+">"+t+"</"+g+">"},NullProtoObjectViaActiveX=function(t){t.write(scriptTag(""));t.close();var r=t.parentWindow.Object;t=null;return r},NullProtoObject=function(){try{o=new ActiveXObject("htmlfile")}catch(t){}NullProtoObject="undefined"!=typeof document?document.domain&&o?NullProtoObjectViaActiveX(o):function(){var t,r=d("iframe"),i="java"+g+":";r.style.display="none";h.appendChild(r);r.src=String(i);(t=r.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}():NullProtoObjectViaActiveX(o);for(var t=l.length;t--;)delete NullProtoObject[v][l[t]];return NullProtoObject()};c[y]=!0;t.exports=Object.create||function create(t,r){var i;if(null!==t){EmptyConstructor[v]=a(t);i=new EmptyConstructor;EmptyConstructor[v]=null;i[y]=t}else i=NullProtoObject();return void 0===r?i:u.f(i,r)}},(t,r,i)=>{var o=i(24),a=i(30),u=i(23),l=i(31),c=i(43),h=i(49);r.f=o&&!a?Object.defineProperties:function defineProperties(t,r){l(t);for(var i,o=c(r),a=h(r),d=a.length,p=0;d>p;)u.f(t,i=a[p++],o[i]);return t}},(t,r,i)=>{var o=i(50),a=i(58);t.exports=Object.keys||function keys(t){return o(t,a)}},(t,r,i)=>{var o=i(6),a=i(5),u=i(43),l=i(51).indexOf,c=i(57),h=o([].push);t.exports=function(t,r){var i,o=u(t),d=0,p=[];for(i in o)!a(c,i)&&a(o,i)&&h(p,i);for(;r.length>d;)a(o,i=r[d++])&&(~l(p,i)||h(p,i));return p}},(t,r,i)=>{var o=i(43),a=i(52),u=i(55),createMethod=function(t){return function(r,i,l){var c,h=o(r),d=u(h),p=a(l,d);if(t&&i!=i){for(;d>p;)if((c=h[p++])!=c)return!0}else for(;d>p;p++)if((t||p in h)&&h[p]===i)return t||p||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},(t,r,i)=>{var o=i(53),a=Math.max,u=Math.min;t.exports=function(t,r){var i=o(t);return i<0?a(i+r,0):u(i,r)}},(t,r,i)=>{var o=i(54);t.exports=function(t){var r=+t;return r!=r||0===r?0:o(r)}},t=>{var r=Math.ceil,i=Math.floor;t.exports=Math.trunc||function trunc(t){var o=+t;return(o>0?i:r)(o)}},(t,r,i)=>{var o=i(56);t.exports=function(t){return o(t.length)}},(t,r,i)=>{var o=i(53),a=Math.min;t.exports=function(t){return t>0?a(o(t),9007199254740991):0}},t=>{t.exports={}},t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(t,r,i)=>{var o=i(36);t.exports=o("document","documentElement")},(t,r,i)=>{var o=i(14),a=i(18),u=o("keys");t.exports=function(t){return u[t]||(u[t]=a(t))}},t=>{t.exports={}},(t,r,i)=>{var o,a,u,l=i(63),c=i(4),h=i(27),d=i(64),p=i(5),v=i(16),g=i(60),y=i(57),m="Object already initialized",w=c.TypeError,b=c.WeakMap;if(l||v.state){var D=v.state||(v.state=new b);D.get=D.get;D.has=D.has;D.set=D.set;o=function(t,r){if(D.has(t))throw new w(m);r.facade=t;D.set(t,r);return r};a=function(t){return D.get(t)||{}};u=function(t){return D.has(t)}}else{var P=g("state");y[P]=!0;o=function(t,r){if(p(t,P))throw new w(m);r.facade=t;d(t,P,r);return r};a=function(t){return p(t,P)?t[P]:{}};u=function(t){return p(t,P)}}t.exports={set:o,get:a,has:u,enforce:function(t){return u(t)?a(t):o(t,{})},getterFor:function(t){return function(r){var i;if(!h(r)||(i=a(r)).type!==t)throw new w("Incompatible receiver, "+t+" required");return i}}}},(t,r,i)=>{var o=i(4),a=i(28),u=o.WeakMap;t.exports=a(u)&&/native code/.test(String(u))},(t,r,i)=>{var o=i(24),a=i(23),u=i(65);t.exports=o?function(t,r,i){return a.f(t,r,u(1,i))}:function(t,r,i){t[r]=i;return t}},t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},(t,r,i)=>{var o=i(67),a=i(34),u=i(15),l=i(72),c=i(28),h=i(79),d=i(81),p=i(84),v=i(83),g=i(64),y=i(70),m=i(13),w=i(61),b=i(80),D=l.PROPER,P=l.CONFIGURABLE,E=b.IteratorPrototype,A=b.BUGGY_SAFARI_ITERATORS,S=m("iterator"),x="keys",C="values",k="entries",returnThis=function(){return this};t.exports=function(t,r,i,l,m,b,T){h(i,r,l);var I,L,O,getIterationMethod=function(t){if(t===m&&N)return N;if(!A&&t&&t in G)return G[t];switch(t){case x:return function keys(){return new i(this,t)};case C:return function values(){return new i(this,t)};case k:return function entries(){return new i(this,t)}}return function(){return new i(this)}},M=r+" Iterator",B=!1,G=t.prototype,R=G[S]||G["@@iterator"]||m&&G[m],N=!A&&R||getIterationMethod(m),j="Array"===r&&G.entries||R;if(j&&(I=d(j.call(new t)))!==Object.prototype&&I.next){u||d(I)===E||(p?p(I,E):c(I[S])||y(I,S,returnThis));v(I,M,!0,!0);u&&(w[M]=returnThis)}if(D&&m===C&&R&&R.name!==C)if(!u&&P)g(G,"name",C);else{B=!0;N=function values(){return a(R,this)}}if(m){L={values:getIterationMethod(C),keys:b?N:getIterationMethod(x),entries:getIterationMethod(k)};if(T)for(O in L)(A||B||!(O in G))&&y(G,O,L[O]);else o({target:r,proto:!0,forced:A||B},L)}u&&!T||G[S]===N||y(G,S,N,{name:m});w[r]=N;return L}},(t,r,i)=>{var o=i(4),a=i(68).f,u=i(64),l=i(70),c=i(17),h=i(74),d=i(78);t.exports=function(t,r){var i,p,v,g,y,m=t.target,w=t.global,b=t.stat;if(i=w?o:b?o[m]||c(m,{}):(o[m]||{}).prototype)for(p in r){g=r[p];v=t.dontCallGetSet?(y=a(i,p))&&y.value:i[p];if(!d(w?p:m+(b?".":"#")+p,t.forced)&&void 0!==v){if(typeof g==typeof v)continue;h(g,v)}(t.sham||v&&v.sham)&&u(g,"sham",!0);l(i,p,g,t)}}},(t,r,i)=>{var o=i(24),a=i(34),u=i(69),l=i(65),c=i(43),h=i(32),d=i(5),p=i(25),v=Object.getOwnPropertyDescriptor;r.f=o?v:function getOwnPropertyDescriptor(t,r){t=c(t);r=h(r);if(p)try{return v(t,r)}catch(t){}if(d(t,r))return l(!a(u.f,t,r),t[r])}},(t,r)=>{var i={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!i.call({1:2},1);r.f=a?function propertyIsEnumerable(t){var r=o(this,t);return!!r&&r.enumerable}:i},(t,r,i)=>{var o=i(28),a=i(23),u=i(71),l=i(17);t.exports=function(t,r,i,c){c||(c={});var h=c.enumerable,d=void 0!==c.name?c.name:r;o(i)&&u(i,d,c);if(c.global)h?t[r]=i:l(r,i);else{try{c.unsafe?t[r]&&(h=!0):delete t[r]}catch(t){}h?t[r]=i:a.f(t,r,{value:i,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return t}},(t,r,i)=>{var o=i(6),a=i(8),u=i(28),l=i(5),c=i(24),h=i(72).CONFIGURABLE,d=i(73),p=i(62),v=p.enforce,g=p.get,y=String,m=Object.defineProperty,w=o("".slice),b=o("".replace),D=o([].join),P=c&&!a((function(){return 8!==m((function(){}),"length",{value:8}).length})),E=String(String).split("String"),A=t.exports=function(t,r,i){"Symbol("===w(y(r),0,7)&&(r="["+b(y(r),/^Symbol\(([^)]*)\)/,"$1")+"]");i&&i.getter&&(r="get "+r);i&&i.setter&&(r="set "+r);(!l(t,"name")||h&&t.name!==r)&&(c?m(t,"name",{value:r,configurable:!0}):t.name=r);P&&i&&l(i,"arity")&&t.length!==i.arity&&m(t,"length",{value:i.arity});try{i&&l(i,"constructor")&&i.constructor?c&&m(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var o=v(t);l(o,"source")||(o.source=D(E,"string"==typeof r?r:""));return t};Function.prototype.toString=A((function toString(){return u(this)&&g(this).source||d(this)}),"toString")},(t,r,i)=>{var o=i(24),a=i(5),u=Function.prototype,l=o&&Object.getOwnPropertyDescriptor,c=a(u,"name"),h=c&&"something"===function something(){}.name,d=c&&(!o||o&&l(u,"name").configurable);t.exports={EXISTS:c,PROPER:h,CONFIGURABLE:d}},(t,r,i)=>{var o=i(6),a=i(28),u=i(16),l=o(Function.toString);a(u.inspectSource)||(u.inspectSource=function(t){return l(t)});t.exports=u.inspectSource},(t,r,i)=>{var o=i(5),a=i(75),u=i(68),l=i(23);t.exports=function(t,r,i){for(var c=a(r),h=l.f,d=u.f,p=0;p<c.length;p++){var v=c[p];o(t,v)||i&&o(i,v)||h(t,v,d(r,v))}}},(t,r,i)=>{var o=i(36),a=i(6),u=i(76),l=i(77),c=i(31),h=a([].concat);t.exports=o("Reflect","ownKeys")||function ownKeys(t){var r=u.f(c(t)),i=l.f;return i?h(r,i(t)):r}},(t,r,i)=>{var o=i(50),a=i(58).concat("length","prototype");r.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return o(t,a)}},(t,r)=>{r.f=Object.getOwnPropertySymbols},(t,r,i)=>{var o=i(8),a=i(28),u=/#|\.prototype\./,isForced=function(t,r){var i=c[l(t)];return i===d||i!==h&&(a(r)?o(r):!!r)},l=isForced.normalize=function(t){return String(t).replace(u,".").toLowerCase()},c=isForced.data={},h=isForced.NATIVE="N",d=isForced.POLYFILL="P";t.exports=isForced},(t,r,i)=>{var o=i(80).IteratorPrototype,a=i(47),u=i(65),l=i(83),c=i(61),returnThis=function(){return this};t.exports=function(t,r,i,h){var d=r+" Iterator";t.prototype=a(o,{next:u(+!h,i)});l(t,d,!1,!0);c[d]=returnThis;return t}},(t,r,i)=>{var o,a,u,l=i(8),c=i(28),h=i(27),d=i(47),p=i(81),v=i(70),g=i(13),y=i(15),m=g("iterator"),w=!1;[].keys&&("next"in(u=[].keys())?(a=p(p(u)))!==Object.prototype&&(o=a):w=!0);!h(o)||l((function(){var t={};return o[m].call(t)!==t}))?o={}:y&&(o=d(o));c(o[m])||v(o,m,(function(){return this}));t.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:w}},(t,r,i)=>{var o=i(5),a=i(28),u=i(9),l=i(60),c=i(82),h=l("IE_PROTO"),d=Object,p=d.prototype;t.exports=c?d.getPrototypeOf:function(t){var r=u(t);if(o(r,h))return r[h];var i=r.constructor;return a(i)&&r instanceof i?i.prototype:r instanceof d?p:null}},(t,r,i)=>{var o=i(8);t.exports=!o((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},(t,r,i)=>{var o=i(23).f,a=i(5),u=i(13)("toStringTag");t.exports=function(t,r,i){t&&!i&&(t=t.prototype);t&&!a(t,u)&&o(t,u,{configurable:!0,value:r})}},(t,r,i)=>{var o=i(85),a=i(31),u=i(86);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=o(Object.prototype,"__proto__","set"))(i,[]);r=i instanceof Array}catch(t){}return function setPrototypeOf(i,o){a(i);u(o);r?t(i,o):i.__proto__=o;return i}}():void 0)},(t,r,i)=>{var o=i(6),a=i(39);t.exports=function(t,r,i){try{return o(a(Object.getOwnPropertyDescriptor(t,r)[i]))}catch(t){}}},(t,r,i)=>{var o=i(28),a=String,u=TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw new u("Can't set "+a(t)+" as a prototype")}},t=>{t.exports=function(t,r){return{value:t,done:r}}},(t,r,i)=>{var o=i(89),a=i(70),u=i(90);o||a(Object.prototype,"toString",u,{unsafe:!0})},(t,r,i)=>{var o={};o[i(13)("toStringTag")]="z";t.exports="[object z]"===String(o)},(t,r,i)=>{var o=i(89),a=i(91);t.exports=o?{}.toString:function toString(){return"[object "+a(this)+"]"}},(t,r,i)=>{var o=i(89),a=i(28),u=i(45),l=i(13)("toStringTag"),c=Object,h="Arguments"===u(function(){return arguments}());t.exports=o?u:function(t){var r,i,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=c(t),l))?i:h?u(r):"Object"===(o=u(r))&&a(r.callee)?"Arguments":o}},(t,r,i)=>{var o=i(93).charAt,a=i(94),u=i(62),l=i(66),c=i(87),h="String Iterator",d=u.set,p=u.getterFor(h);l(String,"String",(function(t){d(this,{type:h,string:a(t),index:0})}),(function next(){var t,r=p(this),i=r.string,a=r.index;if(a>=i.length)return c(void 0,!0);t=o(i,a);r.index+=t.length;return c(t,!1)}))},(t,r,i)=>{var o=i(6),a=i(53),u=i(94),l=i(10),c=o("".charAt),h=o("".charCodeAt),d=o("".slice),createMethod=function(t){return function(r,i){var o,p,v=u(l(r)),g=a(i),y=v.length;return g<0||g>=y?t?"":void 0:(o=h(v,g))<55296||o>56319||g+1===y||(p=h(v,g+1))<56320||p>57343?t?c(v,g):o:t?d(v,g,g+2):p-56320+(o-55296<<10)+65536}};t.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},(t,r,i)=>{var o=i(91),a=String;t.exports=function(t){if("Symbol"===o(t))throw new TypeError("Cannot convert a Symbol value to a string");return a(t)}},(t,r,i)=>{var o=i(4),a=i(96),u=i(97),l=i(42),c=i(64),h=i(13),d=h("iterator"),p=h("toStringTag"),v=l.values,handlePrototype=function(t,r){if(t){if(t[d]!==v)try{c(t,d,v)}catch(r){t[d]=v}t[p]||c(t,p,r);if(a[r])for(var i in l)if(t[i]!==l[i])try{c(t,i,l[i])}catch(r){t[i]=l[i]}}};for(var g in a)handlePrototype(o[g]&&o[g].prototype,g);handlePrototype(u,"DOMTokenList")},t=>{t.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}},(t,r,i)=>{var o=i(26)("span").classList,a=o&&o.constructor&&o.constructor.prototype;t.exports=a===Object.prototype?void 0:a},(t,r,i)=>{i(99);i(112);i(114);i(115);i(119)},(t,r,i)=>{var o=i(67),a=i(4),u=i(34),l=i(6),c=i(15),h=i(24),d=i(19),p=i(8),v=i(5),g=i(37),y=i(31),m=i(43),w=i(32),b=i(94),D=i(65),P=i(47),E=i(49),A=i(76),S=i(100),x=i(77),C=i(68),k=i(23),T=i(48),I=i(69),L=i(70),O=i(103),M=i(14),B=i(60),G=i(57),R=i(18),N=i(13),j=i(12),V=i(2),W=i(104),H=i(83),U=i(62),z=i(105).forEach,K=B("hidden"),Y="Symbol",$="prototype",q=U.set,X=U.getterFor(Y),Z=Object[$],Q=a.Symbol,J=Q&&Q[$],ee=a.RangeError,te=a.TypeError,re=a.QObject,ne=C.f,ie=k.f,oe=S.f,ae=I.f,se=l([].push),ue=M("symbols"),le=M("op-symbols"),ce=M("wks"),he=!re||!re[$]||!re[$].findChild,fallbackDefineProperty=function(t,r,i){var o=ne(Z,r);o&&delete Z[r];ie(t,r,i);o&&t!==Z&&ie(Z,r,o)},fe=h&&p((function(){return 7!==P(ie({},"a",{get:function(){return ie(this,"a",{value:7}).a}})).a}))?fallbackDefineProperty:ie,wrap=function(t,r){var i=ue[t]=P(J);q(i,{type:Y,tag:t,description:r});h||(i.description=r);return i},de=function defineProperty(t,r,i){t===Z&&de(le,r,i);y(t);var o=w(r);y(i);if(v(ue,o)){if(i.enumerable){v(t,K)&&t[K][o]&&(t[K][o]=!1);i=P(i,{enumerable:D(0,!1)})}else{v(t,K)||ie(t,K,D(1,{}));t[K][o]=!0}return fe(t,o,i)}return ie(t,o,i)},pe=function defineProperties(t,r){y(t);var i=m(r),o=E(i).concat($getOwnPropertySymbols(i));z(o,(function(r){h&&!u(ve,i,r)||de(t,r,i[r])}));return t},ve=function propertyIsEnumerable(t){var r=w(t),i=u(ae,this,r);return!(this===Z&&v(ue,r)&&!v(le,r))&&(!(i||!v(this,r)||!v(ue,r)||v(this,K)&&this[K][r])||i)},ge=function getOwnPropertyDescriptor(t,r){var i=m(t),o=w(r);if(i!==Z||!v(ue,o)||v(le,o)){var a=ne(i,o);!a||!v(ue,o)||v(i,K)&&i[K][o]||(a.enumerable=!0);return a}},ye=function getOwnPropertyNames(t){var r=oe(m(t)),i=[];z(r,(function(t){v(ue,t)||v(G,t)||se(i,t)}));return i},$getOwnPropertySymbols=function(t){var r=t===Z,i=oe(r?le:m(t)),o=[];z(i,(function(t){!v(ue,t)||r&&!v(Z,t)||se(o,ue[t])}));return o};if(!d){L(J=(Q=function Symbol(){if(g(J,this))throw new te("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?b(arguments[0]):void 0,r=R(t),setter=function(t){var i=void 0===this?a:this;i===Z&&u(setter,le,t);v(i,K)&&v(i[K],r)&&(i[K][r]=!1);var o=D(1,t);try{fe(i,r,o)}catch(t){if(!(t instanceof ee))throw t;fallbackDefineProperty(i,r,o)}};h&&he&&fe(Z,r,{configurable:!0,set:setter});return wrap(r,t)})[$],"toString",(function toString(){return X(this).tag}));L(Q,"withoutSetter",(function(t){return wrap(R(t),t)}));I.f=ve;k.f=de;T.f=pe;C.f=ge;A.f=S.f=ye;x.f=$getOwnPropertySymbols;j.f=function(t){return wrap(N(t),t)};if(h){O(J,"description",{configurable:!0,get:function description(){return X(this).description}});c||L(Z,"propertyIsEnumerable",ve,{unsafe:!0})}}o({global:!0,constructor:!0,wrap:!0,forced:!d,sham:!d},{Symbol:Q});z(E(ce),(function(t){V(t)}));o({target:Y,stat:!0,forced:!d},{useSetter:function(){he=!0},useSimple:function(){he=!1}});o({target:"Object",stat:!0,forced:!d,sham:!h},{create:function create(t,r){return void 0===r?P(t):pe(P(t),r)},defineProperty:de,defineProperties:pe,getOwnPropertyDescriptor:ge});o({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:ye});W();H(Q,Y);G[K]=!0},(t,r,i)=>{var o=i(45),a=i(43),u=i(76).f,l=i(101),c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function getOwnPropertyNames(t){return c&&"Window"===o(t)?function(t){try{return u(t)}catch(t){return l(c)}}(t):u(a(t))}},(t,r,i)=>{var o=i(52),a=i(55),u=i(102),l=Array,c=Math.max;t.exports=function(t,r,i){for(var h=a(t),d=o(r,h),p=o(void 0===i?h:i,h),v=l(c(p-d,0)),g=0;d<p;d++,g++)u(v,g,t[d]);v.length=g;return v}},(t,r,i)=>{var o=i(32),a=i(23),u=i(65);t.exports=function(t,r,i){var l=o(r);l in t?a.f(t,l,u(0,i)):t[l]=i}},(t,r,i)=>{var o=i(71),a=i(23);t.exports=function(t,r,i){i.get&&o(i.get,r,{getter:!0});i.set&&o(i.set,r,{setter:!0});return a.f(t,r,i)}},(t,r,i)=>{var o=i(34),a=i(36),u=i(13),l=i(70);t.exports=function(){var t=a("Symbol"),r=t&&t.prototype,i=r&&r.valueOf,c=u("toPrimitive");r&&!r[c]&&l(r,c,(function(t){return o(i,this)}),{arity:1})}},(t,r,i)=>{var o=i(106),a=i(6),u=i(44),l=i(9),c=i(55),h=i(108),d=a([].push),createMethod=function(t){var r=1===t,i=2===t,a=3===t,p=4===t,v=6===t,g=7===t,y=5===t||v;return function(m,w,b,D){for(var P,E,A=l(m),S=u(A),x=o(w,b),C=c(S),k=0,T=D||h,I=r?T(m,C):i||g?T(m,0):void 0;C>k;k++)if(y||k in S){E=x(P=S[k],k,A);if(t)if(r)I[k]=E;else if(E)switch(t){case 3:return!0;case 5:return P;case 6:return k;case 2:d(I,P)}else switch(t){case 4:return!1;case 7:d(I,P)}}return v?-1:a||p?p:I}};t.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6),filterReject:createMethod(7)}},(t,r,i)=>{var o=i(107),a=i(39),u=i(7),l=o(o.bind);t.exports=function(t,r){a(t);return void 0===r?t:u?l(t,r):function(){return t.apply(r,arguments)}}},(t,r,i)=>{var o=i(45),a=i(6);t.exports=function(t){if("Function"===o(t))return a(t)}},(t,r,i)=>{var o=i(109);t.exports=function(t,r){return new(o(t))(0===r?0:r)}},(t,r,i)=>{var o=i(110),a=i(111),u=i(27),l=i(13)("species"),c=Array;t.exports=function(t){var r;if(o(t)){r=t.constructor;(a(r)&&(r===c||o(r.prototype))||u(r)&&null===(r=r[l]))&&(r=void 0)}return void 0===r?c:r}},(t,r,i)=>{var o=i(45);t.exports=Array.isArray||function isArray(t){return"Array"===o(t)}},(t,r,i)=>{var o=i(6),a=i(8),u=i(28),l=i(91),c=i(36),h=i(73),noop=function(){},d=[],p=c("Reflect","construct"),v=/^\s*(?:class|function)\b/,g=o(v.exec),y=!v.test(noop),m=function isConstructor(t){if(!u(t))return!1;try{p(noop,d,t);return!0}catch(t){return!1}},w=function isConstructor(t){if(!u(t))return!1;switch(l(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return y||!!g(v,h(t))}catch(t){return!0}};w.sham=!0;t.exports=!p||a((function(){var t;return m(m.call)||!m(Object)||!m((function(){t=!0}))||t}))?w:m},(t,r,i)=>{var o=i(67),a=i(36),u=i(5),l=i(94),c=i(14),h=i(113),d=c("string-to-symbol-registry"),p=c("symbol-to-string-registry");o({target:"Symbol",stat:!0,forced:!h},{for:function(t){var r=l(t);if(u(d,r))return d[r];var i=a("Symbol")(r);d[r]=i;p[i]=r;return i}})},(t,r,i)=>{var o=i(19);t.exports=o&&!!Symbol.for&&!!Symbol.keyFor},(t,r,i)=>{var o=i(67),a=i(5),u=i(35),l=i(40),c=i(14),h=i(113),d=c("symbol-to-string-registry");o({target:"Symbol",stat:!0,forced:!h},{keyFor:function keyFor(t){if(!u(t))throw new TypeError(l(t)+" is not a symbol");if(a(d,t))return d[t]}})},(t,r,i)=>{var o=i(67),a=i(36),u=i(116),l=i(34),c=i(6),h=i(8),d=i(28),p=i(35),v=i(117),g=i(118),y=i(19),m=String,w=a("JSON","stringify"),b=c(/./.exec),D=c("".charAt),P=c("".charCodeAt),E=c("".replace),A=c(1..toString),S=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,C=/^[\uDC00-\uDFFF]$/,k=!y||h((function(){var t=a("Symbol")("stringify detection");return"[null]"!==w([t])||"{}"!==w({a:t})||"{}"!==w(Object(t))})),T=h((function(){return'"\\udf06\\ud834"'!==w("\udf06\ud834")||'"\\udead"'!==w("\udead")})),stringifyWithSymbolsFix=function(t,r){var i=v(arguments),o=g(r);if(d(o)||void 0!==t&&!p(t)){i[1]=function(t,r){d(o)&&(r=l(o,this,m(t),r));if(!p(r))return r};return u(w,null,i)}},fixIllFormed=function(t,r,i){var o=D(i,r-1),a=D(i,r+1);return b(x,t)&&!b(C,a)||b(C,t)&&!b(x,o)?"\\u"+A(P(t,0),16):t};w&&o({target:"JSON",stat:!0,arity:3,forced:k||T},{stringify:function stringify(t,r,i){var o=v(arguments),a=u(k?stringifyWithSymbolsFix:w,null,o);return T&&"string"==typeof a?E(a,S,fixIllFormed):a}})},(t,r,i)=>{var o=i(7),a=Function.prototype,u=a.apply,l=a.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?l.bind(u):function(){return l.apply(u,arguments)})},(t,r,i)=>{var o=i(6);t.exports=o([].slice)},(t,r,i)=>{var o=i(6),a=i(110),u=i(28),l=i(45),c=i(94),h=o([].push);t.exports=function(t){if(u(t))return t;if(a(t)){for(var r=t.length,i=[],o=0;o<r;o++){var d=t[o];"string"==typeof d?h(i,d):"number"!=typeof d&&"Number"!==l(d)&&"String"!==l(d)||h(i,c(d))}var p=i.length,v=!0;return function(t,r){if(v){v=!1;return r}if(a(this))return r;for(var o=0;o<p;o++)if(i[o]===t)return r}}}},(t,r,i)=>{var o=i(67),a=i(19),u=i(8),l=i(77),c=i(9);o({target:"Object",stat:!0,forced:!a||u((function(){l.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){var r=l.f;return r?r(c(t)):[]}})},(t,r,i)=>{var o=i(67),a=i(24),u=i(4),l=i(6),c=i(5),h=i(28),d=i(37),p=i(94),v=i(103),g=i(74),y=u.Symbol,m=y&&y.prototype;if(a&&h(y)&&(!("description"in m)||void 0!==y().description)){var w={},b=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:p(arguments[0]),r=d(m,this)?new y(t):void 0===t?y():y(t);""===t&&(w[r]=!0);return r};g(b,y);b.prototype=m;m.constructor=b;var D="Symbol(description detection)"===String(y("description detection")),P=l(m.valueOf),E=l(m.toString),A=/^Symbol\((.*)\)[^)]+$/,S=l("".replace),x=l("".slice);v(m,"description",{configurable:!0,get:function description(){var t=P(this);if(c(w,t))return"";var r=E(t),i=D?x(r,7,-1):S(r,A,"$1");return""===i?void 0:i}});o({global:!0,constructor:!0,forced:!0},{Symbol:b})}},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(88);i(122);i(123);i(126);i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(42);i(92);i(95);i(175);i(176);i(177);i(178);i(179);i(182);i(183);i(185);i(188);Object.defineProperty(r,"__esModule",{value:!0});r.GenericCom=void 0;i(115);i(190);i(191);i(193);var o=i(194),a=i(423),u=i(424),l=i(425),c=i(429);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}r.GenericCom={};var h=function(t){_inherits(GenericPreferences,t);var r,i,o=_createSuper(GenericPreferences);function GenericPreferences(){_classCallCheck(this,GenericPreferences);return o.apply(this,arguments)}_createClass(GenericPreferences,[{key:"_writeToStorage",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){return _regeneratorRuntime().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:try{localStorage.setItem("pdfjs.preferences",JSON.stringify(t))}catch(t){}case 1:case"end":return r.stop()}}),_callee)}))),function _writeToStorage(t){return i.apply(this,arguments)})},{key:"_readFromStorage",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0;return t.abrupt("return",JSON.parse(localStorage.getItem("pdfjs.preferences")));case 4:t.prev=4;t.t0=t.catch(0);return t.abrupt("return",{});case 7:case"end":return t.stop()}}),_callee2,null,[[0,4]])}))),function _readFromStorage(t){return r.apply(this,arguments)})}]);return GenericPreferences}(a.BasePreferences),d=function(t){_inherits(GenericExternalServices,t);var r=_createSuper(GenericExternalServices);function GenericExternalServices(){_classCallCheck(this,GenericExternalServices);return r.apply(this,arguments)}_createClass(GenericExternalServices,null,[{key:"createDownloadManager",value:function createDownloadManager(){return new u.DownloadManager}},{key:"createPreferences",value:function createPreferences(){return new h}},{key:"createL10n",value:function createL10n(t){var r=t.locale,i=void 0===r?"en-US":r;return new l.GenericL10n(i)}},{key:"createScripting",value:function createScripting(t){var r=t.sandboxBundleSrc;return new c.GenericScripting(r)}}]);return GenericExternalServices}(o.DefaultExternalServices);o.PDFViewerApplication.externalServices=d},(t,r,i)=>{var o=i(67),a=i(4),u=i(83);o({global:!0},{Reflect:{}});u(a.Reflect,"Reflect",!0)},(t,r,i)=>{var o=i(67),a=i(36),u=i(116),l=i(124),c=i(125),h=i(31),d=i(27),p=i(47),v=i(8),g=a("Reflect","construct"),y=Object.prototype,m=[].push,w=v((function(){function F(){}return!(g((function(){}),[],F)instanceof F)})),b=!v((function(){g((function(){}))})),D=w||b;o({target:"Reflect",stat:!0,forced:D,sham:D},{construct:function construct(t,r){c(t);h(r);var i=arguments.length<3?t:c(arguments[2]);if(b&&!w)return g(t,r,i);if(t===i){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var o=[null];u(m,o,r);return new(u(l,t,o))}var a=i.prototype,v=p(d(a)?a:y),D=u(t,v,r);return d(D)?D:v}})},(t,r,i)=>{var o=i(6),a=i(39),u=i(27),l=i(5),c=i(117),h=i(7),d=Function,p=o([].concat),v=o([].join),g={};t.exports=h?d.bind:function bind(t){var r=a(this),i=r.prototype,o=c(arguments,1),h=function bound(){var i=p(o,c(arguments));return this instanceof h?function(t,r,i){if(!l(g,r)){for(var o=[],a=0;a<r;a++)o[a]="a["+a+"]";g[r]=d("C,a","return new C("+v(o,",")+")")}return g[r](t,i)}(r,i.length,i):r.apply(t,i)};u(i)&&(h.prototype=i);return h}},(t,r,i)=>{var o=i(111),a=i(40),u=TypeError;t.exports=function(t){if(o(t))return t;throw new u(a(t)+" is not a constructor")}},(t,r,i)=>{var o=i(67),a=i(4),u=i(116),l=i(127),c="WebAssembly",h=a[c],d=7!==new Error("e",{cause:7}).cause,exportGlobalErrorCauseWrapper=function(t,r){var i={};i[t]=l(t,r,d);o({global:!0,constructor:!0,arity:1,forced:d},i)},exportWebAssemblyErrorCauseWrapper=function(t,r){if(h&&h[t]){var i={};i[t]=l(c+"."+t,r,d);o({target:c,stat:!0,constructor:!0,arity:1,forced:d},i)}};exportGlobalErrorCauseWrapper("Error",(function(t){return function Error(r){return u(t,this,arguments)}}));exportGlobalErrorCauseWrapper("EvalError",(function(t){return function EvalError(r){return u(t,this,arguments)}}));exportGlobalErrorCauseWrapper("RangeError",(function(t){return function RangeError(r){return u(t,this,arguments)}}));exportGlobalErrorCauseWrapper("ReferenceError",(function(t){return function ReferenceError(r){return u(t,this,arguments)}}));exportGlobalErrorCauseWrapper("SyntaxError",(function(t){return function SyntaxError(r){return u(t,this,arguments)}}));exportGlobalErrorCauseWrapper("TypeError",(function(t){return function TypeError(r){return u(t,this,arguments)}}));exportGlobalErrorCauseWrapper("URIError",(function(t){return function URIError(r){return u(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("CompileError",(function(t){return function CompileError(r){return u(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("LinkError",(function(t){return function LinkError(r){return u(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("RuntimeError",(function(t){return function RuntimeError(r){return u(t,this,arguments)}}))},(t,r,i)=>{var o=i(36),a=i(5),u=i(64),l=i(37),c=i(84),h=i(74),d=i(128),p=i(129),v=i(130),g=i(131),y=i(132),m=i(24),w=i(15);t.exports=function(t,r,i,b){var D="stackTraceLimit",P=b?2:1,E=t.split("."),A=E[E.length-1],S=o.apply(null,E);if(S){var x=S.prototype;!w&&a(x,"cause")&&delete x.cause;if(!i)return S;var C=o("Error"),k=r((function(t,r){var i=v(b?r:t,void 0),o=b?new S(t):new S;void 0!==i&&u(o,"message",i);y(o,k,o.stack,2);this&&l(x,this)&&p(o,this,k);arguments.length>P&&g(o,arguments[P]);return o}));k.prototype=x;if("Error"!==A)c?c(k,C):h(k,C,{name:!0});else if(m&&D in S){d(k,S,D);d(k,S,"prepareStackTrace")}h(k,S);if(!w)try{x.name!==A&&u(x,"name",A);x.constructor=k}catch(t){}return k}}},(t,r,i)=>{var o=i(23).f;t.exports=function(t,r,i){i in t||o(t,i,{configurable:!0,get:function(){return r[i]},set:function(t){r[i]=t}})}},(t,r,i)=>{var o=i(28),a=i(27),u=i(84);t.exports=function(t,r,i){var l,c;u&&o(l=r.constructor)&&l!==i&&a(c=l.prototype)&&c!==i.prototype&&u(t,c);return t}},(t,r,i)=>{var o=i(94);t.exports=function(t,r){return void 0===t?arguments.length<2?"":r:o(t)}},(t,r,i)=>{var o=i(27),a=i(64);t.exports=function(t,r){o(r)&&"cause"in r&&a(t,"cause",r.cause)}},(t,r,i)=>{var o=i(64),a=i(133),u=i(134),l=Error.captureStackTrace;t.exports=function(t,r,i,c){u&&(l?l(t,r):o(t,"stack",a(i,c)))}},(t,r,i)=>{var o=i(6),a=Error,u=o("".replace),l=String(new a("zxcasd").stack),c=/\n\s*at [^:]*:[^\n]*/,h=c.test(l);t.exports=function(t,r){if(h&&"string"==typeof t&&!a.prepareStackTrace)for(;r--;)t=u(t,c,"");return t}},(t,r,i)=>{var o=i(8),a=i(65);t.exports=!o((function(){var t=new Error("a");if(!("stack"in t))return!0;Object.defineProperty(t,"stack",a(1,7));return 7!==t.stack}))},(t,r,i)=>{var o=i(2),a=i(104);o("toPrimitive");a()},(t,r,i)=>{var o=i(5),a=i(70),u=i(137),l=i(13)("toPrimitive"),c=Date.prototype;o(c,l)||a(c,l,u)},(t,r,i)=>{var o=i(31),a=i(41),u=TypeError;t.exports=function(t){o(this);if("string"===t||"default"===t)t="string";else if("number"!==t)throw new u("Incorrect hint");return a(this,t)}},(t,r,i)=>{var o=i(67),a=i(15),u=i(24),l=i(4),c=i(3),h=i(6),d=i(78),p=i(5),v=i(129),g=i(37),y=i(35),m=i(33),w=i(8),b=i(76).f,D=i(68).f,P=i(23).f,E=i(139),A=i(140).trim,S="Number",x=l[S],C=c[S],k=x.prototype,T=l.TypeError,I=h("".slice),L=h("".charCodeAt),toNumber=function(t){var r,i,o,a,u,l,c,h,d=m(t,"number");if(y(d))throw new T("Cannot convert a Symbol value to a number");if("string"==typeof d&&d.length>2){d=A(d);if(43===(r=L(d,0))||45===r){if(88===(i=L(d,2))||120===i)return NaN}else if(48===r){switch(L(d,1)){case 66:case 98:o=2;a=49;break;case 79:case 111:o=8;a=55;break;default:return+d}l=(u=I(d,2)).length;for(c=0;c<l;c++)if((h=L(u,c))<48||h>a)return NaN;return parseInt(u,o)}}return+d},O=d(S,!x(" 0o1")||!x("0b1")||x("+0x1")),M=function Number(t){var r,i=arguments.length<1?0:x(function(t){var r=m(t,"number");return"bigint"==typeof r?r:toNumber(r)}(t));return g(k,r=this)&&w((function(){E(r)}))?v(Object(i),this,M):i};M.prototype=k;O&&!a&&(k.constructor=M);o({global:!0,constructor:!0,wrap:!0,forced:O},{Number:M});var copyConstructorProperties=function(t,r){for(var i,o=u?b(r):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),a=0;o.length>a;a++)p(r,i=o[a])&&!p(t,i)&&P(t,i,D(r,i))};a&&C&&copyConstructorProperties(c[S],C);(O||a)&&copyConstructorProperties(c[S],x)},(t,r,i)=>{var o=i(6);t.exports=o(1..valueOf)},(t,r,i)=>{var o=i(6),a=i(10),u=i(94),l=i(141),c=o("".replace),h=RegExp("^["+l+"]+"),d=RegExp("(^|[^"+l+"])["+l+"]+$"),createMethod=function(t){return function(r){var i=u(a(r));1&t&&(i=c(i,h,""));2&t&&(i=c(i,d,"$1"));return i}};t.exports={start:createMethod(1),end:createMethod(2),trim:createMethod(3)}},t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},(t,r,i)=>{i(143);i(162);i(170);i(171);i(172);i(173)},(t,r,i)=>{var o,a,u,l=i(67),c=i(15),h=i(144),d=i(4),p=i(34),v=i(70),g=i(84),y=i(83),m=i(145),w=i(39),b=i(28),D=i(27),P=i(146),E=i(147),A=i(148).set,S=i(151),x=i(155),C=i(156),k=i(152),T=i(62),I=i(157),L=i(158),O=i(161),M="Promise",B=L.CONSTRUCTOR,G=L.REJECTION_EVENT,R=L.SUBCLASSING,N=T.getterFor(M),j=T.set,V=I&&I.prototype,W=I,H=V,U=d.TypeError,z=d.document,K=d.process,Y=O.f,$=Y,q=!!(z&&z.createEvent&&d.dispatchEvent),X="unhandledrejection",isThenable=function(t){var r;return!(!D(t)||!b(r=t.then))&&r},callReaction=function(t,r){var i,o,a,u=r.value,l=1===r.state,c=l?t.ok:t.fail,h=t.resolve,d=t.reject,v=t.domain;try{if(c){if(!l){2===r.rejection&&onHandleUnhandled(r);r.rejection=1}if(!0===c)i=u;else{v&&v.enter();i=c(u);if(v){v.exit();a=!0}}i===t.promise?d(new U("Promise-chain cycle")):(o=isThenable(i))?p(o,i,h,d):h(i)}else d(u)}catch(t){v&&!a&&v.exit();d(t)}},notify=function(t,r){if(!t.notified){t.notified=!0;S((function(){for(var i,o=t.reactions;i=o.get();)callReaction(i,t);t.notified=!1;r&&!t.rejection&&onUnhandled(t)}))}},dispatchEvent=function(t,r,i){var o,a;if(q){(o=z.createEvent("Event")).promise=r;o.reason=i;o.initEvent(t,!1,!0);d.dispatchEvent(o)}else o={promise:r,reason:i};!G&&(a=d["on"+t])?a(o):t===X&&x("Unhandled promise rejection",i)},onUnhandled=function(t){p(A,d,(function(){var r,i=t.facade,o=t.value;if(isUnhandled(t)){r=C((function(){h?K.emit("unhandledRejection",o,i):dispatchEvent(X,i,o)}));t.rejection=h||isUnhandled(t)?2:1;if(r.error)throw r.value}}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t){p(A,d,(function(){var r=t.facade;h?K.emit("rejectionHandled",r):dispatchEvent("rejectionhandled",r,t.value)}))},bind=function(t,r,i){return function(o){t(r,o,i)}},internalReject=function(t,r,i){if(!t.done){t.done=!0;i&&(t=i);t.value=r;t.state=2;notify(t,!0)}},internalResolve=function(t,r,i){if(!t.done){t.done=!0;i&&(t=i);try{if(t.facade===r)throw new U("Promise can't be resolved itself");var o=isThenable(r);if(o)S((function(){var i={done:!1};try{p(o,r,bind(internalResolve,i,t),bind(internalReject,i,t))}catch(r){internalReject(i,r,t)}}));else{t.value=r;t.state=1;notify(t,!1)}}catch(r){internalReject({done:!1},r,t)}}};if(B){H=(W=function Promise(t){P(this,H);w(t);p(o,this);var r=N(this);try{t(bind(internalResolve,r),bind(internalReject,r))}catch(t){internalReject(r,t)}}).prototype;(o=function Promise(t){j(this,{type:M,done:!1,notified:!1,parent:!1,reactions:new k,rejection:!1,state:0,value:void 0})}).prototype=v(H,"then",(function then(t,r){var i=N(this),o=Y(E(this,W));i.parent=!0;o.ok=!b(t)||t;o.fail=b(r)&&r;o.domain=h?K.domain:void 0;0===i.state?i.reactions.add(o):S((function(){callReaction(o,i)}));return o.promise}));a=function(){var t=new o,r=N(t);this.promise=t;this.resolve=bind(internalResolve,r);this.reject=bind(internalReject,r)};O.f=Y=function(t){return t===W||undefined===t?new a(t):$(t)};if(!c&&b(I)&&V!==Object.prototype){u=V.then;R||v(V,"then",(function then(t,r){var i=this;return new W((function(t,r){p(u,i,t,r)})).then(t,r)}),{unsafe:!0});try{delete V.constructor}catch(t){}g&&g(V,H)}}l({global:!0,constructor:!0,wrap:!0,forced:B},{Promise:W});y(W,M,!1,!0);m(M)},(t,r,i)=>{var o=i(4),a=i(45);t.exports="process"===a(o.process)},(t,r,i)=>{var o=i(36),a=i(103),u=i(13),l=i(24),c=u("species");t.exports=function(t){var r=o(t);l&&r&&!r[c]&&a(r,c,{configurable:!0,get:function(){return this}})}},(t,r,i)=>{var o=i(37),a=TypeError;t.exports=function(t,r){if(o(r,t))return t;throw new a("Incorrect invocation")}},(t,r,i)=>{var o=i(31),a=i(125),u=i(11),l=i(13)("species");t.exports=function(t,r){var i,c=o(t).constructor;return void 0===c||u(i=o(c)[l])?r:a(i)}},(t,r,i)=>{var o,a,u,l,c=i(4),h=i(116),d=i(106),p=i(28),v=i(5),g=i(8),y=i(59),m=i(117),w=i(26),b=i(149),D=i(150),P=i(144),E=c.setImmediate,A=c.clearImmediate,S=c.process,x=c.Dispatch,C=c.Function,k=c.MessageChannel,T=c.String,I=0,L={},O="onreadystatechange";g((function(){o=c.location}));var run=function(t){if(v(L,t)){var r=L[t];delete L[t];r()}},runner=function(t){return function(){run(t)}},eventListener=function(t){run(t.data)},globalPostMessageDefer=function(t){c.postMessage(T(t),o.protocol+"//"+o.host)};if(!E||!A){E=function setImmediate(t){b(arguments.length,1);var r=p(t)?t:C(t),i=m(arguments,1);L[++I]=function(){h(r,void 0,i)};a(I);return I};A=function clearImmediate(t){delete L[t]};if(P)a=function(t){S.nextTick(runner(t))};else if(x&&x.now)a=function(t){x.now(runner(t))};else if(k&&!D){l=(u=new k).port2;u.port1.onmessage=eventListener;a=d(l.postMessage,l)}else if(c.addEventListener&&p(c.postMessage)&&!c.importScripts&&o&&"file:"!==o.protocol&&!g(globalPostMessageDefer)){a=globalPostMessageDefer;c.addEventListener("message",eventListener,!1)}else a=O in w("script")?function(t){y.appendChild(w("script"))[O]=function(){y.removeChild(this);run(t)}}:function(t){setTimeout(runner(t),0)}}t.exports={set:E,clear:A}},t=>{var r=TypeError;t.exports=function(t,i){if(t<i)throw new r("Not enough arguments");return t}},(t,r,i)=>{var o=i(21);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(o)},(t,r,i)=>{var o,a,u,l,c,h=i(4),d=i(106),p=i(68).f,v=i(148).set,g=i(152),y=i(150),m=i(153),w=i(154),b=i(144),D=h.MutationObserver||h.WebKitMutationObserver,P=h.document,E=h.process,A=h.Promise,S=p(h,"queueMicrotask"),x=S&&S.value;if(!x){var C=new g,flush=function(){var t,r;b&&(t=E.domain)&&t.exit();for(;r=C.get();)try{r()}catch(t){C.head&&o();throw t}t&&t.enter()};if(y||b||w||!D||!P)if(!m&&A&&A.resolve){(l=A.resolve(void 0)).constructor=A;c=d(l.then,l);o=function(){c(flush)}}else if(b)o=function(){E.nextTick(flush)};else{v=d(v,h);o=function(){v(flush)}}else{a=!0;u=P.createTextNode("");new D(flush).observe(u,{characterData:!0});o=function(){u.data=a=!a}}x=function(t){C.head||o();C.add(t)}}t.exports=x},t=>{var Queue=function(){this.head=null;this.tail=null};Queue.prototype={add:function(t){var r={item:t,next:null},i=this.tail;i?i.next=r:this.head=r;this.tail=r},get:function(){var t=this.head;if(t){null===(this.head=t.next)&&(this.tail=null);return t.item}}};t.exports=Queue},(t,r,i)=>{var o=i(21);t.exports=/ipad|iphone|ipod/i.test(o)&&"undefined"!=typeof Pebble},(t,r,i)=>{var o=i(21);t.exports=/web0s(?!.*chrome)/i.test(o)},t=>{t.exports=function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(t){}}},t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},(t,r,i)=>{var o=i(4);t.exports=o.Promise},(t,r,i)=>{var o=i(4),a=i(157),u=i(28),l=i(78),c=i(73),h=i(13),d=i(159),p=i(160),v=i(15),g=i(20),y=a&&a.prototype,m=h("species"),w=!1,b=u(o.PromiseRejectionEvent),D=l("Promise",(function(){var t=c(a),r=t!==String(a);if(!r&&66===g)return!0;if(v&&(!y.catch||!y.finally))return!0;if(!g||g<51||!/native code/.test(t)){var i=new a((function(t){t(1)})),FakePromise=function(t){t((function(){}),(function(){}))};(i.constructor={})[m]=FakePromise;if(!(w=i.then((function(){}))instanceof FakePromise))return!0}return!r&&(d||p)&&!b}));t.exports={CONSTRUCTOR:D,REJECTION_EVENT:b,SUBCLASSING:w}},(t,r,i)=>{var o=i(160),a=i(144);t.exports=!o&&!a&&"object"==typeof window&&"object"==typeof document},t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},(t,r,i)=>{var o=i(39),a=TypeError,PromiseCapability=function(t){var r,i;this.promise=new t((function(t,o){if(void 0!==r||void 0!==i)throw new a("Bad Promise constructor");r=t;i=o}));this.resolve=o(r);this.reject=o(i)};t.exports.f=function(t){return new PromiseCapability(t)}},(t,r,i)=>{var o=i(67),a=i(34),u=i(39),l=i(161),c=i(156),h=i(163);o({target:"Promise",stat:!0,forced:i(168)},{all:function all(t){var r=this,i=l.f(r),o=i.resolve,d=i.reject,p=c((function(){var i=u(r.resolve),l=[],c=0,p=1;h(t,(function(t){var u=c++,h=!1;p++;a(i,r,t).then((function(t){if(!h){h=!0;l[u]=t;--p||o(l)}}),d)}));--p||o(l)}));p.error&&d(p.value);return i.promise}})},(t,r,i)=>{var o=i(106),a=i(34),u=i(31),l=i(40),c=i(164),h=i(55),d=i(37),p=i(165),v=i(166),g=i(167),y=TypeError,Result=function(t,r){this.stopped=t;this.result=r},m=Result.prototype;t.exports=function(t,r,i){var w,b,D,P,E,A,S,x=i&&i.that,C=!(!i||!i.AS_ENTRIES),k=!(!i||!i.IS_RECORD),T=!(!i||!i.IS_ITERATOR),I=!(!i||!i.INTERRUPTED),L=o(r,x),stop=function(t){w&&g(w,"normal",t);return new Result(!0,t)},callFn=function(t){if(C){u(t);return I?L(t[0],t[1],stop):L(t[0],t[1])}return I?L(t,stop):L(t)};if(k)w=t.iterator;else if(T)w=t;else{if(!(b=v(t)))throw new y(l(t)+" is not iterable");if(c(b)){for(D=0,P=h(t);P>D;D++)if((E=callFn(t[D]))&&d(m,E))return E;return new Result(!1)}w=p(t,b)}A=k?t.next:w.next;for(;!(S=a(A,w)).done;){try{E=callFn(S.value)}catch(t){g(w,"throw",t)}if("object"==typeof E&&E&&d(m,E))return E}return new Result(!1)}},(t,r,i)=>{var o=i(13),a=i(61),u=o("iterator"),l=Array.prototype;t.exports=function(t){return void 0!==t&&(a.Array===t||l[u]===t)}},(t,r,i)=>{var o=i(34),a=i(39),u=i(31),l=i(40),c=i(166),h=TypeError;t.exports=function(t,r){var i=arguments.length<2?c(t):r;if(a(i))return u(o(i,t));throw new h(l(t)+" is not iterable")}},(t,r,i)=>{var o=i(91),a=i(38),u=i(11),l=i(61),c=i(13)("iterator");t.exports=function(t){if(!u(t))return a(t,c)||a(t,"@@iterator")||l[o(t)]}},(t,r,i)=>{var o=i(34),a=i(31),u=i(38);t.exports=function(t,r,i){var l,c;a(t);try{if(!(l=u(t,"return"))){if("throw"===r)throw i;return i}l=o(l,t)}catch(t){c=!0;l=t}if("throw"===r)throw i;if(c)throw l;a(l);return i}},(t,r,i)=>{var o=i(157),a=i(169),u=i(158).CONSTRUCTOR;t.exports=u||!a((function(t){o.all(t).then(void 0,(function(){}))}))},(t,r,i)=>{var o=i(13)("iterator"),a=!1;try{var u=0,l={next:function(){return{done:!!u++}},return:function(){a=!0}};l[o]=function(){return this};Array.from(l,(function(){throw 2}))}catch(t){}t.exports=function(t,r){try{if(!r&&!a)return!1}catch(t){return!1}var i=!1;try{var u={};u[o]=function(){return{next:function(){return{done:i=!0}}}};t(u)}catch(t){}return i}},(t,r,i)=>{var o=i(67),a=i(15),u=i(158).CONSTRUCTOR,l=i(157),c=i(36),h=i(28),d=i(70),p=l&&l.prototype;o({target:"Promise",proto:!0,forced:u,real:!0},{catch:function(t){return this.then(void 0,t)}});if(!a&&h(l)){var v=c("Promise").prototype.catch;p.catch!==v&&d(p,"catch",v,{unsafe:!0})}},(t,r,i)=>{var o=i(67),a=i(34),u=i(39),l=i(161),c=i(156),h=i(163);o({target:"Promise",stat:!0,forced:i(168)},{race:function race(t){var r=this,i=l.f(r),o=i.reject,d=c((function(){var l=u(r.resolve);h(t,(function(t){a(l,r,t).then(i.resolve,o)}))}));d.error&&o(d.value);return i.promise}})},(t,r,i)=>{var o=i(67),a=i(34),u=i(161);o({target:"Promise",stat:!0,forced:i(158).CONSTRUCTOR},{reject:function reject(t){var r=u.f(this);a(r.reject,void 0,t);return r.promise}})},(t,r,i)=>{var o=i(67),a=i(36),u=i(15),l=i(157),c=i(158).CONSTRUCTOR,h=i(174),d=a("Promise"),p=u&&!c;o({target:"Promise",stat:!0,forced:u||c},{resolve:function resolve(t){return h(p&&this===d?l:this,t)}})},(t,r,i)=>{var o=i(31),a=i(27),u=i(161);t.exports=function(t,r){o(t);if(a(r)&&r.constructor===t)return r;var i=u.f(t);(0,i.resolve)(r);return i.promise}},(t,r,i)=>{i(2)("asyncIterator")},(t,r,i)=>{var o=i(36),a=i(2),u=i(83);a("toStringTag");u(o("Symbol"),"Symbol")},(t,r,i)=>{var o=i(4);i(83)(o.JSON,"JSON",!0)},(t,r,i)=>{i(83)(Math,"Math",!0)},(t,r,i)=>{var o=i(67),a=i(9),u=i(55),l=i(180),c=i(181);o({target:"Array",proto:!0,arity:1,forced:i(8)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function push(t){var r=a(this),i=u(r),o=arguments.length;c(i+o);for(var h=0;h<o;h++){r[i]=arguments[h];i++}l(r,i);return i}})},(t,r,i)=>{var o=i(24),a=i(110),u=TypeError,l=Object.getOwnPropertyDescriptor,c=o&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=c?function(t,r){if(a(t)&&!l(t,"length").writable)throw new u("Cannot set read only .length");return t.length=r}:function(t,r){return t.length=r}},t=>{var r=TypeError;t.exports=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}},(t,r,i)=>{var o=i(67),a=i(4),u=i(146),l=i(28),c=i(81),h=i(64),d=i(8),p=i(5),v=i(13),g=i(80).IteratorPrototype,y=i(15),m=v("toStringTag"),w=TypeError,b=a.Iterator,D=y||!l(b)||b.prototype!==g||!d((function(){b({})})),P=function Iterator(){u(this,g);if(c(this)===g)throw new w("Abstract class Iterator not directly constructable")};p(g,m)||h(g,m,"Iterator");!D&&p(g,"constructor")&&g.constructor!==Object||h(g,"constructor",P);P.prototype=g;o({global:!0,constructor:!0,forced:D},{Iterator:P})},(t,r,i)=>{var o=i(67),a=i(163),u=i(39),l=i(31),c=i(184);o({target:"Iterator",proto:!0,real:!0},{forEach:function forEach(t){l(this);u(t);var r=c(this),i=0;a(r,(function(r){t(r,i++)}),{IS_RECORD:!0})}})},t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},(t,r,i)=>{var o=i(4),a=i(96),u=i(97),l=i(186),c=i(64),handlePrototype=function(t){if(t&&t.forEach!==l)try{c(t,"forEach",l)}catch(r){t.forEach=l}};for(var h in a)a[h]&&handlePrototype(o[h]&&o[h].prototype);handlePrototype(u)},(t,r,i)=>{var o=i(105).forEach,a=i(187)("forEach");t.exports=a?[].forEach:function forEach(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}},(t,r,i)=>{var o=i(8);t.exports=function(t,r){var i=[][t];return!!i&&o((function(){i.call(null,r||function(){return 1},1)}))}},(t,r,i)=>{var o=i(67),a=i(110),u=i(111),l=i(27),c=i(52),h=i(55),d=i(43),p=i(102),v=i(13),g=i(189),y=i(117),m=g("slice"),w=v("species"),b=Array,D=Math.max;o({target:"Array",proto:!0,forced:!m},{slice:function slice(t,r){var i,o,v,g=d(this),m=h(g),P=c(t,m),E=c(void 0===r?m:r,m);if(a(g)){i=g.constructor;(u(i)&&(i===b||a(i.prototype))||l(i)&&null===(i=i[w]))&&(i=void 0);if(i===b||void 0===i)return y(g,P,E)}o=new(void 0===i?b:i)(D(E-P,0));for(v=0;P<E;P++,v++)P in g&&p(o,v,g[P]);o.length=v;return o}})},(t,r,i)=>{var o=i(8),a=i(13),u=i(20),l=a("species");t.exports=function(t){return u>=51||!o((function(){var r=[];(r.constructor={})[l]=function(){return{foo:1}};return 1!==r[t](Boolean).foo}))}},(t,r,i)=>{var o=i(67),a=i(9),u=i(49);o({target:"Object",stat:!0,forced:i(8)((function(){u(1)}))},{keys:function keys(t){return u(a(t))}})},(t,r,i)=>{var o=i(67),a=i(24),u=i(4),l=i(36),c=i(6),h=i(34),d=i(28),p=i(27),v=i(110),g=i(5),y=i(94),m=i(55),w=i(102),b=i(8),D=i(192),P=i(19),E=u.JSON,A=u.Number,S=u.SyntaxError,x=E&&E.parse,C=l("Object","keys"),k=Object.getOwnPropertyDescriptor,T=c("".charAt),I=c("".slice),L=c(/./.exec),O=c([].push),M=/^\d$/,B=/^[1-9]$/,G=/^(?:-|\d)$/,R=/^[\t\n\r ]$/,internalize=function(t,r,i,o){var a,u,l,c,d,y=t[r],w=o&&y===o.value,b=w&&"string"==typeof o.source?{source:o.source}:{};if(p(y)){var D=v(y),P=w?o.nodes:D?[]:{};if(D){a=P.length;l=m(y);for(c=0;c<l;c++)internalizeProperty(y,c,internalize(y,""+c,i,c<a?P[c]:void 0))}else{u=C(y);l=m(u);for(c=0;c<l;c++){d=u[c];internalizeProperty(y,d,internalize(y,d,i,g(P,d)?P[d]:void 0))}}}return h(i,t,r,y,b)},internalizeProperty=function(t,r,i){if(a){var o=k(t,r);if(o&&!o.configurable)return}void 0===i?delete t[r]:w(t,r,i)},Node=function(t,r,i,o){this.value=t;this.end=r;this.source=i;this.nodes=o},Context=function(t,r){this.source=t;this.index=r};Context.prototype={fork:function(t){return new Context(this.source,t)},parse:function(){var t=this.source,r=this.skip(R,this.index),i=this.fork(r),o=T(t,r);if(L(G,o))return i.number();switch(o){case"{":return i.object();case"[":return i.array();case'"':return i.string();case"t":return i.keyword(!0);case"f":return i.keyword(!1);case"n":return i.keyword(null)}throw new S('Unexpected character: "'+o+'" at: '+r)},node:function(t,r,i,o,a){return new Node(r,o,t?null:I(this.source,i,o),a)},object:function(){for(var t=this.source,r=this.index+1,i=!1,o={},a={};r<t.length;){r=this.until(['"',"}"],r);if("}"===T(t,r)&&!i){r++;break}var u=this.fork(r).string(),l=u.value;r=u.end;r=this.until([":"],r)+1;r=this.skip(R,r);u=this.fork(r).parse();w(a,l,u);w(o,l,u.value);r=this.until([",","}"],u.end);var c=T(t,r);if(","===c){i=!0;r++}else if("}"===c){r++;break}}return this.node(1,o,this.index,r,a)},array:function(){for(var t=this.source,r=this.index+1,i=!1,o=[],a=[];r<t.length;){r=this.skip(R,r);if("]"===T(t,r)&&!i){r++;break}var u=this.fork(r).parse();O(a,u);O(o,u.value);r=this.until([",","]"],u.end);if(","===T(t,r)){i=!0;r++}else if("]"===T(t,r)){r++;break}}return this.node(1,o,this.index,r,a)},string:function(){var t=this.index,r=D(this.source,this.index+1);return this.node(0,r.value,t,r.end)},number:function(){var t=this.source,r=this.index,i=r;"-"===T(t,i)&&i++;if("0"===T(t,i))i++;else{if(!L(B,T(t,i)))throw new S("Failed to parse number at: "+i);i=this.skip(M,++i)}"."===T(t,i)&&(i=this.skip(M,++i));if("e"===T(t,i)||"E"===T(t,i)){i++;"+"!==T(t,i)&&"-"!==T(t,i)||i++;if(i===(i=this.skip(M,i)))throw new S("Failed to parse number's exponent value at: "+i)}return this.node(0,A(I(t,r,i)),r,i)},keyword:function(t){var r=""+t,i=this.index,o=i+r.length;if(I(this.source,i,o)!==r)throw new S("Failed to parse value at: "+i);return this.node(0,t,i,o)},skip:function(t,r){for(var i=this.source;r<i.length&&L(t,T(i,r));r++);return r},until:function(t,r){r=this.skip(R,r);for(var i=T(this.source,r),o=0;o<t.length;o++)if(t[o]===i)return r;throw new S('Unexpected character: "'+i+'" at: '+r)}};var N=b((function(){var t,r="9007199254740993";x(r,(function(r,i,o){t=o.source}));return t!==r})),j=P&&!b((function(){return 1/x("-0 \t")!=-1/0}));o({target:"JSON",stat:!0,forced:N},{parse:function parse(t,r){return j&&!d(r)?x(t):function(t,r){t=y(t);var i=new Context(t,0,""),o=i.parse(),a=o.value,u=i.skip(R,o.end);if(u<t.length)throw new S('Unexpected extra character: "'+T(t,u)+'" after the parsed data at: '+u);return d(r)?internalize({"":a},"",r,o):a}(t,r)}})},(t,r,i)=>{var o=i(6),a=i(5),u=SyntaxError,l=parseInt,c=String.fromCharCode,h=o("".charAt),d=o("".slice),p=o(/./.exec),v={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},g=/^[\da-f]{4}$/i,y=/^[\u0000-\u001F]$/;t.exports=function(t,r){for(var i=!0,o="";r<t.length;){var m=h(t,r);if("\\"===m){var w=d(t,r,r+2);if(a(v,w)){o+=v[w];r+=2}else{if("\\u"!==w)throw new u('Unknown escape sequence: "'+w+'"');var b=d(t,r+=2,r+4);if(!p(g,b))throw new u("Bad Unicode escape at: "+r);o+=c(l(b,16));r+=4}}else{if('"'===m){i=!1;r++;break}if(p(y,m))throw new u("Bad control character in string literal at: "+r);o+=m;r++}}if(i)throw new u("Unterminated string at: "+r);return{value:o,end:r}}},(t,r,i)=>{var o=i(67),a=i(8),u=i(9),l=i(81),c=i(82);o({target:"Object",stat:!0,forced:a((function(){l(1)})),sham:!c},{getPrototypeOf:function getPrototypeOf(t){return l(u(t))}})},(t,r,i)=>{i(1);i(175);i(176);i(177);i(178);i(193);i(183);i(185);i(188);i(195);i(190);i(198);i(199);i(202);i(203);Object.defineProperty(r,"__esModule",{value:!0});r.PDFViewerApplication=r.PDFPrintServiceFactory=r.DefaultExternalServices=void 0;i(126);i(88);i(142);i(135);i(136);i(98);i(120);i(138);i(204);i(205);i(206);i(210);i(212);i(218);i(222);i(179);i(42);i(92);i(95);i(223);i(182);i(225);i(226);i(227);i(229);i(115);i(231);i(232);i(238);i(239);i(240);i(241);i(242);i(244);var o=i(245),a=i(291),u=i(292),l=i(293),c=i(294),h=i(296),d=i(300),p=i(301),v=i(302),g=i(303),y=i(307),m=i(309),w=i(311),b=i(312),D=i(321),P=i(323),E=i(324),A=i(325),S=i(326),x=i(328),C=i(329),k=i(330),T=i(332),I=i(420),L=i(421),O=i(422);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,o)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,_toPropertyKey(o.key),o)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}var M=1e3,B=-1,G=1,R={AUTOMATIC:0,LIGHT:1,DARK:2},N=r.DefaultExternalServices=function(){function DefaultExternalServices(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,DefaultExternalServices);throw new Error("Cannot initialize DefaultExternalServices.")}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(DefaultExternalServices,null,[{key:"updateFindControlState",value:function updateFindControlState(t){}},{key:"updateFindMatchesCount",value:function updateFindMatchesCount(t){}},{key:"initPassiveLoading",value:function initPassiveLoading(t){}},{key:"reportTelemetry",value:function reportTelemetry(t){}},{key:"createDownloadManager",value:function createDownloadManager(){throw new Error("Not implemented: createDownloadManager")}},{key:"createPreferences",value:function createPreferences(){throw new Error("Not implemented: createPreferences")}},{key:"createL10n",value:function createL10n(t){throw new Error("Not implemented: createL10n")}},{key:"createScripting",value:function createScripting(t){throw new Error("Not implemented: createScripting")}},{key:"supportsPinchToZoom",get:function get(){return(0,a.shadow)(this,"supportsPinchToZoom",!0)}},{key:"supportsIntegratedFind",get:function get(){return(0,a.shadow)(this,"supportsIntegratedFind",!1)}},{key:"supportsDocumentFonts",get:function get(){return(0,a.shadow)(this,"supportsDocumentFonts",!0)}},{key:"supportedMouseWheelZoomModifierKeys",get:function get(){return(0,a.shadow)(this,"supportedMouseWheelZoomModifierKeys",{ctrlKey:!0,metaKey:!0})}},{key:"isInAutomation",get:function get(){return(0,a.shadow)(this,"isInAutomation",!1)}},{key:"updateEditorStates",value:function updateEditorStates(t){throw new Error("Not implemented: updateEditorStates")}},{key:"canvasMaxAreaInBytes",get:function get(){return(0,a.shadow)(this,"canvasMaxAreaInBytes",-1)}},{key:"getNimbusExperimentData",value:function getNimbusExperimentData(){return(0,a.shadow)(this,"getNimbusExperimentData",Promise.resolve(null))}}]);return DefaultExternalServices}(),j=r.PDFViewerApplication={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:N,_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,initialize:function initialize(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var i;return _regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:r.preferences=r.externalServices.createPreferences();r.appConfig=t;o.next=4;return r._initializeOptions();case 4:r._forceCssTheme();o.next=7;return r._initializeL10n();case 7:r.isViewerEmbedded&&l.AppOptions.get("externalLinkTarget")===h.LinkTarget.NONE&&l.AppOptions.set("externalLinkTarget",h.LinkTarget.TOP);o.next=10;return r._initializeViewerComponents();case 10:r.bindEvents();r.bindWindowEvents();i=t.appContainer||document.documentElement;r.l10n.translate(i).then((function(){r.eventBus.dispatch("localized",{source:r})}));r._initializedCapability.resolve();r.initializeLoadingBar();case 16:case"end":return o.stop()}}),_callee)})))()},_initializeOptions:function _initializeOptions(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:if(!l.AppOptions.get("disablePreferences")){r.next=5;break}if(!l.AppOptions.get("pdfBugEnabled")){r.next=4;break}r.next=4;return t._parseHashParams();case 4:return r.abrupt("return");case 5:l.AppOptions._hasUserOptions()&&globalThis.ngxConsole.warn('_initializeOptions: The Preferences may override manually set AppOptions; please use the "disablePreferences"-option in order to prevent that.');r.prev=6;r.t0=l.AppOptions;r.next=10;return t.preferences.getAll();case 10:r.t1=r.sent;r.t0.setAll.call(r.t0,r.t1);r.next=17;break;case 14:r.prev=14;r.t2=r.catch(6);globalThis.ngxConsole.error('_initializeOptions: "'.concat(null===r.t2||void 0===r.t2?void 0:r.t2.message,'".'));case 17:if(!l.AppOptions.get("pdfBugEnabled")){r.next=20;break}r.next=20;return t._parseHashParams();case 20:case"end":return r.stop()}}),_callee2,null,[[6,14]])})))()},_parseHashParams:function _parseHashParams(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var r,i,a,u,c,h;return _regeneratorRuntime().wrap((function _callee3$(d){for(;;)switch(d.prev=d.next){case 0:if(r=document.location.hash.substring(1)){d.next=3;break}return d.abrupt("return");case 3:i=t.appConfig,a=i.mainContainer,u=i.viewerContainer;if("true"!==(c=(0,o.parseQueryString)(r)).get("disableworker")){d.next=13;break}d.prev=5;d.next=8;return loadFakeWorker();case 8:d.next=13;break;case 10:d.prev=10;d.t0=d.catch(5);console.error('_parseHashParams: "'.concat(d.t0.message,'".'));case 13:c.has("disablerange")&&l.AppOptions.set("disableRange","true"===c.get("disablerange"));c.has("disablestream")&&l.AppOptions.set("disableStream","true"===c.get("disablestream"));c.has("disableautofetch")&&l.AppOptions.set("disableAutoFetch","true"===c.get("disableautofetch"));c.has("disablefontface")&&l.AppOptions.set("disableFontFace","true"===c.get("disablefontface"));c.has("disablehistory")&&l.AppOptions.set("disableHistory","true"===c.get("disablehistory"));c.has("verbosity")&&l.AppOptions.set("verbosity",0|c.get("verbosity"));if(!c.has("textlayer")){d.next=36;break}d.t1=c.get("textlayer");d.next="off"===d.t1?23:"visible"===d.t1||"shadow"===d.t1||"hover"===d.t1?25:36;break;case 23:l.AppOptions.set("textLayerMode",o.TextLayerMode.DISABLE);return d.abrupt("break",36);case 25:u.classList.add("textLayer-".concat(c.get("textlayer")));d.prev=26;d.next=29;return loadPDFBug(t);case 29:t._PDFBug.loadCSS();d.next=35;break;case 32:d.prev=32;d.t2=d.catch(26);console.error('_parseHashParams: "'.concat(d.t2.message,'".'));case 35:return d.abrupt("break",36);case 36:if(!c.has("pdfbug")){d.next=49;break}l.AppOptions.set("pdfBug",!0);l.AppOptions.set("fontExtraProperties",!0);h=c.get("pdfbug").split(",");d.prev=40;d.next=43;return loadPDFBug(t);case 43:t._PDFBug.init(a,h);d.next=49;break;case 46:d.prev=46;d.t3=d.catch(40);console.error('_parseHashParams: "'.concat(d.t3.message,'".'));case 49:c.has("locale")&&l.AppOptions.set("locale",c.get("locale"));case 50:case"end":return d.stop()}}),_callee3,null,[[5,10],[26,32],[40,46]])})))()},_initializeL10n:function _initializeL10n(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){var r;return _regeneratorRuntime().wrap((function _callee4$(i){for(;;)switch(i.prev=i.next){case 0:t.l10n=t.externalServices.createL10n({locale:l.AppOptions.get("locale")});i.next=3;return t.l10n.getDirection();case 3:r=i.sent;document.getElementsByTagName("html")[0].dir=r;case 5:case"end":return i.stop()}}),_callee4)})))()},_forceCssTheme:function _forceCssTheme(){var t=l.AppOptions.get("viewerCssTheme");if(t!==R.AUTOMATIC&&Object.values(R).includes(t))try{for(var r=document.styleSheets[0],i=(null==r?void 0:r.cssRules)||[],o=0,a=i.length;o<a;o++){var u,c=i[o];if(c instanceof CSSMediaRule&&"(prefers-color-scheme: dark)"===(null===(u=c.media)||void 0===u?void 0:u[0])){if(t===R.LIGHT){r.deleteRule(o);return}var h=/^@media \(prefers-color-scheme: dark\) {\n\s*([\w\s-.,:;/\\{}()]+)\n}$/.exec(c.cssText);if(null!=h&&h[1]){r.deleteRule(o);r.insertRule(h[1],o)}return}}}catch(t){globalThis.ngxConsole.error('_forceCssTheme: "'.concat(null==t?void 0:t.message,'".'))}},_initializeViewerComponents:function _initializeViewerComponents(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee5(){var r,i,u,O,M,B,G,R,N,j,V,W,H,U,z,K,Y,$,q,X,Z,Q,J,ee,te,re,ne,ie;return _regeneratorRuntime().wrap((function _callee5$(oe){for(;;)switch(oe.prev=oe.next){case 0:R=t.appConfig,N=t.externalServices,j=t.l10n;V=N.isInAutomation?new c.AutomationEventBus:new c.EventBus;t.eventBus=V;t.overlayManager=new p.OverlayManager;(W=new S.PDFRenderingQueue).onIdle=t._cleanup.bind(t);t.pdfRenderingQueue=W;H=new h.PDFLinkService({eventBus:V,externalLinkTarget:l.AppOptions.get("externalLinkTarget"),externalLinkRel:l.AppOptions.get("externalLinkRel"),ignoreDestinationZoom:l.AppOptions.get("ignoreDestinationZoom")});t.pdfLinkService=H;U=N.createDownloadManager();t.downloadManager=U;z=new b.PDFFindController({linkService:H,eventBus:V,pageViewMode:l.AppOptions.get("pageViewMode"),updateMatchesCountOnProgress:!0});t.findController=z;K=new x.PDFScriptingManager({eventBus:V,sandboxBundleSrc:l.AppOptions.get("sandboxBundleSrc"),externalServices:N,docProperties:t._scriptingDocProperties.bind(t)});t.pdfScriptingManager=K;Y=R.mainContainer,$=R.viewerContainer;q=l.AppOptions.get("annotationEditorMode");X=l.AppOptions.get("isOffscreenCanvasSupported")&&a.FeatureTest.isOffscreenCanvasSupported;Z=l.AppOptions.get("forcePageColors")||window.matchMedia("(forced-colors: active)").matches?{background:l.AppOptions.get("pageColorsBackground"),foreground:l.AppOptions.get("pageColorsForeground")}:null;Q=new T.PDFViewer({container:Y,viewer:$,eventBus:V,renderingQueue:W,linkService:H,downloadManager:U,findController:z,scriptingManager:l.AppOptions.get("enableScripting")&&K,l10n:j,textLayerMode:l.AppOptions.get("textLayerMode"),annotationMode:l.AppOptions.get("annotationMode"),annotationEditorMode:q,imageResourcesPath:l.AppOptions.get("imageResourcesPath"),removePageBorders:l.AppOptions.get("removePageBorders"),enablePrintAutoRotate:l.AppOptions.get("enablePrintAutoRotate"),isOffscreenCanvasSupported:X,maxCanvasPixels:l.AppOptions.get("maxCanvasPixels"),pageViewMode:l.AppOptions.get("pageViewMode"),enablePermissions:l.AppOptions.get("enablePermissions"),pageColors:Z});t.pdfViewer=Q;W.setViewer(Q);H.setViewer(Q);K.setViewer(Q);if(null!==(r=R.sidebar)&&void 0!==r&&r.thumbnailView){t.pdfThumbnailViewer=new k.PDFThumbnailViewer({container:R.sidebar.thumbnailView,eventBus:V,renderingQueue:W,linkService:H,l10n:j,pageColors:Z});W.setThumbnailViewer(t.pdfThumbnailViewer)}if(!t.isViewerEmbedded&&!l.AppOptions.get("disableHistory")){t.pdfHistory=new D.PDFHistory({linkService:H,eventBus:V});H.setHistory(t.pdfHistory)}!t.supportsIntegratedFind&&R.findBar&&(t.findBar=new w.PDFFindBar(R.findBar,V,j));if(R.annotationEditorParams)if(q!==a.AnnotationEditorType.DISABLE){l.AppOptions.get("enableStampEditor")&&X&&(null===(J=R.toolbar)||void 0===J||null===(J=J.editorStampButton)||void 0===J||J.classList.remove("hidden"));t.annotationEditorParams=new d.AnnotationEditorParams(R.annotationEditorParams,V)}else for(ee=0,te=["editorModeButtons","editorModeSeparator"];ee<te.length;ee++){ne=te[ee];null===(re=document.getElementById(ne))||void 0===re||re.classList.add("hidden")}R.documentProperties&&(t.pdfDocumentProperties=new m.PDFDocumentProperties(R.documentProperties,t.overlayManager,V,j,(function(){return t._docFilename})));null!==(i=R.secondaryToolbar)&&void 0!==i&&i.cursorHandToolButton&&(t.pdfCursorTools=new y.PDFCursorTools({container:Y,eventBus:V,cursorToolOnLoad:l.AppOptions.get("cursorToolOnLoad")}));R.toolbar&&(t.toolbar=new L.Toolbar(R.toolbar,V,j));R.secondaryToolbar&&(t.secondaryToolbar=new I.SecondaryToolbar(R.secondaryToolbar,V,N));t.supportsFullscreen&&(null!==(u=R.toolbar)&&void 0!==u&&u.presentationModeButton||null!==(O=R.secondaryToolbar)&&void 0!==O&&O.presentationModeButton)&&(t.pdfPresentationMode=new A.PDFPresentationMode({container:Y,pdfViewer:Q,eventBus:V}));(ie=l.AppOptions.get("passwordPrompt"))||R.passwordOverlay&&(ie=new v.PasswordPrompt(R.passwordOverlay,t.overlayManager,j,t.isViewerEmbedded));t.passwordPrompt=ie;null!==(M=R.sidebar)&&void 0!==M&&M.outlineView&&(t.pdfOutlineViewer=new E.PDFOutlineViewer({container:R.sidebar.outlineView,eventBus:V,linkService:H,downloadManager:U}));null!==(B=R.sidebar)&&void 0!==B&&B.attachmentsView&&(t.pdfAttachmentViewer=new g.PDFAttachmentViewer({container:R.sidebar.attachmentsView,eventBus:V,downloadManager:U}));null!==(G=R.sidebar)&&void 0!==G&&G.layersView&&(t.pdfLayerViewer=new P.PDFLayerViewer({container:R.sidebar.layersView,eventBus:V,l10n:j}));if(R.sidebar){t.pdfSidebar=new C.PDFSidebar({elements:R.sidebar,eventBus:V,l10n:j});t.pdfSidebar.onToggled=t.forceRendering.bind(t);t.pdfSidebar.onUpdateThumbnails=function(){var r,i=_createForOfIteratorHelper(Q.getCachedPageViews());try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a.renderingState===o.RenderingStates.FINISHED){var u;null===(u=t.pdfThumbnailViewer.getThumbnail(a.id-1))||void 0===u||u.setImage(a)}}}catch(t){i.e(t)}finally{i.f()}t.pdfThumbnailViewer.scrollThumbnailIntoView(Q.currentPageNumber)}}case 40:case"end":return oe.stop()}}),_callee5)})))()},run:function run(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee6(){var i,a,u,c,h,d,p,v,g,y,m;return _regeneratorRuntime().wrap((function _callee6$(w){for(;;)switch(w.prev=w.next){case 0:w.next=2;return r.initialize(t);case 2:a=r.appConfig,u=r.eventBus;h=document.location.search.substring(1);d=(0,o.parseQueryString)(h);c=null!==(i=d.get("file"))&&void 0!==i?i:l.AppOptions.get("defaultUrl");W(c);(p=a.openFileInput).value=null;p.addEventListener("change",(function(t){var r=t.target.files;r&&0!==r.length&&u.dispatch("fileinputchange",{source:this,fileInput:t.target})}));a.mainContainer.addEventListener("dragover",(function(t){if(l.AppOptions.get("enableDragAndDrop")){t.preventDefault();t.dataTransfer.dropEffect="copy"===t.dataTransfer.effectAllowed?"copy":"move"}}));a.mainContainer.addEventListener("drop",(function(t){t.preventDefault();var r=t.dataTransfer.files;r&&0!==r.length&&u.dispatch("fileinputchange",{source:this,fileInput:t.dataTransfer,dropEvent:t})}));if(!r.supportsDocumentFonts){l.AppOptions.set("disableFontFace",!0);r.l10n.get("web_fonts_disabled").then((function(t){console.warn(t)}))}if(!r.supportsPrinting){null===(v=a.toolbar)||void 0===v||null===(v=v.print)||void 0===v||v.classList.add("hidden");null===(g=a.secondaryToolbar)||void 0===g||g.printButton.classList.add("hidden")}if(!r.supportsFullscreen){a.toolbar.presentationModeButton.classList.add("hidden");null===(y=a.secondaryToolbar)||void 0===y||y.presentationModeButton.classList.add("hidden")}r.supportsIntegratedFind&&(null===(m=a.toolbar)||void 0===m||null===(m=m.viewFind)||void 0===m||m.classList.add("hidden"));a.mainContainer.addEventListener("transitionend",(function(t){t.target===this&&u.dispatch("resize",{source:this})}),!0);try{c?r.open({url:c}):r._hideViewBookmark()}catch(t){l10n.get("loading_error").then((function(i){r._documentError(i,t);j.onError&&j.onError(t)}))}case 18:case"end":return w.stop()}}),_callee6)})))()},get initialized(){return this._initializedCapability.settled},get initializedPromise(){return this._initializedCapability.promise},zoomIn:function zoomIn(t,r){this.pdfViewer.isInPresentationMode||this.pdfViewer.increaseScale({drawingDelay:l.AppOptions.get("defaultZoomDelay"),steps:t,scaleFactor:r})},zoomOut:function zoomOut(t,r){this.pdfViewer.isInPresentationMode||this.pdfViewer.decreaseScale({drawingDelay:l.AppOptions.get("defaultZoomDelay"),steps:t,scaleFactor:r})},zoomReset:function zoomReset(){this.pdfViewer.isInPresentationMode||(this.pdfViewer.currentScaleValue=o.DEFAULT_SCALE_VALUE)},get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0},get page(){return this.pdfViewer.currentPageNumber},set page(t){this.pdfViewer.currentPageNumber=t},get supportsPrinting(){return K.instance.supportsPrinting},get supportsFullscreen(){return(0,a.shadow)(this,"supportsFullscreen",document.fullscreenEnabled)},get supportsPinchToZoom(){return this.externalServices.supportsPinchToZoom},get supportsIntegratedFind(){return this.externalServices.supportsIntegratedFind},get supportsDocumentFonts(){return this.externalServices.supportsDocumentFonts},initializeLoadingBar:function initializeLoadingBar(){var t=document.getElementById("loadingBar"),r=t?new o.ProgressBar(t):null;null==r||r.hide();return(0,a.shadow)(this,"loadingBar",r)},get supportedMouseWheelZoomModifierKeys(){return this.externalServices.supportedMouseWheelZoomModifierKeys},initPassiveLoading:function initPassiveLoading(t){throw new Error("Not implemented: initPassiveLoading")},setTitleUsingUrl:function setTitleUsingUrl(){},setTitle:function setTitle(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._title;this._title=t;if(!this.isViewerEmbedded){var r=this._hasAnnotationEditors&&!this.pdfRenderingQueue.printing;document.title="".concat(r?"* ":"").concat(t)}},get _docFilename(){return this._contentDispositionFilename||(0,a.getPdfFilenameFromUrl)(this.url)},_hideViewBookmark:function _hideViewBookmark(){if(this.appConfig){var t=this.appConfig.secondaryToolbar;null==t||t.viewBookmarkButton.classList.add("hidden");if(null!=t&&t.presentationModeButton.classList.contains("hidden")){var r;null===(r=document.getElementById("viewBookmarkSeparator"))||void 0===r||r.classList.add("hidden")}}},close:function close(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee7(){var r,i,o,a,u,l,c,h,d,p,v,g,y;return _regeneratorRuntime().wrap((function _callee7$(m){for(;;)switch(m.prev=m.next){case 0:t._unblockDocumentLoadEvent();t._hideViewBookmark();if(t.pdfLoadingTask){m.next=4;break}return m.abrupt("return");case 4:if(!((null===(r=t.pdfDocument)||void 0===r?void 0:r.annotationStorage.size)>0&&t._annotationStorageModified)){m.next=12;break}m.prev=5;m.next=8;return t.save();case 8:m.next=12;break;case 10:m.prev=10;m.t0=m.catch(5);case 12:(v=[]).push(t.pdfLoadingTask.destroy());t.pdfLoadingTask=null;if(t.pdfDocument){t.pdfDocument=null;null===(g=t.pdfThumbnailViewer)||void 0===g||g.setDocument(null);t.pdfViewer.setDocument(null);t.pdfLinkService.setDocument(null);null===(y=t.pdfDocumentProperties)||void 0===y||y.setDocument(null)}t.pdfLinkService.externalLinkEnabled=!0;t.store=null;t.isInitialViewSet=!1;t.downloadComplete=!1;t.url="";t.baseUrl="";t._downloadUrl="";t.documentInfo=null;t.metadata=null;t._contentDispositionFilename=null;t._contentLength=null;t._saveInProgress=!1;t._hasAnnotationEditors=!1;v.push(t.pdfScriptingManager.destroyPromise,t.passwordPrompt.close());t.setTitle();null===(i=t.pdfSidebar)||void 0===i||i.reset();null===(o=t.pdfOutlineViewer)||void 0===o||o.reset();null===(a=t.pdfAttachmentViewer)||void 0===a||a.reset();null===(u=t.pdfLayerViewer)||void 0===u||u.reset();null===(l=t.pdfHistory)||void 0===l||l.reset();null===(c=t.findBar)||void 0===c||c.reset();null===(h=t.toolbar)||void 0===h||h.reset();null===(d=t.secondaryToolbar)||void 0===d||d.reset();null===(p=t._PDFBug)||void 0===p||p.cleanup();m.next=42;return Promise.all(v);case 42:case"end":return m.stop()}}),_callee7,null,[[5,10]])})))()},open:function open(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee9(){var i;return _regeneratorRuntime().wrap((function _callee9$(o){for(;;)switch(o.prev=o.next){case 0:window.adjacentPagesLoader=void 0;null===(i=r.pdfViewer)||void 0===i||i.destroyBookMode();window.ngxZone.runOutsideAngular(_asyncToGenerator(_regeneratorRuntime().mark((function _callee8(){var i,o,u,c,h,d;return _regeneratorRuntime().wrap((function _callee8$(p){for(;;)switch(p.prev=p.next){case 0:o=!1;if("string"==typeof t){t={url:t};o=!0}else if(null!==(i=t)&&void 0!==i&&i.byteLength){t={data:t};o=!0}o&&console.error("The `PDFViewerApplication.open` signature was updated, please use an object instead.");if(!r.pdfLoadingTask){p.next=6;break}p.next=6;return r.close();case 6:u=l.AppOptions.getAll(l.OptionKind.WORKER);Object.assign(a.GlobalWorkerOptions,u);t.url&&r.setTitleUsingUrl(t.originalUrl||t.url,t.url);c=l.AppOptions.getAll(l.OptionKind.API);h=_objectSpread(_objectSpread({canvasMaxAreaInBytes:r.externalServices.canvasMaxAreaInBytes},c),t);d=(0,a.getDocument)(h);r.pdfLoadingTask=d;d.onPassword=function(t,i){r.isViewerEmbedded&&r._unblockDocumentLoadEvent();r.pdfLinkService.externalLinkEnabled=!1;r.passwordPrompt.setUpdateCallback(t,i);r.passwordPrompt.open()};d.onProgress=function(t){var i,o=t.loaded,a=t.total;r.progress(o/a);null===(i=r.eventBus)||void 0===i||i.dispatch("progress",{source:r,type:"load",total:a,loaded:o,percent:100*o/a})};return p.abrupt("return",d.promise.then((function(t){r.load(t)}),(function(t){if(d===r.pdfLoadingTask){var i="loading_error";t instanceof a.InvalidPDFException?i="invalid_file_error":t instanceof a.MissingPDFException?i="missing_file_error":t instanceof a.UnexpectedResponseException&&(i="unexpected_response_error");j.onError&&j.onError(t);return r.l10n.get(i).then((function(i){r._documentError(i,{message:null==t?void 0:t.message});throw t}))}})));case 16:case"end":return p.stop()}}),_callee8)}))));case 3:case"end":return o.stop()}}),_callee9)})))()},_ensureDownloadComplete:function _ensureDownloadComplete(){if(!this.pdfDocument||!this.downloadComplete)throw new Error("PDF document not downloaded.")},download:function download(){var t=arguments,r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee10(){var i,o,a,u,l;return _regeneratorRuntime().wrap((function _callee10$(c){for(;;)switch(c.prev=c.next){case 0:i=t.length>0&&void 0!==t[0]?t[0]:{};o=r._downloadUrl,a=r._docFilename;c.prev=2;r._ensureDownloadComplete();c.next=6;return r.pdfDocument.getData();case 6:u=c.sent;l=new Blob([u],{type:"application/pdf"});c.next=10;return r.downloadManager.download(l,o,a,i);case 10:c.next=16;break;case 12:c.prev=12;c.t0=c.catch(2);c.next=16;return r.downloadManager.downloadUrl(o,a,i);case 16:case"end":return c.stop()}}),_callee10,null,[[2,12]])})))()},save:function save(){var t=arguments,r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee11(){var i,o,a,u,l;return _regeneratorRuntime().wrap((function _callee11$(c){for(;;)switch(c.prev=c.next){case 0:i=t.length>0&&void 0!==t[0]?t[0]:{};if(!r._saveInProgress){c.next=3;break}return c.abrupt("return");case 3:r._saveInProgress=!0;c.next=6;return r.pdfScriptingManager.dispatchWillSave();case 6:o=r._downloadUrl,a=r._docFilename;c.prev=7;r._ensureDownloadComplete();c.next=11;return r.pdfDocument.saveDocument();case 11:u=c.sent;l=new Blob([u],{type:"application/pdf"});c.next=15;return r.downloadManager.download(l,o,a,i);case 15:c.next=22;break;case 17:c.prev=17;c.t0=c.catch(7);globalThis.ngxConsole.error("Error when saving the document: ".concat(c.t0.message));c.next=22;return r.download(i);case 22:c.prev=22;c.next=25;return r.pdfScriptingManager.dispatchDidSave();case 25:r._saveInProgress=!1;return c.finish(22);case 27:r._hasAnnotationEditors&&r.externalServices.reportTelemetry({type:"editing",data:{type:"save"}});case 28:case"end":return c.stop()}}),_callee11,null,[[7,17,22,27]])})))()},downloadOrSave:function downloadOrSave(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(null===(t=this.pdfDocument)||void 0===t?void 0:t.annotationStorage.size)>0?this.save(r):this.download(r)},_exportWithAnnotations:function _exportWithAnnotations(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee12(){var r,i;return _regeneratorRuntime().wrap((function _callee12$(o){for(;;)switch(o.prev=o.next){case 0:if(!t._saveInProgress){o.next=2;break}throw new Error("Already downloading");case 2:t._saveInProgress=!0;o.next=5;return t.pdfScriptingManager.dispatchWillSave();case 5:o.prev=5;t._ensureDownloadComplete();o.next=9;return t.pdfDocument.saveDocument();case 9:r=o.sent;i=new Blob([r],{type:"application/pdf"});return o.abrupt("return",i);case 14:o.prev=14;o.t0=o.catch(5);throw new Error("Error when saving the document: ".concat(o.t0.message));case 17:o.prev=17;o.next=20;return t.pdfScriptingManager.dispatchDidSave();case 20:t._saveInProgress=!1;return o.finish(17);case 22:case"end":return o.stop()}}),_callee12,null,[[5,14,17,22]])})))()},_exportWithoutAnnotations:function _exportWithoutAnnotations(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee13(){var r,i;return _regeneratorRuntime().wrap((function _callee13$(o){for(;;)switch(o.prev=o.next){case 0:o.prev=0;t._ensureDownloadComplete();o.next=4;return t.pdfDocument.getData();case 4:r=o.sent;i=new Blob([r],{type:"application/pdf"});return o.abrupt("return",i);case 9:o.prev=9;o.t0=o.catch(0);throw new Error("Error when saving the document: ".concat(o.t0.message));case 12:case"end":return o.stop()}}),_callee13,null,[[0,9]])})))()},export:function _export(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee14(){var r;return _regeneratorRuntime().wrap((function _callee14$(i){for(;;)switch(i.prev=i.next){case 0:if(!((null===(r=t.pdfDocument)||void 0===r?void 0:r.annotationStorage.size)>0)){i.next=2;break}return i.abrupt("return",t._exportWithAnnotations());case 2:return i.abrupt("return",t._exportWithoutAnnotations());case 3:case"end":return i.stop()}}),_callee14)})))()},openInExternalApp:function openInExternalApp(){this.downloadOrSave({openInExternalApp:!0})},_documentError:function _documentError(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this._unblockDocumentLoadEvent();this._otherError(t,i);this.eventBus.dispatch("documenterror",{source:this,message:t,reason:null!==(r=null==i?void 0:i.message)&&void 0!==r?r:null})},_otherError:function _otherError(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=["PDF.js v".concat(a.version||"?"," (build: ").concat(a.build||"?",")")];if(r){i.push("Message: ".concat(r.message));if(r.stack)i.push("Stack: ".concat(r.stack));else{r.filename&&i.push("File: ".concat(r.filename));r.lineNumber&&i.push("Line: ".concat(r.lineNumber))}}console.error("".concat(t,"\n\n").concat(i.join("\n")))},progress:function progress(t){var r,i;if(this.loadingBar&&!this.downloadComplete){var o=Math.round(100*t);if(!(o<=this.loadingBar.percent)){this.loadingBar.percent=o;(null!==(r=null===(i=this.pdfDocument)||void 0===i?void 0:i.loadingParams.disableAutoFetch)&&void 0!==r?r:l.AppOptions.get("disableAutoFetch"))&&this.loadingBar.setDisableAutoFetch()}}},load:function load(t){var r,i,a,u,c=this;this.pdfDocument=t;t.getDownloadInfo().then((function(t){var r,i=t.length;c._contentLength=i;c.downloadComplete=!0;null===(r=c.loadingBar)||void 0===r||r.hide();g.then((function(){var t;null===(t=c.eventBus)||void 0===t||t.dispatch("documentloaded",{source:c})}))}));var h=t.getPageLayout().catch((function(){})),d=t.getPageMode().catch((function(){})),p=t.getOpenAction().catch((function(){}));null===(r=this.toolbar)||void 0===r||r.setPagesCount(t.numPages,!1);null===(i=this.secondaryToolbar)||void 0===i||i.setPagesCount(t.numPages);this.pdfLinkService.setDocument(t);null===(a=this.pdfDocumentProperties)||void 0===a||a.setDocument(t);var v=this.pdfViewer;v.setDocument(t);var g=v.firstPagePromise,y=v.onePageRendered,m=v.pagesPromise;null===(u=this.pdfThumbnailViewer)||void 0===u||u.setDocument(t);var w=(this.store=new O.ViewHistory(t.fingerprints[0])).getMultiple({page:null,zoom:o.DEFAULT_SCALE_VALUE,scrollLeft:"0",scrollTop:"0",rotation:null,sidebarView:o.SidebarView.UNKNOWN,scrollMode:o.ScrollMode.UNKNOWN,spreadMode:o.SpreadMode.UNKNOWN}).catch((function(){}));g.then((function(r){var i;null===(i=c.loadingBar)||void 0===i||i.setWidth(c.appConfig.viewerContainer);c._initializeAnnotationStorageCallbacks(t);Promise.all([o.animationStarted,w,h,d,p]).then(function(){var r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee15(r){var i,a,u,h,d,p,g,y,w,b,D,P,E,A;return _regeneratorRuntime().wrap((function _callee15$(S){for(;;)switch(S.prev=S.next){case 0:i=_slicedToArray(r,5),i[0],a=i[1],u=i[2],h=i[3],d=i[4];p=l.AppOptions.get("viewOnLoad");c._initializePdfHistory({fingerprint:t.fingerprints[0],viewOnLoad:p,initialDest:null==d?void 0:d.dest});g=c.initialBookmark;y=l.AppOptions.get("defaultZoomValue");w=y?"zoom=".concat(y):null;b=null;D=l.AppOptions.get("sidebarViewOnLoad");P=l.AppOptions.get("scrollModeOnLoad");E=l.AppOptions.get("spreadModeOnLoad");if(null!=a&&a.page&&p!==G){w="page=".concat(a.page,"&zoom=").concat(y||a.zoom,",")+"".concat(a.scrollLeft,",").concat(a.scrollTop);b=parseInt(a.rotation,10);D===o.SidebarView.UNKNOWN&&(D=0|a.sidebarView);P===o.ScrollMode.UNKNOWN&&(P=0|a.scrollMode);E===o.SpreadMode.UNKNOWN&&(E=0|a.spreadMode)}h&&D===o.SidebarView.UNKNOWN&&(D=(0,o.apiPageModeToSidebarView)(h));if(u&&P===o.ScrollMode.UNKNOWN&&E===o.SpreadMode.UNKNOWN){A=(0,o.apiPageLayoutToViewerModes)(u);E=A.spreadMode}c.setInitialView(w,{rotation:b,sidebarView:D,scrollMode:P,spreadMode:E});c.eventBus.dispatch("documentinit",{source:c});c.isViewerEmbedded||v.focus();S.next=18;return Promise.race([m,new Promise((function(t){setTimeout(t,10)}))]);case 18:if(g||w){S.next=20;break}return S.abrupt("return");case 20:if(!v.hasEqualPageSizes){S.next=22;break}return S.abrupt("return");case 22:c.initialBookmark=g;v.currentScaleValue=v.currentScaleValue;c.setInitialView(w);case 25:case"end":return S.stop()}}),_callee15)})));return function(t){return r.apply(this,arguments)}}()).catch((function(){c.setInitialView()})).then((function(){v.update()}))}));m.then((function(){c._unblockDocumentLoadEvent();c._initializeAutoPrint(t,p)}),(function(t){j.onError&&j.onError(t);c.l10n.get("loading_error").then((function(r){c._documentError(r,{message:null==t?void 0:t.message})}))}));y.then((function(r){c.externalServices.reportTelemetry({type:"pageInfo",timestamp:r.timestamp});c.pdfOutlineViewer&&t.getOutline().then((function(r){t===c.pdfDocument&&c.pdfOutlineViewer.render({outline:r,pdfDocument:t})}));c.pdfAttachmentViewer&&t.getAttachments().then((function(r){t===c.pdfDocument&&c.pdfAttachmentViewer.render({attachments:r})}));c.pdfLayerViewer&&v.optionalContentConfigPromise.then((function(r){t===c.pdfDocument&&c.pdfLayerViewer.render({optionalContentConfig:r,pdfDocument:t})}))}));this._initializePageLabels(t);this._initializeMetadata(t)},_scriptingDocProperties:function _scriptingDocProperties(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee16(){var i,o;return _regeneratorRuntime().wrap((function _callee16$(a){for(;;)switch(a.prev=a.next){case 0:if(r.documentInfo){a.next=5;break}a.next=3;return new Promise((function(t){r.eventBus._on("metadataloaded",t,{once:!0})}));case 3:if(t===r.pdfDocument){a.next=5;break}return a.abrupt("return",null);case 5:if(r._contentLength){a.next=10;break}a.next=8;return new Promise((function(t){r.eventBus._on("documentloaded",t,{once:!0})}));case 8:if(t===r.pdfDocument){a.next=10;break}return a.abrupt("return",null);case 10:return a.abrupt("return",_objectSpread(_objectSpread({},r.documentInfo),{},{baseURL:r.baseUrl,filesize:r._contentLength,filename:r._docFilename,metadata:null===(i=r.metadata)||void 0===i?void 0:i.getRaw(),authors:null===(o=r.metadata)||void 0===o?void 0:o.get("dc:creator"),numPages:r.pagesCount,URL:r.url}));case 11:case"end":return a.stop()}}),_callee16)})))()},_initializeAutoPrint:function _initializeAutoPrint(t,r){var i=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee17(){var a,u,l,c,h,d;return _regeneratorRuntime().wrap((function _callee17$(p){for(;;)switch(p.prev=p.next){case 0:p.next=2;return Promise.all([r,i.pdfViewer.enableScripting?null:t.getJSActions()]);case 2:a=p.sent;u=_slicedToArray(a,2);l=u[0];c=u[1];if(t===i.pdfDocument){p.next=8;break}return p.abrupt("return");case 8:h="Print"===(null==l?void 0:l.action);if(!c){p.next=23;break}globalThis.ngxConsole.warn("Warning: JavaScript support is not enabled");p.t0=_regeneratorRuntime().keys(c);case 12:if((p.t1=p.t0()).done){p.next=23;break}d=p.t1.value;if(!h){p.next=16;break}return p.abrupt("break",23);case 16:p.t2=d;p.next="WillClose"===p.t2||"WillSave"===p.t2||"DidSave"===p.t2||"WillPrint"===p.t2||"DidPrint"===p.t2?19:20;break;case 19:return p.abrupt("continue",12);case 20:h=c[d].some((function(t){return o.AutoPrintRegExp.test(t)}));p.next=12;break;case 23:h&&i.triggerPrinting();case 24:case"end":return p.stop()}}),_callee17)})))()},_initializeMetadata:function _initializeMetadata(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee18(){var i,o,l,c,h,d,p,v,g,y;return _regeneratorRuntime().wrap((function _callee18$(m){for(;;)switch(m.prev=m.next){case 0:m.next=2;return t.getMetadata();case 2:l=m.sent;c=l.info;h=l.metadata;d=l.contentDispositionFilename;p=l.contentLength;if(t===r.pdfDocument){m.next=9;break}return m.abrupt("return");case 9:r.documentInfo=c;r.metadata=h;null!==(i=r._contentDispositionFilename)&&void 0!==i||(r._contentDispositionFilename=d);null!==(o=r._contentLength)&&void 0!==o||(r._contentLength=p);(!(v=window.PDFViewerApplicationOptions)||v.get("verbosity")>0)&&globalThis.ngxConsole.log("PDF ".concat(t.fingerprints[0]," [").concat(c.PDFFormatVersion," ")+"".concat((c.Producer||"-").trim()," / ").concat((c.Creator||"-").trim(),"] ")+"(PDF.js: ".concat(a.version||"?"," [").concat(a.build||"?","])  modified by ngx-extended-pdf-viewer ").concat(u.ngxExtendedPdfViewerVersion));g=c.Title;(y=null==h?void 0:h.get("dc:title"))&&("Untitled"===y||/[\uFFF0-\uFFFF]/g.test(y)||(g=y));g?r.setTitle("".concat(g," - ").concat(r._contentDispositionFilename||r._title)):r._contentDispositionFilename&&r.setTitle(r._contentDispositionFilename);!c.IsXFAPresent||c.IsAcroFormPresent||t.isPureXfa?!c.IsAcroFormPresent&&!c.IsXFAPresent||r.pdfViewer.renderForms||console.warn("Warning: Interactive form support is not enabled"):t.loadingParams.enableXfa?globalThis.ngxConsole.warn("Warning: XFA Foreground documents are not supported"):globalThis.ngxConsole.warn("Warning: XFA support is not enabled");c.IsSignaturesPresent&&console.warn("Warning: Digital signatures validation is not supported");r.eventBus.dispatch("metadataloaded",{source:r});case 22:case"end":return m.stop()}}),_callee18)})))()},_initializePageLabels:function _initializePageLabels(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee19(){var i,o,a,u,c,h,d,p,v;return _regeneratorRuntime().wrap((function _callee19$(g){for(;;)switch(g.prev=g.next){case 0:g.next=2;return t.getPageLabels();case 2:i=g.sent;if(t===r.pdfDocument){g.next=5;break}return g.abrupt("return");case 5:if(i&&!l.AppOptions.get("disablePageLabels")){g.next=7;break}return g.abrupt("return");case 7:o=i.length;a=0,u=0;c=0;case 10:if(!(c<o)){g.next=24;break}if((h=i[c])!==(c+1).toString()){g.next=16;break}a++;g.next=21;break;case 16:if(""!==h){g.next=20;break}u++;g.next=21;break;case 20:return g.abrupt("break",24);case 21:c++;g.next=10;break;case 24:if(!(a>=o||u>=o)){g.next=26;break}return g.abrupt("return");case 26:d=r.pdfViewer,p=r.pdfThumbnailViewer,v=r.toolbar;d.setPageLabels(i);null==p||p.setPageLabels(i);null==v||v.setPagesCount(o,!0);null==v||v.setPageNumber(d.currentPageNumber,d.currentPageLabel);case 31:case"end":return g.stop()}}),_callee19)})))()},_initializePdfHistory:function _initializePdfHistory(t){var r=t.fingerprint,i=t.viewOnLoad,o=t.initialDest,a=void 0===o?null:o;if(this.pdfHistory){this.pdfHistory.initialize({fingerprint:r,resetHistory:i===G,updateUrl:l.AppOptions.get("historyUpdateUrl")});if(this.pdfHistory.initialBookmark){this.initialBookmark=this.pdfHistory.initialBookmark;this.initialRotation=this.pdfHistory.initialRotation}if(a&&!this.initialBookmark&&i===B){this.initialBookmark=JSON.stringify(a);this.pdfHistory.push({explicitDest:a,pageNumber:null})}}},_initializeAnnotationStorageCallbacks:function _initializeAnnotationStorageCallbacks(t){var r=this;if(t===this.pdfDocument){var i=t.annotationStorage;i.onSetModified=function(){window.addEventListener("beforeunload",beforeUnload);r._annotationStorageModified=!0};i.onResetModified=function(){window.removeEventListener("beforeunload",beforeUnload);delete r._annotationStorageModified};i.onAnnotationEditor=function(t){r._hasAnnotationEditors=!!t;r.setTitle();t&&r.externalServices.reportTelemetry({type:"editing",data:{type:t}})}}},setInitialView:function setInitialView(t){var r,i,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=l.rotation,h=l.sidebarView,d=l.scrollMode,p=l.spreadMode,v=function setRotation(t){(0,o.isValidRotation)(t)&&(u.pdfViewer.pagesRotation=t)};this.isInitialViewSet=!0;null===(r=this.pdfSidebar)||void 0===r||r.setInitialView(h);!function setViewerModes(t,r){(0,o.isValidScrollMode)(t)&&(u.pdfViewer.scrollMode=t);(0,o.isValidSpreadMode)(r)&&(u.pdfViewer.spreadMode=r)}(d,p);if(this.initialBookmark){v(this.initialRotation);delete this.initialRotation;this.pdfLinkService.setHash(this.initialBookmark);this.initialBookmark=null}else if(t){v(c);this.pdfLinkService.setHash(t)}null===(i=this.toolbar)||void 0===i||i.setPageNumber(this.pdfViewer.currentPageNumber,this.pdfViewer.currentPageLabel);null===(a=this.secondaryToolbar)||void 0===a||a.setPageNumber(this.pdfViewer.currentPageNumber);if(!this.pdfViewer.currentScaleValue){var g=PDFViewerApplicationOptions.get("defaultZoomValue");g&&(this.pdfViewer.currentScaleValue=g)}},_cleanup:function _cleanup(){var t;if(this.pdfDocument){this.pdfViewer.cleanup();null===(t=this.pdfThumbnailViewer)||void 0===t||t.cleanup();this.pdfDocument.cleanup()}},forceRendering:function forceRendering(){var t;this.pdfRenderingQueue.printing=!!this.printService;this.pdfRenderingQueue.isThumbnailViewEnabled=(null===(t=this.pdfSidebar)||void 0===t?void 0:t.visibleView)===o.SidebarView.THUMBS;this.pdfRenderingQueue.renderHighestPriority()},beforePrint:function beforePrint(){var t=this;this._printAnnotationStoragePromise=this.pdfScriptingManager.dispatchWillPrint().catch((function(){})).then((function(){var r;return null===(r=t.pdfDocument)||void 0===r?void 0:r.annotationStorage.print}));if(!this.printService)if(this.supportsPrinting)if(this.pdfViewer.pageViewsReady){var r=this.pdfViewer.getPagesOverview(),i=this.appConfig.printContainer,o=l.AppOptions.get("printResolution"),a=this.pdfViewer.optionalContentConfigPromise,u=K.instance.createPrintService(this.pdfDocument,r,i,o,a,this._printAnnotationStoragePromise,this.l10n,this.pdfViewer.eventBus);this.printService=u;this.forceRendering();this.setTitle();u.layout();this._hasAnnotationEditors&&this.externalServices.reportTelemetry({type:"editing",data:{type:"print"}})}else this.l10n.get("printing_not_ready").then((function(t){window.alert(t)}));else this.l10n.get("printing_not_supported").then((function(r){t._otherError(r)}))},afterPrint:function afterPrint(){var t=this;if(this._printAnnotationStoragePromise){this._printAnnotationStoragePromise.then((function(){t.pdfScriptingManager.dispatchDidPrint()}));this._printAnnotationStoragePromise=null}if(this.printService){var r;this.printService.destroy();this.printService=null;null===(r=this.pdfDocument)||void 0===r||r.annotationStorage.resetModified()}this.forceRendering();this.setTitle()},rotatePages:function rotatePages(t){this.pdfViewer.pagesRotation+=t},requestPresentationMode:function requestPresentationMode(){var t;null===(t=this.pdfPresentationMode)||void 0===t||t.request()},triggerPrinting:function triggerPrinting(){this.supportsPrinting&&window.printPDF()},bindEvents:function bindEvents(){var t=this.eventBus,r=this._boundEvents;r.beforePrint=this.beforePrint.bind(this);r.afterPrint=this.afterPrint.bind(this);t._on("resize",webViewerResize);t._on("hashchange",webViewerHashchange);t._on("beforeprint",r.beforePrint);t._on("afterprint",r.afterPrint);t._on("pagerender",webViewerPageRender);t._on("pagerendered",webViewerPageRendered);t._on("updateviewarea",webViewerUpdateViewarea);t._on("pagechanging",webViewerPageChanging);t._on("scalechanging",webViewerScaleChanging);t._on("rotationchanging",webViewerRotationChanging);t._on("sidebarviewchanged",webViewerSidebarViewChanged);t._on("pagemode",webViewerPageMode);t._on("namedaction",webViewerNamedAction);t._on("presentationmodechanged",webViewerPresentationModeChanged);t._on("presentationmode",webViewerPresentationMode);t._on("switchannotationeditormode",webViewerSwitchAnnotationEditorMode);t._on("switchannotationeditorparams",webViewerSwitchAnnotationEditorParams);t._on("print",webViewerPrint);t._on("download",webViewerDownload);t._on("openinexternalapp",webViewerOpenInExternalApp);t._on("firstpage",webViewerFirstPage);t._on("lastpage",webViewerLastPage);t._on("nextpage",webViewerNextPage);t._on("previouspage",webViewerPreviousPage);t._on("zoomin",webViewerZoomIn);t._on("zoomout",webViewerZoomOut);t._on("zoomreset",webViewerZoomReset);t._on("pagenumberchanged",webViewerPageNumberChanged);t._on("scalechanged",webViewerScaleChanged);t._on("rotatecw",webViewerRotateCw);t._on("rotateccw",webViewerRotateCcw);t._on("optionalcontentconfig",webViewerOptionalContentConfig);t._on("switchscrollmode",webViewerSwitchScrollMode);t._on("scrollmodechanged",webViewerScrollModeChanged);t._on("switchspreadmode",webViewerSwitchSpreadMode);t._on("spreadmodechanged",webViewerSpreadModeChanged);t._on("documentproperties",webViewerDocumentProperties);t._on("findfromurlhash",webViewerFindFromUrlHash);t._on("updatefindmatchescount",webViewerUpdateFindMatchesCount);t._on("updatefindcontrolstate",webViewerUpdateFindControlState);if(l.AppOptions.get("pdfBug")){r.reportPageStatsPDFBug=reportPageStatsPDFBug;t._on("pagerendered",r.reportPageStatsPDFBug);t._on("pagechanging",r.reportPageStatsPDFBug)}t._on("fileinputchange",H);t._on("openfile",U)},bindWindowEvents:function bindWindowEvents(){var t=this.eventBus,r=this._boundEvents;!function addWindowResolutionChange(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t&&function webViewerResolutionChange(t){j.pdfViewer.refresh()}();var i=window.matchMedia("(resolution: ".concat(window.devicePixelRatio||1,"dppx)"));i.addEventListener("change",addWindowResolutionChange,{once:!0});r.removeWindowResolutionChange||(r.removeWindowResolutionChange=function(){i.removeEventListener("change",addWindowResolutionChange);r.removeWindowResolutionChange=null})}();r.windowResize=function(){t.dispatch("resize",{source:window})};r.windowHashChange=function(){t.dispatch("hashchange",{source:window,hash:document.location.hash.substring(1)})};r.windowBeforePrint=function(){t.dispatch("beforeprint",{source:window})};r.windowAfterPrint=function(){t.dispatch("afterprint",{source:window})};r.windowUpdateFromSandbox=function(r){t.dispatch("updatefromsandbox",{source:window,detail:r.detail})};window.addEventListener("visibilitychange",webViewerVisibilityChange);var i=document.getElementById("viewerContainer");null==i||i.addEventListener("wheel",webViewerWheel,{passive:!1});var o=document.getElementById("mainContainer");null==o||o.addEventListener("touchstart",webViewerTouchStart,{passive:!1});null==o||o.addEventListener("touchmove",webViewerTouchMove,{passive:!1});null==o||o.addEventListener("touchend",webViewerTouchEnd,{passive:!1});window.addEventListener("click",webViewerClick);window.addEventListener("keydown",webViewerKeyDown);window.addEventListener("keyup",webViewerKeyUp);window.addEventListener("resize",r.windowResize);window.addEventListener("hashchange",r.windowHashChange);window.addEventListener("beforeprint",r.windowBeforePrint);window.addEventListener("afterprint",r.windowAfterPrint);window.addEventListener("updatefromsandbox",r.windowUpdateFromSandbox)},unbindEvents:function unbindEvents(){var t=this.eventBus,r=this._boundEvents;t._off("resize",webViewerResize);t._off("hashchange",webViewerHashchange);t._off("beforeprint",r.beforePrint);t._off("afterprint",r.afterPrint);t._off("pagerender",webViewerPageRender);t._off("pagerendered",webViewerPageRendered);t._off("updateviewarea",webViewerUpdateViewarea);t._off("pagechanging",webViewerPageChanging);t._off("scalechanging",webViewerScaleChanging);t._off("rotationchanging",webViewerRotationChanging);t._off("sidebarviewchanged",webViewerSidebarViewChanged);t._off("pagemode",webViewerPageMode);t._off("namedaction",webViewerNamedAction);t._off("presentationmodechanged",webViewerPresentationModeChanged);t._off("presentationmode",webViewerPresentationMode);t._off("print",webViewerPrint);t._off("download",webViewerDownload);t._off("openinexternalapp",webViewerOpenInExternalApp);t._off("firstpage",webViewerFirstPage);t._off("lastpage",webViewerLastPage);t._off("nextpage",webViewerNextPage);t._off("previouspage",webViewerPreviousPage);t._off("zoomin",webViewerZoomIn);t._off("zoomout",webViewerZoomOut);t._off("zoomreset",webViewerZoomReset);t._off("pagenumberchanged",webViewerPageNumberChanged);t._off("scalechanged",webViewerScaleChanged);t._off("rotatecw",webViewerRotateCw);t._off("rotateccw",webViewerRotateCcw);t._off("optionalcontentconfig",webViewerOptionalContentConfig);t._off("switchscrollmode",webViewerSwitchScrollMode);t._off("scrollmodechanged",webViewerScrollModeChanged);t._off("switchspreadmode",webViewerSwitchSpreadMode);t._off("spreadmodechanged",webViewerSpreadModeChanged);t._off("documentproperties",webViewerDocumentProperties);t._off("findfromurlhash",webViewerFindFromUrlHash);t._off("updatefindmatchescount",webViewerUpdateFindMatchesCount);t._off("updatefindcontrolstate",webViewerUpdateFindControlState);if(r.reportPageStatsPDFBug){t._off("pagerendered",r.reportPageStatsPDFBug);t._off("pagechanging",r.reportPageStatsPDFBug);r.reportPageStatsPDFBug=null}t._off("fileinputchange",H);t._off("openfile",U);r.beforePrint=null;r.afterPrint=null},unbindWindowEvents:function unbindWindowEvents(){var t,r=this._boundEvents;window.removeEventListener("visibilitychange",webViewerVisibilityChange);window.removeEventListener("wheel",webViewerWheel,{passive:!1});var i=document.getElementById("mainContainer");if(i){i.removeEventListener("touchstart",webViewerTouchStart,{passive:!1});i.removeEventListener("touchmove",webViewerTouchMove,{passive:!1});i.removeEventListener("touchend",webViewerTouchEnd,{passive:!1})}window.removeEventListener("click",webViewerClick);window.removeEventListener("keydown",webViewerKeyDown);window.removeEventListener("keyup",webViewerKeyUp);window.removeEventListener("resize",r.windowResize);window.removeEventListener("hashchange",r.windowHashChange);window.removeEventListener("beforeprint",r.windowBeforePrint);window.removeEventListener("afterprint",r.windowAfterPrint);window.removeEventListener("updatefromsandbox",r.windowUpdateFromSandbox);null===(t=r.removeWindowResolutionChange)||void 0===t||t.call(r);r.windowResize=null;r.windowHashChange=null;r.windowBeforePrint=null;r.windowAfterPrint=null;r.windowUpdateFromSandbox=null},_accumulateTicks:function _accumulateTicks(t,r){(this[r]>0&&t<0||this[r]<0&&t>0)&&(this[r]=0);this[r]+=t;var i=Math.trunc(this[r]);this[r]-=i;return i},_accumulateFactor:function _accumulateFactor(t,r,i){if(1===r)return 1;(this[i]>1&&r<1||this[i]<1&&r>1)&&(this[i]=1);var o=Math.floor(t*r*this[i]*100)/(100*t);this[i]=r/o;return o},_centerAtPos:function _centerAtPos(t,r,i){var o=this.pdfViewer,a=o.currentScale/t-1;if(0!==a){var u=_slicedToArray(o.containerTopLeft,2),l=u[0],c=u[1];o.container.scrollLeft+=(r-c)*a;o.container.scrollTop+=(i-l)*a}},_unblockDocumentLoadEvent:function _unblockDocumentLoadEvent(){var t,r;null===(t=(r=document).blockUnblockOnload)||void 0===t||t.call(r,!1);this._unblockDocumentLoadEvent=function(){}},get scriptingReady(){return this.pdfScriptingManager.ready}},V=["null","http://mozilla.github.io","https://mozilla.github.io"],W=function validateFileURL(t){if(t)try{var r=new URL(window.location.href).origin||"null";if(V.includes(r))return;if(new URL(t,window.location.href).origin!==r)throw new Error("file origin does not match viewer's")}catch(t){j.onError&&j.onError(t);j.l10n.get("loading_error").then((function(r){j._documentError(r,{message:null==t?void 0:t.message})}));throw t}};function loadFakeWorker(){return _loadFakeWorker.apply(this,arguments)}function _loadFakeWorker(){return(_loadFakeWorker=_asyncToGenerator(_regeneratorRuntime().mark((function _callee20(){return _regeneratorRuntime().wrap((function _callee20$(t){for(;;)switch(t.prev=t.next){case 0:a.GlobalWorkerOptions.workerSrc||(a.GlobalWorkerOptions.workerSrc=l.AppOptions.get("workerSrc"));"Function"===a.GlobalWorkerOptions.workerSrc.constructor.name&&(a.GlobalWorkerOptions.workerSrc=a.GlobalWorkerOptions.workerSrc());t.next=4;return(0,a.loadScript)(a.PDFWorker.workerSrc);case 4:case"end":return t.stop()}}),_callee20)})))).apply(this,arguments)}function loadPDFBug(t){return _loadPDFBug.apply(this,arguments)}function _loadPDFBug(){return(_loadPDFBug=_asyncToGenerator(_regeneratorRuntime().mark((function _callee21(t){return _regeneratorRuntime().wrap((function _callee21$(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),_callee21)})))).apply(this,arguments)}function reportPageStatsPDFBug(t){var r,i,o=t.pageNumber;if(null!==(r=globalThis.Stats)&&void 0!==r&&r.enabled){var a=j.pdfViewer.getPageView(o-1);globalThis.Stats.add(o,null==a||null===(i=a.pdfPage)||void 0===i?void 0:i.stats)}}function webViewerPageRender(t){if(t.pageNumber===j.page){var r;null===(r=j.toolbar)||void 0===r||r.updateLoadingIndicatorState(!0)}}function webViewerPageRendered(t){var r,i=t.pageNumber,a=t.error;if(i===j.page){var u;null===(u=j.toolbar)||void 0===u||u.updateLoadingIndicatorState(!1)}if((null===(r=j.pdfSidebar)||void 0===r?void 0:r.visibleView)===o.SidebarView.THUMBS){var l,c=j.pdfViewer.getPageView(i-1),h=null===(l=j.pdfThumbnailViewer)||void 0===l?void 0:l.getThumbnail(i-1);c&&(null==h||h.setImage(c))}a&&j.l10n.get("rendering_error").then((function(t){j._otherError(t,a)}))}function webViewerPageMode(t){var r,i,a=t.mode;switch(a){case"thumbs":i=o.SidebarView.THUMBS;break;case"bookmarks":case"outline":i=o.SidebarView.OUTLINE;break;case"attachments":i=o.SidebarView.ATTACHMENTS;break;case"layers":i=o.SidebarView.LAYERS;break;case"none":i=o.SidebarView.NONE;break;default:globalThis.ngxConsole.error('Invalid "pagemode" hash parameter: '+a);return}null===(r=j.pdfSidebar)||void 0===r||r.switchView(i,!0)}function webViewerNamedAction(t){var r;switch(t.action){case"GoToPage":null===(r=j.appConfig.toolbar)||void 0===r||r.pageNumber.select();break;case"Find":j.supportsIntegratedFind||null==j||j.findBar.toggle();break;case"Print":j.triggerPrinting();break;case"SaveAs":j.downloadOrSave()}}function webViewerPresentationModeChanged(t){j.pdfViewer.presentationModeState=t.state}function webViewerSidebarViewChanged(t){var r=t.view;j.pdfRenderingQueue.isThumbnailViewEnabled=r===o.SidebarView.THUMBS;if(j.isInitialViewSet){var i;null===(i=j.store)||void 0===i||i.set("sidebarView",r).catch((function(){}))}}function webViewerUpdateViewarea(t){var r=t.location;if(j.isInitialViewSet){var i,o={};void 0===r.pageNumber&&null===r.pageNumber||(o.page=r.pageNumber);r.scale&&(o.zoom=r.scale);r.left&&(o.scrollLeft=r.left);r.top&&(o.scrollTop=r.top);void 0===r.rotation&&null===r.rotation||(o.rotation=r.rotation);null===(i=j.store)||void 0===i||i.setMultiple(o).catch((function(){}))}if(j.appConfig.secondaryToolbar){var a=j.pdfLinkService.getAnchorUrl(r.pdfOpenParams);j.appConfig.secondaryToolbar.viewBookmarkButton.href=a}}function webViewerScrollModeChanged(t){if(j.isInitialViewSet&&!j.pdfViewer.isInPresentationMode){var r;null===(r=j.store)||void 0===r||r.set("scrollMode",t.mode).catch((function(){}))}}function webViewerSpreadModeChanged(t){if(j.isInitialViewSet&&!j.pdfViewer.isInPresentationMode){var r;null===(r=j.store)||void 0===r||r.set("spreadMode",t.mode).catch((function(){}))}}function webViewerResize(){var t=j.pdfDocument,r=j.pdfViewer;if((!j.pdfRenderingQueue.printing||!window.matchMedia("print").matches)&&t){var i=r.currentScaleValue;"auto"!==i&&"page-fit"!==i&&"page-width"!==i||(r.currentScaleValue=i);r.update()}}function webViewerHashchange(t){var r,i=t.hash;i&&(j.isInitialViewSet?null!==(r=j.pdfHistory)&&void 0!==r&&r.popStateInProgress||j.pdfLinkService.setHash(i):j.initialBookmark=i)}var H=function webViewerFileInputChange(t){var r;if(null===(r=j.pdfViewer)||void 0===r||!r.isInPresentationMode){var i=t.fileInput.files[0];j.open({url:URL.createObjectURL(i),originalUrl:i.name});if(globalThis.setNgxExtendedPdfViewerSource){var o;globalThis.setNgxExtendedPdfViewerSource(null!==(o=i.name)&&void 0!==o?o:URL.createObjectURL(i))}}},U=function webViewerOpenFile(t){j.appConfig.openFileInput.click()};function webViewerPresentationMode(){j.requestPresentationMode()}function webViewerSwitchAnnotationEditorMode(t){j.pdfViewer.annotationEditorMode=t}function webViewerSwitchAnnotationEditorParams(t){j.pdfViewer.annotationEditorParams=t}function webViewerPrint(){j.triggerPrinting()}function webViewerDownload(){j.downloadOrSave()}function webViewerOpenInExternalApp(){j.openInExternalApp()}function webViewerFirstPage(){j.page=1}function webViewerLastPage(){j.page=j.pagesCount}function webViewerNextPage(){j.pdfViewer.nextPage()}function webViewerPreviousPage(){j.pdfViewer.previousPage()}function webViewerZoomIn(){j.zoomIn()}function webViewerZoomOut(){j.zoomOut()}function webViewerZoomReset(){j.zoomReset()}function webViewerPageNumberChanged(t){var r=j.pdfViewer;""!==t.value&&j.pdfLinkService.goToPage(t.value);if(t.value!==r.currentPageNumber.toString()&&t.value!==r.currentPageLabel){var i;null===(i=j.toolbar)||void 0===i||i.setPageNumber(r.currentPageNumber,r.currentPageLabel)}}function webViewerScaleChanged(t){j.pdfViewer.currentScaleValue=t.value}function webViewerRotateCw(){j.rotatePages(90)}function webViewerRotateCcw(){j.rotatePages(-90)}function webViewerOptionalContentConfig(t){j.pdfViewer.optionalContentConfigPromise=t.promise}function webViewerSwitchScrollMode(t){j.pdfViewer.scrollMode=t.mode}function webViewerSwitchSpreadMode(t){j.pdfViewer.spreadMode=t.mode}function webViewerDocumentProperties(){var t;null===(t=j.pdfDocumentProperties)||void 0===t||t.open()}function webViewerFindFromUrlHash(t){j.eventBus.dispatch("find",{source:t.source,type:"",query:t.query,caseSensitive:!1,entireWord:!1,highlightAll:!0,findPrevious:!1,matchDiacritics:!0})}function webViewerUpdateFindMatchesCount(t){var r=t.matchesCount;j.supportsIntegratedFind?j.externalServices.updateFindMatchesCount(r):j.findBar.updateResultsCount(r)}function webViewerUpdateFindControlState(t){var r=t.state,i=t.previous,o=t.matchesCount,a=t.rawQuery;if(j.supportsIntegratedFind)j.externalServices.updateFindControlState({result:r,findPrevious:i,matchesCount:o,rawQuery:a});else{var u;null===(u=j.findBar)||void 0===u||u.updateUIState(r,i,o)}}function webViewerScaleChanging(t){var r;null===(r=j.toolbar)||void 0===r||r.setPageScale(t.presetValue,t.scale);j.pdfViewer.update()}function webViewerRotationChanging(t){j.pdfThumbnailViewer&&(j.pdfThumbnailViewer.pagesRotation=t.pagesRotation);j.forceRendering();j.pdfViewer.currentPageNumber=t.pageNumber}function webViewerPageChanging(t){var r,i,a,u,l=t.pageNumber,c=t.pageLabel;null===(r=j.toolbar)||void 0===r||r.setPageNumber(l,c);null===(i=j.secondaryToolbar)||void 0===i||i.setPageNumber(l);if((null===(a=j.pdfSidebar)||void 0===a?void 0:a.visibleView)===o.SidebarView.THUMBS){var h;null===(h=j.pdfThumbnailViewer)||void 0===h||h.scrollThumbnailIntoView(l)}var d=j.pdfViewer.getPageView(l-1);null===(u=j.toolbar)||void 0===u||u.updateLoadingIndicatorState((null==d?void 0:d.renderingState)===o.RenderingStates.RUNNING);var p=document.getElementById("pageNumber");if(p){var v=new CustomEvent("page-change");p.dispatchEvent(v)}}function webViewerVisibilityChange(t){"visible"===document.visibilityState&&setZoomDisabledTimeout()}var z=null;function setZoomDisabledTimeout(){z&&clearTimeout(z);z=setTimeout((function(){z=null}),M)}function webViewerWheel(t){var r=document.getElementById("viewerContainer");if(r.parentNode.querySelector(":hover")===r){var i=j.pdfViewer,a=j.supportedMouseWheelZoomModifierKeys,u=j.supportsPinchToZoom;if(!i.isInPresentationMode){var l=(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0);if(!window.isKeyIgnored||!window.isKeyIgnored(l,"WHEEL")){var c=t.deltaMode,h=Math.exp(-t.deltaY/100),d=t.ctrlKey&&!j._isCtrlKeyDown&&c===WheelEvent.DOM_DELTA_PIXEL&&0===t.deltaX&&(Math.abs(h-1)<.05||!1)&&0===t.deltaZ;if(d||t.ctrlKey&&a.ctrlKey||t.metaKey&&a.metaKey){t.preventDefault();if(z||"hidden"===document.visibilityState)return;var p=i.currentScale;if(d&&u)if((h=j._accumulateFactor(p,h,"_wheelUnusedFactor"))<1)j.zoomOut(null,h);else{if(!(h>1))return;j.zoomIn(null,h)}else{var v=(0,o.normalizeWheelEventDirection)(t),g=0;if(c===WheelEvent.DOM_DELTA_LINE||c===WheelEvent.DOM_DELTA_PAGE)g=Math.abs(v)>=1?Math.sign(v):j._accumulateTicks(v,"_wheelUnusedTicks");else{g=j._accumulateTicks(v/30,"_wheelUnusedTicks")}if(g<0)j.zoomOut(-g);else{if(!(g>0))return;j.zoomIn(g)}}j._centerAtPos(p,t.clientX,t.clientY)}else setZoomDisabledTimeout()}}}}function webViewerTouchStart(t){if(!(j.pdfViewer.isInPresentationMode||t.touches.length<2)){t.preventDefault();if(2===t.touches.length){var r=_slicedToArray(t.touches,2),i=r[0],o=r[1];if(i.identifier>o.identifier){var a=[o,i];i=a[0];o=a[1]}j._touchInfo={touch0X:i.pageX,touch0Y:i.pageY,touch1X:o.pageX,touch1Y:o.pageY}}else j._touchInfo=null}}function webViewerTouchMove(t){if(j._touchInfo&&2===t.touches.length){var r=j.pdfViewer,i=j._touchInfo,o=j.supportsPinchToZoom,a=_slicedToArray(t.touches,2),u=a[0],l=a[1];if(u.identifier>l.identifier){var c=[l,u];u=c[0];l=c[1]}var h=u,d=h.pageX,p=h.pageY,v=l,g=v.pageX,y=v.pageY,m=i.touch0X,w=i.touch0Y,b=i.touch1X,D=i.touch1Y;if(!(Math.abs(m-d)<=1&&Math.abs(w-p)<=1&&Math.abs(b-g)<=1&&Math.abs(D-y)<=1)){i.touch0X=d;i.touch0Y=p;i.touch1X=g;i.touch1Y=y;if(m===d&&w===p){var P=b-d,E=D-p,A=g-d,S=y-p,x=P*S-E*A;if(Math.abs(x)>.02*Math.hypot(P,E)*Math.hypot(A,S))return}else if(b===g&&D===y){var C=m-g,k=w-y,T=d-g,I=p-y,L=C*I-k*T;if(Math.abs(L)>.02*Math.hypot(C,k)*Math.hypot(T,I))return}else{if((d-m)*(g-b)+(p-w)*(y-D)>=0)return}t.preventDefault();var O=Math.hypot(d-g,p-y)||1,M=Math.hypot(m-b,w-D)||1,B=r.currentScale;if(o){var G=j._accumulateFactor(B,O/M,"_touchUnusedFactor");if(G<1)j.zoomOut(null,G);else{if(!(G>1))return;j.zoomIn(null,G)}}else{var R=j._accumulateTicks((O-M)/30,"_touchUnusedTicks");if(R<0)j.zoomOut(-R);else{if(!(R>0))return;j.zoomIn(R)}}j._centerAtPos(B,(d+g)/2,(p+y)/2)}}}function webViewerTouchEnd(t){if(j._touchInfo){t.preventDefault();j._touchInfo=null;j._touchUnusedTicks=0;j._touchUnusedFactor=1}}function webViewerClick(t){var r,i,o;if(null!==(r=j.secondaryToolbar)&&void 0!==r&&r.isOpen){var a=j.appConfig;if(j.pdfViewer.containsElement(t.target)||null!==(i=a.toolbar)&&void 0!==i&&i.container.contains(t.target)&&t.target!==(null===(o=a.secondaryToolbar)||void 0===o?void 0:o.toggleButton)){if(t.target&&t.target.parentElement===a.secondaryToolbar.toggleButton)return;if(t.target&&t.target.parentElement&&t.target.parentElement.parentElement===a.secondaryToolbar.toggleButton)return;j.secondaryToolbar.close()}}}function webViewerKeyUp(t){"Control"===t.key&&(j._isCtrlKeyDown=!1)}function webViewerKeyDown(t){var r,i,a,u,l;j._isCtrlKeyDown="Control"===t.key;if(!j.overlayManager.active){var c=j.eventBus,h=j.pdfViewer,d=h.isInPresentationMode,p=!1,v=!1,g=(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0);if(!window.isKeyIgnored||!window.isKeyIgnored(g,t.keyCode)){if(1===g||8===g||5===g||12===g)switch(t.keyCode){case 70:if(!j.supportsIntegratedFind&&!t.shiftKey){var y;null===(y=j.findBar)||void 0===y||y.open();p=!0}break;case 71:if(!j.supportsIntegratedFind){var m=j.findController.state;if(m){var w={source:window,type:"again",findPrevious:5===g||12===g};c.dispatch("find",_objectSpread(_objectSpread({},m),w))}p=!0}break;case 61:case 107:case 187:case 171:j.zoomIn();p=!0;break;case 173:case 109:case 189:j.zoomOut();p=!0;break;case 48:case 96:if(!d){setTimeout((function(){j.zoomReset()}));p=!1}break;case 38:if(d||j.page>1){j.page=1;p=!0;v=!0}break;case 40:if(d||j.page<j.pagesCount){j.page=j.pagesCount;p=!0;v=!0}}if(1===g||8===g)switch(t.keyCode){case 83:c.dispatch("download",{source:window});p=!0;break;case 79:c.dispatch("openfile",{source:window});p=!0}if(3===g||10===g)switch(t.keyCode){case 80:j.requestPresentationMode();p=!0;j.externalServices.reportTelemetry({type:"buttons",data:{id:"presentationModeKeyboard"}});break;case 71:if(j.appConfig.toolbar){j.appConfig.toolbar.pageNumber.select();p=!0}}if(p){v&&!d&&h.focus();t.preventDefault()}else{var b=(0,o.getActiveOrFocusedElement)(),D=null==b?void 0:b.tagName.toUpperCase();if(!("INPUT"===D||"TEXTAREA"===D||"SELECT"===D||null!=b&&b.isContentEditable)||27===t.keyCode){if(0===g){var P=0,E=!1;switch(t.keyCode){case 38:case 33:h.isVerticalScrollbarEnabled&&(E=!0);P=-1;break;case 8:d||(E=!0);P=-1;break;case 37:h.isHorizontalScrollbarEnabled&&(E=!0);case 75:case 80:P=-1;break;case 27:if(null!==(r=j.secondaryToolbar)&&void 0!==r&&r.isOpen){j.secondaryToolbar.close();p=!0}if(!j.supportsIntegratedFind&&null!==(i=j.findBar)&&void 0!==i&&i.opened){j.findBar.close();p=!0}break;case 40:case 34:h.isVerticalScrollbarEnabled&&(E=!0);P=1;break;case 13:case 32:d||(E=!0);P=1;break;case 39:h.isHorizontalScrollbarEnabled&&(E=!0);case 74:case 78:P=1;break;case 36:if(d||j.page>1){j.page=1;p=!0;v=!0}break;case 35:if(d||j.page<j.pagesCount){j.page=j.pagesCount;p=!0;v=!0}break;case 83:null===(a=j.pdfCursorTools)||void 0===a||a.switchTool(o.CursorTool.SELECT);break;case 72:null===(u=j.pdfCursorTools)||void 0===u||u.switchTool(o.CursorTool.HAND);break;case 82:j.rotatePages(90);break;case 115:null===(l=j.pdfSidebar)||void 0===l||l.toggle()}if(0!==P&&(!E||"page-fit"===h.currentScaleValue)){P>0?h.nextPage():h.previousPage();p=!0}}if(4===g)switch(t.keyCode){case 13:case 32:if(!d&&"page-fit"!==h.currentScaleValue)break;h.previousPage();p=!0;break;case 82:j.rotatePages(-90)}v&&!h.containsElement(b)&&h.focus();p&&t.preventDefault()}}}}}function beforeUnload(t){t.preventDefault();t.returnValue="";return!1}var K=r.PDFPrintServiceFactory={instance:{supportsPrinting:!1,createPrintService:function createPrintService(){throw new Error("Not implemented: createPrintService")}}}},(t,r,i)=>{var o=i(67),a=i(196);o({target:"Array",stat:!0,forced:!i(169)((function(t){Array.from(t)}))},{from:a})},(t,r,i)=>{var o=i(106),a=i(34),u=i(9),l=i(197),c=i(164),h=i(111),d=i(55),p=i(102),v=i(165),g=i(166),y=Array;t.exports=function from(t){var r=u(t),i=h(this),m=arguments.length,w=m>1?arguments[1]:void 0,b=void 0!==w;b&&(w=o(w,m>2?arguments[2]:void 0));var D,P,E,A,S,x,C=g(r),k=0;if(!C||this===y&&c(C)){D=d(r);P=i?new this(D):y(D);for(;D>k;k++){x=b?w(r[k],k):r[k];p(P,k,x)}}else{S=(A=v(r,C)).next;P=i?new this:[];for(;!(E=a(S,A)).done;k++){x=b?l(A,w,[E.value,k],!0):E.value;p(P,k,x)}}P.length=k;return P}},(t,r,i)=>{var o=i(31),a=i(167);t.exports=function(t,r,i,u){try{return u?r(o(i)[0],i[1]):r(i)}catch(r){a(t,"throw",r)}}},(t,r,i)=>{var o=i(67),a=i(105).filter;o({target:"Array",proto:!0,forced:!i(189)("filter")},{filter:function filter(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var o=i(67),a=i(34),u=i(39),l=i(31),c=i(184),h=i(200),d=i(197),p=i(15),v=h((function(){for(var t,r,i=this.iterator,o=this.predicate,u=this.next;;){t=l(a(u,i));if(this.done=!!t.done)return;r=t.value;if(d(i,o,[r,this.counter++],!0))return r}}));o({target:"Iterator",proto:!0,real:!0,forced:p},{filter:function filter(t){l(this);u(t);return new v(c(this),{predicate:t})}})},(t,r,i)=>{var o=i(34),a=i(47),u=i(64),l=i(201),c=i(13),h=i(62),d=i(38),p=i(80).IteratorPrototype,v=i(87),g=i(167),y=c("toStringTag"),m="IteratorHelper",w="WrapForValidIterator",b=h.set,createIteratorProxyPrototype=function(t){var r=h.getterFor(t?w:m);return l(a(p),{next:function next(){var i=r(this);if(t)return i.nextHandler();try{var o=i.done?void 0:i.nextHandler();return v(o,i.done)}catch(t){i.done=!0;throw t}},return:function(){var i=r(this),a=i.iterator;i.done=!0;if(t){var u=d(a,"return");return u?o(u,a):v(void 0,!0)}if(i.inner)try{g(i.inner.iterator,"normal")}catch(t){return g(a,"throw",t)}g(a,"normal");return v(void 0,!0)}})},D=createIteratorProxyPrototype(!0),P=createIteratorProxyPrototype(!1);u(P,y,"Iterator Helper");t.exports=function(t,r){var i=function Iterator(i,o){if(o){o.iterator=i.iterator;o.next=i.next}else o=i;o.type=r?w:m;o.nextHandler=t;o.counter=0;o.done=!1;b(this,o)};i.prototype=r?D:P;return i}},(t,r,i)=>{var o=i(70);t.exports=function(t,r,i){for(var a in r)o(t,a,r[a],i);return t}},(t,r,i)=>{var o=i(67),a=i(8),u=i(43),l=i(68).f,c=i(24);o({target:"Object",stat:!0,forced:!c||a((function(){l(1)})),sham:!c},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(t,r){return l(u(t),r)}})},(t,r,i)=>{var o=i(67),a=i(24),u=i(75),l=i(43),c=i(68),h=i(102);o({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(t){for(var r,i,o=l(t),a=c.f,d=u(o),p={},v=0;d.length>v;)void 0!==(i=a(o,r=d[v++]))&&h(p,r,i);return p}})},(t,r,i)=>{var o=i(67),a=i(4);o({global:!0,forced:a.globalThis!==a},{globalThis:a})},(t,r,i)=>{var o=i(67),a=i(51).includes,u=i(8),l=i(46);o({target:"Array",proto:!0,forced:u((function(){return!Array(1).includes()}))},{includes:function includes(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}});l("includes")},(t,r,i)=>{var o=i(67),a=i(6),u=i(207),l=i(10),c=i(94),h=i(209),d=a("".indexOf);o({target:"String",proto:!0,forced:!h("includes")},{includes:function includes(t){return!!~d(c(l(this)),c(u(t)),arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var o=i(208),a=TypeError;t.exports=function(t){if(o(t))throw new a("The method doesn't accept regular expressions");return t}},(t,r,i)=>{var o=i(27),a=i(45),u=i(13)("match");t.exports=function(t){var r;return o(t)&&(void 0!==(r=t[u])?!!r:"RegExp"===a(t))}},(t,r,i)=>{var o=i(13)("match");t.exports=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{r[o]=!1;return"/./"[t](r)}catch(t){}}return!1}},(t,r,i)=>{var o=i(67),a=i(211).values;o({target:"Object",stat:!0},{values:function values(t){return a(t)}})},(t,r,i)=>{var o=i(24),a=i(8),u=i(6),l=i(81),c=i(49),h=i(43),d=u(i(69).f),p=u([].push),v=o&&a((function(){var t=Object.create(null);t[2]=2;return!d(t,2)})),createMethod=function(t){return function(r){for(var i,a=h(r),u=c(a),g=v&&null===l(a),y=u.length,m=0,w=[];y>m;){i=u[m++];o&&!(g?i in a:d(a,i))||p(w,t?[i,a[i]]:a[i])}return w}};t.exports={entries:createMethod(!0),values:createMethod(!1)}},(t,r,i)=>{var o=i(67),a=i(213);o({target:"RegExp",proto:!0,forced:/./.exec!==a},{exec:a})},(t,r,i)=>{var o=i(34),a=i(6),u=i(94),l=i(214),c=i(215),h=i(14),d=i(47),p=i(62).get,v=i(216),g=i(217),y=h("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,w=m,b=a("".charAt),D=a("".indexOf),P=a("".replace),E=a("".slice),A=function(){var t=/a/,r=/b*/g;o(m,t,"a");o(m,r,"a");return 0!==t.lastIndex||0!==r.lastIndex}(),S=c.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];(A||x||S||v||g)&&(w=function exec(t){var r,i,a,c,h,v,g,C=this,k=p(C),T=u(t),I=k.raw;if(I){I.lastIndex=C.lastIndex;r=o(w,I,T);C.lastIndex=I.lastIndex;return r}var L=k.groups,O=S&&C.sticky,M=o(l,C),B=C.source,G=0,R=T;if(O){M=P(M,"y","");-1===D(M,"g")&&(M+="g");R=E(T,C.lastIndex);if(C.lastIndex>0&&(!C.multiline||C.multiline&&"\n"!==b(T,C.lastIndex-1))){B="(?: "+B+")";R=" "+R;G++}i=new RegExp("^(?:"+B+")",M)}x&&(i=new RegExp("^"+B+"$(?!\\s)",M));A&&(a=C.lastIndex);c=o(m,O?i:C,R);if(O)if(c){c.input=E(c.input,G);c[0]=E(c[0],G);c.index=C.lastIndex;C.lastIndex+=c[0].length}else C.lastIndex=0;else A&&c&&(C.lastIndex=C.global?c.index+c[0].length:a);x&&c&&c.length>1&&o(y,c[0],i,(function(){for(h=1;h<arguments.length-2;h++)void 0===arguments[h]&&(c[h]=void 0)}));if(c&&L){c.groups=v=d(null);for(h=0;h<L.length;h++)v[(g=L[h])[0]]=c[g[1]]}return c});t.exports=w},(t,r,i)=>{var o=i(31);t.exports=function(){var t=o(this),r="";t.hasIndices&&(r+="d");t.global&&(r+="g");t.ignoreCase&&(r+="i");t.multiline&&(r+="m");t.dotAll&&(r+="s");t.unicode&&(r+="u");t.unicodeSets&&(r+="v");t.sticky&&(r+="y");return r}},(t,r,i)=>{var o=i(8),a=i(4).RegExp,u=o((function(){var t=a("a","y");t.lastIndex=2;return null!==t.exec("abcd")})),l=u||o((function(){return!a("a","y").sticky})),c=u||o((function(){var t=a("^r","gy");t.lastIndex=2;return null!==t.exec("str")}));t.exports={BROKEN_CARET:c,MISSED_STICKY:l,UNSUPPORTED_Y:u}},(t,r,i)=>{var o=i(8),a=i(4).RegExp;t.exports=o((function(){var t=a(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},(t,r,i)=>{var o=i(8),a=i(4).RegExp;t.exports=o((function(){var t=a("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},(t,r,i)=>{var o=i(34),a=i(219),u=i(31),l=i(11),c=i(10),h=i(220),d=i(94),p=i(38),v=i(221);a("search",(function(t,r,i){return[function search(r){var i=c(this),a=l(r)?void 0:p(r,t);return a?o(a,r,i):new RegExp(r)[t](d(i))},function(t){var o=u(this),a=d(t),l=i(r,o,a);if(l.done)return l.value;var c=o.lastIndex;h(c,0)||(o.lastIndex=0);var p=v(o,a);h(o.lastIndex,c)||(o.lastIndex=c);return null===p?-1:p.index}]}))},(t,r,i)=>{i(212);var o=i(107),a=i(70),u=i(213),l=i(8),c=i(13),h=i(64),d=c("species"),p=RegExp.prototype;t.exports=function(t,r,i,v){var g=c(t),y=!l((function(){var r={};r[g]=function(){return 7};return 7!==""[t](r)})),m=y&&!l((function(){var r=!1,i=/a/;if("split"===t){(i={}).constructor={};i.constructor[d]=function(){return i};i.flags="";i[g]=/./[g]}i.exec=function(){r=!0;return null};i[g]("");return!r}));if(!y||!m||i){var w=o(/./[g]),b=r(g,""[t],(function(t,r,i,a,l){var c=o(t),h=r.exec;return h===u||h===p.exec?y&&!l?{done:!0,value:w(r,i,a)}:{done:!0,value:c(i,r,a)}:{done:!1}}));a(String.prototype,t,b[0]);a(p,g,b[1])}v&&h(p[g],"sham",!0)}},t=>{t.exports=Object.is||function is(t,r){return t===r?0!==t||1/t==1/r:t!=t&&r!=r}},(t,r,i)=>{var o=i(34),a=i(31),u=i(28),l=i(45),c=i(213),h=TypeError;t.exports=function(t,r){var i=t.exec;if(u(i)){var d=o(i,t,r);null!==d&&a(d);return d}if("RegExp"===l(t))return o(c,t,r);throw new h("RegExp#exec called on incompatible receiver")}},(t,r,i)=>{var o=i(67),a=i(8),u=i(110),l=i(27),c=i(9),h=i(55),d=i(181),p=i(102),v=i(108),g=i(189),y=i(13),m=i(20),w=y("isConcatSpreadable"),b=m>=51||!a((function(){var t=[];t[w]=!1;return t.concat()[0]!==t})),isConcatSpreadable=function(t){if(!l(t))return!1;var r=t[w];return void 0!==r?!!r:u(t)};o({target:"Array",proto:!0,arity:1,forced:!b||!g("concat")},{concat:function concat(t){var r,i,o,a,u,l=c(this),g=v(l,0),y=0;for(r=-1,o=arguments.length;r<o;r++)if(isConcatSpreadable(u=-1===r?l:arguments[r])){a=h(u);d(y+a);for(i=0;i<a;i++,y++)i in u&&p(g,y,u[i])}else{d(y+1);p(g,y++,u)}g.length=y;return g}})},(t,r,i)=>{var o=i(67),a=i(224);o({target:"Object",stat:!0,arity:2,forced:Object.assign!==a},{assign:a})},(t,r,i)=>{var o=i(24),a=i(6),u=i(34),l=i(8),c=i(49),h=i(77),d=i(69),p=i(9),v=i(44),g=Object.assign,y=Object.defineProperty,m=a([].concat);t.exports=!g||l((function(){if(o&&1!==g({b:1},g(y({},"a",{enumerable:!0,get:function(){y(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},r={},i=Symbol("assign detection"),a="abcdefghijklmnopqrst";t[i]=7;a.split("").forEach((function(t){r[t]=t}));return 7!==g({},t)[i]||c(g({},r)).join("")!==a}))?function assign(t,r){for(var i=p(t),a=arguments.length,l=1,g=h.f,y=d.f;a>l;)for(var w,b=v(arguments[l++]),D=g?m(c(b),g(b)):c(b),P=D.length,E=0;P>E;){w=D[E++];o&&!u(y,b,w)||(i[w]=b[w])}return i}:g},(t,r,i)=>{var o=i(67),a=i(163),u=i(39),l=i(31),c=i(184);o({target:"Iterator",proto:!0,real:!0},{some:function some(t){l(this);u(t);var r=c(this),i=0;return a(r,(function(r,o){if(t(r,i++))return o()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},(t,r,i)=>{i(212);var o=i(67),a=i(34),u=i(28),l=i(31),c=i(94),h=function(){var t=!1,r=/[ac]/;r.exec=function(){t=!0;return/./.exec.apply(this,arguments)};return!0===r.test("abc")&&t}(),d=/./.test;o({target:"RegExp",proto:!0,forced:!h},{test:function(t){var r=l(this),i=c(t),o=r.exec;if(!u(o))return a(d,r,i);var h=a(o,r,i);if(null===h)return!1;l(h);return!0}})},(t,r,i)=>{var o=i(67),a=i(140).trim;o({target:"String",proto:!0,forced:i(228)("trim")},{trim:function trim(){return a(this)}})},(t,r,i)=>{var o=i(72).PROPER,a=i(8),u=i(141);t.exports=function(t){return a((function(){return!!u[t]()||"​…᠎"!=="​…᠎"[t]()||o&&u[t].name!==t}))}},(t,r,i)=>{var o=i(72).PROPER,a=i(70),u=i(31),l=i(94),c=i(8),h=i(230),d="toString",p=RegExp.prototype[d],v=c((function(){return"/a/b"!==p.call({source:"a",flags:"b"})})),g=o&&p.name!==d;(v||g)&&a(RegExp.prototype,d,(function toString(){var t=u(this);return"/"+l(t.source)+"/"+l(h(t))}),{unsafe:!0})},(t,r,i)=>{var o=i(34),a=i(5),u=i(37),l=i(214),c=RegExp.prototype;t.exports=function(t){var r=t.flags;return void 0!==r||"flags"in c||a(t,"flags")||!u(c,t)?r:o(l,t)}},(t,r,i)=>{i(67)({target:"Math",stat:!0},{trunc:i(54)})},(t,r,i)=>{i(233)},(t,r,i)=>{i(92);var o,a=i(67),u=i(24),l=i(234),c=i(4),h=i(106),d=i(6),p=i(70),v=i(103),g=i(146),y=i(5),m=i(224),w=i(196),b=i(101),D=i(93).codeAt,P=i(235),E=i(94),A=i(83),S=i(149),x=i(236),C=i(62),k=C.set,T=C.getterFor("URL"),I=x.URLSearchParams,L=x.getState,O=c.URL,M=c.TypeError,B=c.parseInt,G=Math.floor,R=Math.pow,N=d("".charAt),j=d(/./.exec),V=d([].join),W=d(1..toString),H=d([].pop),U=d([].push),z=d("".replace),K=d([].shift),Y=d("".split),$=d("".slice),q=d("".toLowerCase),X=d([].unshift),Z="Invalid scheme",Q="Invalid host",J="Invalid port",ee=/[a-z]/i,te=/[\d+-.a-z]/i,re=/\d/,ne=/^0x/i,ie=/^[0-7]+$/,oe=/^\d+$/,ae=/^[\da-f]+$/i,se=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ue=/[\0\t\n\r #/:<>?@[\\\]^|]/,le=/^[\u0000-\u0020]+/,ce=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,he=/[\t\n\r]/g,serializeHost=function(t){var r,i,o,a;if("number"==typeof t){r=[];for(i=0;i<4;i++){X(r,t%256);t=G(t/256)}return V(r,".")}if("object"==typeof t){r="";o=function(t){for(var r=null,i=1,o=null,a=0,u=0;u<8;u++)if(0!==t[u]){if(a>i){r=o;i=a}o=null;a=0}else{null===o&&(o=u);++a}if(a>i){r=o;i=a}return r}(t);for(i=0;i<8;i++)if(!a||0!==t[i]){a&&(a=!1);if(o===i){r+=i?":":"::";a=!0}else{r+=W(t[i],16);i<7&&(r+=":")}}return"["+r+"]"}return t},fe={},de=m({},fe,{" ":1,'"':1,"<":1,">":1,"`":1}),pe=m({},de,{"#":1,"?":1,"{":1,"}":1}),ve=m({},pe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,r){var i=D(t,0);return i>32&&i<127&&!y(r,t)?t:encodeURIComponent(t)},ge={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(t,r){var i;return 2===t.length&&j(ee,N(t,0))&&(":"===(i=N(t,1))||!r&&"|"===i)},startsWithWindowsDriveLetter=function(t){var r;return t.length>1&&isWindowsDriveLetter($(t,0,2))&&(2===t.length||"/"===(r=N(t,2))||"\\"===r||"?"===r||"#"===r)},isSingleDot=function(t){return"."===t||"%2e"===q(t)},ye={},me={},_e={},we={},be={},De={},Pe={},Ee={},Fe={},Ae={},Se={},xe={},Ce={},ke={},Te={},Ie={},Le={},Oe={},Me={},Be={},Ge={},URLState=function(t,r,i){var o,a,u,l=E(t);if(r){if(a=this.parse(l))throw new M(a);this.searchParams=null}else{void 0!==i&&(o=new URLState(i,!0));if(a=this.parse(l,null,o))throw new M(a);(u=L(new I)).bindURL(this);this.searchParams=u}};URLState.prototype={type:"URL",parse:function(t,r,i){var a,u,l,c,h,d=this,p=r||ye,v=0,g="",m=!1,D=!1,P=!1;t=E(t);if(!r){d.scheme="";d.username="";d.password="";d.host=null;d.port=null;d.path=[];d.query=null;d.fragment=null;d.cannotBeABaseURL=!1;t=z(t,le,"");t=z(t,ce,"$1")}t=z(t,he,"");a=w(t);for(;v<=a.length;){u=a[v];switch(p){case ye:if(!u||!j(ee,u)){if(r)return Z;p=_e;continue}g+=q(u);p=me;break;case me:if(u&&(j(te,u)||"+"===u||"-"===u||"."===u))g+=q(u);else{if(":"!==u){if(r)return Z;g="";p=_e;v=0;continue}if(r&&(d.isSpecial()!==y(ge,g)||"file"===g&&(d.includesCredentials()||null!==d.port)||"file"===d.scheme&&!d.host))return;d.scheme=g;if(r){d.isSpecial()&&ge[d.scheme]===d.port&&(d.port=null);return}g="";if("file"===d.scheme)p=ke;else if(d.isSpecial()&&i&&i.scheme===d.scheme)p=we;else if(d.isSpecial())p=Ee;else if("/"===a[v+1]){p=be;v++}else{d.cannotBeABaseURL=!0;U(d.path,"");p=Me}}break;case _e:if(!i||i.cannotBeABaseURL&&"#"!==u)return Z;if(i.cannotBeABaseURL&&"#"===u){d.scheme=i.scheme;d.path=b(i.path);d.query=i.query;d.fragment="";d.cannotBeABaseURL=!0;p=Ge;break}p="file"===i.scheme?ke:De;continue;case we:if("/"!==u||"/"!==a[v+1]){p=De;continue}p=Fe;v++;break;case be:if("/"===u){p=Ae;break}p=Oe;continue;case De:d.scheme=i.scheme;if(u===o){d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;d.path=b(i.path);d.query=i.query}else if("/"===u||"\\"===u&&d.isSpecial())p=Pe;else if("?"===u){d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;d.path=b(i.path);d.query="";p=Be}else{if("#"!==u){d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;d.path=b(i.path);d.path.length--;p=Oe;continue}d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;d.path=b(i.path);d.query=i.query;d.fragment="";p=Ge}break;case Pe:if(!d.isSpecial()||"/"!==u&&"\\"!==u){if("/"!==u){d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;p=Oe;continue}p=Ae}else p=Fe;break;case Ee:p=Fe;if("/"!==u||"/"!==N(g,v+1))continue;v++;break;case Fe:if("/"!==u&&"\\"!==u){p=Ae;continue}break;case Ae:if("@"===u){m&&(g="%40"+g);m=!0;l=w(g);for(var A=0;A<l.length;A++){var S=l[A];if(":"!==S||P){var x=percentEncode(S,ve);P?d.password+=x:d.username+=x}else P=!0}g=""}else if(u===o||"/"===u||"?"===u||"#"===u||"\\"===u&&d.isSpecial()){if(m&&""===g)return"Invalid authority";v-=w(g).length+1;g="";p=Se}else g+=u;break;case Se:case xe:if(r&&"file"===d.scheme){p=Ie;continue}if(":"!==u||D){if(u===o||"/"===u||"?"===u||"#"===u||"\\"===u&&d.isSpecial()){if(d.isSpecial()&&""===g)return Q;if(r&&""===g&&(d.includesCredentials()||null!==d.port))return;if(c=d.parseHost(g))return c;g="";p=Le;if(r)return;continue}"["===u?D=!0:"]"===u&&(D=!1);g+=u}else{if(""===g)return Q;if(c=d.parseHost(g))return c;g="";p=Ce;if(r===xe)return}break;case Ce:if(!j(re,u)){if(u===o||"/"===u||"?"===u||"#"===u||"\\"===u&&d.isSpecial()||r){if(""!==g){var C=B(g,10);if(C>65535)return J;d.port=d.isSpecial()&&C===ge[d.scheme]?null:C;g=""}if(r)return;p=Le;continue}return J}g+=u;break;case ke:d.scheme="file";if("/"===u||"\\"===u)p=Te;else{if(!i||"file"!==i.scheme){p=Oe;continue}switch(u){case o:d.host=i.host;d.path=b(i.path);d.query=i.query;break;case"?":d.host=i.host;d.path=b(i.path);d.query="";p=Be;break;case"#":d.host=i.host;d.path=b(i.path);d.query=i.query;d.fragment="";p=Ge;break;default:if(!startsWithWindowsDriveLetter(V(b(a,v),""))){d.host=i.host;d.path=b(i.path);d.shortenPath()}p=Oe;continue}}break;case Te:if("/"===u||"\\"===u){p=Ie;break}i&&"file"===i.scheme&&!startsWithWindowsDriveLetter(V(b(a,v),""))&&(isWindowsDriveLetter(i.path[0],!0)?U(d.path,i.path[0]):d.host=i.host);p=Oe;continue;case Ie:if(u===o||"/"===u||"\\"===u||"?"===u||"#"===u){if(!r&&isWindowsDriveLetter(g))p=Oe;else if(""===g){d.host="";if(r)return;p=Le}else{if(c=d.parseHost(g))return c;"localhost"===d.host&&(d.host="");if(r)return;g="";p=Le}continue}g+=u;break;case Le:if(d.isSpecial()){p=Oe;if("/"!==u&&"\\"!==u)continue}else if(r||"?"!==u)if(r||"#"!==u){if(u!==o){p=Oe;if("/"!==u)continue}}else{d.fragment="";p=Ge}else{d.query="";p=Be}break;case Oe:if(u===o||"/"===u||"\\"===u&&d.isSpecial()||!r&&("?"===u||"#"===u)){if(".."===(h=q(h=g))||"%2e."===h||".%2e"===h||"%2e%2e"===h){d.shortenPath();"/"===u||"\\"===u&&d.isSpecial()||U(d.path,"")}else if(isSingleDot(g))"/"===u||"\\"===u&&d.isSpecial()||U(d.path,"");else{if("file"===d.scheme&&!d.path.length&&isWindowsDriveLetter(g)){d.host&&(d.host="");g=N(g,0)+":"}U(d.path,g)}g="";if("file"===d.scheme&&(u===o||"?"===u||"#"===u))for(;d.path.length>1&&""===d.path[0];)K(d.path);if("?"===u){d.query="";p=Be}else if("#"===u){d.fragment="";p=Ge}}else g+=percentEncode(u,pe);break;case Me:if("?"===u){d.query="";p=Be}else if("#"===u){d.fragment="";p=Ge}else u!==o&&(d.path[0]+=percentEncode(u,fe));break;case Be:if(r||"#"!==u)u!==o&&("'"===u&&d.isSpecial()?d.query+="%27":d.query+="#"===u?"%23":percentEncode(u,fe));else{d.fragment="";p=Ge}break;case Ge:u!==o&&(d.fragment+=percentEncode(u,de))}v++}},parseHost:function(t){var r,i,o;if("["===N(t,0)){if("]"!==N(t,t.length-1))return Q;r=function(t){var r,i,o,a,u,l,c,h=[0,0,0,0,0,0,0,0],d=0,p=null,v=0,chr=function(){return N(t,v)};if(":"===chr()){if(":"!==N(t,1))return;v+=2;p=++d}for(;chr();){if(8===d)return;if(":"!==chr()){r=i=0;for(;i<4&&j(ae,chr());){r=16*r+B(chr(),16);v++;i++}if("."===chr()){if(0===i)return;v-=i;if(d>6)return;o=0;for(;chr();){a=null;if(o>0){if(!("."===chr()&&o<4))return;v++}if(!j(re,chr()))return;for(;j(re,chr());){u=B(chr(),10);if(null===a)a=u;else{if(0===a)return;a=10*a+u}if(a>255)return;v++}h[d]=256*h[d]+a;2!=++o&&4!==o||d++}if(4!==o)return;break}if(":"===chr()){v++;if(!chr())return}else if(chr())return;h[d++]=r}else{if(null!==p)return;v++;p=++d}}if(null!==p){l=d-p;d=7;for(;0!==d&&l>0;){c=h[d];h[d--]=h[p+l-1];h[p+--l]=c}}else if(8!==d)return;return h}($(t,1,-1));if(!r)return Q;this.host=r}else if(this.isSpecial()){t=P(t);if(j(se,t))return Q;r=function(t){var r,i,o,a,u,l,c,h=Y(t,".");h.length&&""===h[h.length-1]&&h.length--;if((r=h.length)>4)return t;i=[];for(o=0;o<r;o++){if(""===(a=h[o]))return t;u=10;if(a.length>1&&"0"===N(a,0)){u=j(ne,a)?16:8;a=$(a,8===u?1:2)}if(""===a)l=0;else{if(!j(10===u?oe:8===u?ie:ae,a))return t;l=B(a,u)}U(i,l)}for(o=0;o<r;o++){l=i[o];if(o===r-1){if(l>=R(256,5-r))return null}else if(l>255)return null}c=H(i);for(o=0;o<i.length;o++)c+=i[o]*R(256,3-o);return c}(t);if(null===r)return Q;this.host=r}else{if(j(ue,t))return Q;r="";i=w(t);for(o=0;o<i.length;o++)r+=percentEncode(i[o],fe);this.host=r}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return y(ge,this.scheme)},shortenPath:function(){var t=this.path,r=t.length;!r||"file"===this.scheme&&1===r&&isWindowsDriveLetter(t[0],!0)||t.length--},serialize:function(){var t=this,r=t.scheme,i=t.username,o=t.password,a=t.host,u=t.port,l=t.path,c=t.query,h=t.fragment,d=r+":";if(null!==a){d+="//";t.includesCredentials()&&(d+=i+(o?":"+o:"")+"@");d+=serializeHost(a);null!==u&&(d+=":"+u)}else"file"===r&&(d+="//");d+=t.cannotBeABaseURL?l[0]:l.length?"/"+V(l,"/"):"";null!==c&&(d+="?"+c);null!==h&&(d+="#"+h);return d},setHref:function(t){var r=this.parse(t);if(r)throw new M(r);this.searchParams.update()},getOrigin:function(){var t=this.scheme,r=this.port;if("blob"===t)try{return new Re(t.path[0]).origin}catch(t){return"null"}return"file"!==t&&this.isSpecial()?t+"://"+serializeHost(this.host)+(null!==r?":"+r:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(E(t)+":",ye)},getUsername:function(){return this.username},setUsername:function(t){var r=w(E(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var i=0;i<r.length;i++)this.username+=percentEncode(r[i],ve)}},getPassword:function(){return this.password},setPassword:function(t){var r=w(E(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var i=0;i<r.length;i++)this.password+=percentEncode(r[i],ve)}},getHost:function(){var t=this.host,r=this.port;return null===t?"":null===r?serializeHost(t):serializeHost(t)+":"+r},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Se)},getHostname:function(){var t=this.host;return null===t?"":serializeHost(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,xe)},getPort:function(){var t=this.port;return null===t?"":E(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""===(t=E(t))?this.port=null:this.parse(t,Ce))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+V(t,"/"):""},setPathname:function(t){if(!this.cannotBeABaseURL){this.path=[];this.parse(t,Le)}},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){if(""===(t=E(t)))this.query=null;else{"?"===N(t,0)&&(t=$(t,1));this.query="";this.parse(t,Be)}this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){if(""!==(t=E(t))){"#"===N(t,0)&&(t=$(t,1));this.fragment="";this.parse(t,Ge)}else this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Re=function URL(t){var r=g(this,Ne),i=S(arguments.length,1)>1?arguments[1]:void 0,o=k(r,new URLState(t,!1,i));if(!u){r.href=o.serialize();r.origin=o.getOrigin();r.protocol=o.getProtocol();r.username=o.getUsername();r.password=o.getPassword();r.host=o.getHost();r.hostname=o.getHostname();r.port=o.getPort();r.pathname=o.getPathname();r.search=o.getSearch();r.searchParams=o.getSearchParams();r.hash=o.getHash()}},Ne=Re.prototype,accessorDescriptor=function(t,r){return{get:function(){return T(this)[t]()},set:r&&function(t){return T(this)[r](t)},configurable:!0,enumerable:!0}};if(u){v(Ne,"href",accessorDescriptor("serialize","setHref"));v(Ne,"origin",accessorDescriptor("getOrigin"));v(Ne,"protocol",accessorDescriptor("getProtocol","setProtocol"));v(Ne,"username",accessorDescriptor("getUsername","setUsername"));v(Ne,"password",accessorDescriptor("getPassword","setPassword"));v(Ne,"host",accessorDescriptor("getHost","setHost"));v(Ne,"hostname",accessorDescriptor("getHostname","setHostname"));v(Ne,"port",accessorDescriptor("getPort","setPort"));v(Ne,"pathname",accessorDescriptor("getPathname","setPathname"));v(Ne,"search",accessorDescriptor("getSearch","setSearch"));v(Ne,"searchParams",accessorDescriptor("getSearchParams"));v(Ne,"hash",accessorDescriptor("getHash","setHash"))}p(Ne,"toJSON",(function toJSON(){return T(this).serialize()}),{enumerable:!0});p(Ne,"toString",(function toString(){return T(this).serialize()}),{enumerable:!0});if(O){var je=O.createObjectURL,Ve=O.revokeObjectURL;je&&p(Re,"createObjectURL",h(je,O));Ve&&p(Re,"revokeObjectURL",h(Ve,O))}A(Re,"URL");a({global:!0,constructor:!0,forced:!l,sham:!u},{URL:Re})},(t,r,i)=>{var o=i(8),a=i(13),u=i(24),l=i(15),c=a("iterator");t.exports=!o((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),r=t.searchParams,i=new URLSearchParams("a=1&a=2&b=3"),o="";t.pathname="c%20d";r.forEach((function(t,i){r.delete("b");o+=i+t}));i.delete("a",2);i.delete("b",void 0);return l&&(!t.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!r.size&&(l||!u)||!r.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[c]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==o||"x"!==new URL("http://x",void 0).host}))},(t,r,i)=>{var o=i(6),a=2147483647,u=/[^\0-\u007E]/,l=/[.\u3002\uFF0E\uFF61]/g,c="Overflow: input needs wider integers to process",h=RangeError,d=o(l.exec),p=Math.floor,v=String.fromCharCode,g=o("".charCodeAt),y=o([].join),m=o([].push),w=o("".replace),b=o("".split),D=o("".toLowerCase),digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,r,i){var o=0;t=i?p(t/700):t>>1;t+=p(t/r);for(;t>455;){t=p(t/35);o+=36}return p(o+36*t/(t+38))},encode=function(t){var r=[];t=function(t){for(var r=[],i=0,o=t.length;i<o;){var a=g(t,i++);if(a>=55296&&a<=56319&&i<o){var u=g(t,i++);if(56320==(64512&u))m(r,((1023&a)<<10)+(1023&u)+65536);else{m(r,a);i--}}else m(r,a)}return r}(t);var i,o,u=t.length,l=128,d=0,w=72;for(i=0;i<t.length;i++)(o=t[i])<128&&m(r,v(o));var b=r.length,D=b;b&&m(r,"-");for(;D<u;){var P=a;for(i=0;i<t.length;i++)(o=t[i])>=l&&o<P&&(P=o);var E=D+1;if(P-l>p((a-d)/E))throw new h(c);d+=(P-l)*E;l=P;for(i=0;i<t.length;i++){if((o=t[i])<l&&++d>a)throw new h(c);if(o===l){for(var A=d,S=36;;){var x=S<=w?1:S>=w+26?26:S-w;if(A<x)break;var C=A-x,k=36-x;m(r,v(digitToBasic(x+C%k)));A=p(C/k);S+=36}m(r,v(digitToBasic(A)));w=adapt(d,E,D===b);d=0;D++}}d++;l++}return y(r,"")};t.exports=function(t){var r,i,o=[],a=b(w(D(t),l,"."),".");for(r=0;r<a.length;r++){i=a[r];m(o,d(u,i)?"xn--"+encode(i):i)}return y(o,".")}},(t,r,i)=>{i(42);var o=i(67),a=i(4),u=i(34),l=i(6),c=i(24),h=i(234),d=i(70),p=i(103),v=i(201),g=i(83),y=i(79),m=i(62),w=i(146),b=i(28),D=i(5),P=i(106),E=i(91),A=i(31),S=i(27),x=i(94),C=i(47),k=i(65),T=i(165),I=i(166),L=i(87),O=i(149),M=i(13),B=i(237),G=M("iterator"),R="URLSearchParams",N=R+"Iterator",j=m.set,V=m.getterFor(R),W=m.getterFor(N),H=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(t){if(!c)return a[t];var r=H(a,t);return r&&r.value},U=safeGetBuiltIn("fetch"),z=safeGetBuiltIn("Request"),K=safeGetBuiltIn("Headers"),Y=z&&z.prototype,$=K&&K.prototype,q=a.RegExp,X=a.TypeError,Z=a.decodeURIComponent,Q=a.encodeURIComponent,J=l("".charAt),ee=l([].join),te=l([].push),re=l("".replace),ne=l([].shift),ie=l([].splice),oe=l("".split),ae=l("".slice),se=/\+/g,ue=Array(4),percentSequence=function(t){return ue[t-1]||(ue[t-1]=q("((?:%[\\da-f]{2}){"+t+"})","gi"))},percentDecode=function(t){try{return Z(t)}catch(r){return t}},deserialize=function(t){var r=re(t,se," "),i=4;try{return Z(r)}catch(t){for(;i;)r=re(r,percentSequence(i--),percentDecode);return r}},le=/[!'()~]|%20/g,ce={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return ce[t]},serialize=function(t){return re(Q(t),le,replacer)},he=y((function Iterator(t,r){j(this,{type:N,target:V(t).entries,index:0,kind:r})}),R,(function next(){var t=W(this),r=t.target,i=t.index++;if(!r||i>=r.length){t.target=void 0;return L(void 0,!0)}var o=r[i];switch(t.kind){case"keys":return L(o.key,!1);case"values":return L(o.value,!1)}return L([o.key,o.value],!1)}),!0),URLSearchParamsState=function(t){this.entries=[];this.url=null;void 0!==t&&(S(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===J(t,0)?ae(t,1):t:x(t)))};URLSearchParamsState.prototype={type:R,bindURL:function(t){this.url=t;this.update()},parseObject:function(t){var r,i,o,a,l,c,h,d=this.entries,p=I(t);if(p){i=(r=T(t,p)).next;for(;!(o=u(i,r)).done;){l=(a=T(A(o.value))).next;if((c=u(l,a)).done||(h=u(l,a)).done||!u(l,a).done)throw new X("Expected sequence with length 2");te(d,{key:x(c.value),value:x(h.value)})}}else for(var v in t)D(t,v)&&te(d,{key:v,value:x(t[v])})},parseQuery:function(t){if(t)for(var r,i,o=this.entries,a=oe(t,"&"),u=0;u<a.length;)if((r=a[u++]).length){i=oe(r,"=");te(o,{key:deserialize(ne(i)),value:deserialize(ee(i,"="))})}},serialize:function(){for(var t,r=this.entries,i=[],o=0;o<r.length;){t=r[o++];te(i,serialize(t.key)+"="+serialize(t.value))}return ee(i,"&")},update:function(){this.entries.length=0;this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var fe=function URLSearchParams(){w(this,de);var t=j(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0));c||(this.size=t.entries.length)},de=fe.prototype;v(de,{append:function append(t,r){var i=V(this);O(arguments.length,2);te(i.entries,{key:x(t),value:x(r)});c||this.length++;i.updateURL()},delete:function(t){for(var r=V(this),i=O(arguments.length,1),o=r.entries,a=x(t),u=i<2?void 0:arguments[1],l=void 0===u?u:x(u),h=0;h<o.length;){var d=o[h];if(d.key!==a||void 0!==l&&d.value!==l)h++;else{ie(o,h,1);if(void 0!==l)break}}c||(this.size=o.length);r.updateURL()},get:function get(t){var r=V(this).entries;O(arguments.length,1);for(var i=x(t),o=0;o<r.length;o++)if(r[o].key===i)return r[o].value;return null},getAll:function getAll(t){var r=V(this).entries;O(arguments.length,1);for(var i=x(t),o=[],a=0;a<r.length;a++)r[a].key===i&&te(o,r[a].value);return o},has:function has(t){for(var r=V(this).entries,i=O(arguments.length,1),o=x(t),a=i<2?void 0:arguments[1],u=void 0===a?a:x(a),l=0;l<r.length;){var c=r[l++];if(c.key===o&&(void 0===u||c.value===u))return!0}return!1},set:function set(t,r){var i=V(this);O(arguments.length,1);for(var o,a=i.entries,u=!1,l=x(t),h=x(r),d=0;d<a.length;d++)if((o=a[d]).key===l)if(u)ie(a,d--,1);else{u=!0;o.value=h}u||te(a,{key:l,value:h});c||(this.size=a.length);i.updateURL()},sort:function sort(){var t=V(this);B(t.entries,(function(t,r){return t.key>r.key?1:-1}));t.updateURL()},forEach:function forEach(t){for(var r,i=V(this).entries,o=P(t,arguments.length>1?arguments[1]:void 0),a=0;a<i.length;)o((r=i[a++]).value,r.key,this)},keys:function keys(){return new he(this,"keys")},values:function values(){return new he(this,"values")},entries:function entries(){return new he(this,"entries")}},{enumerable:!0});d(de,G,de.entries,{name:"entries"});d(de,"toString",(function toString(){return V(this).serialize()}),{enumerable:!0});c&&p(de,"size",{get:function size(){return V(this).entries.length},configurable:!0,enumerable:!0});g(fe,R);o({global:!0,constructor:!0,forced:!h},{URLSearchParams:fe});if(!h&&b(K)){var pe=l($.has),ve=l($.set),wrapRequestOptions=function(t){if(S(t)){var r,i=t.body;if(E(i)===R){r=t.headers?new K(t.headers):new K;pe(r,"content-type")||ve(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8");return C(t,{body:k(0,x(i)),headers:k(0,r)})}}return t};b(U)&&o({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function fetch(t){return U(t,arguments.length>1?wrapRequestOptions(arguments[1]):{})}});if(b(z)){var ge=function Request(t){w(this,Y);return new z(t,arguments.length>1?wrapRequestOptions(arguments[1]):{})};Y.constructor=ge;ge.prototype=Y;o({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ge})}}t.exports={URLSearchParams:fe,getState:V}},(t,r,i)=>{var o=i(101),a=Math.floor,mergeSort=function(t,r){var i=t.length,u=a(i/2);return i<8?insertionSort(t,r):merge(t,mergeSort(o(t,0,u),r),mergeSort(o(t,u),r),r)},insertionSort=function(t,r){for(var i,o,a=t.length,u=1;u<a;){o=u;i=t[u];for(;o&&r(t[o-1],i)>0;)t[o]=t[--o];o!==u++&&(t[o]=i)}return t},merge=function(t,r,i,o){for(var a=r.length,u=i.length,l=0,c=0;l<a||c<u;)t[l+c]=l<a&&c<u?o(r[l],i[c])<=0?r[l++]:i[c++]:l<a?r[l++]:i[c++];return t};t.exports=mergeSort},(t,r,i)=>{i(236)},(t,r,i)=>{var o=i(70),a=i(6),u=i(94),l=i(149),c=URLSearchParams,h=c.prototype,d=a(h.append),p=a(h.delete),v=a(h.forEach),g=a([].push),y=new c("a=1&a=2&b=3");y.delete("a",1);y.delete("b",void 0);y+""!="a=2"&&o(h,"delete",(function(t){var r=arguments.length,i=r<2?void 0:arguments[1];if(r&&void 0===i)return p(this,t);var o=[];v(this,(function(t,r){g(o,{key:r,value:t})}));l(r,1);for(var a,c=u(t),h=u(i),y=0,m=0,w=!1,b=o.length;y<b;){a=o[y++];if(w||a.key===c){w=!0;p(this,a.key)}else m++}for(;m<b;)(a=o[m++]).key===c&&a.value===h||d(this,a.key,a.value)}),{enumerable:!0,unsafe:!0})},(t,r,i)=>{var o=i(70),a=i(6),u=i(94),l=i(149),c=URLSearchParams,h=c.prototype,d=a(h.getAll),p=a(h.has),v=new c("a=1");!v.has("a",2)&&v.has("a",void 0)||o(h,"has",(function has(t){var r=arguments.length,i=r<2?void 0:arguments[1];if(r&&void 0===i)return p(this,t);var o=d(this,t);l(r,1);for(var a=u(i),c=0;c<o.length;)if(o[c++]===a)return!0;return!1}),{enumerable:!0,unsafe:!0})},(t,r,i)=>{var o=i(24),a=i(6),u=i(103),l=URLSearchParams.prototype,c=a(l.forEach);o&&!("size"in l)&&u(l,"size",{get:function size(){var t=0;c(this,(function(){t++}));return t},configurable:!0,enumerable:!0})},(t,r,i)=>{i(67)({target:"Math",stat:!0},{sign:i(243)})},t=>{t.exports=Math.sign||function sign(t){var r=+t;return 0===r||r!=r?r:r<0?-1:1}},(t,r,i)=>{var o=i(67),a=Math.hypot,u=Math.abs,l=Math.sqrt;o({target:"Math",stat:!0,arity:2,forced:!!a&&a(1/0,NaN)!==1/0},{hypot:function hypot(t,r){for(var i,o,a=0,c=0,h=arguments.length,d=0;c<h;)if(d<(i=u(arguments[c++]))){a=a*(o=d/i)*o+1;d=i}else a+=i>0?(o=i/d)*o:i;return d===1/0?1/0:d*l(a)}})},(t,r,i)=>{i(1);i(188);i(229);i(195);i(226);Object.defineProperty(r,"__esModule",{value:!0});r.animationStarted=r.VERTICAL_PADDING=r.UNKNOWN_SCALE=r.TextLayerMode=r.SpreadMode=r.SidebarView=r.ScrollMode=r.SCROLLBAR_PADDING=r.RenderingStates=r.ProgressBar=r.PresentationModeState=r.OutputScale=r.MIN_SCALE=r.MAX_SCALE=r.MAX_AUTO_SCALE=r.DEFAULT_SCALE_VALUE=r.DEFAULT_SCALE_DELTA=r.DEFAULT_SCALE=r.CursorTool=r.AutoPrintRegExp=void 0;r.apiPageLayoutToViewerModes=function apiPageLayoutToViewerModes(t){var r=a.VERTICAL,i=u.NONE;switch(t){case"SinglePage":r=a.PAGE;break;case"OneColumn":break;case"TwoPageLeft":r=a.PAGE;case"TwoColumnLeft":i=u.ODD;break;case"TwoPageRight":r=a.PAGE;case"TwoColumnRight":i=u.EVEN}return{scrollMode:r,spreadMode:i}};r.apiPageModeToSidebarView=function apiPageModeToSidebarView(t){switch(t){case"UseNone":return o.NONE;case"UseThumbs":return o.THUMBS;case"UseOutlines":return o.OUTLINE;case"UseAttachments":return o.ATTACHMENTS;case"UseOC":return o.LAYERS}return o.NONE};r.approximateFraction=function approximateFraction(t){if(Math.floor(t)===t)return[t,1];var r=1/t;if(r>8)return[1,8];if(Math.floor(r)===r)return[1,r];var i,o=t>1?r:t,a=0,u=1,l=1,c=1;for(;;){var h=a+l,d=u+c;if(d>8)break;if(o<=h/d){l=h;c=d}else{a=h;u=d}}i=o-a/u<l/c-o?o===t?[a,u]:[u,a]:o===t?[l,c]:[c,l];return i};r.backtrackBeforeAllVisibleElements=backtrackBeforeAllVisibleElements;r.binarySearchFirstItem=binarySearchFirstItem;r.docStyle=void 0;r.getActiveOrFocusedElement=function getActiveOrFocusedElement(){var t=document,r=t.activeElement||t.querySelector(":focus");for(;null!==(i=r)&&void 0!==i&&i.shadowRoot;){var i;r=(t=r.shadowRoot).activeElement||t.querySelector(":focus")}return r};r.getPageSizeInches=function getPageSizeInches(t){var r=t.view,i=t.userUnit,o=t.rotate,a=_slicedToArray(r,4),u=a[0],l=a[1],c=a[2],h=a[3],d=o%180!=0,p=(c-u)/72*i,v=(h-l)/72*i;return{width:d?v:p,height:d?p:v}};r.getVisibleElements=function getVisibleElements(t){var r=t.scrollEl,i=t.views,o=t.sortByVisibility,a=void 0!==o&&o,u=t.horizontal,l=void 0!==u&&u,c=t.rtl,h=void 0!==c&&c,d=r.scrollTop,p=d+r.clientHeight,v=r.scrollLeft,g=v+r.clientWidth;var y=[],m=new Set,w=i.length,b=binarySearchFirstItem(i,l?function isElementNextAfterViewHorizontally(t){var r=t.div,i=r.offsetLeft+r.clientLeft,o=i+r.clientWidth;return h?i<g:o>v}:function isElementBottomAfterViewTop(t){var r=t.div;return r.offsetTop+r.clientTop+r.clientHeight>d});b>0&&b<w&&!l&&(b=backtrackBeforeAllVisibleElements(b,i,d));for(var D=l?g:-1,P=b;P<w;P++){var E=i[P],A=E.div,S=A.offsetLeft+A.clientLeft,x=A.offsetTop+A.clientTop,C=A.clientWidth,k=A.clientHeight,T=S+C,I=x+k;if(-1===D)I>=p&&(D=I);else if((l?S:x)>D)break;if(!(I<=d||x>=p||T<=v||S>=g)){var L=Math.max(0,d-x)+Math.max(0,I-p),O=(C-(Math.max(0,v-S)+Math.max(0,T-g)))/C,M=(k-L)/k*O*100|0;y.push({id:E.id,x:S,y:x,view:E,percent:M,widthPercent:100*O|0});m.add(E.id)}}var B=y[0],G=y.at(-1);a&&y.sort((function(t,r){var i=t.percent-r.percent;return Math.abs(i)>.001?-i:t.id-r.id}));return{first:B,last:G,views:y,ids:m}};r.isPortraitOrientation=function isPortraitOrientation(t){return t.width<=t.height};r.isValidRotation=function isValidRotation(t){return Number.isInteger(t)&&t%90==0};r.isValidScrollMode=function isValidScrollMode(t){return Number.isInteger(t)&&Object.values(a).includes(t)&&t!==a.UNKNOWN};r.isValidSpreadMode=function isValidSpreadMode(t){return Number.isInteger(t)&&Object.values(u).includes(t)&&t!==u.UNKNOWN};r.noContextMenuHandler=function noContextMenuHandler(t){t.preventDefault()};r.normalizeWheelEventDelta=function normalizeWheelEventDelta(t){var r=t.deltaMode,i=normalizeWheelEventDirection(t);r===WheelEvent.DOM_DELTA_PIXEL?i/=900:r===WheelEvent.DOM_DELTA_LINE&&(i/=30);return i};r.normalizeWheelEventDirection=normalizeWheelEventDirection;r.parseQueryString=function parseQueryString(t){var r,i=new Map,o=function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}(new URLSearchParams(t));try{for(o.s();!(r=o.n()).done;){var a=_slicedToArray(r.value,2),u=a[0],l=a[1];i.set(u.toLowerCase(),l)}}catch(t){o.e(t)}finally{o.f()}return i};r.removeNullCharacters=function removeNullCharacters(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof t){console.error("The argument must be a string.");return t}r&&(t=t.replaceAll(l," "));return t.replaceAll("\0","")};r.roundToDivide=function roundToDivide(t,r){var i=t%r;return 0===i?t:Math.round(t-i+r)};r.scrollIntoView=function scrollIntoView(t,r){var i,o,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t.classList.contains("stf__item")||null!==(i=t.parentElement)&&void 0!==i&&i.classList.contains("stf__item")||null!==(o=t.parentElement)&&void 0!==o&&null!==(o=o.parentElement)&&void 0!==o&&o.classList.contains("stf__item"))return;var l=t.offsetParent;if(!l){globalThis.ngxConsole.error("offsetParent is not set -- cannot scroll");return}var c=t.offsetTop+t.clientTop,h=t.offsetLeft+t.clientLeft;for(;l.clientHeight===l.scrollHeight&&l.clientWidth===l.scrollWidth||a&&(l.classList.contains("markedContent")||"hidden"===getComputedStyle(l).overflow);){c+=l.offsetTop;h+=l.offsetLeft;if(!(l=l.offsetParent)){if(u&&document.body.clientHeight>c){c-=32;window.scrollTo(window.scrollX,c)}return}}if(r){void 0!==r.top&&(c+=r.top);if(void 0!==r.left){h+=r.left;l.scrollLeft=h}}else if(function isDivInViewport(t){var r=t.getBoundingClientRect();return r.top>=0&&r.left>=0&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&r.right<=(window.innerWidth||document.documentElement.clientWidth)}(t))return;l.scrollTop=c};r.toggleCheckedBtn=function toggleCheckedBtn(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t.classList.toggle("toggled",r);t.setAttribute("aria-checked",r);null==i||i.classList.toggle("hidden",!r)};r.toggleExpandedBtn=function toggleExpandedBtn(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t.classList.toggle("toggled",r);t.setAttribute("aria-expanded",r);null==i||i.classList.toggle("hidden",!r)};r.watchScroll=function watchScroll(t,r){var i=function debounceScroll(i){a||(a=window.requestAnimationFrame((function viewAreaElementScrolled(){a=null;var i=t.scrollLeft,u=o.lastX;i!==u&&(o.right=i>u);o.lastX=i;var l=t.scrollTop,c=o.lastY;l!==c&&(o.down=l>c);o.lastY=l;r(o)})))},o={right:!0,down:!0,lastX:t.scrollLeft,lastY:t.scrollTop,_eventHandler:i},a=null;t.addEventListener("scroll",i,!0);return o};i(135);i(136);i(98);i(120);i(88);i(126);i(138);i(204);i(42);i(246);i(92);i(95);i(238);i(239);i(240);i(241);i(212);i(254);i(257);i(258);i(260);i(270);i(272);i(274);i(276);i(278);i(280);i(179);i(282);i(283);i(244);i(205);i(206);i(210);i(142);i(288);function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}r.DEFAULT_SCALE_VALUE="auto",r.DEFAULT_SCALE=1,r.DEFAULT_SCALE_DELTA=1.1,r.MIN_SCALE=.1,r.MAX_SCALE=10,r.UNKNOWN_SCALE=0,r.MAX_AUTO_SCALE=1.25,r.SCROLLBAR_PADDING=40,r.VERTICAL_PADDING=5,r.RenderingStates={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},r.PresentationModeState={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};var o=r.SidebarView={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4},a=(r.TextLayerMode={DISABLE:0,ENABLE:1,ENABLE_PERMISSIONS:2},r.ScrollMode={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3}),u=r.SpreadMode={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};r.CursorTool={SELECT:0,HAND:1,ZOOM:2},r.AutoPrintRegExp=/\bprint\s*\(/,r.OutputScale=function(){function OutputScale(){_classCallCheck(this,OutputScale);var t=window.devicePixelRatio||1;this.sx=t;this.sy=t}_createClass(OutputScale,[{key:"scaled",get:function get(){return 1!==this.sx||1!==this.sy}}]);return OutputScale}();var l=/[\x01-\x1F]/g;function binarySearchFirstItem(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=t.length-1;if(o<0||!r(t[o]))return t.length;if(r(t[i]))return i;for(;i<o;){var a=i+o>>1;r(t[a])?o=a:i=a+1}return i}function backtrackBeforeAllVisibleElements(t,r,i){if(t<2)return t;var o=r[t].div,a=o.offsetTop+o.clientTop;a>=i&&(a=(o=r[t-1].div).offsetTop+o.clientTop);for(var u=t-2;u>=0&&!((o=r[u].div).offsetTop+o.clientTop+o.clientHeight<=a);--u)t=u;return t}function normalizeWheelEventDirection(t){var r=Math.hypot(t.deltaX,t.deltaY),i=Math.atan2(t.deltaY,t.deltaX);-.25*Math.PI<i&&i<.75*Math.PI&&(r=-r);return r}r.animationStarted=new Promise((function(t){window.ngxZone.runOutsideAngular((function(){window.requestAnimationFrame(t)}))})),r.docStyle=document.documentElement.style;var c=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap;r.ProgressBar=function(){function ProgressBar(t){_classCallCheck(this,ProgressBar);_classPrivateFieldInitSpec(this,c,{writable:!0,value:null});_classPrivateFieldInitSpec(this,h,{writable:!0,value:null});_classPrivateFieldInitSpec(this,d,{writable:!0,value:0});_classPrivateFieldInitSpec(this,p,{writable:!0,value:null});_classPrivateFieldInitSpec(this,v,{writable:!0,value:!0});_classPrivateFieldSet(this,c,t.classList);_classPrivateFieldSet(this,p,t.style)}_createClass(ProgressBar,[{key:"percent",get:function get(){return _classPrivateFieldGet(this,d)},set:function set(t){_classPrivateFieldSet(this,d,function clamp(t,r,i){return Math.min(Math.max(t,r),i)}(t,0,100));if(isNaN(t))_classPrivateFieldGet(this,c).add("indeterminate");else{_classPrivateFieldGet(this,c).remove("indeterminate");_classPrivateFieldGet(this,p).setProperty("--progressBar-percent","".concat(_classPrivateFieldGet(this,d),"%"))}}},{key:"setWidth",value:function setWidth(t){if(t){var r=t.parentNode.offsetWidth-t.offsetWidth;r>0&&_classPrivateFieldGet(this,p).setProperty("--progressBar-end-offset","".concat(r,"px"))}}},{key:"setDisableAutoFetch",value:function setDisableAutoFetch(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3;if(!isNaN(_classPrivateFieldGet(this,d))){_classPrivateFieldGet(this,h)&&clearTimeout(_classPrivateFieldGet(this,h));this.show();_classPrivateFieldSet(this,h,setTimeout((function(){_classPrivateFieldSet(t,h,null);t.hide()}),r))}}},{key:"hide",value:function hide(){if(_classPrivateFieldGet(this,v)){_classPrivateFieldSet(this,v,!1);_classPrivateFieldGet(this,c).add("hidden")}}},{key:"show",value:function show(){if(!_classPrivateFieldGet(this,v)){_classPrivateFieldSet(this,v,!0);_classPrivateFieldGet(this,c).remove("hidden")}}}]);return ProgressBar}()},(t,r,i)=>{i(247)},(t,r,i)=>{i(248)("Map",(function(t){return function Map(){return t(this,arguments.length?arguments[0]:void 0)}}),i(253))},(t,r,i)=>{var o=i(67),a=i(4),u=i(6),l=i(78),c=i(70),h=i(249),d=i(163),p=i(146),v=i(28),g=i(11),y=i(27),m=i(8),w=i(169),b=i(83),D=i(129);t.exports=function(t,r,i){var P=-1!==t.indexOf("Map"),E=-1!==t.indexOf("Weak"),A=P?"set":"add",S=a[t],x=S&&S.prototype,C=S,k={},fixMethod=function(t){var r=u(x[t]);c(x,t,"add"===t?function add(t){r(this,0===t?0:t);return this}:"delete"===t?function(t){return!(E&&!y(t))&&r(this,0===t?0:t)}:"get"===t?function get(t){return E&&!y(t)?void 0:r(this,0===t?0:t)}:"has"===t?function has(t){return!(E&&!y(t))&&r(this,0===t?0:t)}:function set(t,i){r(this,0===t?0:t,i);return this})};if(l(t,!v(S)||!(E||x.forEach&&!m((function(){(new S).entries().next()}))))){C=i.getConstructor(r,t,P,A);h.enable()}else if(l(t,!0)){var T=new C,I=T[A](E?{}:-0,1)!==T,L=m((function(){T.has(1)})),O=w((function(t){new S(t)})),M=!E&&m((function(){for(var t=new S,r=5;r--;)t[A](r,r);return!t.has(-0)}));if(!O){(C=r((function(t,r){p(t,x);var i=D(new S,t,C);g(r)||d(r,i[A],{that:i,AS_ENTRIES:P});return i}))).prototype=x;x.constructor=C}if(L||M){fixMethod("delete");fixMethod("has");P&&fixMethod("get")}(M||I)&&fixMethod(A);E&&x.clear&&delete x.clear}k[t]=C;o({global:!0,constructor:!0,forced:C!==S},k);b(C,t);E||i.setStrong(C,t,P);return C}},(t,r,i)=>{var o=i(67),a=i(6),u=i(57),l=i(27),c=i(5),h=i(23).f,d=i(76),p=i(100),v=i(250),g=i(18),y=i(252),m=!1,w=g("meta"),b=0,setMetadata=function(t){h(t,w,{value:{objectID:"O"+b++,weakData:{}}})},D=t.exports={enable:function(){D.enable=function(){};m=!0;var t=d.f,r=a([].splice),i={};i[w]=1;if(t(i).length){d.f=function(i){for(var o=t(i),a=0,u=o.length;a<u;a++)if(o[a]===w){r(o,a,1);break}return o};o({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:p.f})}},fastKey:function(t,r){if(!l(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!c(t,w)){if(!v(t))return"F";if(!r)return"E";setMetadata(t)}return t[w].objectID},getWeakData:function(t,r){if(!c(t,w)){if(!v(t))return!0;if(!r)return!1;setMetadata(t)}return t[w].weakData},onFreeze:function(t){y&&m&&v(t)&&!c(t,w)&&setMetadata(t);return t}};u[w]=!0},(t,r,i)=>{var o=i(8),a=i(27),u=i(45),l=i(251),c=Object.isExtensible,h=o((function(){c(1)}));t.exports=h||l?function isExtensible(t){return!!a(t)&&((!l||"ArrayBuffer"!==u(t))&&(!c||c(t)))}:c},(t,r,i)=>{var o=i(8);t.exports=o((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},(t,r,i)=>{var o=i(8);t.exports=!o((function(){return Object.isExtensible(Object.preventExtensions({}))}))},(t,r,i)=>{var o=i(47),a=i(103),u=i(201),l=i(106),c=i(146),h=i(11),d=i(163),p=i(66),v=i(87),g=i(145),y=i(24),m=i(249).fastKey,w=i(62),b=w.set,D=w.getterFor;t.exports={getConstructor:function(t,r,i,p){var v=t((function(t,a){c(t,g);b(t,{type:r,index:o(null),first:void 0,last:void 0,size:0});y||(t.size=0);h(a)||d(a,t[p],{that:t,AS_ENTRIES:i})})),g=v.prototype,w=D(r),define=function(t,r,i){var o,a,u=w(t),l=getEntry(t,r);if(l)l.value=i;else{u.last=l={index:a=m(r,!0),key:r,value:i,previous:o=u.last,next:void 0,removed:!1};u.first||(u.first=l);o&&(o.next=l);y?u.size++:t.size++;"F"!==a&&(u.index[a]=l)}return t},getEntry=function(t,r){var i,o=w(t),a=m(r);if("F"!==a)return o.index[a];for(i=o.first;i;i=i.next)if(i.key===r)return i};u(g,{clear:function clear(){for(var t=w(this),r=t.index,i=t.first;i;){i.removed=!0;i.previous&&(i.previous=i.previous.next=void 0);delete r[i.index];i=i.next}t.first=t.last=void 0;y?t.size=0:this.size=0},delete:function(t){var r=this,i=w(r),o=getEntry(r,t);if(o){var a=o.next,u=o.previous;delete i.index[o.index];o.removed=!0;u&&(u.next=a);a&&(a.previous=u);i.first===o&&(i.first=a);i.last===o&&(i.last=u);y?i.size--:r.size--}return!!o},forEach:function forEach(t){for(var r,i=w(this),o=l(t,arguments.length>1?arguments[1]:void 0);r=r?r.next:i.first;){o(r.value,r.key,this);for(;r&&r.removed;)r=r.previous}},has:function has(t){return!!getEntry(this,t)}});u(g,i?{get:function get(t){var r=getEntry(this,t);return r&&r.value},set:function set(t,r){return define(this,0===t?0:t,r)}}:{add:function add(t){return define(this,t=0===t?0:t,t)}});y&&a(g,"size",{configurable:!0,get:function(){return w(this).size}});return v},setStrong:function(t,r,i){var o=r+" Iterator",a=D(r),u=D(o);p(t,r,(function(t,r){b(this,{type:o,target:t,state:a(t),kind:r,last:void 0})}),(function(){for(var t=u(this),r=t.kind,i=t.last;i&&i.removed;)i=i.previous;if(!t.target||!(t.last=i=i?i.next:t.state.first)){t.target=void 0;return v(void 0,!0)}return v("keys"===r?i.key:"values"===r?i.value:[i.key,i.value],!1)}),i?"entries":"values",!i,!0);g(r)}}},(t,r,i)=>{var o=i(116),a=i(34),u=i(6),l=i(219),c=i(8),h=i(31),d=i(28),p=i(11),v=i(53),g=i(56),y=i(94),m=i(10),w=i(255),b=i(38),D=i(256),P=i(221),E=i(13)("replace"),A=Math.max,S=Math.min,x=u([].concat),C=u([].push),k=u("".indexOf),T=u("".slice),I="$0"==="a".replace(/./,"$0"),L=!!/./[E]&&""===/./[E]("a","$0");l("replace",(function(t,r,i){var u=L?"$":"$0";return[function replace(t,i){var o=m(this),u=p(t)?void 0:b(t,E);return u?a(u,t,o,i):a(r,y(o),t,i)},function(t,a){var l=h(this),c=y(t);if("string"==typeof a&&-1===k(a,u)&&-1===k(a,"$<")){var p=i(r,l,c,a);if(p.done)return p.value}var m=d(a);m||(a=y(a));var b,E=l.global;if(E){b=l.unicode;l.lastIndex=0}for(var I,L=[];null!==(I=P(l,c));){C(L,I);if(!E)break;""===y(I[0])&&(l.lastIndex=w(c,g(l.lastIndex),b))}for(var O,M="",B=0,G=0;G<L.length;G++){for(var R,N=y((I=L[G])[0]),j=A(S(v(I.index),c.length),0),V=[],W=1;W<I.length;W++)C(V,void 0===(O=I[W])?O:String(O));var H=I.groups;if(m){var U=x([N],V,j,c);void 0!==H&&C(U,H);R=y(o(a,void 0,U))}else R=D(N,c,j,V,H,a);if(j>=B){M+=T(c,B,j)+R;B=j+N.length}}return M+T(c,B)}]}),!!c((function(){var t=/./;t.exec=function(){var t=[];t.groups={a:"7"};return t};return"7"!=="".replace(t,"$<a>")}))||!I||L)},(t,r,i)=>{var o=i(93).charAt;t.exports=function(t,r,i){return r+(i?o(t,r).length:1)}},(t,r,i)=>{var o=i(6),a=i(9),u=Math.floor,l=o("".charAt),c=o("".replace),h=o("".slice),d=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,p=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,r,i,o,v,g){var y=i+t.length,m=o.length,w=p;if(void 0!==v){v=a(v);w=d}return c(g,w,(function(a,c){var d;switch(l(c,0)){case"$":return"$";case"&":return t;case"`":return h(r,0,i);case"'":return h(r,y);case"<":d=v[h(c,1,-1)];break;default:var p=+c;if(0===p)return a;if(p>m){var g=u(p/10);return 0===g?a:g<=m?void 0===o[g-1]?l(c,1):o[g-1]+l(c,1):a}d=o[p-1]}return void 0===d?"":d}))}},(t,r,i)=>{var o=i(67),a=i(34),u=i(6),l=i(10),c=i(28),h=i(11),d=i(208),p=i(94),v=i(38),g=i(230),y=i(256),m=i(13),w=i(15),b=m("replace"),D=TypeError,P=u("".indexOf),E=u("".replace),A=u("".slice),S=Math.max,stringIndexOf=function(t,r,i){return i>t.length?-1:""===r?i:P(t,r,i)};o({target:"String",proto:!0},{replaceAll:function replaceAll(t,r){var i,o,u,m,x,C,k,T,I,L=l(this),O=0,M=0,B="";if(!h(t)){if(i=d(t)){o=p(l(g(t)));if(!~P(o,"g"))throw new D("`.replaceAll` does not allow non-global regexes")}if(u=v(t,b))return a(u,t,L,r);if(w&&i)return E(p(L),t,r)}m=p(L);x=p(t);(C=c(r))||(r=p(r));k=x.length;T=S(1,k);O=stringIndexOf(m,x,0);for(;-1!==O;){I=C?p(r(x,O,m)):y(x,m,O,[],void 0,r);B+=A(m,M,O)+I;M=O+k;O=stringIndexOf(m,x,O+T)}M<m.length&&(B+=A(m,M));return B}})},(t,r,i)=>{i(259)},(t,r,i)=>{i(248)("Set",(function(t){return function Set(){return t(this,arguments.length?arguments[0]:void 0)}}),i(253))},(t,r,i)=>{var o=i(67),a=i(261);o({target:"Set",proto:!0,real:!0,forced:!i(269)("difference")},{difference:a})},(t,r,i)=>{var o=i(262),a=i(263),u=i(264),l=i(267),c=i(268),h=i(265),d=i(266),p=a.has,v=a.remove;t.exports=function difference(t){var r=o(this),i=c(t),a=u(r);l(r)<=i.size?h(r,(function(t){i.includes(t)&&v(a,t)})):d(i.getIterator(),(function(t){p(r,t)&&v(a,t)}));return a}},(t,r,i)=>{var o=i(263).has;t.exports=function(t){o(t);return t}},(t,r,i)=>{var o=i(6),a=Set.prototype;t.exports={Set:Set,add:o(a.add),has:o(a.has),remove:o(a.delete),proto:a}},(t,r,i)=>{var o=i(263),a=i(265),u=o.Set,l=o.add;t.exports=function(t){var r=new u;a(t,(function(t){l(r,t)}));return r}},(t,r,i)=>{var o=i(6),a=i(266),u=i(263),l=u.Set,c=u.proto,h=o(c.forEach),d=o(c.keys),p=d(new l).next;t.exports=function(t,r,i){return i?a({iterator:d(t),next:p},r):h(t,r)}},(t,r,i)=>{var o=i(34);t.exports=function(t,r,i){for(var a,u,l=i?t:t.iterator,c=t.next;!(a=o(c,l)).done;)if(void 0!==(u=r(a.value)))return u}},(t,r,i)=>{var o=i(85),a=i(263);t.exports=o(a.proto,"size","get")||function(t){return t.size}},(t,r,i)=>{var o=i(39),a=i(31),u=i(34),l=i(53),c=i(184),h="Invalid size",d=RangeError,p=TypeError,v=Math.max,SetRecord=function(t,r,i,o){this.set=t;this.size=r;this.has=i;this.keys=o};SetRecord.prototype={getIterator:function(){return c(a(u(this.keys,this.set)))},includes:function(t){return u(this.has,this.set,t)}};t.exports=function(t){a(t);var r=+t.size;if(r!=r)throw new p(h);var i=l(r);if(i<0)throw new d(h);return new SetRecord(t,v(i,0),o(t.has),o(t.keys))}},(t,r,i)=>{var o=i(36),createSetLike=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var r=o("Set");try{(new r)[t](createSetLike(0));try{(new r)[t](createSetLike(-1));return!1}catch(t){return!0}}catch(t){return!1}}},(t,r,i)=>{var o=i(67),a=i(8),u=i(271);o({target:"Set",proto:!0,real:!0,forced:!i(269)("intersection")||a((function(){return"3,2"!==Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:u})},(t,r,i)=>{var o=i(262),a=i(263),u=i(267),l=i(268),c=i(265),h=i(266),d=a.Set,p=a.add,v=a.has;t.exports=function intersection(t){var r=o(this),i=l(t),a=new d;u(r)>i.size?h(i.getIterator(),(function(t){v(r,t)&&p(a,t)})):c(r,(function(t){i.includes(t)&&p(a,t)}));return a}},(t,r,i)=>{var o=i(67),a=i(273);o({target:"Set",proto:!0,real:!0,forced:!i(269)("isDisjointFrom")},{isDisjointFrom:a})},(t,r,i)=>{var o=i(262),a=i(263).has,u=i(267),l=i(268),c=i(265),h=i(266),d=i(167);t.exports=function isDisjointFrom(t){var r=o(this),i=l(t);if(u(r)<=i.size)return!1!==c(r,(function(t){if(i.includes(t))return!1}),!0);var p=i.getIterator();return!1!==h(p,(function(t){if(a(r,t))return d(p,"normal",!1)}))}},(t,r,i)=>{var o=i(67),a=i(275);o({target:"Set",proto:!0,real:!0,forced:!i(269)("isSubsetOf")},{isSubsetOf:a})},(t,r,i)=>{var o=i(262),a=i(267),u=i(265),l=i(268);t.exports=function isSubsetOf(t){var r=o(this),i=l(t);return!(a(r)>i.size)&&!1!==u(r,(function(t){if(!i.includes(t))return!1}),!0)}},(t,r,i)=>{var o=i(67),a=i(277);o({target:"Set",proto:!0,real:!0,forced:!i(269)("isSupersetOf")},{isSupersetOf:a})},(t,r,i)=>{var o=i(262),a=i(263).has,u=i(267),l=i(268),c=i(266),h=i(167);t.exports=function isSupersetOf(t){var r=o(this),i=l(t);if(u(r)<i.size)return!1;var d=i.getIterator();return!1!==c(d,(function(t){if(!a(r,t))return h(d,"normal",!1)}))}},(t,r,i)=>{var o=i(67),a=i(279);o({target:"Set",proto:!0,real:!0,forced:!i(269)("symmetricDifference")},{symmetricDifference:a})},(t,r,i)=>{var o=i(262),a=i(263),u=i(264),l=i(268),c=i(266),h=a.add,d=a.has,p=a.remove;t.exports=function symmetricDifference(t){var r=o(this),i=l(t).getIterator(),a=u(r);c(i,(function(t){d(r,t)?p(a,t):h(a,t)}));return a}},(t,r,i)=>{var o=i(67),a=i(281);o({target:"Set",proto:!0,real:!0,forced:!i(269)("union")},{union:a})},(t,r,i)=>{var o=i(262),a=i(263).add,u=i(264),l=i(268),c=i(266);t.exports=function union(t){var r=o(this),i=l(t).getIterator(),h=u(r);c(i,(function(t){a(h,t)}));return h}},(t,r,i)=>{var o=i(67),a=i(9),u=i(55),l=i(53),c=i(46);o({target:"Array",proto:!0},{at:function at(t){var r=a(this),i=u(r),o=l(t),c=o>=0?o:i+o;return c<0||c>=i?void 0:r[c]}});c("at")},(t,r,i)=>{var o=i(67),a=i(6),u=i(39),l=i(9),c=i(55),h=i(284),d=i(94),p=i(8),v=i(237),g=i(187),y=i(285),m=i(286),w=i(20),b=i(287),D=[],P=a(D.sort),E=a(D.push),A=p((function(){D.sort(void 0)})),S=p((function(){D.sort(null)})),x=g("sort"),C=!p((function(){if(w)return w<70;if(!(y&&y>3)){if(m)return!0;if(b)return b<603;var t,r,i,o,a="";for(t=65;t<76;t++){r=String.fromCharCode(t);switch(t){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(o=0;o<47;o++)D.push({k:r+o,v:i})}D.sort((function(t,r){return r.v-t.v}));for(o=0;o<D.length;o++){r=D[o].k.charAt(0);a.charAt(a.length-1)!==r&&(a+=r)}return"DGBEFHACIJK"!==a}}));o({target:"Array",proto:!0,forced:A||!S||!x||!C},{sort:function sort(t){void 0!==t&&u(t);var r=l(this);if(C)return void 0===t?P(r):P(r,t);var i,o,a=[],p=c(r);for(o=0;o<p;o++)o in r&&E(a,r[o]);v(a,function(t){return function(r,i){return void 0===i?-1:void 0===r?1:void 0!==t?+t(r,i)||0:d(r)>d(i)?1:-1}}(t));i=c(a);o=0;for(;o<i;)r[o]=a[o++];for(;o<p;)h(r,o++);return r}})},(t,r,i)=>{var o=i(40),a=TypeError;t.exports=function(t,r){if(!delete t[r])throw new a("Cannot delete property "+o(r)+" of "+o(t))}},(t,r,i)=>{var o=i(21).match(/firefox\/(\d+)/i);t.exports=!!o&&+o[1]},(t,r,i)=>{var o=i(21);t.exports=/MSIE|Trident/.test(o)},(t,r,i)=>{var o=i(21).match(/AppleWebKit\/(\d+)\./);t.exports=!!o&&+o[1]},(t,r,i)=>{i(289)},(t,r,i)=>{var o,a=i(252),u=i(4),l=i(6),c=i(201),h=i(249),d=i(248),p=i(290),v=i(27),g=i(62).enforce,y=i(8),m=i(63),w=Object,b=Array.isArray,D=w.isExtensible,P=w.isFrozen,E=w.isSealed,A=w.freeze,S=w.seal,x={},C={},k=!u.ActiveXObject&&"ActiveXObject"in u,wrapper=function(t){return function WeakMap(){return t(this,arguments.length?arguments[0]:void 0)}},T=d("WeakMap",wrapper,p),I=T.prototype,L=l(I.set);if(m)if(k){o=p.getConstructor(wrapper,"WeakMap",!0);h.enable();var O=l(I.delete),M=l(I.has),B=l(I.get);c(I,{delete:function(t){if(v(t)&&!D(t)){var r=g(this);r.frozen||(r.frozen=new o);return O(this,t)||r.frozen.delete(t)}return O(this,t)},has:function has(t){if(v(t)&&!D(t)){var r=g(this);r.frozen||(r.frozen=new o);return M(this,t)||r.frozen.has(t)}return M(this,t)},get:function get(t){if(v(t)&&!D(t)){var r=g(this);r.frozen||(r.frozen=new o);return M(this,t)?B(this,t):r.frozen.get(t)}return B(this,t)},set:function set(t,r){if(v(t)&&!D(t)){var i=g(this);i.frozen||(i.frozen=new o);M(this,t)?L(this,t,r):i.frozen.set(t,r)}else L(this,t,r);return this}})}else a&&y((function(){var t=A([]);L(new T,t,1);return!P(t)}))&&c(I,{set:function set(t,r){var i;b(t)&&(P(t)?i=x:E(t)&&(i=C));L(this,t,r);i===x&&A(t);i===C&&S(t);return this}})},(t,r,i)=>{var o=i(6),a=i(201),u=i(249).getWeakData,l=i(146),c=i(31),h=i(11),d=i(27),p=i(163),v=i(105),g=i(5),y=i(62),m=y.set,w=y.getterFor,b=v.find,D=v.findIndex,P=o([].splice),E=0,uncaughtFrozenStore=function(t){return t.frozen||(t.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(t,r){return b(t.entries,(function(t){return t[0]===r}))};UncaughtFrozenStore.prototype={get:function(t){var r=findUncaughtFrozen(this,t);if(r)return r[1]},has:function(t){return!!findUncaughtFrozen(this,t)},set:function(t,r){var i=findUncaughtFrozen(this,t);i?i[1]=r:this.entries.push([t,r])},delete:function(t){var r=D(this.entries,(function(r){return r[0]===t}));~r&&P(this.entries,r,1);return!!~r}};t.exports={getConstructor:function(t,r,i,o){var v=t((function(t,a){l(t,y);m(t,{type:r,id:E++,frozen:void 0});h(a)||p(a,t[o],{that:t,AS_ENTRIES:i})})),y=v.prototype,b=w(r),define=function(t,r,i){var o=b(t),a=u(c(r),!0);!0===a?uncaughtFrozenStore(o).set(r,i):a[o.id]=i;return t};a(y,{delete:function(t){var r=b(this);if(!d(t))return!1;var i=u(t);return!0===i?uncaughtFrozenStore(r).delete(t):i&&g(i,r.id)&&delete i[r.id]},has:function has(t){var r=b(this);if(!d(t))return!1;var i=u(t);return!0===i?uncaughtFrozenStore(r).has(t):i&&g(i,r.id)}});a(y,i?{get:function get(t){var r=b(this);if(d(t)){var i=u(t);return!0===i?uncaughtFrozenStore(r).get(t):i?i[r.id]:void 0}},set:function set(t,r){return define(this,t,r)}}:{add:function add(t){return define(this,t,!0)}});return v}}},(t,r,i)=>{i(204);t.exports=globalThis.pdfjsLib},(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.ngxExtendedPdfViewerVersion=void 0;r.ngxExtendedPdfViewerVersion="18.1.14"},(t,r,i)=>{i(135);i(136);i(98);i(120);i(88);i(1);i(42);i(92);i(95);Object.defineProperty(r,"__esModule",{value:!0});r.compatibilityParams=r.OptionKind=r.AppOptions=void 0;i(212);i(226);i(204);i(126);i(138);i(190);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,_toPropertyKey(o.key),o)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}var o=r.compatibilityParams=Object.create(null),a=navigator.userAgent||"",u=navigator.platform||"",l=navigator.maxTouchPoints||1,c=/Android/.test(a),h=/\b(iPad|iPhone|iPod)(?=;)/.test(a)||"MacIntel"===u&&l>1;!function checkCanvasSizeLimitation(){(h||c)&&(o.maxCanvasPixels=5242880)}();var d=r.OptionKind={VIEWER:2,API:4,WORKER:8,PREFERENCE:128},p={annotationEditorMode:{value:0,kind:d.VIEWER+d.PREFERENCE},annotationMode:{value:2,kind:d.VIEWER+d.PREFERENCE},cursorToolOnLoad:{value:0,kind:d.VIEWER+d.PREFERENCE},defaultZoomDelay:{value:400,kind:d.VIEWER+d.PREFERENCE},defaultZoomValue:{value:"",kind:d.VIEWER+d.PREFERENCE},disableHistory:{value:!1,kind:d.VIEWER},disablePageLabels:{value:!1,kind:d.VIEWER+d.PREFERENCE},enablePermissions:{value:!1,kind:d.VIEWER+d.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:d.VIEWER+d.PREFERENCE},enableScripting:{value:!0,kind:d.VIEWER+d.PREFERENCE},enableStampEditor:{value:!0,kind:d.VIEWER+d.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:d.VIEWER},externalLinkTarget:{value:0,kind:d.VIEWER+d.PREFERENCE},historyUpdateUrl:{value:!1,kind:d.VIEWER+d.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:d.VIEWER+d.PREFERENCE},imageResourcesPath:{value:"./images/",kind:d.VIEWER},maxCanvasPixels:{value:16777216,kind:d.VIEWER},forcePageColors:{value:!1,kind:d.VIEWER+d.PREFERENCE},pageColorsBackground:{value:"Canvas",kind:d.VIEWER+d.PREFERENCE},pageColorsForeground:{value:"CanvasText",kind:d.VIEWER+d.PREFERENCE},pdfBugEnabled:{value:!1,kind:d.VIEWER+d.PREFERENCE},printResolution:{value:150,kind:d.VIEWER},removePageBorders:{value:!1,kind:d.VIEWER+d.PREFERENCE},sidebarViewOnLoad:{value:-1,kind:d.VIEWER+d.PREFERENCE},scrollModeOnLoad:{value:-1,kind:d.VIEWER+d.PREFERENCE},spreadModeOnLoad:{value:-1,kind:d.VIEWER+d.PREFERENCE},textLayerMode:{value:1,kind:d.VIEWER+d.PREFERENCE},viewerCssTheme:{value:0,kind:d.VIEWER+d.PREFERENCE},viewOnLoad:{value:0,kind:d.VIEWER+d.PREFERENCE},cMapPacked:{value:!0,kind:d.API},cMapUrl:{value:"../web/cmaps/",kind:d.API},disableAutoFetch:{value:!1,kind:d.API+d.PREFERENCE},disableFontFace:{value:!1,kind:d.API+d.PREFERENCE},disableRange:{value:!1,kind:d.API+d.PREFERENCE},disableStream:{value:!1,kind:d.API+d.PREFERENCE},docBaseUrl:{value:"",kind:d.API},enableXfa:{value:!0,kind:d.API+d.PREFERENCE},fontExtraProperties:{value:!1,kind:d.API},isEvalSupported:{value:!0,kind:d.API},isOffscreenCanvasSupported:{value:!0,kind:d.API},maxImageSize:{value:-1,kind:d.API},pdfBug:{value:!1,kind:d.API},standardFontDataUrl:{value:"../web/standard_fonts/",kind:d.API},verbosity:{value:1,kind:d.API},workerPort:{value:null,kind:d.WORKER},workerSrc:{value:"./assets/pdf.worker.js",kind:d.WORKER}};p.defaultUrl={value:"compressed.tracemonkey-pldi-09.pdf",kind:d.VIEWER};p.disablePreferences={value:!1,kind:d.VIEWER};p.locale={value:navigator.language||"en-US",kind:d.VIEWER};p.sandboxBundleSrc={value:"../build/pdf.sandbox.js",kind:d.VIEWER};var v=Object.create(null);if(globalThis.pdfDefaultOptions)for(var g in globalThis.pdfDefaultOptions)v[g]=globalThis.pdfDefaultOptions[g];(r.AppOptions=function(){function AppOptions(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AppOptions);throw new Error("Cannot initialize AppOptions.")}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(AppOptions,null,[{key:"get",value:function get(t){var r=v[t];if(void 0!==r)return r;var i=p[t];if(void 0!==i){var a;return null!==(a=o[t])&&void 0!==a?a:i.value}}},{key:"getAll",value:function getAll(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=Object.create(null);for(var i in p){var a,u=p[i];if(t){if(0==(t&u.kind))continue;if(t===d.PREFERENCE){var l=u.value,c=_typeof(l);if("boolean"===c||"string"===c||"number"===c&&Number.isInteger(l)){r[i]=l;continue}throw new Error("Invalid type for preference: ".concat(i))}}var h=v[i];r[i]=void 0!==h?h:null!==(a=o[i])&&void 0!==a?a:u.value}return r}},{key:"set",value:function set(t,r){v[t]=r}},{key:"setAll",value:function setAll(t){for(var r in t)v[r]=t[r]}},{key:"remove",value:function remove(t){delete v[t]}}]);return AppOptions}())._hasUserOptions=function(){return Object.keys(v).length>0}},(t,r,i)=>{i(98);i(120);i(1);i(135);i(136);i(229);i(195);i(212);i(226);i(193);i(122);i(123);Object.defineProperty(r,"__esModule",{value:!0});r.WaitOnType=r.EventBus=r.AutomationEventBus=void 0;r.waitOnEventOrTimeout=function waitOnEventOrTimeout(t){var r=t.target,i=t.name,a=t.delay,l=void 0===a?0:a;return new Promise((function(t,a){if("object"!==_typeof(r)||!i||"string"!=typeof i||!(Number.isInteger(l)&&l>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function handler(o){r instanceof u?r._off(i,c):r.removeEventListener(i,c);d&&clearTimeout(d);t(o)}var c=handler.bind(null,o.EVENT);r instanceof u?r._on(i,c):r.addEventListener(i,c);var h=handler.bind(null,o.TIMEOUT),d=setTimeout(h,l)}))};i(88);i(142);i(138);i(126);i(188);i(179);i(295);i(42);i(92);i(288);i(95);function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldGet(t,r){var i=function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}(t,r,"get");return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,i)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var o=r.WaitOnType={EVENT:"event",TIMEOUT:"timeout"};var a=new WeakMap,u=r.EventBus=function(){function EventBus(){_classCallCheck(this,EventBus);_classPrivateFieldInitSpec(this,a,{writable:!0,value:Object.create(null)})}_createClass(EventBus,[{key:"on",value:function on(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._on(t,r,{external:!0,once:null==i?void 0:i.once})}},{key:"off",value:function off(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._off(t,r,{external:!0,once:null==i?void 0:i.once})}},{key:"dispatch",value:function dispatch(t,r){var i=_classPrivateFieldGet(this,a)[t];if(i&&0!==i.length){var o,u,l=_createForOfIteratorHelper(i.slice(0));try{for(l.s();!(u=l.n()).done;){var c=u.value,h=c.listener,d=c.external;c.once&&this._off(t,h);d?(o||(o=[])).push(h):h(r)}}catch(t){l.e(t)}finally{l.f()}if(o){var p,v=_createForOfIteratorHelper(o);try{for(v.s();!(p=v.n()).done;){(0,p.value)(r)}}catch(t){v.e(t)}finally{v.f()}o=null}}}},{key:"_on",value:function _on(t,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;((i=_classPrivateFieldGet(this,a))[t]||(i[t]=[])).push({listener:r,external:!0===(null==o?void 0:o.external),once:!0===(null==o?void 0:o.once)})}},{key:"_off",value:function _off(t,r){var i=_classPrivateFieldGet(this,a)[t];if(i)for(var o=0,u=i.length;o<u;o++)if(i[o].listener===r){i.splice(o,1);return}}}]);return EventBus}();r.AutomationEventBus=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(AutomationEventBus,t);var r=_createSuper(AutomationEventBus);function AutomationEventBus(){_classCallCheck(this,AutomationEventBus);return r.apply(this,arguments)}_createClass(AutomationEventBus,[{key:"dispatch",value:function dispatch(t,r){throw new Error("Not implemented: AutomationEventBus.dispatch")}}]);return AutomationEventBus}(u)},(t,r,i)=>{var o=i(67),a=i(9),u=i(52),l=i(53),c=i(55),h=i(180),d=i(181),p=i(108),v=i(102),g=i(284),y=i(189)("splice"),m=Math.max,w=Math.min;o({target:"Array",proto:!0,forced:!y},{splice:function splice(t,r){var i,o,y,b,D,P,E=a(this),A=c(E),S=u(t,A),x=arguments.length;if(0===x)i=o=0;else if(1===x){i=0;o=A-S}else{i=x-2;o=w(m(l(r),0),A-S)}d(A+i-o);y=p(E,o);for(b=0;b<o;b++)(D=S+b)in E&&v(y,b,E[D]);y.length=o;if(i<o){for(b=S;b<A-o;b++){P=b+i;(D=b+o)in E?E[P]=E[D]:g(E,P)}for(b=A;b>A-o+i;b--)g(E,b-1)}else if(i>o)for(b=A-o;b>S;b--){P=b+i-1;(D=b+o-1)in E?E[P]=E[D]:g(E,P)}for(b=0;b<i;b++)E[b+S]=arguments[b+2];h(E,A-o+i);return y}})},(t,r,i)=>{i(135);i(136);i(98);i(120);i(1);i(175);i(176);i(177);i(178);i(193);i(182);i(183);i(185);i(188);i(195);i(226);Object.defineProperty(r,"__esModule",{value:!0});r.SimpleLinkService=r.PDFLinkService=r.LinkTarget=void 0;i(126);i(42);i(246);i(88);i(92);i(95);i(204);i(138);i(115);i(205);i(206);i(212);i(254);i(257);i(297);i(190);i(191);i(229);i(142);i(222);i(288);i(298);i(179);var o=i(245);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classStaticPrivateMethodGet(t,r,i){!function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return i}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldGet(t,r){var i=function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}(t,r,"get");return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,i)}var a=r.LinkTarget={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function _addLinkAttributes(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.url,u=r.target,l=r.rel,c=r.enabled,h=void 0===c||c;if(!i||"string"!=typeof i)throw new Error('A valid "url" parameter must provided.');var d=(0,o.removeNullCharacters)(i);if(h)t.href=t.title=d;else{t.href="";t.title="Disabled: ".concat(d);t.onclick=function(){return!1}}var p="";switch(u){case a.NONE:break;case a.SELF:p="_self";break;case a.BLANK:p="_blank";break;case a.PARENT:p="_parent";break;case a.TOP:p="_top"}t.target=p;t.rel="string"==typeof l?l:"noopener noreferrer nofollow"}var u=new WeakMap,l=new WeakSet;r.PDFLinkService=function(){function PDFLinkService(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.eventBus,i=t.externalLinkTarget,o=void 0===i?null:i,a=t.externalLinkRel,c=void 0===a?null:a,h=t.ignoreDestinationZoom,d=void 0!==h&&h;_classCallCheck(this,PDFLinkService);!function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}(this,l);!function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}(this,u,{writable:!0,value:new Map});this.eventBus=r;this.externalLinkTarget=o;this.externalLinkRel=c;this.externalLinkEnabled=!0;this._ignoreDestinationZoom=d;this.baseUrl=null;this.pdfDocument=null;this.pdfViewer=null;this.pdfHistory=null}_createClass(PDFLinkService,[{key:"setDocument",value:function setDocument(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.baseUrl=r;this.pdfDocument=t;_classPrivateFieldGet(this,u).clear()}},{key:"setViewer",value:function setViewer(t){this.pdfViewer=t}},{key:"setHistory",value:function setHistory(t){this.pdfHistory=t}},{key:"pagesCount",get:function get(){return this.pdfDocument?this.pdfDocument.numPages:0}},{key:"page",get:function get(){return this.pdfViewer.currentPageNumber},set:function set(t){this.pdfViewer.currentPageNumber=t}},{key:"rotation",get:function get(){return this.pdfViewer.pagesRotation},set:function set(t){this.pdfViewer.pagesRotation=t}},{key:"isInPresentationMode",get:function get(){return this.pdfViewer.isInPresentationMode}},{key:"goToDestination",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,i;return _regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(this.pdfDocument){o.next=2;break}return o.abrupt("return");case 2:if("string"!=typeof t){o.next=9;break}r=t;o.next=6;return this.pdfDocument.getDestination(t);case 6:i=o.sent;o.next=13;break;case 9:r=null;o.next=12;return t;case 12:i=o.sent;case 13:if(Array.isArray(i)){o.next=16;break}globalThis.ngxConsole.error('PDFLinkService.goToDestination: "'.concat(i,'" is not ')+'a valid destination array, for dest="'.concat(t,'".'));return o.abrupt("return");case 16:_classPrivateMethodGet(this,l,_goToDestinationHelper2).call(this,t,r,i);case 17:case"end":return o.stop()}}),_callee,this)}))),function goToDestination(t){return r.apply(this,arguments)})},{key:"goToPage",value:function goToPage(t){if(this.pdfDocument){var r="string"==typeof t&&this.pdfViewer.pageLabelToPageNumber(t)||0|t;if(Number.isInteger(r)&&r>0&&r<=this.pagesCount){if(this.pdfHistory){this.pdfHistory.pushCurrentPosition();this.pdfHistory.pushPage(r)}if("book"===this.pdfViewer.pageViewMode){if(this.pdfViewer.pageFlip){this.pdfViewer.ensureAdjecentPagesAreLoaded();var i=this.pdfViewer.currentPageNumber-this.pdfViewer.currentPageNumber%2,o=r-r%2;i===o-2?this.pdfViewer.pageFlip.flipNext():i===o+2?this.pdfViewer.pageFlip.flipPrev():this.pdfViewer.pageFlip.turnToPage(r-1)}}else this.pdfViewer.scrollPageIntoView({pageNumber:r})}else globalThis.ngxConsole.error('PDFLinkService.goToPage: "'.concat(t,'" is not a valid page.'))}}},{key:"addLinkAttributes",value:function addLinkAttributes(t,r){_addLinkAttributes(t,{url:r,target:arguments.length>2&&void 0!==arguments[2]&&arguments[2]?a.BLANK:this.externalLinkTarget,rel:this.externalLinkRel,enabled:this.externalLinkEnabled})}},{key:"getDestinationHash",value:function getDestinationHash(t){if("string"==typeof t){if(t.length>0)return this.getAnchorUrl("#"+escape(t))}else if(Array.isArray(t)){var r=JSON.stringify(t);if(r.length>0)return this.getAnchorUrl("#"+escape(r))}return this.getAnchorUrl("")}},{key:"getAnchorUrl",value:function getAnchorUrl(t){return this.baseUrl?this.baseUrl+t:t}},{key:"setHash",value:function setHash(t){if(this.pdfDocument){var r,i;if(t.includes("=")){var a=(0,o.parseQueryString)(t);if(a.has("search")){var u=a.get("search").replaceAll('"',""),l="true"===a.get("phrase");this.eventBus.dispatch("findfromurlhash",{source:this,query:l?u:u.match(/\S+/g)})}a.has("page")&&(r=0|a.get("page")||1);if(a.has("zoom")){var c=a.get("zoom").split(","),h=c[0],d=parseFloat(h);h.includes("Fit")?"Fit"===h||"FitB"===h?i=[null,{name:h}]:"FitH"===h||"FitBH"===h||"FitV"===h||"FitBV"===h?i=[null,{name:h},c.length>1?0|c[1]:null]:"FitR"===h?5!==c.length?globalThis.ngxConsole.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):i=[null,{name:h},0|c[1],0|c[2],0|c[3],0|c[4]]:globalThis.ngxConsole.error('PDFLinkService.setHash: "'.concat(h,'" is not a valid zoom value.')):i=[null,{name:"XYZ"},c.length>1?0|c[1]:null,c.length>2?0|c[2]:null,d?d/100:h]}i?this.pdfViewer.scrollPageIntoView({pageNumber:r||this.page,destArray:i,allowNegativeOffset:!0}):r&&(this.page=r);a.has("pagemode")&&this.eventBus.dispatch("pagemode",{source:this,mode:a.get("pagemode")});a.has("nameddest")&&this.goToDestination(a.get("nameddest"))}else{i=unescape(t);try{i=JSON.parse(i);Array.isArray(i)||(i=i.toString())}catch(t){}if("string"==typeof i||_classStaticPrivateMethodGet(PDFLinkService,PDFLinkService,_isValidExplicitDestination).call(PDFLinkService,i)){this.goToDestination(i);return}globalThis.ngxConsole.error('PDFLinkService.setHash: "'.concat(unescape(t),'" is not a valid destination.'))}}}},{key:"executeNamedAction",value:function executeNamedAction(t){var r,i;switch(t){case"GoBack":null===(r=this.pdfHistory)||void 0===r||r.back();break;case"GoForward":null===(i=this.pdfHistory)||void 0===i||i.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:t})}},{key:"executeSetOCGState",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,i,o,a,u,l,c;return _regeneratorRuntime().wrap((function _callee2$(h){for(;;)switch(h.prev=h.next){case 0:r=this.pdfDocument;h.next=3;return this.pdfViewer.optionalContentConfigPromise;case 3:i=h.sent;if(r===this.pdfDocument){h.next=6;break}return h.abrupt("return");case 6:a=_createForOfIteratorHelper(t.state);h.prev=7;a.s();case 9:if((u=a.n()).done){h.next=28;break}l=u.value;h.t0=l;h.next="ON"===h.t0||"OFF"===h.t0||"Toggle"===h.t0?14:16;break;case 14:o=l;return h.abrupt("continue",26);case 16:h.t1=o;h.next="ON"===h.t1?19:"OFF"===h.t1?21:"Toggle"===h.t1?23:26;break;case 19:i.setVisibility(l,!0);return h.abrupt("break",26);case 21:i.setVisibility(l,!1);return h.abrupt("break",26);case 23:(c=i.getGroup(l))&&i.setVisibility(l,!c.visible);return h.abrupt("break",26);case 26:h.next=9;break;case 28:h.next=33;break;case 30:h.prev=30;h.t2=h.catch(7);a.e(h.t2);case 33:h.prev=33;a.f();return h.finish(33);case 36:this.pdfViewer.optionalContentConfigPromise=Promise.resolve(i);case 37:case"end":return h.stop()}}),_callee2,this,[[7,30,33,36]])}))),function executeSetOCGState(r){return t.apply(this,arguments)})},{key:"cachePageRef",value:function cachePageRef(t,r){if(r){var i=0===r.gen?"".concat(r.num,"R"):"".concat(r.num,"R").concat(r.gen);_classPrivateFieldGet(this,u).set(i,t)}}},{key:"_cachedPageNumber",value:function _cachedPageNumber(t){if(!t)return null;var r=0===t.gen?"".concat(t.num,"R"):"".concat(t.num,"R").concat(t.gen);return _classPrivateFieldGet(this,u).get(r)||null}}]);var t,r;return PDFLinkService}();function _goToDestinationHelper2(t){var r,i=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2?arguments[2]:void 0,u=a[0];if("object"===_typeof(u)&&null!==u){if(!(r=this._cachedPageNumber(u))){this.pdfDocument.getPageIndex(u).then((function(r){i.cachePageRef(r+1,u);_classPrivateMethodGet(i,l,_goToDestinationHelper2).call(i,t,o,a)})).catch((function(){globalThis.ngxConsole.error('PDFLinkService.#goToDestinationHelper: "'.concat(u,'" is not ')+'a valid page reference, for dest="'.concat(t,'".'))}));return}}else{if(!Number.isInteger(u)){globalThis.ngxConsole.error('PDFLinkService.#goToDestinationHelper: "'.concat(u,'" is not ')+'a valid destination reference, for dest="'.concat(t,'".'));return}r=u+1}if(!r||r<1||r>this.pagesCount)globalThis.ngxConsole.error('PDFLinkService.#goToDestinationHelper: "'.concat(r,'" is not ')+'a valid page number, for dest="'.concat(t,'".'));else{if(this.pdfHistory){this.pdfHistory.pushCurrentPosition();this.pdfHistory.push({namedDest:o,explicitDest:a,pageNumber:r})}this.pdfViewer.scrollPageIntoView({pageNumber:r,destArray:a,ignoreDestinationZoom:this._ignoreDestinationZoom})}}function _isValidExplicitDestination(t){if(!Array.isArray(t))return!1;var r=t.length;if(r<2)return!1;var i=t[0];if(!("object"===_typeof(i)&&Number.isInteger(i.num)&&Number.isInteger(i.gen)||Number.isInteger(i)&&i>=0))return!1;var o=t[1];if("object"!==_typeof(o)||"string"!=typeof o.name)return!1;var a=!0;switch(o.name){case"XYZ":if(5!==r)return!1;break;case"Fit":case"FitB":return 2===r;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==r)return!1;break;case"FitR":if(6!==r)return!1;a=!1;break;default:return!1}for(var u=2;u<r;u++){var l=t[u];if(!("number"==typeof l||a&&null===l))return!1}return!0}r.SimpleLinkService=function(){function SimpleLinkService(){_classCallCheck(this,SimpleLinkService);this.externalLinkEnabled=!0}_createClass(SimpleLinkService,[{key:"pagesCount",get:function get(){return 0}},{key:"page",get:function get(){return 0},set:function set(t){}},{key:"rotation",get:function get(){return 0},set:function set(t){}},{key:"isInPresentationMode",get:function get(){return!1}},{key:"goToDestination",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(t){return _regeneratorRuntime().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),_callee3)}))),function goToDestination(r){return t.apply(this,arguments)})},{key:"goToPage",value:function goToPage(t){}},{key:"addLinkAttributes",value:function addLinkAttributes(t,r){_addLinkAttributes(t,{url:r,enabled:this.externalLinkEnabled})}},{key:"getDestinationHash",value:function getDestinationHash(t){return"#"}},{key:"getAnchorUrl",value:function getAnchorUrl(t){return"#"}},{key:"setHash",value:function setHash(t){}},{key:"executeNamedAction",value:function executeNamedAction(t){}},{key:"executeSetOCGState",value:function executeSetOCGState(t){}},{key:"cachePageRef",value:function cachePageRef(t,r){}}]);var t;return SimpleLinkService}()},(t,r,i)=>{var o=i(34),a=i(219),u=i(31),l=i(11),c=i(56),h=i(94),d=i(10),p=i(38),v=i(255),g=i(221);a("match",(function(t,r,i){return[function match(r){var i=d(this),a=l(r)?void 0:p(r,t);return a?o(a,r,i):new RegExp(r)[t](h(i))},function(t){var o=u(this),a=h(t),l=i(r,o,a);if(l.done)return l.value;if(!o.global)return g(o,a);var d=o.unicode;o.lastIndex=0;for(var p,y=[],m=0;null!==(p=g(o,a));){var w=h(p[0]);y[m]=w;""===w&&(o.lastIndex=v(a,c(o.lastIndex),d));m++}return 0===m?null:y}]}))},(t,r,i)=>{i(299)},(t,r,i)=>{i(248)("WeakSet",(function(t){return function WeakSet(){return t(this,arguments.length?arguments[0]:void 0)}}),i(290))},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(188);i(229);i(195);i(212);i(226);i(1);i(179);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationEditorParams=void 0;i(126);i(42);i(88);i(92);i(298);i(95);var o=i(291);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}var a=new WeakSet;r.AnnotationEditorParams=_createClass((function AnnotationEditorParams(t,r){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AnnotationEditorParams);_classPrivateMethodInitSpec(this,a);this.eventBus=r;(function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i})(this,a,_bindListeners2).call(this,t)}));function _bindListeners2(t){var r=this,i=t.editorFreeTextFontSize,a=t.editorFreeTextColor,u=t.editorInkColor,l=t.editorInkThickness,c=t.editorInkOpacity,h=t.editorStampAddImage,d=function dispatchEvent(t,i){r.eventBus.dispatch("switchannotationeditorparams",{source:r,type:o.AnnotationEditorParamsType[t],value:i})};i.addEventListener("input",(function(){d("FREETEXT_SIZE",this.valueAsNumber)}));a.addEventListener("input",(function(){d("FREETEXT_COLOR",this.value)}));u.addEventListener("input",(function(){d("INK_COLOR",this.value)}));l.addEventListener("input",(function(){d("INK_THICKNESS",this.valueAsNumber)}));c.addEventListener("input",(function(){d("INK_OPACITY",this.valueAsNumber)}));h.addEventListener("click",(function(){d("CREATE")}));this.eventBus._on("annotationeditorparamschanged",(function(t){var r,h=function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}(t.details);try{for(h.s();!(r=h.n()).done;){var d=_slicedToArray(r.value,2),p=d[0],v=d[1];switch(p){case o.AnnotationEditorParamsType.FREETEXT_SIZE:i.value=v;break;case o.AnnotationEditorParamsType.FREETEXT_COLOR:a.value=v;break;case o.AnnotationEditorParamsType.INK_COLOR:u.value=v;break;case o.AnnotationEditorParamsType.INK_THICKNESS:l.value=v;break;case o.AnnotationEditorParamsType.INK_OPACITY:c.value=v}}}catch(t){h.e(t)}finally{h.f()}}))}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(175);i(176);i(177);i(178);i(193);i(179);i(182);i(183);i(185);i(188);Object.defineProperty(r,"__esModule",{value:!0});r.OverlayManager=void 0;i(42);i(88);i(92);i(288);i(95);i(126);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var o=new WeakMap,a=new WeakMap;r.OverlayManager=function(){function OverlayManager(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,OverlayManager);_classPrivateFieldInitSpec(this,o,{writable:!0,value:new WeakMap});_classPrivateFieldInitSpec(this,a,{writable:!0,value:null})}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(OverlayManager,[{key:"active",get:function get(){return _classPrivateFieldGet(this,a)}},{key:"register",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,i=this,u=arguments;return _regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:r=u.length>1&&void 0!==u[1]&&u[1];if("object"===_typeof(t)){l.next=5;break}throw new Error("Not enough parameters.");case 5:if(!_classPrivateFieldGet(this,o).has(t)){l.next=7;break}throw new Error("The overlay is already registered.");case 7:_classPrivateFieldGet(this,o).set(t,{canForceClose:r});t.addEventListener("cancel",(function(t){_classPrivateFieldSet(i,a,null)}));case 9:case"end":return l.stop()}}),_callee,this)}))),function register(t){return i.apply(this,arguments)})},{key:"open",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){return _regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:if(_classPrivateFieldGet(this,o).has(t)){r.next=4;break}throw new Error("The overlay does not exist.");case 4:if(!_classPrivateFieldGet(this,a)){r.next=15;break}if(_classPrivateFieldGet(this,a)!==t){r.next=9;break}throw new Error("The overlay is already active.");case 9:if(!_classPrivateFieldGet(this,o).get(t).canForceClose){r.next=14;break}r.next=12;return this.close();case 12:r.next=15;break;case 14:throw new Error("Another overlay is currently active.");case 15:_classPrivateFieldSet(this,a,t);t.showModal();t.classList.remove("hidden");case 18:case"end":return r.stop()}}),_callee2,this)}))),function open(t){return r.apply(this,arguments)})},{key:"close",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t,r=arguments;return _regeneratorRuntime().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:t=r.length>0&&void 0!==r[0]?r[0]:_classPrivateFieldGet(this,a);if(_classPrivateFieldGet(this,o).has(t)){i.next=5;break}throw new Error("The overlay does not exist.");case 5:if(_classPrivateFieldGet(this,a)){i.next=9;break}throw new Error("The overlay is currently not active.");case 9:if(_classPrivateFieldGet(this,a)===t){i.next=11;break}throw new Error("Another overlay is currently active.");case 11:t.close();_classPrivateFieldSet(this,a,null);case 13:case"end":return i.stop()}}),_callee3,this)}))),function close(){return t.apply(this,arguments)})}]);var t,r,i;return OverlayManager}()},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(175);i(176);i(177);i(178);i(193);i(179);i(182);i(183);i(185);i(188);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PasswordPrompt=void 0;i(126);i(42);i(88);i(92);i(288);i(95);i(298);var o=i(291);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakSet,h=new WeakSet,d=new WeakSet;r.PasswordPrompt=function(){function PasswordPrompt(t,r,i){var o=this,p=arguments.length>3&&void 0!==arguments[3]&&arguments[3];!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PasswordPrompt);_classPrivateMethodInitSpec(this,d);_classPrivateMethodInitSpec(this,h);_classPrivateMethodInitSpec(this,c);_classPrivateFieldInitSpec(this,a,{writable:!0,value:null});_classPrivateFieldInitSpec(this,u,{writable:!0,value:null});_classPrivateFieldInitSpec(this,l,{writable:!0,value:null});this.dialog=t.dialog;this.label=t.label;this.input=t.input;this.submitButton=t.submitButton;this.cancelButton=t.cancelButton;this.overlayManager=r;this.l10n=i;this._isViewerEmbedded=p;this.submitButton.addEventListener("click",_classPrivateMethodGet(this,c,_verify2).bind(this));this.cancelButton.addEventListener("click",this.close.bind(this));this.input.addEventListener("keydown",(function(t){13===t.keyCode&&_classPrivateMethodGet(o,c,_verify2).call(o)}));this.overlayManager.register(this.dialog,!0);this.dialog.addEventListener("close",_classPrivateMethodGet(this,h,_cancel2).bind(this))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PasswordPrompt,[{key:"open",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t;return _regeneratorRuntime().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:if(!_classPrivateFieldGet(this,a)){r.next=3;break}r.next=3;return _classPrivateFieldGet(this,a).promise;case 3:_classPrivateFieldSet(this,a,new o.PromiseCapability);r.prev=4;r.next=7;return this.overlayManager.open(this.dialog);case 7:this.input.type="password";this.input.focus();r.next=15;break;case 11:r.prev=11;r.t0=r.catch(4);_classPrivateFieldGet(this,a).resolve();throw r.t0;case 15:t=_classPrivateFieldGet(this,l)===o.PasswordResponses.INCORRECT_PASSWORD;this._isViewerEmbedded&&!t||this.input.focus();r.next=19;return this.l10n.get("password_".concat(t?"invalid":"label"));case 19:this.label.textContent=r.sent;case 20:case"end":return r.stop()}}),_callee,this,[[4,11]])}))),function open(){return i.apply(this,arguments)})},{key:"close",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:if(this.overlayManager.active===this.dialog){this.overlayManager.close(this.dialog);this.input.value="";this.input.type="hidden"}case 1:case"end":return t.stop()}}),_callee2,this)}))),function close(){return r.apply(this,arguments)})},{key:"setUpdateCallback",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(t,r){return _regeneratorRuntime().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:if(!_classPrivateFieldGet(this,a)){i.next=3;break}i.next=3;return _classPrivateFieldGet(this,a).promise;case 3:_classPrivateFieldSet(this,u,t);_classPrivateFieldSet(this,l,r);case 5:case"end":return i.stop()}}),_callee3,this)}))),function setUpdateCallback(r,i){return t.apply(this,arguments)})}]);var t,r,i;return PasswordPrompt}();function _verify2(){var t=this.input.value;(null==t?void 0:t.length)>0&&_classPrivateMethodGet(this,d,_invokeCallback2).call(this,t)}function _cancel2(){_classPrivateMethodGet(this,d,_invokeCallback2).call(this,new Error("PasswordPrompt cancelled."));_classPrivateFieldGet(this,a).resolve()}function _invokeCallback2(t){if(_classPrivateFieldGet(this,u)){this.close();this.input.value="";_classPrivateFieldGet(this,u).call(this,t);_classPrivateFieldSet(this,u,null)}}},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(193);i(122);i(123);i(304);i(202);i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(175);i(176);i(177);i(178);i(179);i(182);i(183);i(185);i(188);Object.defineProperty(r,"__esModule",{value:!0});r.PDFAttachmentViewer=void 0;i(126);i(42);i(88);i(92);i(298);i(95);var o=i(291),a=i(306),u=i(294);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var o=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(o){var a=Object.getOwnPropertyDescriptor(o,r);return a.get?a.get.call(arguments.length<3?t:i):a.value}};return _get.apply(this,arguments)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,i)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}var l=new WeakSet;r.PDFAttachmentViewer=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(PDFAttachmentViewer,t);var r,i=_createSuper(PDFAttachmentViewer);function PDFAttachmentViewer(t){var r;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFAttachmentViewer);_classPrivateMethodInitSpec(_assertThisInitialized(r=i.call(this,t)),l);r.downloadManager=t.downloadManager;r.eventBus._on("fileattachmentannotation",function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}(_assertThisInitialized(r),l,_appendAttachment2).bind(_assertThisInitialized(r)));return r}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFAttachmentViewer,[{key:"reset",value:function reset(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_get(_getPrototypeOf(PDFAttachmentViewer.prototype),"reset",this).call(this);this._attachments=null;t||(this._renderedCapability=new o.PromiseCapability);this._pendingDispatchEvent=!1}},{key:"_dispatchEvent",value:(r=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){return _regeneratorRuntime().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:this._renderedCapability.resolve();if(0!==t||this._pendingDispatchEvent){r.next=7;break}this._pendingDispatchEvent=!0;r.next=5;return(0,u.waitOnEventOrTimeout)({target:this.eventBus,name:"annotationlayerrendered",delay:1e3});case 5:if(this._pendingDispatchEvent){r.next=7;break}return r.abrupt("return");case 7:this._pendingDispatchEvent=!1;this.eventBus.dispatch("attachmentsloaded",{source:this,attachmentsCount:t});case 9:case"end":return r.stop()}}),_callee,this)}))),function _dispatchEvent(t){return r.apply(this,arguments)})},{key:"_bindLink",value:function _bindLink(t,r){var i=this,o=r.content,a=r.filename;t.onclick=function(){i.downloadManager.openOrDownloadData(t,o,a);return!1}}},{key:"render",value:function render(t){var r=t.attachments,i=t.keepRenderedCapability,a=void 0!==i&&i;this._attachments&&this.reset(a);this._attachments=r||null;if(r){var u=document.createDocumentFragment(),l=0;for(var c in r){var h=r[c],d=h.content,p=(0,o.getFilenameFromUrl)(h.filename,!0),v=document.createElement("div");v.className="treeItem";var g=document.createElement("a");this._bindLink(g,{content:d,filename:p});g.textContent=this._normalizeTextContent(p);v.append(g);u.append(v);l++}this._finishRendering(u,l)}else this._dispatchEvent(0)}}]);return PDFAttachmentViewer}(a.BaseTreeViewer);function _appendAttachment2(t){var r=this,i=t.filename,o=t.content,a=this._renderedCapability.promise;a.then((function(){if(a===r._renderedCapability.promise){var t=r._attachments||Object.create(null);for(var u in t)if(i===u)return;t[i]={filename:i,content:o};r.render({attachments:t,keepRenderedCapability:!0})}}))}},(t,r,i)=>{var o=i(67),a=i(34),u=i(27),l=i(31),c=i(305),h=i(68),d=i(81);o({target:"Reflect",stat:!0},{get:function get(t,r){var i,o,p=arguments.length<3?t:arguments[2];return l(t)===p?t[r]:(i=h.f(t,r))?c(i)?i.value:void 0===i.get?void 0:a(i.get,p):u(o=d(t))?get(o,r,p):void 0}})},(t,r,i)=>{var o=i(5);t.exports=function(t){return void 0!==t&&(o(t,"value")||o(t,"writable"))}},(t,r,i)=>{i(188);i(229);i(195);i(92);i(212);i(226);i(1);i(42);i(95);Object.defineProperty(r,"__esModule",{value:!0});r.BaseTreeViewer=void 0;i(126);i(135);i(136);i(98);i(120);i(88);i(138);var o=i(245);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}var a="selected";r.BaseTreeViewer=function(){function BaseTreeViewer(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,BaseTreeViewer);if(this.constructor===BaseTreeViewer)throw new Error("Cannot initialize BaseTreeViewer.");this.container=t.container;this.eventBus=t.eventBus;this.reset()}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(BaseTreeViewer,[{key:"reset",value:function reset(){this._pdfDocument=null;this._lastToggleIsShow=!0;this._currentTreeItem=null;this.container.textContent="";this.container.classList.remove("treeWithDeepNesting")}},{key:"_dispatchEvent",value:function _dispatchEvent(t){throw new Error("Not implemented: _dispatchEvent")}},{key:"_bindLink",value:function _bindLink(t,r){throw new Error("Not implemented: _bindLink")}},{key:"_normalizeTextContent",value:function _normalizeTextContent(t){return(0,o.removeNullCharacters)(t,!0)||"–"}},{key:"_addToggleButton",value:function _addToggleButton(t){var r=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=document.createElement("div");o.className="treeItemToggler";i&&o.classList.add("treeItemsHidden");o.onclick=function(i){i.stopPropagation();o.classList.toggle("treeItemsHidden");if(i.shiftKey){var a=!o.classList.contains("treeItemsHidden");r._toggleTreeItem(t,a)}};t.prepend(o)}},{key:"_toggleTreeItem",value:function _toggleTreeItem(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._lastToggleIsShow=r;var i,o=_createForOfIteratorHelper(t.querySelectorAll(".treeItemToggler"));try{for(o.s();!(i=o.n()).done;){i.value.classList.toggle("treeItemsHidden",!r)}}catch(t){o.e(t)}finally{o.f()}}},{key:"_toggleAllTreeItems",value:function _toggleAllTreeItems(){this._toggleTreeItem(this.container,!this._lastToggleIsShow)}},{key:"_finishRendering",value:function _finishRendering(t,r){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]){this.container.classList.add("treeWithDeepNesting");this._lastToggleIsShow=!t.querySelector(".treeItemsHidden")}this.container.append(t);this._dispatchEvent(r)}},{key:"render",value:function render(t){throw new Error("Not implemented: render")}},{key:"_updateCurrentTreeItem",value:function _updateCurrentTreeItem(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this._currentTreeItem){this._currentTreeItem.classList.remove(a);this._currentTreeItem=null}if(t){t.classList.add(a);this._currentTreeItem=t}}},{key:"_scrollToCurrentTreeItem",value:function _scrollToCurrentTreeItem(t){if(t){for(var r=t.parentNode;r&&r!==this.container;){if(r.classList.contains("treeItem")){var i=r.firstElementChild;null==i||i.classList.remove("treeItemsHidden")}r=r.parentNode}this._updateCurrentTreeItem(t);this.container.scrollTo(t.offsetLeft,t.offsetTop+-100)}}}]);return BaseTreeViewer}()},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFCursorTools=void 0;i(88);i(142);i(204);i(126);i(42);i(92);i(288);i(95);i(298);var o=i(291),a=i(245),u=i(308);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var l=new WeakMap,c=new WeakMap,h=new WeakSet;r.PDFCursorTools=function(){function PDFCursorTools(t){var r=this,i=t.container,o=t.eventBus,u=t.cursorToolOnLoad,d=void 0===u?a.CursorTool.SELECT:u;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFCursorTools);!function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}(this,h);_classPrivateFieldInitSpec(this,l,{writable:!0,value:a.CursorTool.SELECT});_classPrivateFieldInitSpec(this,c,{writable:!0,value:null});this.container=i;this.eventBus=o;(function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i})(this,h,_addEventListeners2).call(this);Promise.resolve().then((function(){r.switchTool(d)}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFCursorTools,[{key:"activeTool",get:function get(){return _classPrivateFieldGet(this,l)}},{key:"switchTool",value:function switchTool(t){var r=this;if(null===_classPrivateFieldGet(this,c)&&t!==_classPrivateFieldGet(this,l)){var i=function disableActiveTool(){switch(_classPrivateFieldGet(r,l)){case a.CursorTool.SELECT:break;case a.CursorTool.HAND:r._handTool.deactivate();case a.CursorTool.ZOOM:}};switch(t){case a.CursorTool.SELECT:i();break;case a.CursorTool.HAND:i();this._handTool.activate();break;case a.CursorTool.ZOOM:default:globalThis.ngxConsole.error('switchTool: "'.concat(t,'" is an unsupported value.'));return}_classPrivateFieldSet(this,l,t);this.eventBus.dispatch("cursortoolchanged",{source:this,tool:t})}}},{key:"_handTool",get:function get(){return(0,o.shadow)(this,"_handTool",new u.GrabToPan({element:this.container}))}}]);return PDFCursorTools}();function _addEventListeners2(){var t=this;this.eventBus._on("switchcursortool",(function(r){t.switchTool(r.tool)}));var r=o.AnnotationEditorType.NONE,i=a.PresentationModeState.NORMAL,u=function disableActive(){var r,i=_classPrivateFieldGet(t,l);t.switchTool(a.CursorTool.SELECT);null!==(r=_classPrivateFieldGet(t,c))&&void 0!==r||_classPrivateFieldSet(t,c,i)},h=function enableActive(){var u=_classPrivateFieldGet(t,c);if(null!==u&&r===o.AnnotationEditorType.NONE&&i===a.PresentationModeState.NORMAL){_classPrivateFieldSet(t,c,null);t.switchTool(u)}};this.eventBus._on("secondarytoolbarreset",(function(u){if(null!==_classPrivateFieldGet(t,c)){r=o.AnnotationEditorType.NONE;i=a.PresentationModeState.NORMAL;h()}}));this.eventBus._on("annotationeditormodechanged",(function(t){var i=t.mode;r=i;i===o.AnnotationEditorType.NONE?h():u()}));this.eventBus._on("presentationmodechanged",(function(t){var r=t.state;i=r;r===a.PresentationModeState.NORMAL?h():r===a.PresentationModeState.FULLSCREEN&&u()}))}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.GrabToPan=void 0;i(126);i(42);i(88);i(92);i(298);i(95);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var o="grab-to-pan-grab",a=new WeakSet,u=new WeakSet,l=new WeakSet;r.GrabToPan=function(){function GrabToPan(t){var r=t.element;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,GrabToPan);_classPrivateMethodInitSpec(this,l);_classPrivateMethodInitSpec(this,u);_classPrivateMethodInitSpec(this,a);this.element=r;this.document=r.ownerDocument;this.activate=this.activate.bind(this);this.deactivate=this.deactivate.bind(this);this.toggle=this.toggle.bind(this);this._onMouseDown=_classPrivateMethodGet(this,a,_onMouseDown2).bind(this);this._onMouseMove=_classPrivateMethodGet(this,u,_onMouseMove2).bind(this);this._endPan=_classPrivateMethodGet(this,l,_endPan2).bind(this);(this.overlay=document.createElement("div")).className="grab-to-pan-grabbing"}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(GrabToPan,[{key:"activate",value:function activate(){if(!this.active){this.active=!0;this.element.addEventListener("mousedown",this._onMouseDown);this.element.classList.add(o)}}},{key:"deactivate",value:function deactivate(){if(this.active){this.active=!1;this.element.removeEventListener("mousedown",this._onMouseDown);this._endPan();this.element.classList.remove(o)}}},{key:"toggle",value:function toggle(){this.active?this.deactivate():this.activate()}},{key:"ignoreTarget",value:function ignoreTarget(t){return!!document.querySelector(".stf__item")||t.matches("a[href], a[href] *, input, textarea, button, button *, select, option")}}]);return GrabToPan}();function _onMouseDown2(t){if(0===t.button&&!this.ignoreTarget(t.target)){if(t.originalTarget)try{t.originalTarget.tagName}catch(t){return}this.scrollLeftStart=this.element.scrollLeft;this.scrollTopStart=this.element.scrollTop;this.clientXStart=t.clientX;this.clientYStart=t.clientY;if(!isOverPerfectScrollbar(this.clientXStart,this.clientYStart,"ps__rail-x")&&!isOverPerfectScrollbar(this.clientXStart,this.clientYStart,"ps__rail-y")){this.document.addEventListener("mousemove",this._onMouseMove,!0);this.document.addEventListener("mouseup",this._endPan,!0);this.element.addEventListener("scroll",this._endPan,!0);t.preventDefault();t.stopPropagation();var r=document.activeElement;r&&!r.contains(t.target)&&r.blur()}}}function _onMouseMove2(t){this.element.removeEventListener("scroll",this._endPan,!0);if(1&t.buttons){var r=t.clientX-this.clientXStart,i=t.clientY-this.clientYStart;this.element.scrollTo({top:this.scrollTopStart-i,left:this.scrollLeftStart-r,behavior:"instant"});this.overlay.parentNode||document.body.append(this.overlay)}else this._endPan()}function _endPan2(){this.element.removeEventListener("scroll",this._endPan,!0);this.document.removeEventListener("mousemove",this._onMouseMove,!0);this.document.removeEventListener("mouseup",this._endPan,!0);this.overlay.remove()}function isOverPerfectScrollbar(t,r,i){var o=document.getElementsByClassName(i);if(o&&1===o.length){var a=o[0].getBoundingClientRect(),u=a.top,l=a.right,c=a.bottom,h=a.left;if(r>=u&&r<=c&&t<=l&&t>=h)return!0}return!1}},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(126);i(135);i(136);i(98);i(120);i(1);i(179);i(188);i(229);i(195);i(212);i(226);i(175);i(176);i(177);i(178);i(193);i(182);i(183);i(185);Object.defineProperty(r,"__esModule",{value:!0});r.PDFDocumentProperties=void 0;i(222);i(205);i(42);i(88);i(142);i(92);i(95);i(310);i(223);i(288);i(298);i(138);var o=i(245),a=i(291);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var u=["en-us","en-lr","my"],l={"8.5x11":"Letter","8.5x14":"Legal"},c={"297x420":"A3","210x297":"A4"};function getPageName(t,r,i){var o=r?t.width:t.height,a=r?t.height:t.width;return i["".concat(o,"x").concat(a)]}var h=new WeakMap,d=new WeakSet,p=new WeakSet,v=new WeakSet,g=new WeakSet,y=new WeakSet,m=new WeakSet;r.PDFDocumentProperties=function(){function PDFDocumentProperties(t,r,i,o,a){var l=this,c=t.dialog,w=t.fields,b=t.closeButton;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFDocumentProperties);_classPrivateMethodInitSpec(this,m);_classPrivateMethodInitSpec(this,y);_classPrivateMethodInitSpec(this,g);_classPrivateMethodInitSpec(this,v);_classPrivateMethodInitSpec(this,p);_classPrivateMethodInitSpec(this,d);!function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}(this,h,{writable:!0,value:null});this.dialog=c;this.fields=w;this.overlayManager=r;this.l10n=o;this._fileNameLookup=a;this.eventBus=i;_classPrivateMethodGet(this,d,_reset2).call(this);b.addEventListener("click",this.close.bind(this));this.overlayManager.register(this.dialog);i._on("pagechanging",(function(t){l._currentPageNumber=t.pageNumber}));i._on("rotationchanging",(function(t){l._pagesRotation=t.pagesRotation}));this._isNonMetricLocale=!0;o.getLanguage().then((function(t){l._isNonMetricLocale=u.includes(t)}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFDocumentProperties,[{key:"open",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,i,a,u,l,c,d,w,b,D,P,E,A,S,x,C=this;return _regeneratorRuntime().wrap((function _callee$(k){for(;;)switch(k.prev=k.next){case 0:k.next=2;return Promise.all([this.overlayManager.open(this.dialog),this._dataAvailableCapability.promise]);case 2:this.eventBus.dispatch("propertiesdialogopen",this);t=this._currentPageNumber;r=this._pagesRotation;if(!_classPrivateFieldGet(this,h)||t!==_classPrivateFieldGet(this,h)._currentPageNumber||r!==_classPrivateFieldGet(this,h)._pagesRotation){k.next=8;break}_classPrivateMethodGet(this,p,_updateUI2).call(this);return k.abrupt("return");case 8:k.next=10;return this.pdfDocument.getMetadata();case 10:i=k.sent;a=i.info;u=i.contentLength;k.next=15;return Promise.all([this._fileNameLookup(),_classPrivateMethodGet(this,v,_parseFileSize2).call(this,u),_classPrivateMethodGet(this,y,_parseDate2).call(this,a.CreationDate),_classPrivateMethodGet(this,y,_parseDate2).call(this,a.ModDate),this.pdfDocument.getPage(t).then((function(t){return _classPrivateMethodGet(C,g,_parsePageSize2).call(C,(0,o.getPageSizeInches)(t),r)})),_classPrivateMethodGet(this,m,_parseLinearization2).call(this,a.IsLinearized)]);case 15:l=k.sent;c=_slicedToArray(l,6);d=c[0];w=c[1];b=c[2];D=c[3];P=c[4];E=c[5];_classPrivateFieldSet(this,h,Object.freeze({fileName:d,fileSize:w,title:a.Title,author:a.Author,subject:a.Subject,keywords:a.Keywords,creationDate:b,modificationDate:D,creator:a.Creator,producer:a.Producer,version:a.PDFFormatVersion,pageCount:this.pdfDocument.numPages,pageSize:P,linearized:E,_currentPageNumber:t,_pagesRotation:r}));_classPrivateMethodGet(this,p,_updateUI2).call(this);k.next=27;return this.pdfDocument.getDownloadInfo();case 27:A=k.sent;S=A.length;if(u!==S){k.next=31;break}return k.abrupt("return");case 31:x=Object.assign(Object.create(null),_classPrivateFieldGet(this,h));k.next=34;return _classPrivateMethodGet(this,v,_parseFileSize2).call(this,S);case 34:x.fileSize=k.sent;_classPrivateFieldSet(this,h,Object.freeze(x));_classPrivateMethodGet(this,p,_updateUI2).call(this);case 37:case"end":return k.stop()}}),_callee,this)}))),function open(){return r.apply(this,arguments)})},{key:"close",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:this.overlayManager.close(this.dialog);this.eventBus.dispatch("propertiesdialogclose",this);case 2:case"end":return t.stop()}}),_callee2,this)}))),function close(){return t.apply(this,arguments)})},{key:"setDocument",value:function setDocument(t){if(this.pdfDocument){_classPrivateMethodGet(this,d,_reset2).call(this);_classPrivateMethodGet(this,p,_updateUI2).call(this,!0)}if(t){this.pdfDocument=t;this._dataAvailableCapability.resolve()}}}]);var t,r;return PDFDocumentProperties}();function _reset2(){this.pdfDocument=null;_classPrivateFieldSet(this,h,null);this._dataAvailableCapability=new a.PromiseCapability;this._currentPageNumber=1;this._pagesRotation=0}function _updateUI2(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&_classPrivateFieldGet(this,h)){if(this.overlayManager.active===this.dialog)for(var t in this.fields){var r=_classPrivateFieldGet(this,h)[t];this.fields[t].textContent=r||0===r?r:"-"}}else for(var i in this.fields)this.fields[i].textContent="-"}function _parseFileSize2(){return _parseFileSize3.apply(this,arguments)}function _parseFileSize3(){_parseFileSize3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t,r,i,o=arguments;return _regeneratorRuntime().wrap((function _callee3$(a){for(;;)switch(a.prev=a.next){case 0:i=(r=(t=o.length>0&&void 0!==o[0]?o[0]:0)/1024)/1024;if(r){a.next=4;break}return a.abrupt("return",void 0);case 4:return a.abrupt("return",this.l10n.get("document_properties_".concat(i>=1?"mb":"kb"),{size_mb:i>=1&&(+i.toPrecision(3)).toLocaleString(),size_kb:i<1&&(+r.toPrecision(3)).toLocaleString(),size_b:t.toLocaleString()}));case 5:case"end":return a.stop()}}),_callee3,this)})));return _parseFileSize3.apply(this,arguments)}function _parsePageSize2(t,r){return _parsePageSize3.apply(this,arguments)}function _parsePageSize3(){return(_parsePageSize3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t,r){var i,a,u,h,d,p,v,g,y,m,w,b,D,P;return _regeneratorRuntime().wrap((function _callee4$(E){for(;;)switch(E.prev=E.next){case 0:if(t){E.next=2;break}return E.abrupt("return",void 0);case 2:r%180!=0&&(t={width:t.height,height:t.width});i=(0,o.isPortraitOrientation)(t);a={width:Math.round(100*t.width)/100,height:Math.round(100*t.height)/100};u={width:Math.round(25.4*t.width*10)/10,height:Math.round(25.4*t.height*10)/10};if(!((h=getPageName(a,i,l)||getPageName(u,i,c))||Number.isInteger(u.width)&&Number.isInteger(u.height))){d={width:25.4*t.width,height:25.4*t.height};p={width:Math.round(u.width),height:Math.round(u.height)};if(Math.abs(d.width-p.width)<.1&&Math.abs(d.height-p.height)<.1&&(h=getPageName(p,i,c))){a={width:Math.round(p.width/25.4*100)/100,height:Math.round(p.height/25.4*100)/100};u=p}}E.next=10;return Promise.all([this._isNonMetricLocale?a:u,this.l10n.get("document_properties_page_size_unit_".concat(this._isNonMetricLocale?"inches":"millimeters")),h&&this.l10n.get("document_properties_page_size_name_".concat(h.toLowerCase())),this.l10n.get("document_properties_page_size_orientation_".concat(i?"portrait":"landscape"))]);case 10:v=E.sent;g=_slicedToArray(v,4);y=g[0];m=y.width;w=y.height;b=g[1];D=g[2];P=g[3];return E.abrupt("return",this.l10n.get("document_properties_page_size_dimension_".concat(D?"name_":"","string"),{width:m.toLocaleString(),height:w.toLocaleString(),unit:b,name:D,orientation:P}));case 19:case"end":return E.stop()}}),_callee4,this)})))).apply(this,arguments)}function _parseDate2(t){return _parseDate3.apply(this,arguments)}function _parseDate3(){return(_parseDate3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(t){var r;return _regeneratorRuntime().wrap((function _callee5$(i){for(;;)switch(i.prev=i.next){case 0:if(r=a.PDFDateString.toDateObject(t)){i.next=3;break}return i.abrupt("return",void 0);case 3:return i.abrupt("return",this.l10n.get("document_properties_date_string",{date:r.toLocaleDateString(),time:r.toLocaleTimeString()}));case 4:case"end":return i.stop()}}),_callee5,this)})))).apply(this,arguments)}function _parseLinearization2(t){return this.l10n.get("document_properties_linearized_".concat(t?"yes":"no"))}},(t,r,i)=>{var o=i(67),a=i(252),u=i(8),l=i(27),c=i(249).onFreeze,h=Object.freeze;o({target:"Object",stat:!0,forced:u((function(){h(1)})),sham:!a},{freeze:function freeze(t){return h&&l(t)?h(c(t)):t}})},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFFindBar=void 0;i(88);i(142);i(126);i(42);i(92);i(298);i(95);var o=i(312),a=i(245);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var u=new WeakSet;r.PDFFindBar=function(){function PDFFindBar(t,r,i){var o,a=this;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFFindBar);_classPrivateMethodInitSpec(this,u);this.opened=!1;this.bar=t.bar;this.toggleButton=t.toggleButton;this.findField=t.findField;this.highlightAll=t.highlightAllCheckbox;this.currentPage=t.findCurrentPageCheckbox;this.pageRange=t.findPageRangeField;this.caseSensitive=t.caseSensitiveCheckbox;this.matchDiacritics=t.matchDiacriticsCheckbox;this.entireWord=t.entireWordCheckbox;this.findMsg=t.findMsg;this.findResultsCount=t.findResultsCount;this.findPreviousButton=t.findPreviousButton;this.findNextButton=t.findNextButton;this.eventBus=r;this.l10n=i;this.toggleButton.addEventListener("click",(function(){a.toggle()}));this.findField.addEventListener("input",(function(){a.dispatchEvent("")}));this.bar.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:t.target===a.findField&&a.dispatchEvent("again",t.shiftKey);break;case 27:a.close()}}));this.findPreviousButton.addEventListener("click",(function(){a.dispatchEvent("again",!0)}));this.findNextButton.addEventListener("click",(function(){a.dispatchEvent("again",!1)}));this.highlightAll.addEventListener("click",(function(){a.dispatchEvent("highlightallchange")}));this.caseSensitive.addEventListener("click",(function(){a.dispatchEvent("casesensitivitychange")}));this.entireWord.addEventListener("click",(function(){a.dispatchEvent("entirewordchange")}));null===(o=this.matchDiacritics)||void 0===o||o.addEventListener("click",(function(){a.dispatchEvent("diacriticmatchingchange")}));this.eventBus._on("resize",_classPrivateMethodGet(this,u,_adjustWidth2).bind(this))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFFindBar,[{key:"reset",value:function reset(){this.updateUIState()}},{key:"dispatchEvent",value:function dispatchEvent(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.eventBus.dispatch("find",{source:this,type:t,query:this.findField.value,caseSensitive:this.caseSensitive.checked,entireWord:this.entireWord.checked,highlightAll:this.highlightAll.checked,findPrevious:r,matchDiacritics:this.matchDiacritics.checked})}},{key:"updateUIState",value:function updateUIState(t,r,i){var a=this,l=Promise.resolve(""),c="";switch(t){case o.FindState.FOUND:break;case o.FindState.PENDING:c="pending";break;case o.FindState.NOT_FOUND:l=this.l10n.get("find_not_found");c="notFound";break;case o.FindState.WRAPPED:l=this.l10n.get("find_reached_".concat(r?"top":"bottom"))}this.findField.setAttribute("data-status",c);this.findField.setAttribute("aria-invalid",t===o.FindState.NOT_FOUND);l.then((function(t){a.findMsg.setAttribute("data-status",c);a.findMsg.textContent=t;_classPrivateMethodGet(a,u,_adjustWidth2).call(a)}));this.updateResultsCount(i)}},{key:"updateResultsCount",value:function updateResultsCount(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.current,o=void 0===i?0:i,a=r.total,l=void 0===a?0:a,c=Promise.resolve("");if(l>0)if(l>1e3){c=this.l10n.get("find_match_count_limit",{limit:1e3})}else{c=this.l10n.get("find_match_count",{current:o,total:l})}c.then((function(r){t.findResultsCount.textContent=r;_classPrivateMethodGet(t,u,_adjustWidth2).call(t)}))}},{key:"open",value:function open(){if(!this.opened){this.opened=!0;(0,a.toggleExpandedBtn)(this.toggleButton,!0,this.bar)}this.findField.select();this.findField.focus();this.dispatchEvent("");this.eventBus.dispatch("findbaropen",{source:this});_classPrivateMethodGet(this,u,_adjustWidth2).call(this)}},{key:"close",value:function close(){if(this.opened){this.opened=!1;(0,a.toggleExpandedBtn)(this.toggleButton,!1,this.bar);this.eventBus.dispatch("findbarclose",{source:this})}}},{key:"toggle",value:function toggle(){this.opened?this.close():this.open()}}]);return PDFFindBar}();function _adjustWidth2(){if(this.opened){this.bar.classList.remove("wrapContainers");this.bar.clientHeight>this.bar.firstElementChild.clientHeight&&this.bar.classList.add("wrapContainers")}}},(t,r,i)=>{i(195);i(226);i(98);i(120);i(1);i(126);i(135);i(136);i(138);Object.defineProperty(r,"__esModule",{value:!0});r.PDFFindController=r.FindState=void 0;i(42);i(88);i(258);i(92);i(260);i(270);i(272);i(274);i(276);i(278);i(280);i(95);i(246);i(212);i(179);i(190);i(222);i(313);i(314);i(315);i(229);i(254);i(316);i(188);i(288);i(298);i(297);i(182);i(225);i(317);i(318);i(198);i(199);i(115);i(257);i(283);i(142);var o=i(245),a=i(320),u=i(291);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}var l,c=r.FindState={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3},h={"‐":"-","‘":"'","’":"'","‚":"'","‛":"'","“":'"',"”":'"',"„":'"',"‟":'"',"¼":"1/4","½":"1/2","¾":"3/4"},d=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]),p=/(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])+/g,v=/([\$\(-\+\.\?\[-\^\{-\}])|((?:[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]))|([\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+)|((?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]))|((?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]))/g,g=/((?:[\0-\u02FF\u0370-\u0482\u048A-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u060F\u061B-\u064A\u0660-\u066F\u0671-\u06D5\u06DD\u06DE\u06E5\u06E6\u06E9\u06EE-\u0710\u0712-\u072F\u074B-\u07A5\u07B1-\u07EA\u07F4-\u07FC\u07FE-\u0815\u081A\u0824\u0828\u082E-\u0858\u085C-\u0897\u08A0-\u08C9\u08E2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0964-\u0980\u0984-\u09BB\u09BD\u09C5\u09C6\u09C9\u09CA\u09CE-\u09D6\u09D8-\u09E1\u09E4-\u09FD\u09FF\u0A00\u0A04-\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A6F\u0A72-\u0A74\u0A76-\u0A80\u0A84-\u0ABB\u0ABD\u0AC6\u0ACA\u0ACE-\u0AE1\u0AE4-\u0AF9\u0B00\u0B04-\u0B3B\u0B3D\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B61\u0B64-\u0B81\u0B83-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE-\u0BD6\u0BD8-\u0BFF\u0C05-\u0C3B\u0C3D\u0C45\u0C49\u0C4E-\u0C54\u0C57-\u0C61\u0C64-\u0C80\u0C84-\u0CBB\u0CBD\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CE1\u0CE4-\u0CF2\u0CF4-\u0CFF\u0D04-\u0D3A\u0D3D\u0D45\u0D49\u0D4E-\u0D56\u0D58-\u0D61\u0D64-\u0D80\u0D84-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF4-\u0E30\u0E32\u0E33\u0E3B-\u0E46\u0E4F-\u0EB0\u0EB2\u0EB3\u0EBD-\u0EC7\u0ECF-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F40-\u0F70\u0F85\u0F88-\u0F8C\u0F98\u0FBD-\u0FC5\u0FC7-\u102A\u103F-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u109E-\u135C\u1360-\u1711\u1716-\u1731\u1735-\u1751\u1754-\u1771\u1774-\u17B3\u17D4-\u17DC\u17DE-\u180A\u180E\u1810-\u1884\u1887-\u18A8\u18AA-\u191F\u192C-\u192F\u193C-\u1A16\u1A1C-\u1A54\u1A5F\u1A7D\u1A7E\u1A80-\u1AAF\u1ACF-\u1AFF\u1B05-\u1B33\u1B45-\u1B6A\u1B74-\u1B7F\u1B83-\u1BA0\u1BAE-\u1BE5\u1BF4-\u1C23\u1C38-\u1CCF\u1CD3\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA-\u1DBF\u1E00-\u20CF\u20F1-\u2CEE\u2CF2-\u2D7E\u2D80-\u2DDF\u2E00-\u3029\u3030-\u3098\u309B-\uA66E\uA673\uA67E-\uA69D\uA6A0-\uA6EF\uA6F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA828-\uA82B\uA82D-\uA87F\uA882-\uA8B3\uA8C6-\uA8DF\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA954-\uA97F\uA984-\uA9B2\uA9C1-\uA9E4\uA9E6-\uAA28\uAA37-\uAA42\uAA44-\uAA4B\uAA4E-\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2-\uAAEA\uAAF0-\uAAF4\uAAF7-\uABE2\uABEB\uABEE-\uD7FF\uE000-\uFB1D\uFB1F-\uFDFF\uFE10-\uFE1F\uFE30-\uFFFF]|\uD800[\uDC00-\uDDFC\uDDFE-\uDEDF\uDEE1-\uDF75\uDF7B-\uDFFF]|[\uD801\uD808-\uD80C\uD80E-\uD819\uD81C-\uD82E\uD830-\uD832\uD835\uD837\uD83B-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD802[\uDC00-\uDE00\uDE04\uDE07-\uDE0B\uDE10-\uDE37\uDE3B-\uDE3E\uDE40-\uDEE4\uDEE7-\uDFFF]|\uD803[\uDC00-\uDD23\uDD28-\uDEAA\uDEAD-\uDEFC\uDF00-\uDF45\uDF51-\uDF81\uDF86-\uDFFF]|\uD804[\uDC03-\uDC37\uDC47-\uDC6F\uDC71\uDC72\uDC75-\uDC7E\uDC83-\uDCAF\uDCBB-\uDCC1\uDCC3-\uDCFF\uDD03-\uDD26\uDD35-\uDD44\uDD47-\uDD72\uDD74-\uDD7F\uDD83-\uDDB2\uDDC1-\uDDC8\uDDCD\uDDD0-\uDE2B\uDE38-\uDE3D\uDE3F\uDE40\uDE42-\uDEDE\uDEEB-\uDEFF\uDF04-\uDF3A\uDF3D\uDF45\uDF46\uDF49\uDF4A\uDF4E-\uDF56\uDF58-\uDF61\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC00-\uDC34\uDC47-\uDC5D\uDC5F-\uDCAF\uDCC4-\uDDAE\uDDB6\uDDB7\uDDC1-\uDDDB\uDDDE-\uDE2F\uDE41-\uDEAA\uDEB8-\uDF1C\uDF2C-\uDFFF]|\uD806[\uDC00-\uDC2B\uDC3B-\uDD2F\uDD36\uDD39\uDD3A\uDD3F\uDD41\uDD44-\uDDD0\uDDD8\uDDD9\uDDE1-\uDDE3\uDDE5-\uDE00\uDE0B-\uDE32\uDE3A\uDE3F-\uDE46\uDE48-\uDE50\uDE5C-\uDE89\uDE9A-\uDFFF]|\uD807[\uDC00-\uDC2E\uDC37\uDC40-\uDC91\uDCA8\uDCB7-\uDD30\uDD37-\uDD39\uDD3B\uDD3E\uDD46\uDD48-\uDD89\uDD8F\uDD92\uDD98-\uDEF2\uDEF7-\uDEFF\uDF02\uDF04-\uDF33\uDF3B-\uDF3D\uDF43-\uDFFF]|\uD80D[\uDC00-\uDC3F\uDC41-\uDC46\uDC56-\uDFFF]|\uD81A[\uDC00-\uDEEF\uDEF5-\uDF2F\uDF37-\uDFFF]|\uD81B[\uDC00-\uDF4E\uDF50\uDF88-\uDF8E\uDF93-\uDFE3\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD82F[\uDC00-\uDC9C\uDC9F-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDC8E\uDC90-\uDD2F\uDD37-\uDEAD\uDEAF-\uDEEB\uDEF0-\uDFFF]|\uD839[\uDC00-\uDCEB\uDCF0-\uDFFF]|\uD83A[\uDC00-\uDCCF\uDCD7-\uDD43\uDD4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/,y=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*((?:[\0-\u02FF\u0370-\u0482\u048A-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u060F\u061B-\u064A\u0660-\u066F\u0671-\u06D5\u06DD\u06DE\u06E5\u06E6\u06E9\u06EE-\u0710\u0712-\u072F\u074B-\u07A5\u07B1-\u07EA\u07F4-\u07FC\u07FE-\u0815\u081A\u0824\u0828\u082E-\u0858\u085C-\u0897\u08A0-\u08C9\u08E2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0964-\u0980\u0984-\u09BB\u09BD\u09C5\u09C6\u09C9\u09CA\u09CE-\u09D6\u09D8-\u09E1\u09E4-\u09FD\u09FF\u0A00\u0A04-\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A6F\u0A72-\u0A74\u0A76-\u0A80\u0A84-\u0ABB\u0ABD\u0AC6\u0ACA\u0ACE-\u0AE1\u0AE4-\u0AF9\u0B00\u0B04-\u0B3B\u0B3D\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B61\u0B64-\u0B81\u0B83-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE-\u0BD6\u0BD8-\u0BFF\u0C05-\u0C3B\u0C3D\u0C45\u0C49\u0C4E-\u0C54\u0C57-\u0C61\u0C64-\u0C80\u0C84-\u0CBB\u0CBD\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CE1\u0CE4-\u0CF2\u0CF4-\u0CFF\u0D04-\u0D3A\u0D3D\u0D45\u0D49\u0D4E-\u0D56\u0D58-\u0D61\u0D64-\u0D80\u0D84-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF4-\u0E30\u0E32\u0E33\u0E3B-\u0E46\u0E4F-\u0EB0\u0EB2\u0EB3\u0EBD-\u0EC7\u0ECF-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F40-\u0F70\u0F85\u0F88-\u0F8C\u0F98\u0FBD-\u0FC5\u0FC7-\u102A\u103F-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u109E-\u135C\u1360-\u1711\u1716-\u1731\u1735-\u1751\u1754-\u1771\u1774-\u17B3\u17D4-\u17DC\u17DE-\u180A\u180E\u1810-\u1884\u1887-\u18A8\u18AA-\u191F\u192C-\u192F\u193C-\u1A16\u1A1C-\u1A54\u1A5F\u1A7D\u1A7E\u1A80-\u1AAF\u1ACF-\u1AFF\u1B05-\u1B33\u1B45-\u1B6A\u1B74-\u1B7F\u1B83-\u1BA0\u1BAE-\u1BE5\u1BF4-\u1C23\u1C38-\u1CCF\u1CD3\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA-\u1DBF\u1E00-\u20CF\u20F1-\u2CEE\u2CF2-\u2D7E\u2D80-\u2DDF\u2E00-\u3029\u3030-\u3098\u309B-\uA66E\uA673\uA67E-\uA69D\uA6A0-\uA6EF\uA6F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA828-\uA82B\uA82D-\uA87F\uA882-\uA8B3\uA8C6-\uA8DF\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA954-\uA97F\uA984-\uA9B2\uA9C1-\uA9E4\uA9E6-\uAA28\uAA37-\uAA42\uAA44-\uAA4B\uAA4E-\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2-\uAAEA\uAAF0-\uAAF4\uAAF7-\uABE2\uABEB\uABEE-\uD7FF\uE000-\uFB1D\uFB1F-\uFDFF\uFE10-\uFE1F\uFE30-\uFFFF]|\uD800[\uDC00-\uDDFC\uDDFE-\uDEDF\uDEE1-\uDF75\uDF7B-\uDFFF]|[\uD801\uD808-\uD80C\uD80E-\uD819\uD81C-\uD82E\uD830-\uD832\uD835\uD837\uD83B-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD802[\uDC00-\uDE00\uDE04\uDE07-\uDE0B\uDE10-\uDE37\uDE3B-\uDE3E\uDE40-\uDEE4\uDEE7-\uDFFF]|\uD803[\uDC00-\uDD23\uDD28-\uDEAA\uDEAD-\uDEFC\uDF00-\uDF45\uDF51-\uDF81\uDF86-\uDFFF]|\uD804[\uDC03-\uDC37\uDC47-\uDC6F\uDC71\uDC72\uDC75-\uDC7E\uDC83-\uDCAF\uDCBB-\uDCC1\uDCC3-\uDCFF\uDD03-\uDD26\uDD35-\uDD44\uDD47-\uDD72\uDD74-\uDD7F\uDD83-\uDDB2\uDDC1-\uDDC8\uDDCD\uDDD0-\uDE2B\uDE38-\uDE3D\uDE3F\uDE40\uDE42-\uDEDE\uDEEB-\uDEFF\uDF04-\uDF3A\uDF3D\uDF45\uDF46\uDF49\uDF4A\uDF4E-\uDF56\uDF58-\uDF61\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC00-\uDC34\uDC47-\uDC5D\uDC5F-\uDCAF\uDCC4-\uDDAE\uDDB6\uDDB7\uDDC1-\uDDDB\uDDDE-\uDE2F\uDE41-\uDEAA\uDEB8-\uDF1C\uDF2C-\uDFFF]|\uD806[\uDC00-\uDC2B\uDC3B-\uDD2F\uDD36\uDD39\uDD3A\uDD3F\uDD41\uDD44-\uDDD0\uDDD8\uDDD9\uDDE1-\uDDE3\uDDE5-\uDE00\uDE0B-\uDE32\uDE3A\uDE3F-\uDE46\uDE48-\uDE50\uDE5C-\uDE89\uDE9A-\uDFFF]|\uD807[\uDC00-\uDC2E\uDC37\uDC40-\uDC91\uDCA8\uDCB7-\uDD30\uDD37-\uDD39\uDD3B\uDD3E\uDD46\uDD48-\uDD89\uDD8F\uDD92\uDD98-\uDEF2\uDEF7-\uDEFF\uDF02\uDF04-\uDF33\uDF3B-\uDF3D\uDF43-\uDFFF]|\uD80D[\uDC00-\uDC3F\uDC41-\uDC46\uDC56-\uDFFF]|\uD81A[\uDC00-\uDEEF\uDEF5-\uDF2F\uDF37-\uDFFF]|\uD81B[\uDC00-\uDF4E\uDF50\uDF88-\uDF8E\uDF93-\uDFE3\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD82F[\uDC00-\uDC9C\uDC9F-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDC8E\uDC90-\uDD2F\uDD37-\uDEAD\uDEAF-\uDEEB\uDEF0-\uDFFF]|\uD839[\uDC00-\uDCEB\uDCF0-\uDFFF]|\uD83A[\uDC00-\uDCCF\uDCD7-\uDD43\uDD4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/,m=/[\uAC00-\uD7AF\uFA6C\uFACF-\uFAD1\uFAD5-\uFAD7]+/g,w=new Map,b="[\\u1100-\\u1112\\ud7a4-\\ud7af\\ud84a\\ud84c\\ud850\\ud854\\ud857\\ud85f]",D=new Map,P=null,E=null;function normalize(t){for(var r,i,o=[];null!==(r=m.exec(t));){var u,l=r.index,c=_createForOfIteratorHelper(r[0]);try{for(c.s();!(u=c.n()).done;){var d=u.value,v=w.get(d);if(!v){v=d.normalize("NFD").length;w.set(d,v)}o.push([v,l++])}}catch(t){c.e(t)}finally{c.f()}}if(0===o.length&&P)i=P;else if(o.length>0&&E)i=E;else{var g=Object.keys(h).join(""),y=(0,a.getNormalizeWithNFKC)(),A="([".concat(g,"])|([").concat(y,"])|(").concat("(?:゙|゚)","\\n)|(\\p{M}+(?:-\\n)?)|(\\S-\\n)|(").concat("(?:\\p{Ideographic}|[぀-ヿ])","\\n)|(\\n)");i=0===o.length?P=new RegExp(A+"|(\\u0000)","gum"):E=new RegExp(A+"|(".concat(b,")"),"gum")}for(var S=[];null!==(r=p.exec(t));)S.push([r[0].length,r.index]);var x=t.normalize("NFD"),C=[[0,0]],k=0,T=0,I=0,L=0,O=0,M=!1;x=x.replace(i,(function(t,r,i,a,u,l,c,d,p,v){var g;v-=L;if(r){for(var y=h[r],m=y.length,w=1;w<m;w++)C.push([v-I+w,I-w]);I-=m-1;return y}if(i){var b=D.get(i);if(!b){b=i.normalize("NFKC");D.set(i,b)}for(var P=b.length,E=1;E<P;E++)C.push([v-I+E,I-E]);I-=P-1;return b}if(a){var A;M=!0;if(v+O===(null===(A=S[k])||void 0===A?void 0:A[1]))++k;else{C.push([v-1-I+1,I-1]);I-=1;L+=1}C.push([v-I+1,I]);L+=1;O+=1;return a.charAt(0)}if(u){var x,B=u.endsWith("\n"),G=B?u.length-2:u.length;M=!0;var R=G;if(v+O===(null===(x=S[k])||void 0===x?void 0:x[1])){R-=S[k][0];++k}for(var N=1;N<=R;N++)C.push([v-1-I+N,I-N]);I-=R;L+=R;if(B){v+=G-1;C.push([v-I+1,1+I]);I+=1;L+=1;O+=1;return u.slice(0,G)}return u}if(l){var j=l.length-2;C.push([v-I+j,1+I]);I+=1;L+=1;O+=1;return l.slice(0,-2)}if(c){var V=c.length-1;C.push([v-I+V,I]);L+=1;O+=1;return c.slice(0,-1)}if(d){C.push([v-I+1,I-1]);I-=1;L+=1;O+=1;return" "}if(v+O===(null===(g=o[T])||void 0===g?void 0:g[1])){var W=o[T][0]-1;++T;for(var H=1;H<=W;H++)C.push([v-(I-H),I-H]);I-=W;L+=W}return p}));C.push([x.length,I]);return[x,C,M]}function getOriginalIndex(t,r,i){if(!t)return[r,i];var a=r,u=r+i-1,l=(0,o.binarySearchFirstItem)(t,(function(t){return t[0]>=a}));t[l][0]>a&&--l;var c=(0,o.binarySearchFirstItem)(t,(function(t){return t[0]>=u}),l);t[c][0]>u&&--c;var h=a+t[l][1];return[h,u+t[c][1]+1-h]}var A=new WeakMap,S=new WeakMap,x=new WeakMap,C=new WeakSet,k=new WeakSet,T=new WeakMap,I=new WeakSet,L=new WeakSet,O=new WeakSet,M=new WeakSet,B=new WeakSet,G=new WeakSet,R=new WeakSet,N=new WeakSet,j=new WeakSet,V=new WeakSet,W=new WeakSet,H=new WeakSet,U=new WeakSet,z=new WeakSet,K=new WeakSet,Y=new WeakSet,$=new WeakSet;r.PDFFindController=function(){function PDFFindController(t){var r=t.linkService,i=t.eventBus,o=t.updateMatchesCountOnProgress,a=void 0===o||o,u=t.pageViewMode;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFFindController);_classPrivateMethodInitSpec(this,$);_classPrivateMethodInitSpec(this,Y);_classPrivateMethodInitSpec(this,K);_classPrivateMethodInitSpec(this,z);_classPrivateMethodInitSpec(this,U);_classPrivateMethodInitSpec(this,H);_classPrivateMethodInitSpec(this,W);_classPrivateMethodInitSpec(this,V);_classPrivateMethodInitSpec(this,j);_classPrivateMethodInitSpec(this,N);_classPrivateMethodInitSpec(this,R);_classPrivateMethodInitSpec(this,G);_classPrivateMethodInitSpec(this,B);_classPrivateMethodInitSpec(this,M);_classPrivateMethodInitSpec(this,O);_classPrivateMethodInitSpec(this,L);_classPrivateMethodInitSpec(this,I);_classPrivateFieldInitSpec(this,T,{get:_get_query,set:void 0});_classPrivateMethodInitSpec(this,k);_classPrivateMethodInitSpec(this,C);_classPrivateFieldInitSpec(this,A,{writable:!0,value:null});_classPrivateFieldInitSpec(this,S,{writable:!0,value:!0});_classPrivateFieldInitSpec(this,x,{writable:!0,value:0});this._linkService=r;this._eventBus=i;_classPrivateFieldSet(this,S,a);this._pageViewMode=u;this.onIsPageVisible=null;_classPrivateMethodGet(this,k,_reset2).call(this);i._on("find",_classPrivateMethodGet(this,C,_onFind2).bind(this));i._on("findbarclose",_classPrivateMethodGet(this,z,_onFindBarClose2).bind(this))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFFindController,[{key:"highlightMatches",get:function get(){return this._highlightMatches}},{key:"pageMatches",get:function get(){return this._pageMatches}},{key:"pageMatchesLength",get:function get(){return this._pageMatchesLength}},{key:"selected",get:function get(){return this._selected}},{key:"state",get:function get(){return _classPrivateFieldGet(this,A)}},{key:"setDocument",value:function setDocument(t){this._pdfDocument&&_classPrivateMethodGet(this,k,_reset2).call(this);if(t){this._pdfDocument=t;this._firstPageCapability.resolve()}}},{key:"scrollMatchIntoView",value:function scrollMatchIntoView(t){var r=t.element,i=void 0===r?null:r,a=t.selectedLeft,u=void 0===a?0:a,l=t.pageIndex,c=void 0===l?-1:l,h=t.matchIndex,d=void 0===h?-1:h;if(this._scrollMatches&&i&&-1!==d&&d===this._selected.matchIdx&&-1!==c&&c===this._selected.pageIdx){this._scrollMatches=!1;var p={top:-50,left:u+-400};(0,o.scrollIntoView)(i,p,!0,"infinite-scroll"===this._pageViewMode)}}}]);return PDFFindController}();function _onFind2(t){var r=this;if(t){if(!1===t.phraseSearch){console.error("The `phraseSearch`-parameter was removed, please provide an Array of strings in the `query`-parameter instead.");"string"==typeof t.query&&(t.query=t.query.match(/\S+/g))}var i=this._pdfDocument,o=t.type;(null===_classPrivateFieldGet(this,A)||_classPrivateMethodGet(this,I,_shouldDirtyMatch2).call(this,t))&&(this._dirtyMatch=!0);_classPrivateFieldSet(this,A,t);if("highlightallchange"!==o)_classPrivateMethodGet(this,$,_updateUIState2).call(this,c.PENDING);else{var a,u=this._pageMatches.some((function(t){return t.length>0})),l=!(null!==(a=this.state)&&void 0!==a&&a.query)||u;_classPrivateMethodGet(this,$,_updateUIState2).call(this,l?c.FOUND:c.NOT_FOUND)}this._firstPageCapability.promise.then((function(){if(r._pdfDocument&&(!i||r._pdfDocument===i)){_classPrivateMethodGet(r,G,_extractText2).call(r);var t=!r._highlightMatches,a=!!r._findTimeout;if(r._findTimeout){clearTimeout(r._findTimeout);r._findTimeout=null}if(o)if(r._dirtyMatch)_classPrivateMethodGet(r,j,_nextMatch2).call(r);else if("again"===o){_classPrivateMethodGet(r,j,_nextMatch2).call(r);t&&_classPrivateFieldGet(r,A).highlightAll&&_classPrivateMethodGet(r,N,_updateAllPages2).call(r)}else if("highlightallchange"===o){a?_classPrivateMethodGet(r,j,_nextMatch2).call(r):r._highlightMatches=!0;_classPrivateMethodGet(r,N,_updateAllPages2).call(r)}else _classPrivateMethodGet(r,j,_nextMatch2).call(r);else r._findTimeout=setTimeout((function(){_classPrivateMethodGet(r,j,_nextMatch2).call(r);r._findTimeout=null}),250)}}))}}function _reset2(){this._highlightMatches=!1;this._scrollMatches=!1;this._pdfDocument=null;this._pageMatches=[];this._pageMatchesLength=[];_classPrivateFieldSet(this,x,0);_classPrivateFieldSet(this,A,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 u.PromiseCapability}function _get_query(){var t=_classPrivateFieldGet(this,A).query;if("string"==typeof t){if(t!==this._rawQuery){this._rawQuery=t;var r=_slicedToArray(normalize(t),1);this._normalizedQuery=r[0]}return this._normalizedQuery}return(t||[]).filter((function(t){return!!t})).map((function(t){return normalize(t)[0]}))}function _shouldDirtyMatch2(t){var r,i,o=t.query,a=_classPrivateFieldGet(this,A).query,u=_typeof(o);if(u!==_typeof(a))return!0;if("string"===u){if(o!==a)return!0}else if(JSON.stringify(o)!==JSON.stringify(a))return!0;switch(t.type){case"again":var l=this._selected.pageIdx+1,c=this._linkService;return l>=1&&l<=c.pagesCount&&l!==c.page&&!(null===(r=null===(i=this.onIsPageVisible)||void 0===i?void 0:i.call(this,l))||void 0===r||r);case"highlightallchange":return!1}return!0}function _isEntireWord2(t,r,i){var o=t.slice(0,r).match(g);if(o){var u=t.charCodeAt(r),l=o[1].charCodeAt(0);if((0,a.getCharacterType)(u)===(0,a.getCharacterType)(l))return!1}if(o=t.slice(r+i).match(y)){var c=t.charCodeAt(r+i-1),h=o[1].charCodeAt(0);if((0,a.getCharacterType)(c)===(0,a.getCharacterType)(h))return!1}return!0}function _calculateRegExpMatch2(t,r,i,o){var a=this._pageMatches[i]=[],u=this._pageMatchesLength[i]=[];if(t)for(var l,c=this._pageDiffs[i];null!==(l=t.exec(o));)if(!r||_classPrivateMethodGet(this,L,_isEntireWord2).call(this,o,l.index,l[0].length)){var h=_slicedToArray(getOriginalIndex(c,l.index,l[0].length),2),d=h[0],p=h[1];if(p){a.push(d);u.push(p)}}}function _convertToRegExpString2(t,r){var i=_classPrivateFieldGet(this,A).matchDiacritics,o=!1,a="[ ]*";(t=t.replaceAll(v,(function(t,a,u,l,c,h){if(a)return"[ ]*\\".concat(a,"[ ]*");if(u)return"[ ]*".concat(u,"[ ]*");if(l)return"[ ]+";if(i)return c||h;if(c)return d.has(c.charCodeAt(0))?c:"";if(r){o=!0;return"".concat(h,"\\p{M}*")}return h}))).endsWith(a)&&(t=t.slice(0,t.length-4));if(i&&r){l||(l=String.fromCharCode.apply(String,_toConsumableArray(d)));o=!0;t="".concat(t,"(?=[").concat(l,"]|[^\\p{M}]|$)")}return[o,t]}function _calculateMatch2(t){var r,i=this,o=_classPrivateFieldGet(this,T);if(0!==o.length){var a=_classPrivateFieldGet(this,A),u=a.caseSensitive,l=a.entireWord,c=this._pageContents[t],h=this._hasDiacritics[t],d=!1;if("string"==typeof o){var p=_slicedToArray(_classPrivateMethodGet(this,M,_convertToRegExpString2).call(this,o,h),2);d=p[0];o=p[1]}else o=o.sort().reverse().map((function(t){var r=_slicedToArray(_classPrivateMethodGet(i,M,_convertToRegExpString2).call(i,t,h),2),o=r[0],a=r[1];d||(d=o);return"(".concat(a,")")})).join("|");var v="g".concat(d?"u":"").concat(u?"":"i");o=o?new RegExp(o,v):null;_classPrivateMethodGet(this,O,_calculateRegExpMatch2).call(this,o,l,t,c);_classPrivateFieldGet(this,A).highlightAll&&_classPrivateMethodGet(this,R,_updatePage2).call(this,t);if(this._resumePageIdx===t){this._resumePageIdx=null;_classPrivateMethodGet(this,W,_nextPageMatch2).call(this)}var g=this._pageMatches[t].length;this._matchesCountTotal+=g;_classPrivateFieldGet(this,S)?g>0&&_classPrivateMethodGet(this,Y,_updateUIResultsCount2).call(this):_classPrivateFieldSet(this,x,(r=_classPrivateFieldGet(this,x),++r))===this._linkService.pagesCount&&_classPrivateMethodGet(this,Y,_updateUIResultsCount2).call(this)}}function _extractText2(){var t=this;if(!(this._extractTextPromises.length>0))for(var r=Promise.resolve(),i={disableNormalization:!0},o=function _loop(o){var a=new u.PromiseCapability;t._extractTextPromises[o]=a.promise;r=r.then((function(){return t._pdfDocument.getPage(o+1).then((function(t){return t.getTextContent(i)})).then((function(r){var i,u=[],l=_createForOfIteratorHelper(r.items);try{for(l.s();!(i=l.n()).done;){var c=i.value;u.push(c.str);c.hasEOL&&u.push("\n")}}catch(t){l.e(t)}finally{l.f()}var h=_slicedToArray(normalize(u.join("")),3);t._pageContents[o]=h[0];t._pageDiffs[o]=h[1];t._hasDiacritics[o]=h[2];a.resolve()}),(function(r){console.error("Unable to get text content for page ".concat(o+1),r);t._pageContents[o]="";t._pageDiffs[o]=null;t._hasDiacritics[o]=!1;a.resolve()}))}))},a=0,l=this._linkService.pagesCount;a<l;a++)o(a)}function _updatePage2(t){this._scrollMatches&&this._selected.pageIdx===t&&(this._linkService.page=t+1);this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:t})}function _updateAllPages2(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}function _nextMatch2(){var t=this,r=_classPrivateFieldGet(this,A).findPrevious,i=this._linkService.page-1,o=this._linkService.pagesCount;this._highlightMatches=!0;if(this._dirtyMatch){this._dirtyMatch=!1;this._selected.pageIdx=this._selected.matchIdx=-1;this._offset.pageIdx=i;this._offset.matchIdx=null;this._offset.wrapped=!1;this._resumePageIdx=null;this._pageMatches.length=0;this._pageMatchesLength.length=0;_classPrivateFieldSet(this,x,0);this._matchesCountTotal=0;_classPrivateMethodGet(this,N,_updateAllPages2).call(this);for(var a=function _loop2(r){if(t._pendingFindMatches.has(r))return 1;t._pendingFindMatches.add(r);t._extractTextPromises[r].then((function(){t._pendingFindMatches.delete(r);_classPrivateMethodGet(t,B,_calculateMatch2).call(t,r)}))},u=0;u<o;u++)a(u)}if(0!==_classPrivateFieldGet(this,T).length){if(!this._resumePageIdx){var l=this._offset;this._pagesToSearch=o;if(null!==l.matchIdx){var h=this._pageMatches[l.pageIdx].length;if(!r&&l.matchIdx+1<h||r&&l.matchIdx>0){l.matchIdx=r?l.matchIdx-1:l.matchIdx+1;_classPrivateMethodGet(this,U,_updateMatch2).call(this,!0);return}_classPrivateMethodGet(this,H,_advanceOffsetPage2).call(this,r)}_classPrivateMethodGet(this,W,_nextPageMatch2).call(this)}}else _classPrivateMethodGet(this,$,_updateUIState2).call(this,c.FOUND)}function _matchesReady2(t){var r=this._offset,i=t.length,o=_classPrivateFieldGet(this,A).findPrevious;if(i){r.matchIdx=o?i-1:0;_classPrivateMethodGet(this,U,_updateMatch2).call(this,!0);return!0}_classPrivateMethodGet(this,H,_advanceOffsetPage2).call(this,o);if(r.wrapped){r.matchIdx=null;if(this._pagesToSearch<0){_classPrivateMethodGet(this,U,_updateMatch2).call(this,!1);return!0}}return!1}function _nextPageMatch2(){null!==this._resumePageIdx&&console.error("There can only be one pending page.");var t=null;do{var r=this._offset.pageIdx;if(!(t=this._pageMatches[r])){this._resumePageIdx=r;break}}while(!_classPrivateMethodGet(this,V,_matchesReady2).call(this,t))}function _advanceOffsetPage2(t){var r=this._offset,i=this._linkService.pagesCount;r.pageIdx=t?r.pageIdx-1:r.pageIdx+1;r.matchIdx=null;this._pagesToSearch--;if(r.pageIdx>=i||r.pageIdx<0){r.pageIdx=t?i-1:0;r.wrapped=!0}}function _updateMatch2(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=c.NOT_FOUND,i=this._offset.wrapped;this._offset.wrapped=!1;if(t){var o=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx;this._selected.matchIdx=this._offset.matchIdx;r=i?c.WRAPPED:c.FOUND;-1!==o&&o!==this._selected.pageIdx&&_classPrivateMethodGet(this,R,_updatePage2).call(this,o)}_classPrivateMethodGet(this,$,_updateUIState2).call(this,r,_classPrivateFieldGet(this,A).findPrevious);if(-1!==this._selected.pageIdx){this._scrollMatches=!0;_classPrivateMethodGet(this,R,_updatePage2).call(this,this._selected.pageIdx)}}function _onFindBarClose2(t){var r=this,i=this._pdfDocument;this._firstPageCapability.promise.then((function(){if(r._pdfDocument&&(!i||r._pdfDocument===i)){if(r._findTimeout){clearTimeout(r._findTimeout);r._findTimeout=null}if(r._resumePageIdx){r._resumePageIdx=null;r._dirtyMatch=!0}_classPrivateMethodGet(r,$,_updateUIState2).call(r,c.FOUND);r._highlightMatches=!1;_classPrivateMethodGet(r,N,_updateAllPages2).call(r)}}))}function _requestMatchesCount2(){var t=this._selected,r=t.pageIdx,i=t.matchIdx,o=0,a=this._matchesCountTotal;if(-1!==i){for(var u=0;u<r;u++){var l;o+=(null===(l=this._pageMatches[u])||void 0===l?void 0:l.length)||0}o+=i+1}(o<1||o>a)&&(o=a=0);return{current:o,total:a}}function _updateUIResultsCount2(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:_classPrivateMethodGet(this,K,_requestMatchesCount2).call(this)})}function _updateUIState2(t){var r,i,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(_classPrivateFieldGet(this,S)||_classPrivateFieldGet(this,x)===this._linkService.pagesCount&&t!==c.PENDING)&&this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:t,previous:o,matchesCount:_classPrivateMethodGet(this,K,_requestMatchesCount2).call(this),rawQuery:null!==(r=null===(i=_classPrivateFieldGet(this,A))||void 0===i?void 0:i.query)&&void 0!==r?r:null})}},(t,r,i)=>{var o=i(24),a=i(4),u=i(6),l=i(78),c=i(129),h=i(64),d=i(76).f,p=i(37),v=i(208),g=i(94),y=i(230),m=i(215),w=i(128),b=i(70),D=i(8),P=i(5),E=i(62).enforce,A=i(145),S=i(13),x=i(216),C=i(217),k=S("match"),T=a.RegExp,I=T.prototype,L=a.SyntaxError,O=u(I.exec),M=u("".charAt),B=u("".replace),G=u("".indexOf),R=u("".slice),N=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,j=/a/g,V=/a/g,W=new T(j)!==j,H=m.MISSED_STICKY,U=m.UNSUPPORTED_Y,z=o&&(!W||H||x||C||D((function(){V[k]=!1;return T(j)!==j||T(V)===V||"/a/i"!==String(T(j,"i"))})));if(l("RegExp",z)){for(var K=function RegExp(t,r){var i,o,a,u,l,d,m=p(I,this),w=v(t),b=void 0===r,D=[],A=t;if(!m&&w&&b&&t.constructor===K)return t;if(w||p(I,t)){t=t.source;b&&(r=y(A))}t=void 0===t?"":g(t);r=void 0===r?"":g(r);A=t;x&&"dotAll"in j&&(o=!!r&&G(r,"s")>-1)&&(r=B(r,/s/g,""));i=r;H&&"sticky"in j&&(a=!!r&&G(r,"y")>-1)&&U&&(r=B(r,/y/g,""));if(C){u=function(t){for(var r,i=t.length,o=0,a="",u=[],l={},c=!1,h=!1,d=0,p="";o<=i;o++){if("\\"===(r=M(t,o)))r+=M(t,++o);else if("]"===r)c=!1;else if(!c)switch(!0){case"["===r:c=!0;break;case"("===r:if(O(N,R(t,o+1))){o+=2;h=!0}a+=r;d++;continue;case">"===r&&h:if(""===p||P(l,p))throw new L("Invalid capture group name");l[p]=!0;u[u.length]=[p,d];h=!1;p="";continue}h?p+=r:a+=r}return[a,u]}(t);t=u[0];D=u[1]}l=c(T(t,r),m?this:I,K);if(o||a||D.length){d=E(l);if(o){d.dotAll=!0;d.raw=K(function(t){for(var r,i=t.length,o=0,a="",u=!1;o<=i;o++)if("\\"!==(r=M(t,o)))if(u||"."!==r){"["===r?u=!0:"]"===r&&(u=!1);a+=r}else a+="[\\s\\S]";else a+=r+M(t,++o);return a}(t),i)}a&&(d.sticky=!0);D.length&&(d.groups=D)}if(t!==A)try{h(l,"source",""===A?"(?:)":A)}catch(t){}return l},Y=d(T),$=0;Y.length>$;)w(K,T,Y[$++]);I.constructor=K;K.prototype=I;b(a,"RegExp",K,{constructor:!0})}A("RegExp")},(t,r,i)=>{var o=i(24),a=i(216),u=i(45),l=i(103),c=i(62).get,h=RegExp.prototype,d=TypeError;o&&a&&l(h,"dotAll",{configurable:!0,get:function dotAll(){if(this!==h){if("RegExp"===u(this))return!!c(this).dotAll;throw new d("Incompatible receiver, RegExp required")}}})},(t,r,i)=>{var o=i(24),a=i(215).MISSED_STICKY,u=i(45),l=i(103),c=i(62).get,h=RegExp.prototype,d=TypeError;o&&a&&l(h,"sticky",{configurable:!0,get:function sticky(){if(this!==h){if("RegExp"===u(this))return!!c(this).sticky;throw new d("Incompatible receiver, RegExp required")}}})},(t,r,i)=>{var o,a=i(67),u=i(107),l=i(68).f,c=i(56),h=i(94),d=i(207),p=i(10),v=i(209),g=i(15),y=u("".endsWith),m=u("".slice),w=Math.min,b=v("endsWith");a({target:"String",proto:!0,forced:!(!g&&!b&&!!(o=l(String.prototype,"endsWith"),o&&!o.writable))&&!b},{endsWith:function endsWith(t){var r=h(p(this));d(t);var i=arguments.length>1?arguments[1]:void 0,o=r.length,a=void 0===i?o:w(c(i),o),u=h(t);return y?y(r,u,a):m(r,a-u.length,a)===u}})},(t,r,i)=>{var o=i(67),a=i(105).map;o({target:"Array",proto:!0,forced:!i(189)("map")},{map:function map(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var o=i(67),a=i(319);o({target:"Iterator",proto:!0,real:!0,forced:i(15)},{map:a})},(t,r,i)=>{var o=i(34),a=i(39),u=i(31),l=i(184),c=i(200),h=i(197),d=c((function(){var t=this.iterator,r=u(o(this.next,t));if(!(this.done=!!r.done))return h(t,this.mapper,[r.value,this.counter++],!0)}));t.exports=function map(t){u(this);a(t);return new d(l(this),{mapper:t})}},(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.CharacterType=void 0;r.getCharacterType=function getCharacterType(t){if(function isAlphabeticalScript(t){return t<11904}(t))return function isAscii(t){return 0==(65408&t)}(t)?function isAsciiSpace(t){return 32===t||9===t||13===t||10===t}(t)?o.SPACE:function isAsciiAlpha(t){return t>=97&&t<=122||t>=65&&t<=90}(t)||function isAsciiDigit(t){return t>=48&&t<=57}(t)||95===t?o.ALPHA_LETTER:o.PUNCT:function isThai(t){return 3584==(65408&t)}(t)?o.THAI_LETTER:160===t?o.SPACE:o.ALPHA_LETTER;if(function isHan(t){return t>=13312&&t<=40959||t>=63744&&t<=64255}(t))return o.HAN_LETTER;if(function isKatakana(t){return t>=12448&&t<=12543}(t))return o.KATAKANA_LETTER;if(function isHiragana(t){return t>=12352&&t<=12447}(t))return o.HIRAGANA_LETTER;if(function isHalfwidthKatakana(t){return t>=65376&&t<=65439}(t))return o.HALFWIDTH_KATAKANA_LETTER;return o.ALPHA_LETTER};r.getNormalizeWithNFKC=function getNormalizeWithNFKC(){i||(i=" ¨ª¯²-µ¸-º¼-¾IJ-ijĿ-ŀʼnſDŽ-njDZ-dzʰ-ʸ˘-˝ˠ-ˤʹͺ;΄-΅·ϐ-ϖϰ-ϲϴ-ϵϹևٵ-ٸक़-य़ড়-ঢ়য়ਲ਼ਸ਼ਖ਼-ਜ਼ਫ਼ଡ଼-ଢ଼ำຳໜ-ໝ༌གྷཌྷདྷབྷཛྷཀྵჼᴬ-ᴮᴰ-ᴺᴼ-ᵍᵏ-ᵪᵸᶛ-ᶿẚ-ẛάέήίόύώΆ᾽-῁ΈΉ῍-῏ΐΊ῝-῟ΰΎ῭-`ΌΏ´-῾ - ‑‗․-… ″-‴‶-‷‼‾⁇-⁉⁗ ⁰-ⁱ⁴-₎ₐ-ₜ₨℀-℃℅-ℇ℉-ℓℕ-№ℙ-ℝ℠-™ℤΩℨK-ℭℯ-ℱℳ-ℹ℻-⅀ⅅ-ⅉ⅐-ⅿ↉∬-∭∯-∰〈-〉①-⓪⨌⩴-⩶⫝̸ⱼ-ⱽⵯ⺟⻳⼀-⿕ 〶〸-〺゛-゜ゟヿㄱ-ㆎ㆒-㆟㈀-㈞㈠-㉇㉐-㉾㊀-㏿ꚜ-ꚝꝰꟲ-ꟴꟸ-ꟹꭜ-ꭟꭩ豈-嗀塚晴凞-羽蘒諸逸-都飯-舘並-龎ff-stﬓ-ﬗיִײַ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-﷼︐-︙︰-﹄﹇-﹒﹔-﹦﹨-﹫ﹰ-ﹲﹴﹶ-ﻼ!-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ¢-₩");return i};var i,o=r.CharacterType={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7}},(t,r,i)=>{i(1);i(42);i(92);i(95);i(179);i(188);i(229);i(195);i(212);i(226);Object.defineProperty(r,"__esModule",{value:!0});r.PDFHistory=void 0;r.isDestArraysEqual=isDestArraysEqual;r.isDestHashesEqual=isDestHashesEqual;i(204);i(115);i(88);i(142);i(322);i(222);i(223);i(138);i(135);i(136);i(98);i(120);i(126);i(190);var o=i(245),a=i(294);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function getCurrentHash(){return document.location.hash}r.PDFHistory=function(){function PDFHistory(t){var r=this,i=t.linkService,o=t.eventBus;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFHistory);this.linkService=i;this.eventBus=o;this._initialized=!1;this._fingerprint="";this.reset();this._boundEvents=null;this.eventBus._on("pagesinit",(function(){r._isPagesLoaded=!1;r.eventBus._on("pagesloaded",(function(t){r._isPagesLoaded=!!t.pagesCount}),{once:!0})}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFHistory,[{key:"initialize",value:function initialize(t){var r=t.fingerprint,i=t.resetHistory,o=void 0!==i&&i,a=t.updateUrl,u=void 0!==a&&a;if(r&&"string"==typeof r){this._initialized&&this.reset();var l=""!==this._fingerprint&&this._fingerprint!==r;this._fingerprint=r;this._updateUrl=!0===u;this._initialized=!0;this._bindEvents();var c=window.history.state;this._popStateInProgress=!1;this._blockHashChange=0;this._currentHash=getCurrentHash();this._numPositionUpdates=0;this._uid=this._maxUid=0;this._destination=null;this._position=null;if(this._isValidState(c,!0)&&!o){var h=c.destination;this._updateInternalState(h,c.uid,!0);void 0!==h.rotation&&(this._initialRotation=h.rotation);if(h.dest){this._initialBookmark=JSON.stringify(h.dest);this._destination.page=null}else h.hash?this._initialBookmark=h.hash:h.page&&(this._initialBookmark="page=".concat(h.page))}else{var d=this._parseCurrentHash(!0),p=d.hash,v=d.page,g=d.rotation;if(!p||l||o){this._pushOrReplaceState(null,!0);return}this._pushOrReplaceState({hash:p,page:v,rotation:g},!0)}}else globalThis.ngxConsole.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.')}},{key:"reset",value:function reset(){if(this._initialized){this._pageHide();this._initialized=!1;this._unbindEvents()}if(this._updateViewareaTimeout){clearTimeout(this._updateViewareaTimeout);this._updateViewareaTimeout=null}this._initialBookmark=null;this._initialRotation=null}},{key:"push",value:function push(t){var r=this,i=t.namedDest,o=void 0===i?null:i,a=t.explicitDest,u=t.pageNumber;if(this._initialized)if(o&&"string"!=typeof o)globalThis.ngxConsole.error("PDFHistory.push: "+'"'.concat(o,'" is not a valid namedDest parameter.'));else if(Array.isArray(a))if(this._isValidPage(u)||null===u&&!this._destination){var l=o||JSON.stringify(a);if(l){var c=!1;if(this._destination&&(isDestHashesEqual(this._destination.hash,l)||isDestArraysEqual(this._destination.dest,a))){if(this._destination.page)return;c=!0}if(!this._popStateInProgress||c){this._pushOrReplaceState({dest:a,hash:l,page:u,rotation:this.linkService.rotation},c);if(!this._popStateInProgress){this._popStateInProgress=!0;Promise.resolve().then((function(){r._popStateInProgress=!1}))}}}}else globalThis.ngxConsole.error("PDFHistory.push: "+'"'.concat(u,'" is not a valid pageNumber parameter.'));else globalThis.ngxConsole.error("PDFHistory.push: "+'"'.concat(a,'" is not a valid explicitDest parameter.'))}},{key:"pushPage",value:function pushPage(t){var r,i=this;if(this._initialized)if(this._isValidPage(t)){if((null===(r=this._destination)||void 0===r?void 0:r.page)!==t&&!this._popStateInProgress){this._pushOrReplaceState({dest:null,hash:"page=".concat(t),page:t,rotation:this.linkService.rotation});if(!this._popStateInProgress){this._popStateInProgress=!0;Promise.resolve().then((function(){i._popStateInProgress=!1}))}}}else globalThis.ngxConsole.error('PDFHistory.pushPage: "'.concat(t,'" is not a valid page number.'))}},{key:"pushCurrentPosition",value:function pushCurrentPosition(){this._initialized&&!this._popStateInProgress&&this._tryPushCurrentPosition()}},{key:"back",value:function back(){if(this._initialized&&!this._popStateInProgress){var t=window.history.state;this._isValidState(t)&&t.uid>0&&window.history.back()}}},{key:"forward",value:function forward(){if(this._initialized&&!this._popStateInProgress){var t=window.history.state;this._isValidState(t)&&t.uid<this._maxUid&&window.history.forward()}}},{key:"popStateInProgress",get:function get(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}},{key:"initialBookmark",get:function get(){return this._initialized?this._initialBookmark:null}},{key:"initialRotation",get:function get(){return this._initialized?this._initialRotation:null}},{key:"_pushOrReplaceState",value:function _pushOrReplaceState(t){var r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1]||!this._destination,o={fingerprint:this._fingerprint,uid:i?this._uid:this._uid+1,destination:t};this._updateInternalState(t,o.uid);if(this._updateUrl&&null!=t&&t.hash){var a=document.location.href.split("#")[0];a.startsWith("file://")||(r="".concat(a,"#").concat(t.hash))}i?window.history.replaceState(o,"",r):window.history.pushState(o,"",r)}},{key:"_tryPushCurrentPosition",value:function _tryPushCurrentPosition(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._position){var r=this._position;t&&((r=Object.assign(Object.create(null),this._position)).temporary=!0);if(this._destination){if(this._destination.temporary)this._pushOrReplaceState(r,!0);else if(this._destination.hash!==r.hash&&(this._destination.page||!(this._numPositionUpdates<=50))){var i=!1;if(this._destination.page>=r.first&&this._destination.page<=r.page){if(void 0!==this._destination.dest||!this._destination.first)return;i=!0}this._pushOrReplaceState(r,i)}}else this._pushOrReplaceState(r)}}},{key:"_isValidPage",value:function _isValidPage(t){return Number.isInteger(t)&&t>0&&t<=this.linkService.pagesCount}},{key:"_isValidState",value:function _isValidState(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return!1;if(t.fingerprint!==this._fingerprint){if(!r)return!1;if("string"!=typeof t.fingerprint||t.fingerprint.length!==this._fingerprint.length)return!1;var i=_slicedToArray(performance.getEntriesByType("navigation"),1)[0];if("reload"!==(null==i?void 0:i.type))return!1}return!(!Number.isInteger(t.uid)||t.uid<0)&&(null!==t.destination&&"object"===_typeof(t.destination))}},{key:"_updateInternalState",value:function _updateInternalState(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this._updateViewareaTimeout){clearTimeout(this._updateViewareaTimeout);this._updateViewareaTimeout=null}i&&null!=t&&t.temporary&&delete t.temporary;this._destination=t;this._uid=r;this._maxUid=Math.max(this._maxUid,r);this._numPositionUpdates=0}},{key:"_parseCurrentHash",value:function _parseCurrentHash(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=unescape(getCurrentHash()).substring(1),i=(0,o.parseQueryString)(r),a=i.get("nameddest")||"",u=0|i.get("page");(!this._isValidPage(u)||t&&a.length>0)&&(u=null);return{hash:r,page:u,rotation:this.linkService.rotation}}},{key:"_updateViewarea",value:function _updateViewarea(t){var r=this,i=t.location;if(this._updateViewareaTimeout){clearTimeout(this._updateViewareaTimeout);this._updateViewareaTimeout=null}this._position={hash:i.pdfOpenParams.substring(1),page:this.linkService.page,first:i.pageNumber,rotation:i.rotation};if(!this._popStateInProgress){this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++;this._updateViewareaTimeout=setTimeout((function(){r._popStateInProgress||r._tryPushCurrentPosition(!0);r._updateViewareaTimeout=null}),1e3)}}},{key:"_popState",value:function _popState(t){var r=this,i=t.state,u=getCurrentHash(),l=this._currentHash!==u;this._currentHash=u;if(i){if(this._isValidState(i)){this._popStateInProgress=!0;if(l){this._blockHashChange++;(0,a.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:1e3}).then((function(){r._blockHashChange--}))}var c=i.destination;this._updateInternalState(c,i.uid,!0);(0,o.isValidRotation)(c.rotation)&&(this.linkService.rotation=c.rotation);c.dest?this.linkService.goToDestination(c.dest):c.hash?this.linkService.setHash(c.hash):c.page&&(this.linkService.page=c.page);Promise.resolve().then((function(){r._popStateInProgress=!1}))}}else{this._uid++;var h=this._parseCurrentHash(),d=h.hash,p=h.page,v=h.rotation;this._pushOrReplaceState({hash:d,page:p,rotation:v},!0)}}},{key:"_pageHide",value:function _pageHide(){this._destination&&!this._destination.temporary||this._tryPushCurrentPosition()}},{key:"_bindEvents",value:function _bindEvents(){if(!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)}}},{key:"_unbindEvents",value:function _unbindEvents(){if(this._boundEvents){this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea);window.removeEventListener("popstate",this._boundEvents.popState);window.removeEventListener("pagehide",this._boundEvents.pageHide);this._boundEvents=null}}}]);return PDFHistory}();function isDestHashesEqual(t,r){return"string"==typeof t&&"string"==typeof r&&(t===r||(0,o.parseQueryString)(t).get("nameddest")===r)}function isDestArraysEqual(t,r){function isEntryEqual(t,r){if(_typeof(t)!==_typeof(r))return!1;if(Array.isArray(t)||Array.isArray(r))return!1;if(null!==t&&"object"===_typeof(t)&&null!==r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(var i in t)if(!isEntryEqual(t[i],r[i]))return!1;return!0}return t===r||Number.isNaN(t)&&Number.isNaN(r)}if(!Array.isArray(t)||!Array.isArray(r))return!1;if(t.length!==r.length)return!1;for(var i=0,o=t.length;i<o;i++)if(!isEntryEqual(t[i],r[i]))return!1;return!0}},(t,r,i)=>{var o,a=i(67),u=i(107),l=i(68).f,c=i(56),h=i(94),d=i(207),p=i(10),v=i(209),g=i(15),y=u("".startsWith),m=u("".slice),w=Math.min,b=v("startsWith");a({target:"String",proto:!0,forced:!(!g&&!b&&!!(o=l(String.prototype,"startsWith"),o&&!o.writable))&&!b},{startsWith:function startsWith(t){var r=h(p(this));d(t);var i=c(w(arguments.length>1?arguments[1]:void 0,r.length)),o=h(t);return y?y(r,o,i):m(r,i,i+o.length)===o}})},(t,r,i)=>{i(193);i(122);i(123);i(304);i(202);i(135);i(136);i(98);i(120);i(138);i(1);i(175);i(176);i(177);i(178);i(182);i(183);i(185);i(188);i(229);i(195);i(212);i(226);Object.defineProperty(r,"__esModule",{value:!0});r.PDFLayerViewer=void 0;i(88);i(142);i(179);i(126);i(42);i(92);i(298);i(95);var o=i(306);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var o=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(o){var a=Object.getOwnPropertyDescriptor(o,r);return a.get?a.get.call(arguments.length<3?t:i):a.value}};return _get.apply(this,arguments)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,i)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var a=new WeakSet;r.PDFLayerViewer=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(PDFLayerViewer,t);var r,i=_createSuper(PDFLayerViewer);function PDFLayerViewer(t){var r;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFLayerViewer);_classPrivateMethodInitSpec(_assertThisInitialized(r=i.call(this,t)),a);r.l10n=t.l10n;r.eventBus._on("optionalcontentconfigchanged",(function(t){_classPrivateMethodGet(_assertThisInitialized(r),a,_updateLayers2).call(_assertThisInitialized(r),t.promise)}));r.eventBus._on("resetlayers",(function(){_classPrivateMethodGet(_assertThisInitialized(r),a,_updateLayers2).call(_assertThisInitialized(r))}));r.eventBus._on("togglelayerstree",r._toggleAllTreeItems.bind(_assertThisInitialized(r)));return r}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFLayerViewer,[{key:"reset",value:function reset(){_get(_getPrototypeOf(PDFLayerViewer.prototype),"reset",this).call(this);this._optionalContentConfig=null;this._optionalContentHash=null}},{key:"_dispatchEvent",value:function _dispatchEvent(t){this.eventBus.dispatch("layersloaded",{source:this,layersCount:t})}},{key:"_bindLink",value:function _bindLink(t,r){var i=this,o=r.groupId,a=r.input,u=function setVisibility(){i._optionalContentConfig.setVisibility(o,a.checked);i._optionalContentHash=i._optionalContentConfig.getHash();i.eventBus.dispatch("optionalcontentconfig",{source:i,promise:Promise.resolve(i._optionalContentConfig)})};t.onclick=function(r){if(r.target===a){u();return!0}if(r.target!==t)return!0;a.checked=!a.checked;u();return!1}}},{key:"_setNestedName",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t,r){var i,o;return _regeneratorRuntime().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:i=r.name;if("string"!=typeof(o=void 0===i?null:i)){a.next=4;break}t.textContent=this._normalizeTextContent(o);return a.abrupt("return");case 4:a.next=6;return this.l10n.get("additional_layers");case 6:t.textContent=a.sent;t.style.fontStyle="italic";case 8:case"end":return a.stop()}}),_callee,this)}))),function _setNestedName(t,i){return r.apply(this,arguments)})},{key:"_addToggleButton",value:function _addToggleButton(t,r){var i=r.name,o=void 0===i?null:i;_get(_getPrototypeOf(PDFLayerViewer.prototype),"_addToggleButton",this).call(this,t,null===o)}},{key:"_toggleAllTreeItems",value:function _toggleAllTreeItems(){this._optionalContentConfig&&_get(_getPrototypeOf(PDFLayerViewer.prototype),"_toggleAllTreeItems",this).call(this)}},{key:"render",value:function render(t){var r=t.optionalContentConfig,i=t.pdfDocument;this._optionalContentConfig&&this.reset();this._optionalContentConfig=r||null;this._pdfDocument=i||null;var o=null==r?void 0:r.getOrder();if(o){this._optionalContentHash=r.getHash();for(var a=document.createDocumentFragment(),u=[{parent:a,groups:o}],l=0,c=!1;u.length>0;){var h,d=u.shift(),p=_createForOfIteratorHelper(d.groups);try{for(p.s();!(h=p.n()).done;){var v=h.value,g=document.createElement("div");g.className="treeItem";var y=document.createElement("a");g.append(y);if("object"===_typeof(v)){c=!0;this._addToggleButton(g,v);this._setNestedName(y,v);var m=document.createElement("div");m.className="treeItems";g.append(m);u.push({parent:m,groups:v.order})}else{var w=r.getGroup(v),b=document.createElement("input");this._bindLink(y,{groupId:v,input:b});b.type="checkbox";b.checked=w.visible;var D=document.createElement("label");D.textContent=this._normalizeTextContent(w.name);D.append(b);y.append(D);l++}d.parent.append(g)}}catch(t){p.e(t)}finally{p.f()}}this._finishRendering(a,l,c)}else this._dispatchEvent(0)}}]);return PDFLayerViewer}(o.BaseTreeViewer);function _updateLayers2(){return _updateLayers3.apply(this,arguments)}function _updateLayers3(){_updateLayers3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r,i,o=arguments;return _regeneratorRuntime().wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:t=o.length>0&&void 0!==o[0]?o[0]:null;if(this._optionalContentConfig){a.next=3;break}return a.abrupt("return");case 3:r=this._pdfDocument;a.next=6;return t||r.getOptionalContentConfig();case 6:i=a.sent;if(r===this._pdfDocument){a.next=9;break}return a.abrupt("return");case 9:if(!t){a.next=14;break}if(i.getHash()!==this._optionalContentHash){a.next=12;break}return a.abrupt("return");case 12:a.next=15;break;case 14:this.eventBus.dispatch("optionalcontentconfig",{source:this,promise:Promise.resolve(i)});case 15:this.render({optionalContentConfig:i,pdfDocument:this._pdfDocument});case 16:case"end":return a.stop()}}),_callee2,this)})));return _updateLayers3.apply(this,arguments)}},(t,r,i)=>{i(122);i(123);i(304);i(202);i(135);i(136);i(98);i(120);i(1);i(195);i(188);i(229);i(212);i(226);i(142);i(175);i(176);i(177);i(178);i(182);i(183);i(185);Object.defineProperty(r,"__esModule",{value:!0});r.PDFOutlineViewer=void 0;i(179);i(126);i(42);i(246);i(88);i(92);i(95);i(138);i(193);var o=i(306),a=i(291),u=i(245);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var o=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(o){var a=Object.getOwnPropertyDescriptor(o,r);return a.get?a.get.call(arguments.length<3?t:i):a.value}};return _get.apply(this,arguments)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,i)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}r.PDFOutlineViewer=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(PDFOutlineViewer,t);var r,i,o=_createSuper(PDFOutlineViewer);function PDFOutlineViewer(t){var r;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFOutlineViewer);(r=o.call(this,t)).linkService=t.linkService;r.downloadManager=t.downloadManager;r.eventBus._on("toggleoutlinetree",r._toggleAllTreeItems.bind(_assertThisInitialized(r)));r.eventBus._on("currentoutlineitem",r._currentOutlineItem.bind(_assertThisInitialized(r)));r.eventBus._on("pagechanging",(function(t){r._currentPageNumber=t.pageNumber}));r.eventBus._on("pagesloaded",(function(t){r._isPagesLoaded=!!t.pagesCount;r._currentOutlineItemCapability&&!r._currentOutlineItemCapability.settled&&r._currentOutlineItemCapability.resolve(r._isPagesLoaded)}));r.eventBus._on("sidebarviewchanged",(function(t){r._sidebarView=t.view}));return r}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFOutlineViewer,[{key:"reset",value:function reset(){_get(_getPrototypeOf(PDFOutlineViewer.prototype),"reset",this).call(this);this._outline=null;this._pageNumberToDestHashCapability=null;this._currentPageNumber=1;this._isPagesLoaded=null;this._currentOutlineItemCapability&&!this._currentOutlineItemCapability.settled&&this._currentOutlineItemCapability.resolve(!1);this._currentOutlineItemCapability=null}},{key:"_dispatchEvent",value:function _dispatchEvent(t){var r;this._currentOutlineItemCapability=new a.PromiseCapability;0===t||null!==(r=this._pdfDocument)&&void 0!==r&&r.loadingParams.disableAutoFetch?this._currentOutlineItemCapability.resolve(!1):null!==this._isPagesLoaded&&this._currentOutlineItemCapability.resolve(this._isPagesLoaded);this.eventBus.dispatch("outlineloaded",{source:this,outlineCount:t,currentOutlineItemPromise:this._currentOutlineItemCapability.promise})}},{key:"_bindLink",value:function _bindLink(t,r){var i=this,o=r.url,a=r.newWindow,u=r.action,l=r.attachment,c=r.dest,h=r.setOCGState,d=this.linkService;if(o)d.addLinkAttributes(t,o,a);else if(u){t.href=d.getAnchorUrl("");t.onclick=function(){d.executeNamedAction(u);return!1}}else if(l){t.href=d.getAnchorUrl("");t.onclick=function(){i.downloadManager.openOrDownloadData(t,l.content,l.filename);return!1}}else if(h){t.href=d.getAnchorUrl("");t.onclick=function(){d.executeSetOCGState(h);return!1}}else{t.href=d.getDestinationHash(c);t.onclick=function(t){i._updateCurrentTreeItem(t.target.parentNode);c&&d.goToDestination(c);return!1}}}},{key:"_setStyles",value:function _setStyles(t,r){var i=r.bold,o=r.italic;i&&(t.style.fontWeight="bold");o&&(t.style.fontStyle="italic")}},{key:"_addToggleButton",value:function _addToggleButton(t,r){var i=r.count,o=r.items,a=!1;if(i<0){var u=o.length;if(u>0)for(var l=_toConsumableArray(o);l.length>0;){var c=l.shift(),h=c.count,d=c.items;if(h>0&&d.length>0){u+=d.length;l.push.apply(l,_toConsumableArray(d))}}Math.abs(i)===u&&(a=!0)}_get(_getPrototypeOf(PDFOutlineViewer.prototype),"_addToggleButton",this).call(this,t,a)}},{key:"_toggleAllTreeItems",value:function _toggleAllTreeItems(){this._outline&&_get(_getPrototypeOf(PDFOutlineViewer.prototype),"_toggleAllTreeItems",this).call(this)}},{key:"render",value:function render(t){var r=t.outline,i=t.pdfDocument;this._outline&&this.reset();this._outline=r||null;this._pdfDocument=i||null;if(r){for(var o=document.createDocumentFragment(),a=[{parent:o,items:r}],u=0,l=!1;a.length>0;){var c,h=a.shift(),d=_createForOfIteratorHelper(h.items);try{for(d.s();!(c=d.n()).done;){var p=c.value,v=document.createElement("div");v.className="treeItem";var g=document.createElement("a");this._bindLink(g,p);this._setStyles(g,p);g.textContent=this._normalizeTextContent(p.title);v.append(g);if(p.items.length>0){l=!0;this._addToggleButton(v,p);var y=document.createElement("div");y.className="treeItems";v.append(y);a.push({parent:y,items:p.items})}h.parent.append(v);u++}}catch(t){d.e(t)}finally{d.f()}}this._finishRendering(o,u,l)}else this._dispatchEvent(0)}},{key:"_currentOutlineItem",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,i,o;return _regeneratorRuntime().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(this._isPagesLoaded){a.next=2;break}throw new Error("_currentOutlineItem: All pages have not been loaded.");case 2:if(this._outline&&this._pdfDocument){a.next=4;break}return a.abrupt("return");case 4:a.next=6;return this._getPageNumberToDestHash(this._pdfDocument);case 6:if(t=a.sent){a.next=9;break}return a.abrupt("return");case 9:this._updateCurrentTreeItem(null);if(this._sidebarView===u.SidebarView.OUTLINE){a.next=12;break}return a.abrupt("return");case 12:r=this._currentPageNumber;case 13:if(!(r>0)){a.next=25;break}if(i=t.get(r)){a.next=17;break}return a.abrupt("continue",22);case 17:if(o=this.container.querySelector('a[href="'.concat(i,'"]'))){a.next=20;break}return a.abrupt("continue",22);case 20:this._scrollToCurrentTreeItem(o.parentNode);return a.abrupt("break",25);case 22:r--;a.next=13;break;case 25:case"end":return a.stop()}}),_callee,this)}))),function _currentOutlineItem(){return i.apply(this,arguments)})},{key:"_getPageNumberToDestHash",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,i,o,u,l,c,h,d,p,v,g,y,m,w,b;return _regeneratorRuntime().wrap((function _callee2$(D){for(;;)switch(D.prev=D.next){case 0:if(!this._pageNumberToDestHashCapability){D.next=2;break}return D.abrupt("return",this._pageNumberToDestHashCapability.promise);case 2:this._pageNumberToDestHashCapability=new a.PromiseCapability;r=new Map,i=new Map;o=[{nesting:0,items:this._outline}];case 5:if(!(o.length>0)){D.next=56;break}u=o.shift(),l=u.nesting;c=_createForOfIteratorHelper(u.items);D.prev=8;c.s();case 10:if((h=c.n()).done){D.next=46;break}d=h.value,p=d.dest,v=d.items;g=void 0,y=void 0;if("string"!=typeof p){D.next=21;break}D.next=16;return t.getDestination(p);case 16:g=D.sent;if(t===this._pdfDocument){D.next=19;break}return D.abrupt("return",null);case 19:D.next=22;break;case 21:g=p;case 22:if(!Array.isArray(g)){D.next=43;break}m=_slicedToArray(g,1);if("object"!==_typeof(w=m[0])||null===w){D.next=41;break}if(y=this.linkService._cachedPageNumber(w)){D.next=39;break}D.prev=27;D.next=30;return t.getPageIndex(w);case 30:D.t0=D.sent;y=D.t0+1;if(t===this._pdfDocument){D.next=34;break}return D.abrupt("return",null);case 34:this.linkService.cachePageRef(y,w);D.next=39;break;case 37:D.prev=37;D.t1=D.catch(27);case 39:D.next=42;break;case 41:Number.isInteger(w)&&(y=w+1);case 42:if(Number.isInteger(y)&&(!r.has(y)||l>i.get(y))){b=this.linkService.getDestinationHash(p);r.set(y,b);i.set(y,l)}case 43:v.length>0&&o.push({nesting:l+1,items:v});case 44:D.next=10;break;case 46:D.next=51;break;case 48:D.prev=48;D.t2=D.catch(8);c.e(D.t2);case 51:D.prev=51;c.f();return D.finish(51);case 54:D.next=5;break;case 56:this._pageNumberToDestHashCapability.resolve(r.size>0?r:null);return D.abrupt("return",this._pageNumberToDestHashCapability.promise);case 58:case"end":return D.stop()}}),_callee2,this,[[8,48,51,54],[27,37]])}))),function _getPageNumberToDestHash(t){return r.apply(this,arguments)})}]);return PDFOutlineViewer}(o.BaseTreeViewer)},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(175);i(176);i(177);i(178);i(193);i(179);i(182);i(183);i(185);i(188);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFPresentationMode=void 0;i(126);i(42);i(88);i(92);i(288);i(95);i(298);var o=i(245),a=i(291);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var u=3e3,l="pdfPresentationMode",c="pdfPresentationModeControls",h=50,d=.1,p=50,v=Math.PI/6,g=new WeakMap,y=new WeakMap,m=new WeakSet,w=new WeakSet,b=new WeakSet,D=new WeakSet,P=new WeakSet,E=new WeakSet,A=new WeakSet,S=new WeakSet,x=new WeakSet,C=new WeakSet,k=new WeakSet,T=new WeakSet,I=new WeakSet,L=new WeakSet,O=new WeakSet;r.PDFPresentationMode=function(){function PDFPresentationMode(t){var r=t.container,i=t.pdfViewer,a=t.eventBus;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFPresentationMode);_classPrivateMethodInitSpec(this,O);_classPrivateMethodInitSpec(this,L);_classPrivateMethodInitSpec(this,I);_classPrivateMethodInitSpec(this,T);_classPrivateMethodInitSpec(this,k);_classPrivateMethodInitSpec(this,C);_classPrivateMethodInitSpec(this,x);_classPrivateMethodInitSpec(this,S);_classPrivateMethodInitSpec(this,A);_classPrivateMethodInitSpec(this,E);_classPrivateMethodInitSpec(this,P);_classPrivateMethodInitSpec(this,D);_classPrivateMethodInitSpec(this,b);_classPrivateMethodInitSpec(this,w);_classPrivateMethodInitSpec(this,m);_classPrivateFieldInitSpec(this,g,{writable:!0,value:o.PresentationModeState.UNKNOWN});_classPrivateFieldInitSpec(this,y,{writable:!0,value:null});this.container=r;this.pdfViewer=i;this.eventBus=a;this.contextMenuOpen=!1;this.mouseScrollTimeStamp=0;this.mouseScrollDelta=0;this.touchSwipeState=null}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFPresentationMode,[{key:"request",value:(t=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(){var t,r,i;return _regeneratorRuntime().wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:t=this.container,r=this.pdfViewer;if(!this.active&&r.pagesCount&&t.requestFullscreen){u.next=3;break}return u.abrupt("return",!1);case 3:_classPrivateMethodGet(this,L,_addFullscreenChangeListeners2).call(this);_classPrivateMethodGet(this,w,_notifyStateChange2).call(this,o.PresentationModeState.CHANGING);i=t.requestFullscreen();_classPrivateFieldSet(this,y,{pageNumber:r.currentPageNumber,scaleValue:r.currentScaleValue,scrollMode:r.scrollMode,spreadMode:null,annotationEditorMode:null});if(!(r.spreadMode===o.SpreadMode.NONE||r.pageViewsReady&&r.hasEqualPageSizes)){console.warn("Ignoring Spread modes when entering PresentationMode, since the document may contain varying page sizes.");_classPrivateFieldGet(this,y).spreadMode=r.spreadMode}r.annotationEditorMode!==a.AnnotationEditorType.DISABLE&&(_classPrivateFieldGet(this,y).annotationEditorMode=r.annotationEditorMode);u.prev=9;u.next=12;return i;case 12:r.focus();return u.abrupt("return",!0);case 16:u.prev=16;u.t0=u.catch(9);_classPrivateMethodGet(this,O,_removeFullscreenChangeListeners2).call(this);_classPrivateMethodGet(this,w,_notifyStateChange2).call(this,o.PresentationModeState.NORMAL);case 20:return u.abrupt("return",!1);case 21:case"end":return u.stop()}}),_callee,this,[[9,16]])}))),function request(){return t.apply(this,arguments)})},{key:"active",get:function get(){return _classPrivateFieldGet(this,g)===o.PresentationModeState.CHANGING||_classPrivateFieldGet(this,g)===o.PresentationModeState.FULLSCREEN}},{key:"_prepareFullscreenMode",value:function _prepareFullscreenMode(){var t=document.getElementsByClassName("zoom")[0].parentElement,r=t.parentElement;this.ngxContainer=r;for(var i=0;i<r.childElementCount;i++)r.children.item(i)===t&&(this.ngxContainerIndex=i);r.removeChild(t);document.body.append(t);for(var o=document.body.children,a=0;a<o.length;a++){var u=o.item(a);u!==t&&u instanceof HTMLElement&&u.classList.add("hidden-by-fullscreen")}document.getElementById("sidebarContainer").classList.add("hidden-by-fullscreen");document.getElementsByClassName("toolbar")[0].classList.add("hidden-by-fullscreen")}},{key:"_tidyUpFullscreenMode",value:function _tidyUpFullscreenMode(){if(this.ngxContainer){var t=document.getElementsByClassName("zoom")[0].parentElement;document.body.removeChild(t);this.ngxContainerIndex>=this.ngxContainer.childElementCount?this.ngxContainer.append(t):this.ngxContainer.insertBefore(t,this.ngxContainer.children.item(this.ngxContainerIndex));this.ngxContainer=void 0;for(var r=document.body.children,i=0;i<r.length;i++){var o=r.item(i);o!==t&&o instanceof HTMLElement&&o.classList.contains("hidden-by-fullscreen")&&o.classList.remove("hidden-by-fullscreen")}document.getElementById("sidebarContainer").classList.remove("hidden-by-fullscreen");document.getElementsByClassName("toolbar")[0].classList.remove("hidden-by-fullscreen")}}}]);var t;return PDFPresentationMode}();function _mouseWheel2(t){if(this.active){t.preventDefault();var r=(0,o.normalizeWheelEventDelta)(t),i=Date.now(),a=this.mouseScrollTimeStamp;if(!(i>a&&i-a<h)){(this.mouseScrollDelta>0&&r<0||this.mouseScrollDelta<0&&r>0)&&_classPrivateMethodGet(this,x,_resetMouseScrollState2).call(this);this.mouseScrollDelta+=r;if(Math.abs(this.mouseScrollDelta)>=d){var u=this.mouseScrollDelta;_classPrivateMethodGet(this,x,_resetMouseScrollState2).call(this);(u>0?this.pdfViewer.previousPage():this.pdfViewer.nextPage())&&(this.mouseScrollTimeStamp=i)}}}}function _notifyStateChange2(t){_classPrivateFieldSet(this,g,t);this.eventBus.dispatch("presentationmodechanged",{source:this,state:t})}function _enter2(){var t=this;_classPrivateMethodGet(this,w,_notifyStateChange2).call(this,o.PresentationModeState.FULLSCREEN);this.container.classList.add(l);setTimeout((function(){t.pdfViewer.scrollMode=o.ScrollMode.PAGE;null!==_classPrivateFieldGet(t,y).spreadMode&&(t.pdfViewer.spreadMode=o.SpreadMode.NONE);t.pdfViewer.currentPageNumber=_classPrivateFieldGet(t,y).pageNumber;t.pdfViewer.currentScaleValue="page-fit";null!==_classPrivateFieldGet(t,y).annotationEditorMode&&(t.pdfViewer.annotationEditorMode={mode:a.AnnotationEditorType.NONE})}),0);_classPrivateMethodGet(this,k,_addWindowListeners2).call(this);_classPrivateMethodGet(this,A,_showControls2).call(this);this.contextMenuOpen=!1;window.getSelection().removeAllRanges()}function _exit2(){var t=this,r=this.pdfViewer.currentPageNumber;this.container.classList.remove(l);setTimeout((function(){_classPrivateMethodGet(t,O,_removeFullscreenChangeListeners2).call(t);_classPrivateMethodGet(t,w,_notifyStateChange2).call(t,o.PresentationModeState.NORMAL);t.pdfViewer.scrollMode=_classPrivateFieldGet(t,y).scrollMode;null!==_classPrivateFieldGet(t,y).spreadMode&&(t.pdfViewer.spreadMode=_classPrivateFieldGet(t,y).spreadMode);t.pdfViewer.currentScaleValue=_classPrivateFieldGet(t,y).scaleValue;t.pdfViewer.currentPageNumber=r;null!==_classPrivateFieldGet(t,y).annotationEditorMode&&(t.pdfViewer.annotationEditorMode={mode:_classPrivateFieldGet(t,y).annotationEditorMode});_classPrivateFieldSet(t,y,null)}),0);_classPrivateMethodGet(this,T,_removeWindowListeners2).call(this);_classPrivateMethodGet(this,S,_hideControls2).call(this);_classPrivateMethodGet(this,x,_resetMouseScrollState2).call(this);this.contextMenuOpen=!1}function _mouseDown2(t){var r;if(this.contextMenuOpen){this.contextMenuOpen=!1;t.preventDefault()}else if(!(0!==t.button||t.target.href&&null!==(r=t.target.parentNode)&&void 0!==r&&r.hasAttribute("data-internal-link"))){t.preventDefault();t.shiftKey?this.pdfViewer.previousPage():this.pdfViewer.nextPage()}}function _contextMenu2(){this.contextMenuOpen=!0}function _showControls2(){var t=this;this.controlsTimeout?clearTimeout(this.controlsTimeout):this.container.classList.add(c);this.controlsTimeout=setTimeout((function(){t.container.classList.remove(c);delete t.controlsTimeout}),u)}function _hideControls2(){if(this.controlsTimeout){clearTimeout(this.controlsTimeout);this.container.classList.remove(c);delete this.controlsTimeout}}function _resetMouseScrollState2(){this.mouseScrollTimeStamp=0;this.mouseScrollDelta=0}function _touchSwipe2(t){if(this.active)if(t.touches.length>1)this.touchSwipeState=null;else switch(t.type){case"touchstart":this.touchSwipeState={startX:t.touches[0].pageX,startY:t.touches[0].pageY,endX:t.touches[0].pageX,endY:t.touches[0].pageY};break;case"touchmove":if(null===this.touchSwipeState)return;this.touchSwipeState.endX=t.touches[0].pageX;this.touchSwipeState.endY=t.touches[0].pageY;t.preventDefault();break;case"touchend":if(null===this.touchSwipeState)return;var r=0,i=this.touchSwipeState.endX-this.touchSwipeState.startX,o=this.touchSwipeState.endY-this.touchSwipeState.startY,a=Math.abs(Math.atan2(o,i));Math.abs(i)>p&&(a<=v||a>=Math.PI-v)?r=i:Math.abs(o)>p&&Math.abs(a-Math.PI/2)<=v&&(r=o);r>0?this.pdfViewer.previousPage():r<0&&this.pdfViewer.nextPage()}}function _addWindowListeners2(){this.showControlsBind=_classPrivateMethodGet(this,A,_showControls2).bind(this);this.mouseDownBind=_classPrivateMethodGet(this,P,_mouseDown2).bind(this);this.mouseWheelBind=_classPrivateMethodGet(this,m,_mouseWheel2).bind(this);this.resetMouseScrollStateBind=_classPrivateMethodGet(this,x,_resetMouseScrollState2).bind(this);this.contextMenuBind=_classPrivateMethodGet(this,E,_contextMenu2).bind(this);this.touchSwipeBind=_classPrivateMethodGet(this,C,_touchSwipe2).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)}function _removeWindowListeners2(){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}function _fullscreenChange2(){document.fullscreenElement?_classPrivateMethodGet(this,b,_enter2).call(this):_classPrivateMethodGet(this,D,_exit2).call(this)}function _addFullscreenChangeListeners2(){this.fullscreenChangeBind=_classPrivateMethodGet(this,I,_fullscreenChange2).bind(this);window.addEventListener("fullscreenchange",this.fullscreenChangeBind)}function _removeFullscreenChangeListeners2(){window.removeEventListener("fullscreenchange",this.fullscreenChangeBind);delete this.fullscreenChangeBind}},(t,r,i)=>{i(1);i(42);i(92);i(95);Object.defineProperty(r,"__esModule",{value:!0});r.PDFRenderingQueue=void 0;i(88);i(142);i(327);i(204);i(135);i(136);i(98);i(120);i(126);i(138);var o=i(291),a=i(245);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}r.PDFRenderingQueue=function(){function PDFRenderingQueue(){var t=this;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFRenderingQueue);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:function value(){return!!t.pdfViewer}})}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFRenderingQueue,[{key:"setViewer",value:function setViewer(t){this.pdfViewer=t}},{key:"setThumbnailViewer",value:function setThumbnailViewer(t){this.pdfThumbnailViewer=t}},{key:"isHighestPriority",value:function isHighestPriority(t){return this.highestPriorityPage===t.renderingId}},{key:"renderHighestPriority",value:function renderHighestPriority(t){var r;if(this.idleTimeout){clearTimeout(this.idleTimeout);this.idleTimeout=null}this.pdfViewer.forceRendering(t)||this.isThumbnailViewEnabled&&null!==(r=this.pdfThumbnailViewer)&&void 0!==r&&r.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),3e4))}},{key:"getHighestPriority",value:function getHighestPriority(t,r,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=t.views,u=a.length;if(0===u)return null;for(var l=0;l<u;l++){var c=a[l].view;if(!this.isViewFinished(c))return c}var h=t.first.id,d=t.last.id;if(d-h+1>u)for(var p=t.ids,v=1,g=d-h;v<g;v++){var y=i?h+v:d-v;if(!p.has(y)){var m=r[y-1];if(!this.isViewFinished(m))return m}}var w=i?d:h-2,b=r[w];return b&&!this.isViewFinished(b)||o&&(b=r[w+=i?1:-1])&&!this.isViewFinished(b)?b:null}},{key:"isViewFinished",value:function isViewFinished(t){return t.renderingState===a.RenderingStates.FINISHED}},{key:"renderView",value:function renderView(t){var r=this;switch(t.renderingState){case a.RenderingStates.FINISHED:return!1;case a.RenderingStates.PAUSED:this.highestPriorityPage=t.renderingId;t.resume();break;case a.RenderingStates.RUNNING:this.highestPriorityPage=t.renderingId;break;case a.RenderingStates.INITIAL:this.highestPriorityPage=t.renderingId;t.draw().finally((function(){r.renderHighestPriority()})).catch((function(t){t instanceof o.RenderingCancelledException||globalThis.ngxConsole.error('renderView: "'.concat(t,'"'))}))}return!0}}]);return PDFRenderingQueue}()},(t,r,i)=>{var o=i(67),a=i(15),u=i(157),l=i(8),c=i(36),h=i(28),d=i(147),p=i(174),v=i(70),g=u&&u.prototype;o({target:"Promise",proto:!0,real:!0,forced:!!u&&l((function(){g.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var r=d(this,c("Promise")),i=h(t);return this.then(i?function(i){return p(r,t()).then((function(){return i}))}:t,i?function(i){return p(r,t()).then((function(){throw i}))}:t)}});if(!a&&h(u)){var y=c("Promise").prototype.finally;g.finally!==y&&v(g,"finally",y,{unsafe:!0})}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);i(179);i(188);i(229);i(195);i(212);i(226);i(175);i(176);i(177);i(178);i(193);i(182);i(183);i(185);i(190);i(198);i(199);i(202);i(203);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFScriptingManager=void 0;i(42);i(88);i(142);i(92);i(95);i(204);i(246);i(258);i(260);i(270);i(272);i(274);i(276);i(278);i(280);i(126);i(288);i(298);i(222);var o=i(245),a=i(291);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,o)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,_toPropertyKey(o.key),o)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var u=new WeakMap,l=new WeakMap,c=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,g=new WeakMap,y=new WeakMap,m=new WeakMap,w=new WeakMap,b=new WeakSet,D=new WeakSet,P=new WeakSet,E=new WeakSet,A=new WeakSet;r.PDFScriptingManager=function(){function PDFScriptingManager(t){var r=t.eventBus,i=t.sandboxBundleSrc,o=void 0===i?null:i,a=t.externalServices,S=void 0===a?null:a,x=t.docProperties,C=void 0===x?null:x;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFScriptingManager);_classPrivateMethodInitSpec(this,A);_classPrivateMethodInitSpec(this,E);_classPrivateMethodInitSpec(this,P);_classPrivateMethodInitSpec(this,D);_classPrivateMethodInitSpec(this,b);_classPrivateFieldInitSpec(this,u,{writable:!0,value:null});_classPrivateFieldInitSpec(this,l,{writable:!0,value:null});_classPrivateFieldInitSpec(this,c,{writable:!0,value:null});_classPrivateFieldInitSpec(this,h,{writable:!0,value:null});_classPrivateFieldInitSpec(this,d,{writable:!0,value:null});_classPrivateFieldInitSpec(this,p,{writable:!0,value:null});_classPrivateFieldInitSpec(this,v,{writable:!0,value:null});_classPrivateFieldInitSpec(this,g,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,y,{writable:!0,value:null});_classPrivateFieldInitSpec(this,m,{writable:!0,value:null});_classPrivateFieldInitSpec(this,w,{writable:!0,value:null});_classPrivateFieldSet(this,h,r);_classPrivateFieldSet(this,y,o);_classPrivateFieldSet(this,d,S);_classPrivateFieldSet(this,c,C)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFScriptingManager,[{key:"setViewer",value:function setViewer(t){_classPrivateFieldSet(this,v,t)}},{key:"setDocument",value:(S=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,i,o,a,l,d,y,w,S,x,C,k,T=this;return _regeneratorRuntime().wrap((function _callee2$(I){for(;;)switch(I.prev=I.next){case 0:if(!_classPrivateFieldGet(this,p)){I.next=3;break}I.next=3;return _classPrivateMethodGet(this,A,_destroyScripting2).call(this);case 3:_classPrivateFieldSet(this,p,t);if(t){I.next=6;break}return I.abrupt("return");case 6:I.next=8;return Promise.all([t.getFieldObjects(),t.getCalculationOrderIds(),t.getJSActions()]);case 8:i=I.sent;o=_slicedToArray(i,3);a=o[0];l=o[1];d=o[2];if(a||d){I.next=17;break}I.next=16;return _classPrivateMethodGet(this,A,_destroyScripting2).call(this);case 16:return I.abrupt("return");case 17:if(t===_classPrivateFieldGet(this,p)){I.next=19;break}return I.abrupt("return");case 19:I.prev=19;_classPrivateFieldSet(this,m,_classPrivateMethodGet(this,E,_initScripting2).call(this));I.next=29;break;case 23:I.prev=23;I.t0=I.catch(19);globalThis.ngxConsole.error('setDocument: "'.concat(I.t0.message,'".'));I.next=28;return _classPrivateMethodGet(this,A,_destroyScripting2).call(this);case 28:return I.abrupt("return");case 29:this._internalEvents.set("updatefromsandbox",(function(t){(null==t?void 0:t.source)===window&&_classPrivateMethodGet(T,b,_updateFromSandbox2).call(T,t.detail)}));this._internalEvents.set("dispatcheventinsandbox",(function(t){var r;null===(r=_classPrivateFieldGet(T,m))||void 0===r||r.dispatchEventInSandbox(t.detail)}));this._internalEvents.set("pagechanging",(function(t){var r=t.pageNumber,i=t.previous;if(r!==i){_classPrivateMethodGet(T,P,_dispatchPageClose2).call(T,i);_classPrivateMethodGet(T,D,_dispatchPageOpen2).call(T,r)}}));this._internalEvents.set("pagerendered",(function(t){var r=t.pageNumber;T._pageOpenPending.has(r)&&r===_classPrivateFieldGet(T,v).currentPageNumber&&_classPrivateMethodGet(T,D,_dispatchPageOpen2).call(T,r)}));this._internalEvents.set("pagesdestroy",_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r;return _regeneratorRuntime().wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return _classPrivateMethodGet(T,P,_dispatchPageClose2).call(T,_classPrivateFieldGet(T,v).currentPageNumber);case 2:i.next=4;return null===(t=_classPrivateFieldGet(T,m))||void 0===t?void 0:t.dispatchEventInSandbox({id:"doc",name:"WillClose"});case 4:null===(r=_classPrivateFieldGet(T,u))||void 0===r||r.resolve();case 5:case"end":return i.stop()}}),_callee)}))));y=_createForOfIteratorHelper(this._internalEvents);try{for(y.s();!(w=y.n()).done;){S=_slicedToArray(w.value,2),x=S[0],C=S[1];_classPrivateFieldGet(this,h)._on(x,C)}}catch(t){y.e(t)}finally{y.f()}I.prev=36;I.next=39;return _classPrivateFieldGet(this,c).call(this,t);case 39:k=I.sent;if(t===_classPrivateFieldGet(this,p)){I.next=42;break}return I.abrupt("return");case 42:I.next=44;return _classPrivateFieldGet(this,m).createSandbox({objects:a,calculationOrder:l,appInfo:{platform:navigator.platform,language:navigator.language},docInfo:_objectSpread(_objectSpread({},k),{},{actions:d})});case 44:_classPrivateFieldGet(this,h).dispatch("sandboxcreated",{source:this});I.next=53;break;case 47:I.prev=47;I.t1=I.catch(36);globalThis.ngxConsole.error('setDocument: "'.concat(I.t1.message,'".'));I.next=52;return _classPrivateMethodGet(this,A,_destroyScripting2).call(this);case 52:return I.abrupt("return");case 53:I.next=55;return null===(r=_classPrivateFieldGet(this,m))||void 0===r?void 0:r.dispatchEventInSandbox({id:"doc",name:"Open"});case 55:I.next=57;return _classPrivateMethodGet(this,D,_dispatchPageOpen2).call(this,_classPrivateFieldGet(this,v).currentPageNumber,!0);case 57:Promise.resolve().then((function(){t===_classPrivateFieldGet(T,p)&&_classPrivateFieldSet(T,g,!0)}));case 58:case"end":return I.stop()}}),_callee2,this,[[19,23],[36,47]])}))),function setDocument(t){return S.apply(this,arguments)})},{key:"dispatchWillSave",value:(o=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t;return _regeneratorRuntime().wrap((function _callee3$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",null===(t=_classPrivateFieldGet(this,m))||void 0===t?void 0:t.dispatchEventInSandbox({id:"doc",name:"WillSave"}));case 1:case"end":return r.stop()}}),_callee3,this)}))),function dispatchWillSave(){return o.apply(this,arguments)})},{key:"dispatchDidSave",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){var t;return _regeneratorRuntime().wrap((function _callee4$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",null===(t=_classPrivateFieldGet(this,m))||void 0===t?void 0:t.dispatchEventInSandbox({id:"doc",name:"DidSave"}));case 1:case"end":return r.stop()}}),_callee4,this)}))),function dispatchDidSave(){return i.apply(this,arguments)})},{key:"dispatchWillPrint",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(){var t;return _regeneratorRuntime().wrap((function _callee5$(r){for(;;)switch(r.prev=r.next){case 0:if(_classPrivateFieldGet(this,m)){r.next=2;break}return r.abrupt("return");case 2:r.next=4;return null===(t=_classPrivateFieldGet(this,w))||void 0===t?void 0:t.promise;case 4:_classPrivateFieldSet(this,w,new a.PromiseCapability);r.prev=5;r.next=8;return _classPrivateFieldGet(this,m).dispatchEventInSandbox({id:"doc",name:"WillPrint"});case 8:r.next=15;break;case 10:r.prev=10;r.t0=r.catch(5);_classPrivateFieldGet(this,w).resolve();_classPrivateFieldSet(this,w,null);throw r.t0;case 15:r.next=17;return _classPrivateFieldGet(this,w).promise;case 17:case"end":return r.stop()}}),_callee5,this,[[5,10]])}))),function dispatchWillPrint(){return r.apply(this,arguments)})},{key:"dispatchDidPrint",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(){var t;return _regeneratorRuntime().wrap((function _callee6$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",null===(t=_classPrivateFieldGet(this,m))||void 0===t?void 0:t.dispatchEventInSandbox({id:"doc",name:"DidPrint"}));case 1:case"end":return r.stop()}}),_callee6,this)}))),function dispatchDidPrint(){return t.apply(this,arguments)})},{key:"destroyPromise",get:function get(){var t;return(null===(t=_classPrivateFieldGet(this,l))||void 0===t?void 0:t.promise)||null}},{key:"ready",get:function get(){return _classPrivateFieldGet(this,g)}},{key:"_internalEvents",get:function get(){return(0,a.shadow)(this,"_internalEvents",new Map)}},{key:"_pageOpenPending",get:function get(){return(0,a.shadow)(this,"_pageOpenPending",new Set)}},{key:"_visitedPages",get:function get(){return(0,a.shadow)(this,"_visitedPages",new Map)}}]);var t,r,i,o,S;return PDFScriptingManager}();function _updateFromSandbox2(t){return _updateFromSandbox3.apply(this,arguments)}function _updateFromSandbox3(){return(_updateFromSandbox3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee7(t){var r,i,a,u,l,c,d,g,y,m,b,D,P,E;return _regeneratorRuntime().wrap((function _callee7$(A){for(;;)switch(A.prev=A.next){case 0:i=_classPrivateFieldGet(this,v);a=i.isInPresentationMode||i.isChangingPresentationMode;u=t.id,l=t.siblings,c=t.command,d=t.value;if(u){A.next=41;break}A.t0=c;A.next="clear"===A.t0?7:"error"===A.t0?9:"layout"===A.t0?11:"page-num"===A.t0?13:"print"===A.t0?15:"println"===A.t0?19:"zoom"===A.t0?21:"SaveAs"===A.t0?23:"FirstPage"===A.t0?25:"LastPage"===A.t0?27:"NextPage"===A.t0?29:"PrevPage"===A.t0?31:"ZoomViewIn"===A.t0?33:"ZoomViewOut"===A.t0?35:"WillPrintFinished"===A.t0?37:40;break;case 7:globalThis.ngxConsole.clear();return A.abrupt("break",40);case 9:globalThis.ngxConsole.error(d);return A.abrupt("break",40);case 11:if(!a){g=(0,o.apiPageLayoutToViewerModes)(d);i.spreadMode=g.spreadMode}return A.abrupt("break",40);case 13:i.currentPageNumber=d+1;return A.abrupt("break",40);case 15:A.next=17;return i.pagesPromise;case 17:_classPrivateFieldGet(this,h).dispatch("print",{source:this});return A.abrupt("break",40);case 19:globalThis.ngxConsole.log(d);return A.abrupt("break",40);case 21:a||(i.currentScaleValue=d);return A.abrupt("break",40);case 23:_classPrivateFieldGet(this,h).dispatch("download",{source:this});return A.abrupt("break",40);case 25:i.currentPageNumber=1;return A.abrupt("break",40);case 27:i.currentPageNumber=i.pagesCount;return A.abrupt("break",40);case 29:i.nextPage();return A.abrupt("break",40);case 31:i.previousPage();return A.abrupt("break",40);case 33:a||i.increaseScale();return A.abrupt("break",40);case 35:a||i.decreaseScale();return A.abrupt("break",40);case 37:null===(r=_classPrivateFieldGet(this,w))||void 0===r||r.resolve();_classPrivateFieldSet(this,w,null);return A.abrupt("break",40);case 40:return A.abrupt("return");case 41:if(!a||!t.focus){A.next=43;break}return A.abrupt("return");case 43:delete t.id;delete t.siblings;y=l?[u].concat(_toConsumableArray(l)):[u];m=_createForOfIteratorHelper(y);try{for(m.s();!(b=m.n()).done;){D=b.value;(P=document.querySelector('[data-element-id="'.concat(D,'"]')))?P.dispatchEvent(new CustomEvent("updatefromsandbox",{detail:t})):null===(E=_classPrivateFieldGet(this,p))||void 0===E||E.annotationStorage.setValue(D,t)}}catch(t){m.e(t)}finally{m.f()}case 48:case"end":return A.stop()}}),_callee7,this)})))).apply(this,arguments)}function _dispatchPageOpen2(t){return _dispatchPageOpen3.apply(this,arguments)}function _dispatchPageOpen3(){_dispatchPageOpen3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee9(t){var r,i,l,c,h,d=this,g=arguments;return _regeneratorRuntime().wrap((function _callee9$(y){for(;;)switch(y.prev=y.next){case 0:r=g.length>1&&void 0!==g[1]&&g[1];i=_classPrivateFieldGet(this,p),l=this._visitedPages;r&&_classPrivateFieldSet(this,u,new a.PromiseCapability);if(_classPrivateFieldGet(this,u)){y.next=5;break}return y.abrupt("return");case 5:if((null==(c=_classPrivateFieldGet(this,v).getPageView(t-1))?void 0:c.renderingState)===o.RenderingStates.FINISHED){y.next=9;break}this._pageOpenPending.add(t);return y.abrupt("return");case 9:this._pageOpenPending.delete(t);h=_asyncToGenerator(_regeneratorRuntime().mark((function _callee8(){var r,o,a;return _regeneratorRuntime().wrap((function _callee8$(u){for(;;)switch(u.prev=u.next){case 0:u.next=2;return l.has(t)?null:null===(r=c.pdfPage)||void 0===r?void 0:r.getJSActions();case 2:a=u.sent;if(i===_classPrivateFieldGet(d,p)){u.next=5;break}return u.abrupt("return");case 5:u.next=7;return null===(o=_classPrivateFieldGet(d,m))||void 0===o?void 0:o.dispatchEventInSandbox({id:"page",name:"PageOpen",pageNumber:t,actions:a});case 7:case"end":return u.stop()}}),_callee8)})))();l.set(t,h);case 12:case"end":return y.stop()}}),_callee9,this)})));return _dispatchPageOpen3.apply(this,arguments)}function _dispatchPageClose2(t){return _dispatchPageClose3.apply(this,arguments)}function _dispatchPageClose3(){return(_dispatchPageClose3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee10(t){var r,i,o,a;return _regeneratorRuntime().wrap((function _callee10$(l){for(;;)switch(l.prev=l.next){case 0:i=_classPrivateFieldGet(this,p),o=this._visitedPages;if(_classPrivateFieldGet(this,u)){l.next=3;break}return l.abrupt("return");case 3:if(!this._pageOpenPending.has(t)){l.next=5;break}return l.abrupt("return");case 5:if(a=o.get(t)){l.next=8;break}return l.abrupt("return");case 8:o.set(t,null);l.next=11;return a;case 11:if(i===_classPrivateFieldGet(this,p)){l.next=13;break}return l.abrupt("return");case 13:l.next=15;return null===(r=_classPrivateFieldGet(this,m))||void 0===r?void 0:r.dispatchEventInSandbox({id:"page",name:"PageClose",pageNumber:t});case 15:case"end":return l.stop()}}),_callee10,this)})))).apply(this,arguments)}function _initScripting2(){_classPrivateFieldSet(this,l,new a.PromiseCapability);if(_classPrivateFieldGet(this,m))throw new Error("#initScripting: Scripting already exists.");return _classPrivateFieldGet(this,d).createScripting({sandboxBundleSrc:_classPrivateFieldGet(this,y)})}function _destroyScripting2(){return _destroyScripting3.apply(this,arguments)}function _destroyScripting3(){return(_destroyScripting3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee11(){var t,r,i,o,a,c,d,v;return _regeneratorRuntime().wrap((function _callee11$(y){for(;;)switch(y.prev=y.next){case 0:if(_classPrivateFieldGet(this,m)){y.next=4;break}_classPrivateFieldSet(this,p,null);null===(i=_classPrivateFieldGet(this,l))||void 0===i||i.resolve();return y.abrupt("return");case 4:if(!_classPrivateFieldGet(this,u)){y.next=8;break}y.next=7;return Promise.race([_classPrivateFieldGet(this,u).promise,new Promise((function(t){setTimeout(t,1e3)}))]).catch((function(){}));case 7:_classPrivateFieldSet(this,u,null);case 8:_classPrivateFieldSet(this,p,null);y.prev=9;y.next=12;return _classPrivateFieldGet(this,m).destroySandbox();case 12:y.next=16;break;case 14:y.prev=14;y.t0=y.catch(9);case 16:null===(t=_classPrivateFieldGet(this,w))||void 0===t||t.reject(new Error("Scripting destroyed."));_classPrivateFieldSet(this,w,null);o=_createForOfIteratorHelper(this._internalEvents);try{for(o.s();!(a=o.n()).done;){c=_slicedToArray(a.value,2),d=c[0],v=c[1];_classPrivateFieldGet(this,h)._off(d,v)}}catch(t){o.e(t)}finally{o.f()}this._internalEvents.clear();this._pageOpenPending.clear();this._visitedPages.clear();_classPrivateFieldSet(this,m,null);_classPrivateFieldSet(this,g,!1);null===(r=_classPrivateFieldGet(this,l))||void 0===r||r.resolve();case 26:case"end":return y.stop()}}),_callee11,this,[[9,14]])})))).apply(this,arguments)}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFSidebar=void 0;i(204);i(126);i(42);i(88);i(92);i(288);i(95);i(298);i(142);var o=i(245);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var a="--sidebar-width",u=200,l="sidebarResizing",c="pdfSidebarNotification",h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,g=new WeakMap,y=new WeakSet,m=new WeakSet,w=new WeakSet,b=new WeakSet,D=new WeakSet,P=new WeakSet,E=new WeakSet;r.PDFSidebar=function(){function PDFSidebar(t){var r=this,i=t.elements,a=t.eventBus,u=t.l10n;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFSidebar);_classPrivateMethodInitSpec(this,E);_classPrivateMethodInitSpec(this,P);_classPrivateMethodInitSpec(this,D);_classPrivateMethodInitSpec(this,b);_classPrivateMethodInitSpec(this,w);_classPrivateMethodInitSpec(this,m);_classPrivateMethodInitSpec(this,y);_classPrivateFieldInitSpec(this,h,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,d,{writable:!0,value:_classPrivateMethodGet(this,P,_mouseMove2).bind(this)});_classPrivateFieldInitSpec(this,p,{writable:!0,value:_classPrivateMethodGet(this,E,_mouseUp2).bind(this)});_classPrivateFieldInitSpec(this,v,{writable:!0,value:null});_classPrivateFieldInitSpec(this,g,{writable:!0,value:null});this.isOpen=!1;this.active=o.SidebarView.THUMBS;this.isInitialViewSet=!1;this.isInitialEventDispatched=!1;this.onToggled=null;this.onUpdateThumbnails=null;this.outerContainer=i.outerContainer;this.sidebarContainer=i.sidebarContainer;this.toggleButton=i.toggleButton;this.resizer=i.resizer;this.thumbnailButton=i.thumbnailButton;this.outlineButton=i.outlineButton;this.attachmentsButton=i.attachmentsButton;this.layersButton=i.layersButton;this.thumbnailView=i.thumbnailView;this.outlineView=i.outlineView;this.attachmentsView=i.attachmentsView;this.layersView=i.layersView;this._outlineOptionsContainer=i.outlineOptionsContainer;this._currentOutlineItemButton=i.currentOutlineItemButton;this.eventBus=a;this.l10n=u;u.getDirection().then((function(t){_classPrivateFieldSet(r,h,"rtl"===t)}));_classPrivateMethodGet(this,b,_addEventListeners2).call(this)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFSidebar,[{key:"reset",value:function reset(){this.isInitialViewSet=!1;this.isInitialEventDispatched=!1;_classPrivateMethodGet(this,w,_hideUINotification2).call(this,!0);this.switchView(o.SidebarView.THUMBS);this.outlineButton.disabled=!1;this.attachmentsButton.disabled=!1;this.layersButton.disabled=!1;this.outlineButton.hidden=!1;this.attachmentsButton.hidden=!1;this.layersButton.hidden=!1;this._currentOutlineItemButton.disabled=!0}},{key:"visibleView",get:function get(){return this.isOpen?this.active:o.SidebarView.NONE}},{key:"setInitialView",value:function setInitialView(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.SidebarView.NONE;if(!this.isInitialViewSet){this.isInitialViewSet=!0;if(t!==o.SidebarView.NONE&&t!==o.SidebarView.UNKNOWN){this.switchView(t,!0);this.isInitialEventDispatched||_classPrivateMethodGet(this,y,_dispatchEvent2).call(this)}else _classPrivateMethodGet(this,y,_dispatchEvent2).call(this)}}},{key:"switchView",value:function switchView(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t!==this.active,a=!1;switch(t){case o.SidebarView.NONE:this.isOpen&&this.close();return;case o.SidebarView.THUMBS:this.isOpen&&i&&(a=!0);break;case o.SidebarView.OUTLINE:if(this.outlineButton.disabled)return;break;case o.SidebarView.ATTACHMENTS:if(this.attachmentsButton.disabled)return;break;case o.SidebarView.LAYERS:if(this.layersButton.disabled)return;break;default:globalThis.ngxConsole.error('PDFSidebar.switchView: "'.concat(t,'" is not a valid view.'));return}this.active=t;(0,o.toggleCheckedBtn)(this.thumbnailButton,t===o.SidebarView.THUMBS,this.thumbnailView);(0,o.toggleCheckedBtn)(this.outlineButton,t===o.SidebarView.OUTLINE,this.outlineView);(0,o.toggleCheckedBtn)(this.attachmentsButton,t===o.SidebarView.ATTACHMENTS,this.attachmentsView);(0,o.toggleCheckedBtn)(this.layersButton,t===o.SidebarView.LAYERS,this.layersView);this._outlineOptionsContainer.classList.toggle("hidden",t!==o.SidebarView.OUTLINE);if(!r||this.isOpen){if(a){this.onUpdateThumbnails();this.onToggled()}i&&_classPrivateMethodGet(this,y,_dispatchEvent2).call(this)}else this.open()}},{key:"open",value:function open(){if(!this.isOpen){this.isOpen=!0;(0,o.toggleExpandedBtn)(this.toggleButton,!0);this.outerContainer.classList.add("sidebarMoving","sidebarOpen");this.active===o.SidebarView.THUMBS&&this.onUpdateThumbnails();this.onToggled();_classPrivateMethodGet(this,y,_dispatchEvent2).call(this);_classPrivateMethodGet(this,w,_hideUINotification2).call(this)}}},{key:"close",value:function close(){if(this.isOpen){this.isOpen=!1;(0,o.toggleExpandedBtn)(this.toggleButton,!1);this.outerContainer.classList.add("sidebarMoving");this.outerContainer.classList.remove("sidebarOpen");this.onToggled();_classPrivateMethodGet(this,y,_dispatchEvent2).call(this)}}},{key:"toggle",value:function toggle(){this.isOpen?this.close():this.open()}},{key:"outerContainerWidth",get:function get(){return _classPrivateFieldGet(this,v)||_classPrivateFieldSet(this,v,this.outerContainer.clientWidth)}}]);return PDFSidebar}();function _dispatchEvent2(){this.isInitialViewSet&&(this.isInitialEventDispatched||(this.isInitialEventDispatched=!0));this.eventBus.dispatch("sidebarviewchanged",{source:this,view:this.visibleView})}function _showUINotification2(){this.toggleButton.setAttribute("data-l10n-id","toggle_sidebar_notification2");this.l10n.translate(this.toggleButton);this.isOpen||this.toggleButton.classList.add(c)}function _hideUINotification2(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(this.isOpen||t)&&this.toggleButton.classList.remove(c);if(t){this.toggleButton.setAttribute("data-l10n-id","toggle_sidebar");this.l10n.translate(this.toggleButton)}}function _addEventListeners2(){var t=this;this.sidebarContainer.addEventListener("transitionend",(function(r){r.target===t.sidebarContainer&&t.outerContainer.classList.remove("sidebarMoving")}));this.toggleButton.addEventListener("click",(function(){t.toggle()}));this.thumbnailButton.addEventListener("click",(function(){t.switchView(o.SidebarView.THUMBS)}));this.outlineButton.addEventListener("click",(function(){t.switchView(o.SidebarView.OUTLINE)}));this.outlineButton.addEventListener("dblclick",(function(){t.eventBus.dispatch("toggleoutlinetree",{source:t})}));this.attachmentsButton.addEventListener("click",(function(){t.switchView(o.SidebarView.ATTACHMENTS)}));this.layersButton.addEventListener("click",(function(){t.switchView(o.SidebarView.LAYERS)}));this.layersButton.addEventListener("dblclick",(function(){t.eventBus.dispatch("resetlayers",{source:t})}));this._currentOutlineItemButton.addEventListener("click",(function(){t.eventBus.dispatch("currentoutlineitem",{source:t})}));var r=function onTreeLoaded(r,i,a){i.disabled=!r;i.hidden=!r;r?_classPrivateMethodGet(t,m,_showUINotification2).call(t):t.active===a&&t.switchView(o.SidebarView.THUMBS)};this.eventBus._on("outlineloaded",(function(i){r(i.outlineCount,t.outlineButton,o.SidebarView.OUTLINE);i.enableCurrentOutlineItemButton&&i.currentOutlineItemPromise&&i.currentOutlineItemPromise.then((function(r){t.isInitialViewSet&&(t._currentOutlineItemButton.disabled=!r)}))}));this.eventBus._on("attachmentsloaded",(function(i){r(i.attachmentsCount,t.attachmentsButton,o.SidebarView.ATTACHMENTS)}));this.eventBus._on("layersloaded",(function(i){r(i.layersCount,t.layersButton,o.SidebarView.LAYERS)}));this.eventBus._on("presentationmodechanged",(function(r){r.state===o.PresentationModeState.NORMAL&&t.visibleView===o.SidebarView.THUMBS&&t.onUpdateThumbnails()}));this.resizer.addEventListener("mousedown",(function(r){if(0===r.button){t.outerContainer.classList.add(l);window.addEventListener("mousemove",_classPrivateFieldGet(t,d));window.addEventListener("mouseup",_classPrivateFieldGet(t,p))}}));this.eventBus._on("resize",(function(r){if(r.source===window){_classPrivateFieldSet(t,v,null);if(_classPrivateFieldGet(t,g))if(t.isOpen){t.outerContainer.classList.add(l);var i=_classPrivateMethodGet(t,D,_updateWidth2).call(t,_classPrivateFieldGet(t,g));Promise.resolve().then((function(){t.outerContainer.classList.remove(l);i&&t.eventBus.dispatch("resize",{source:t})}))}else _classPrivateMethodGet(t,D,_updateWidth2).call(t,_classPrivateFieldGet(t,g))}}))}function _updateWidth2(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=Math.floor(this.outerContainerWidth/2);t>r&&(t=r);t<u&&(t=u);if(t===_classPrivateFieldGet(this,g))return!1;_classPrivateFieldSet(this,g,t);o.docStyle.setProperty(a,"".concat(t,"px"));return!0}function _mouseMove2(t){var r=t.clientX;_classPrivateFieldGet(this,h)&&(r=this.outerContainerWidth-r);_classPrivateMethodGet(this,D,_updateWidth2).call(this,r)}function _mouseUp2(t){this.outerContainer.classList.remove(l);this.eventBus.dispatch("resize",{source:this});window.removeEventListener("mousemove",_classPrivateFieldGet(this,d));window.removeEventListener("mouseup",_classPrivateFieldGet(this,p))}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(188);i(229);i(195);i(212);i(226);i(1);i(142);i(175);i(176);i(177);i(178);i(193);i(182);i(183);i(185);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFThumbnailViewer=void 0;i(204);i(126);i(179);i(42);i(88);i(92);i(298);i(95);var o=i(245),a=i(331);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,_toPropertyKey(o.key),o)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var u="selected",l=new WeakSet,c=new WeakSet;r.PDFThumbnailViewer=function(){function PDFThumbnailViewer(t){var r=t.container,i=t.eventBus,a=t.linkService,u=t.renderingQueue,h=t.l10n,d=t.pageColors;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFThumbnailViewer);_classPrivateMethodInitSpec(this,c);_classPrivateMethodInitSpec(this,l);this.container=r;this.eventBus=i;this.linkService=a;this.renderingQueue=u;this.l10n=h;this.pageColors=d||null;this.scroll=(0,o.watchScroll)(this.container,this._scrollUpdated.bind(this));this._resetView()}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFThumbnailViewer,[{key:"_scrollUpdated",value:function _scrollUpdated(){this.renderingQueue.renderHighestPriority()}},{key:"getThumbnail",value:function getThumbnail(t){return this._thumbnails[t]}},{key:"_getVisibleThumbs",value:function _getVisibleThumbs(){return(0,o.getVisibleElements)({scrollEl:this.container,views:this._thumbnails})}},{key:"scrollThumbnailIntoView",value:function scrollThumbnailIntoView(t){if(this.pdfDocument){var r=this._thumbnails[t-1];if(r){if(t!==this._currentPageNumber){this._thumbnails[this._currentPageNumber-1].div.classList.remove(u);r.div.classList.add(u)}var i=this._getVisibleThumbs(),a=i.first,l=i.last,c=i.views;if(c.length>0){var h=!1;if(t<=a.id||t>=l.id)h=!0;else{var d,p=_createForOfIteratorHelper(c);try{for(p.s();!(d=p.n()).done;){var v=d.value,g=v.id,y=v.percent;if(g===t){h=y<100;break}}}catch(t){p.e(t)}finally{p.f()}}h&&(0,o.scrollIntoView)(r.div,{top:-19})}this._currentPageNumber=t}else globalThis.ngxConsole.error('scrollThumbnailIntoView: Invalid "pageNumber" parameter.')}}},{key:"pagesRotation",get:function get(){return this._pagesRotation},set:function set(t){if(!(0,o.isValidRotation)(t))throw new Error("Invalid thumbnails rotation angle.");if(this.pdfDocument&&this._pagesRotation!==t){this._pagesRotation=t;var r,i={rotation:t},a=_createForOfIteratorHelper(this._thumbnails);try{for(a.s();!(r=a.n()).done;){r.value.update(i)}}catch(t){a.e(t)}finally{a.f()}}}},{key:"cleanup",value:function cleanup(){var t,r=_createForOfIteratorHelper(this._thumbnails);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.renderingState!==o.RenderingStates.FINISHED&&i.reset()}}catch(t){r.e(t)}finally{r.f()}a.TempImageFactory.destroyCanvas()}},{key:"_resetView",value:function _resetView(){this._thumbnails=[];this._currentPageNumber=1;this._pageLabels=null;this._pagesRotation=0;this.container.textContent=""}},{key:"setDocument",value:function setDocument(t){var r=this;this.initialized=!1;if(this.pdfDocument){this._cancelRendering();this._resetView()}this.pdfDocument=t;if(t&&!this.initialized){this.initialized=!0;var i=t.getPage(1),o=t.getOptionalContentConfig();i.then((function(i){for(var l,c=t.numPages,h=i.getViewport({scale:1}),d=1;d<=c;++d){var p=new a.PDFThumbnailView(_defineProperty({container:r.container,eventBus:r.eventBus,id:d,defaultViewport:h.clone(),optionalContentConfigPromise:o,linkService:r.linkService,renderingQueue:r.renderingQueue,l10n:r.l10n,pageColors:r.pageColors},"eventBus",r.eventBus));r._thumbnails.push(p)}null===(l=r._thumbnails[0])||void 0===l||l.setPdfPage(i);r._thumbnails[r._currentPageNumber-1].div.classList.add(u)})).catch((function(t){globalThis.ngxConsole.error("Unable to initialize thumbnail viewer",t)}))}}},{key:"_cancelRendering",value:function _cancelRendering(){var t,r=_createForOfIteratorHelper(this._thumbnails);try{for(r.s();!(t=r.n()).done;){t.value.cancelRendering()}}catch(t){r.e(t)}finally{r.f()}}},{key:"setPageLabels",value:function setPageLabels(t){if(this.pdfDocument){if(t)if(Array.isArray(t)&&this.pdfDocument.numPages===t.length)this._pageLabels=t;else{this._pageLabels=null;globalThis.ngxConsole.error("PDFThumbnailViewer_setPageLabels: Invalid page labels.")}else this._pageLabels=null;for(var r=0,i=this._thumbnails.length;r<i;r++){var o,a;this._thumbnails[r].setPageLabel(null!==(o=null===(a=this._pageLabels)||void 0===a?void 0:a[r])&&void 0!==o?o:null)}}}},{key:"forceRendering",value:function forceRendering(){var t=this,r=this._getVisibleThumbs(),i=_classPrivateMethodGet(this,c,_getScrollAhead2).call(this,r),o=this.renderingQueue.getHighestPriority(r,this._thumbnails,i);if(o){_classPrivateMethodGet(this,l,_ensurePdfPageLoaded2).call(this,o).then((function(){t.renderingQueue.renderView(o)}));return!0}return!1}},{key:"stopRendering",value:function stopRendering(){this._cancelRendering()}}]);return PDFThumbnailViewer}();function _ensurePdfPageLoaded2(t){return _ensurePdfPageLoaded3.apply(this,arguments)}function _ensurePdfPageLoaded3(){_ensurePdfPageLoaded3=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r;return _regeneratorRuntime().wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:if(!t.pdfPage){i.next=2;break}return i.abrupt("return",t.pdfPage);case 2:i.prev=2;i.next=5;return this.pdfDocument.getPage(t.id);case 5:r=i.sent;t.pdfPage||t.setPdfPage(r);return i.abrupt("return",r);case 10:i.prev=10;i.t0=i.catch(2);globalThis.ngxConsole.error("Unable to get page for thumb view",i.t0);return i.abrupt("return",null);case 14:case"end":return i.stop()}}),_callee,this,[[2,10]])})));return _ensurePdfPageLoaded3.apply(this,arguments)}function _getScrollAhead2(t){var r,i;return 1===(null===(r=t.first)||void 0===r?void 0:r.id)||(null===(i=t.last)||void 0===i?void 0:i.id)!==this._thumbnails.length&&this.scroll.down}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);i(175);i(176);i(177);i(178);i(193);i(179);i(182);i(183);i(185);i(188);i(229);i(195);i(212);i(226);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.TempImageFactory=r.PDFThumbnailView=void 0;i(126);i(204);i(88);i(142);i(327);i(42);i(92);i(298);i(95);var o=i(245),a=i(291);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classStaticPrivateFieldSpecSet(t,r,i,o){_classCheckPrivateStaticAccess(t,r);_classCheckPrivateStaticFieldDescriptor(i,"set");!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,i,o);return o}function _classStaticPrivateFieldSpecGet(t,r,i){_classCheckPrivateStaticAccess(t,r);_classCheckPrivateStaticFieldDescriptor(i,"get");return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,i)}function _classCheckPrivateStaticFieldDescriptor(t,r){if(void 0===t)throw new TypeError("attempted to "+r+" private static field before its declaration")}function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}var u=r.TempImageFactory=function(){function TempImageFactory(){_classCallCheck(this,TempImageFactory)}_createClass(TempImageFactory,null,[{key:"getCanvas",value:function getCanvas(t,r){var i=_classStaticPrivateFieldSpecGet(this,TempImageFactory,l)||_classStaticPrivateFieldSpecSet(this,TempImageFactory,l,document.createElement("canvas"));i.width=t;i.height=r;var o=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0,alpha:!1}:{alpha:!1},a=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,u=i.getContext("2d",o);u.save();u.fillStyle="rgb(255, 255, 255)";u.fillRect(0,0,t,r);u.restore();return[i,i.getContext("2d",a)]}},{key:"destroyCanvas",value:function destroyCanvas(){var t=_classStaticPrivateFieldSpecGet(this,TempImageFactory,l);if(t){t.width=0;t.height=0}_classStaticPrivateFieldSpecSet(this,TempImageFactory,l,null)}}]);return TempImageFactory}(),l={writable:!0,value:null},c=new WeakSet,h=new WeakSet;r.PDFThumbnailView=function(){function PDFThumbnailView(t){var r=t.container,i=t.eventBus,a=t.id,u=t.defaultViewport,l=t.optionalContentConfigPromise,d=t.linkService,p=t.renderingQueue,v=t.l10n,g=t.pageColors;_classCallCheck(this,PDFThumbnailView);_classPrivateMethodInitSpec(this,h);_classPrivateMethodInitSpec(this,c);this.id=a;this.renderingId="thumbnail"+a;this.pageLabel=null;this.pdfPage=null;this.rotation=0;this.viewport=u;this.pdfPageRotate=u.rotation;this._optionalContentConfigPromise=l||null;this.pageColors=g||null;this.eventBus=i;this.linkService=d;this.renderingQueue=p;this.eventBus=i;this.renderTask=null;this.renderingState=o.RenderingStates.INITIAL;this.resume=null;this.l10n=v;window.pdfThumbnailGenerator?this._placeholderImg=window.pdfThumbnailGenerator(this,d,a,r,this._thumbPageTitle):this.createThumbnail(this,d,a,r,this._thumbPageTitle)}_createClass(PDFThumbnailView,[{key:"createThumbnail",value:function createThumbnail(t,r,i,o,a){var u=document.createElement("a");u.href=r.getAnchorUrl("#page="+i);this._thumbPageTitle.then((function(t){u.title=t}));u.onclick=function(){r.goToPage(i);return!1};this.anchor=u;var l=document.createElement("div");l.className="thumbnail";l.setAttribute("data-page-number",this.id);this.div=l;_classPrivateMethodGet(this,c,_updateDims2).call(this);var h=document.createElement("div");h.className="thumbnailImage";this._placeholderImg=h;l.append(h);u.append(l);o.append(u)}},{key:"setPdfPage",value:function setPdfPage(t){this.pdfPage=t;this.pdfPageRotate=t.rotate;var r=(this.rotation+this.pdfPageRotate)%360;this.viewport=t.getViewport({scale:1,rotation:r});this.reset()}},{key:"reset",value:function reset(){var t;this.cancelRendering();this.renderingState=o.RenderingStates.INITIAL;this.div.removeAttribute("data-loaded");null===(t=this.image)||void 0===t||t.replaceWith(this._placeholderImg);_classPrivateMethodGet(this,c,_updateDims2).call(this);if(this.image){this.image.removeAttribute("src");delete this.image}}},{key:"update",value:function update(t){var r=t.rotation,i=void 0===r?null:r;"number"==typeof i&&(this.rotation=i);var o=(this.rotation+this.pdfPageRotate)%360;this.viewport=this.viewport.clone({scale:1,rotation:o});this.reset()}},{key:"cancelRendering",value:function cancelRendering(){if(this.renderTask){this.renderTask.cancel();this.renderTask=null}this.resume=null}},{key:"_getPageDrawContext",value:function _getPageDrawContext(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=document.createElement("canvas"),i=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0,alpha:!1}:{alpha:!1},a=r.getContext("2d",i),u=new o.OutputScale;r.width=t*this.canvasWidth*u.sx|0;r.height=t*this.canvasHeight*u.sy|0;return{ctx:a,canvas:r,transform:u.scaled?[u.sx,0,0,u.sy,0,0]:null}}},{key:"_convertCanvasToImage",value:function _convertCanvasToImage(t){if(this.renderingState!==o.RenderingStates.FINISHED)throw new Error("_convertCanvasToImage: Rendering has not finished.");var r=this._reduceImage(t),i=document.createElement("img");i.className="thumbnailImage";this._thumbPageCanvas.then((function(t){i.setAttribute("aria-label",t)}));i.src=r.toDataURL();this.image=i;this.div.setAttribute("data-loaded",!0);this._placeholderImg.replaceWith(i);r.width=0;r.height=0}},{key:"draw",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,i,a,u,l,c,d,p,v,g=this;return _regeneratorRuntime().wrap((function _callee$(y){for(;;)switch(y.prev=y.next){case 0:if(this.renderingState===o.RenderingStates.INITIAL){y.next=3;break}globalThis.ngxConsole.error("Must be in new state before drawing");return y.abrupt("return",void 0);case 3:if(t=this.pdfPage){y.next=7;break}this.renderingState=o.RenderingStates.FINISHED;throw new Error("pdfPage is not loaded");case 7:this.renderingState=o.RenderingStates.RUNNING;r=this._getPageDrawContext(2),i=r.ctx,a=r.canvas,u=r.transform;l=this.viewport.clone({scale:2*this.scale});c=function renderContinueCallback(t){if(g.renderingQueue.isHighestPriority(g))t();else{g.renderingState=o.RenderingStates.PAUSED;g.resume=function(){g.renderingState=o.RenderingStates.RUNNING;t()}}};d={canvasContext:i,transform:u,viewport:l,optionalContentConfigPromise:this._optionalContentConfigPromise,pageColors:this.pageColors};(p=this.renderTask=t.render(d)).onContinue=c;(v=p.promise.then((function(){return _classPrivateMethodGet(g,h,_finishRenderTask2).call(g,p,a)}),(function(t){return _classPrivateMethodGet(g,h,_finishRenderTask2).call(g,p,a,t)}))).finally((function(){a.width=0;a.height=0;g.eventBus.dispatch("thumbnailrendered",{source:g,pageNumber:g.id,pdfPage:g.pdfPage})}));return y.abrupt("return",v);case 17:case"end":return y.stop()}}),_callee,this)}))),function draw(){return t.apply(this,arguments)})},{key:"setImage",value:function setImage(t){if(this.renderingState===o.RenderingStates.INITIAL){var r=t.thumbnailCanvas,i=t.pdfPage,a=t.scale;if(r){this.pdfPage||this.setPdfPage(i);if(!(a<this.scale)){this.renderingState=o.RenderingStates.FINISHED;this._convertCanvasToImage(r)}}}}},{key:"_reduceImage",value:function _reduceImage(t){var r=this._getPageDrawContext(),i=r.ctx,o=r.canvas;if(t.width<=2*o.width){i.drawImage(t,0,0,t.width,t.height,0,0,o.width,o.height);return o}for(var a=o.width<<3,l=o.height<<3,c=_slicedToArray(u.getCanvas(a,l),2),h=c[0],d=c[1];a>t.width||l>t.height;){a>>=1;l>>=1}d.drawImage(t,0,0,t.width,t.height,0,0,a,l);for(;a>2*o.width;){d.drawImage(h,0,0,a,l,0,0,a>>1,l>>1);a>>=1;l>>=1}i.drawImage(h,0,0,a,l,0,0,o.width,o.height);return o}},{key:"_thumbPageTitle",get:function get(){var t;return this.l10n.get("thumb_page_title",{page:null!==(t=this.pageLabel)&&void 0!==t?t:this.id})}},{key:"_thumbPageCanvas",get:function get(){var t;return this.l10n.get("thumb_page_canvas",{page:null!==(t=this.pageLabel)&&void 0!==t?t:this.id})}},{key:"setPageLabel",value:function setPageLabel(t){var r=this;this.pageLabel="string"==typeof t?t:null;this._thumbPageTitle.then((function(t){r.anchor.title=t}));this.renderingState===o.RenderingStates.FINISHED&&this._thumbPageCanvas.then((function(t){var i;null===(i=r.image)||void 0===i||i.setAttribute("aria-label",t)}))}}]);var t;return PDFThumbnailView}();function _updateDims2(){var t=this.viewport,r=t.width,i=r/t.height;this.canvasWidth=98;this.canvasHeight=this.canvasWidth/i|0;this.scale=this.canvasWidth/r;var o=this.div.style;o.setProperty("--thumbnail-width","".concat(this.canvasWidth,"px"));o.setProperty("--thumbnail-height","".concat(this.canvasHeight,"px"))}function _finishRenderTask2(t,r){return _finishRenderTask3.apply(this,arguments)}function _finishRenderTask3(){_finishRenderTask3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t,r){var i,u=arguments;return _regeneratorRuntime().wrap((function _callee2$(l){for(;;)switch(l.prev=l.next){case 0:i=u.length>2&&void 0!==u[2]?u[2]:null;t===this.renderTask&&(this.renderTask=null);if(!(i instanceof a.RenderingCancelledException)){l.next=4;break}return l.abrupt("return");case 4:this.renderingState=o.RenderingStates.FINISHED;this._convertCanvasToImage(r);if(!i){l.next=8;break}throw i;case 8:this.eventBus.dispatch("thumbnailRendered",this.id);case 9:case"end":return l.stop()}}),_callee2,this)})));return _finishRenderTask3.apply(this,arguments)}},(t,r,i)=>{i(135);i(136);i(188);i(195);i(226);i(175);i(176);i(177);i(178);i(193);i(190);i(198);i(199);i(202);i(203);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PagesCountLimit=r.PDFViewer=r.PDFPageViewBuffer=void 0;i(205);i(206);i(210);i(42);i(88);i(258);i(92);i(260);i(270);i(272);i(274);i(276);i(278);i(280);i(95);i(126);i(222);i(182);i(333);i(138);i(204);i(183);i(185);i(225);i(334);i(335);i(336);i(179);i(142);i(316);i(212);i(254);i(317);i(318);i(246);i(288);i(298);i(1);i(98);i(120);i(327);i(229);var o,a=i(291),u=i(245),l=i(337),c=i(338),h=i(341),d=i(326),p=i(296);function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,o)}return i}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,_toPropertyKey(o.key),o)}}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var v=r.PagesCountLimit={FORCE_SCROLL_MODE_PAGE:15e3,FORCE_LAZY_PAGE_INIT:7500,PAUSE_EAGER_PAGE_INIT:250};function isValidAnnotationEditorMode(t){return Object.values(a.AnnotationEditorType).includes(t)&&t!==a.AnnotationEditorType.DISABLE}var g=new WeakMap,y=new WeakMap,m=new WeakSet;o=Symbol.iterator;var w=r.PDFPageViewBuffer=function(){function PDFPageViewBuffer(t){_classCallCheck(this,PDFPageViewBuffer);_classPrivateMethodInitSpec(this,m);_classPrivateFieldInitSpec(this,g,{writable:!0,value:new Set});_classPrivateFieldInitSpec(this,y,{writable:!0,value:0});_classPrivateFieldSet(this,y,t)}_createClass(PDFPageViewBuffer,[{key:"push",value:function push(t){var r=_classPrivateFieldGet(this,g);r.has(t)&&r.delete(t);r.add(t);r.size>_classPrivateFieldGet(this,y)&&_classPrivateMethodGet(this,m,_destroyFirstView2).call(this)}},{key:"resize",value:function resize(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;_classPrivateFieldSet(this,y,t);var i=_classPrivateFieldGet(this,g);if(r){var o,a=i.size,u=1,l=_createForOfIteratorHelper(i);try{for(l.s();!(o=l.n()).done;){var c=o.value;if(r.has(c.id)){i.delete(c);i.add(c)}if(++u>a)break}}catch(t){l.e(t)}finally{l.f()}}for(;i.size>_classPrivateFieldGet(this,y);)_classPrivateMethodGet(this,m,_destroyFirstView2).call(this)}},{key:"has",value:function has(t){return _classPrivateFieldGet(this,g).has(t)}},{key:o,value:function value(){return _classPrivateFieldGet(this,g).keys()}}]);return PDFPageViewBuffer}();function _destroyFirstView2(){var t=_classPrivateFieldGet(this,g).keys().next().value;null==t||t.destroy();_classPrivateFieldGet(this,g).delete(t)}var b=new WeakMap,D=new WeakMap,P=new WeakMap,E=new WeakMap,A=new WeakMap,S=new WeakMap,x=new WeakMap,C=new WeakMap,k=new WeakMap,T=new WeakMap,I=new WeakMap,L=new WeakMap,O=new WeakMap,M=new WeakMap,B=new WeakMap,G=new WeakMap,R=new WeakMap,N=new WeakMap,j=new WeakSet,V=new WeakSet,W=new WeakSet,H=new WeakSet,U=new WeakSet,z=new WeakSet,K=new WeakSet,Y=new WeakSet,$=new WeakSet,q=new WeakMap,X=new WeakSet,Z=new WeakSet,Q=new WeakSet,J=new WeakSet,ee=new WeakSet,te=new WeakSet;r.PDFViewer=function(){function PDFViewer(t){var r,i,o,c,h,v,g=this;_classCallCheck(this,PDFViewer);_classPrivateMethodInitSpec(this,te);_classPrivateMethodInitSpec(this,ee);_classPrivateMethodInitSpec(this,J);_classPrivateMethodInitSpec(this,Q);_classPrivateMethodInitSpec(this,Z);_classPrivateMethodInitSpec(this,X);_classPrivateFieldInitSpec(this,q,{get:_get_pageWidthScaleFactor,set:void 0});_classPrivateMethodInitSpec(this,$);_classPrivateMethodInitSpec(this,Y);_classPrivateMethodInitSpec(this,K);_classPrivateMethodInitSpec(this,z);_classPrivateMethodInitSpec(this,U);_classPrivateMethodInitSpec(this,H);_classPrivateMethodInitSpec(this,W);_classPrivateMethodInitSpec(this,V);_classPrivateMethodInitSpec(this,j);_classPrivateFieldInitSpec(this,b,{writable:!0,value:null});_classPrivateFieldInitSpec(this,D,{writable:!0,value:a.AnnotationEditorType.NONE});_classPrivateFieldInitSpec(this,P,{writable:!0,value:null});_classPrivateFieldInitSpec(this,E,{writable:!0,value:a.AnnotationMode.ENABLE_FORMS});_classPrivateFieldInitSpec(this,A,{writable:!0,value:null});_classPrivateFieldInitSpec(this,S,{writable:!0,value:null});_classPrivateFieldInitSpec(this,x,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,C,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,k,{writable:!0,value:null});_classPrivateFieldInitSpec(this,T,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,I,{writable:!0,value:0});_classPrivateFieldInitSpec(this,L,{writable:!0,value:new ResizeObserver(_classPrivateMethodGet(this,te,_resizeObserverCallback2).bind(this))});_classPrivateFieldInitSpec(this,O,{writable:!0,value:null});_classPrivateFieldInitSpec(this,M,{writable:!0,value:null});_classPrivateFieldInitSpec(this,B,{writable:!0,value:null});_classPrivateFieldInitSpec(this,G,{writable:!0,value:u.TextLayerMode.ENABLE});_classPrivateFieldInitSpec(this,R,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,N,{writable:!0,value:"multiple"});var y="3.10.557";if(a.version!==y)throw new Error('The API version "'.concat(a.version,'" does not match the Viewer version "').concat(y,'".'));this.container=t.container;this.viewer=t.viewer||t.container.firstElementChild;this.pageViewMode=t.pageViewMode||"multiple";if("DIV"!==(null===(r=this.container)||void 0===r?void 0:r.tagName)||"DIV"!==(null===(i=this.viewer)||void 0===i?void 0:i.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.");_classPrivateFieldGet(this,L).observe(this.container);this.eventBus=t.eventBus;this.linkService=t.linkService||new p.SimpleLinkService;this.downloadManager=t.downloadManager||null;this.findController=t.findController||null;this.findController&&(this.findController.onIsPageVisible=function(t){return g._getVisiblePages().ids.has(t)});this._scriptingManager=t.scriptingManager||null;_classPrivateFieldSet(this,G,null!==(o=t.textLayerMode)&&void 0!==o?o:u.TextLayerMode.ENABLE);_classPrivateFieldSet(this,E,null!==(c=t.annotationMode)&&void 0!==c?c:a.AnnotationMode.ENABLE_FORMS);_classPrivateFieldSet(this,D,null!==(h=t.annotationEditorMode)&&void 0!==h?h:a.AnnotationEditorType.NONE);this.imageResourcesPath=t.imageResourcesPath||"";this.enablePrintAutoRotate=t.enablePrintAutoRotate||!1;this.removePageBorders=t.removePageBorders||!1;if(t.useOnlyCssZoom){console.error("useOnlyCssZoom was removed, please use `maxCanvasPixels = 0` instead.");t.maxCanvasPixels=0}this.isOffscreenCanvasSupported=null===(v=t.isOffscreenCanvasSupported)||void 0===v||v;this.maxCanvasPixels=t.maxCanvasPixels;this.l10n=t.l10n||l.NullL10n;_classPrivateFieldSet(this,x,t.enablePermissions||!1);this.pageColors=t.pageColors||null;this.defaultRenderingQueue=!t.renderingQueue;if(this.defaultRenderingQueue){this.renderingQueue=new d.PDFRenderingQueue;this.renderingQueue.setViewer(this)}else this.renderingQueue=t.renderingQueue;this.scroll=(0,u.watchScroll)(this.container,this._scrollUpdate.bind(this));this.presentationModeState=u.PresentationModeState.UNKNOWN;this._onBeforeDraw=this._onAfterDraw=null;this._resetView();this.removePageBorders&&this.viewer.classList.add("removePageBorders");_classPrivateMethodGet(this,ee,_updateContainerHeightCss2).call(this);this.eventBus._on("thumbnailrendered",(function(t){var r=t.pageNumber,i=t.pdfPage,o=g._pages[r-1];_classPrivateFieldGet(g,b).has(o)||null==i||i.cleanup()}))}_createClass(PDFViewer,[{key:"pageViewMode",get:function get(){return _classPrivateFieldGet(this,N)},set:function set(t){if(_classPrivateFieldGet(this,N)!==t){_classPrivateFieldSet(this,N,t);if(!_classPrivateFieldGet(this,R)&&"infinite-scroll"===t){_classPrivateFieldSet(this,R,_classPrivateMethodGet(this,j,_findParentWithScrollbar2).call(this,this.container.offsetParent));_classPrivateFieldGet(this,R)&&(0,u.watchScroll)(_classPrivateFieldGet(this,R),this._scrollUpdate.bind(this))}}}},{key:"pagesCount",get:function get(){return this._pages.length}},{key:"getPageView",value:function getPageView(t){return this._pages[t]}},{key:"getCachedPageViews",value:function getCachedPageViews(){return new Set(_classPrivateFieldGet(this,b))}},{key:"pageViewsReady",get:function get(){return this._pagesCapability.settled&&this._pages.every((function(t){return null==t?void 0:t.pdfPage}))}},{key:"renderForms",get:function get(){return _classPrivateFieldGet(this,E)===a.AnnotationMode.ENABLE_FORMS}},{key:"enableScripting",get:function get(){return!!this._scriptingManager}},{key:"currentPageNumber",get:function get(){return this._currentPageNumber},set:function set(t){if(!Number.isInteger(t))throw new Error("Invalid page number.");if(this.pdfDocument){var r=Math.abs(this._currentPageNumber-t)<=2;this._setCurrentPageNumber(t,!0)||globalThis.ngxConsole.error('currentPageNumber: "'.concat(t,'" is not a valid page.'));this.pageFlip&&(r?this.pageFlip.flip(t-1):this.pageFlip.turnToPage(t-1))}}},{key:"hidePagesDependingOnpageViewMode",value:function hidePagesDependingOnpageViewMode(){var t=this;"book"===this.pageViewMode&&(this.pageFlip||setTimeout((function(){if(!t.pageFlip){var r=t._pages[0].div,i=r.parentElement,o=i.parentElement;o.style.width=2*r.clientWidth+"px";o.style.overflow="hidden";o.style.marginLeft="auto";o.style.marginRight="auto";t.pageFlip=new c.PageFlip(i,{width:r.clientWidth,height:r.clientHeight,showCover:!0,size:"fixed"});t.pageFlip.loadFromHTML(document.querySelectorAll(".page"));t.ensureAdjecentPagesAreLoaded();t.pageFlip.on("flip",(function(r){t._currentPageNumber!==r.data+1&&t._setCurrentPageNumber(r.data+1,!1)}))}}),100))}},{key:"_setCurrentPageNumber",value:function _setCurrentPageNumber(t){var r,i,o=this,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._currentPageNumber===t){a&&_classPrivateMethodGet(this,Z,_resetCurrentPageView2).call(this);return!0}if(!(0<t&&t<=this.pagesCount))return!1;var u=this._currentPageNumber;this._currentPageNumber=t;this.hidePagesDependingOnpageViewMode();if("book"===this.pageViewMode||"infinite-scroll"===this.pageViewMode){var l=this._pages[this.currentPageNumber-1];if(l.div.parentElement.classList.contains("spread"))l.div.parentElement.childNodes.forEach((function(t){var r=Number(t.getAttribute("data-page-number")),i=o._pages[r-1];_classPrivateMethodGet(o,Q,_ensurePdfPageLoaded2).call(o,i).then((function(){o.renderingQueue.renderView(i)}));t.style.display="inline-block"}));else{_classPrivateMethodGet(this,Q,_ensurePdfPageLoaded2).call(this,l).then((function(){o.renderingQueue.renderView(l)}));"book"===this.pageViewMode&&this.ensureAdjecentPagesAreLoaded()}}this.eventBus.dispatch("pagechanging",{source:this,pageNumber:t,pageLabel:null!==(r=null===(i=this._pageLabels)||void 0===i?void 0:i[t-1])&&void 0!==r?r:null,previous:u});a&&_classPrivateMethodGet(this,Z,_resetCurrentPageView2).call(this);return!0}},{key:"addPageToRenderQueue",value:function addPageToRenderQueue(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(r>=0&&r<=this._pages.length-1){var i=this._pages[r];if(i.renderingState===u.RenderingStates.INITIAL){_classPrivateMethodGet(this,Q,_ensurePdfPageLoaded2).call(this,i).then((function(){t.renderingQueue.renderView(i)}));return!0}}return!1}},{key:"ensureAdjecentPagesAreLoaded",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,i,o,a,u,l=this;return _regeneratorRuntime().wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:t=0,r=[0,1,-1,2,-2];case 2:if(!(t<r.length)){c.next=12;break}i=r[t];if(!((o=this.currentPageNumber+i)>=0&&o<this._pages.length)){c.next=9;break}a=this._pages[o];c.next=9;return _classPrivateMethodGet(this,Q,_ensurePdfPageLoaded2).call(this,a);case 9:t++;c.next=2;break;case 12:u=function loader(){return l.adjacentPagesLoader(loader)};this.eventBus._on("pagerendered",u);this.eventBus._on("thumbnailRendered",u);case 15:case"end":return c.stop()}}),_callee,this)}))),function ensureAdjecentPagesAreLoaded(){return r.apply(this,arguments)})},{key:"adjacentPagesLoader",value:function adjacentPagesLoader(t){var r=this._pages.some((function(t){return t.renderingState===u.RenderingStates.RUNNING}));if(!r){var i=this._pages.find((function(t){return t.renderingState===u.RenderingStates.PAUSED}));if(i)this.renderingQueue.renderView(i);else{for(var o=0,a=[0,1,-1,2,-2];o<a.length;o++){var l=a[o],c=this.currentPageNumber+l;if(c>=0&&c<this._pages.length){var h=this._pages[c];if(h.renderingState===u.RenderingStates.INITIAL){this.renderingQueue.renderView(h);return}}}this.eventBus._off("pagerendered",t);this.eventBus._off("thumbnailRendered",t)}}}},{key:"currentPageLabel",get:function get(){var t,r;return null!==(t=null===(r=this._pageLabels)||void 0===r?void 0:r[this._currentPageNumber-1])&&void 0!==t?t:null},set:function set(t){if(this.pdfDocument){var r=0|t;if(this._pageLabels){var i=this._pageLabels.indexOf(t);i>=0&&(r=i+1)}this._setCurrentPageNumber(r,!0)||globalThis.ngxConsole.error('currentPageLabel: "'.concat(t,'" is not a valid page.'))}}},{key:"currentScale",get:function get(){return this._currentScale!==u.UNKNOWN_SCALE?this._currentScale:u.DEFAULT_SCALE},set:function set(t){if(isNaN(t))throw new Error("Invalid numeric scale.");this.pdfDocument&&_classPrivateMethodGet(this,X,_setScale2).call(this,t,{noScroll:!1})}},{key:"currentScaleValue",get:function get(){return this._currentScaleValue},set:function set(t){this.pdfDocument&&_classPrivateMethodGet(this,X,_setScale2).call(this,t,{noScroll:!1})}},{key:"pagesRotation",get:function get(){return this._pagesRotation},set:function set(t){if(!(0,u.isValidRotation)(t))throw new Error("Invalid pages rotation angle.");if(this.pdfDocument){(t%=360)<0&&(t+=360);if(this._pagesRotation!==t){this._pagesRotation=t;var r=this._currentPageNumber;this.refresh(!0,{rotation:t});this._currentScaleValue&&_classPrivateMethodGet(this,X,_setScale2).call(this,this._currentScaleValue,{noScroll:!0});this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:t,pageNumber:r});this.defaultRenderingQueue&&this.update()}}}},{key:"firstPagePromise",get:function get(){return this.pdfDocument?this._firstPageCapability.promise:null}},{key:"onePageRendered",get:function get(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}},{key:"pagesPromise",get:function get(){return this.pdfDocument?this._pagesCapability.promise:null}},{key:"getAllText",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r,i,o,a,l,c,h,d,p;return _regeneratorRuntime().wrap((function _callee2$(v){for(;;)switch(v.prev=v.next){case 0:t=[];r=[];i=1,o=this.pdfDocument.numPages;case 3:if(!(i<=o)){v.next=20;break}if(!_classPrivateFieldGet(this,T)){v.next=6;break}return v.abrupt("return",null);case 6:r.length=0;v.next=9;return this.pdfDocument.getPage(i);case 9:a=v.sent;v.next=12;return a.getTextContent();case 12:l=v.sent;c=l.items;h=_createForOfIteratorHelper(c);try{for(h.s();!(d=h.n()).done;){(p=d.value).str&&r.push(p.str);p.hasEOL&&r.push("\n")}}catch(t){h.e(t)}finally{h.f()}t.push((0,u.removeNullCharacters)(r.join("")));case 17:++i;v.next=3;break;case 20:return v.abrupt("return",t.join("\n"));case 21:case"end":return v.stop()}}),_callee2,this)}))),function getAllText(){return t.apply(this,arguments)})},{key:"setDocument",value:function setDocument(t){var r=this;if(this.pdfDocument){var i,o;this.eventBus.dispatch("pagesdestroy",{source:this});this._cancelRendering();this._resetView();null===(i=this.findController)||void 0===i||i.setDocument(null);null===(o=this._scriptingManager)||void 0===o||o.setDocument(null);if(_classPrivateFieldGet(this,P)){_classPrivateFieldGet(this,P).destroy();_classPrivateFieldSet(this,P,null)}}this.pdfDocument=t;if(t){var l=t.numPages,c=t.getPage(1),d=t.getOptionalContentConfig(),p=_classPrivateFieldGet(this,x)?t.getPermissions():Promise.resolve();if(l>v.FORCE_SCROLL_MODE_PAGE){console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document.");var g=this._scrollMode=u.ScrollMode.PAGE;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:g})}this._pagesCapability.promise.then((function(){r.eventBus.dispatch("pagesloaded",{source:r,pagesCount:l})}),(function(){}));this._onBeforeDraw=function(t){var i=r._pages[t.pageNumber-1];i&&_classPrivateFieldGet(r,b).push(i)};this.eventBus._on("pagerender",this._onBeforeDraw);this._onAfterDraw=function(t){if(!t.cssTransform&&!r._onePageRenderedCapability.settled){r._onePageRenderedCapability.resolve({timestamp:t.timestamp});r.eventBus._off("pagerendered",r._onAfterDraw);r._onAfterDraw=null;if(_classPrivateFieldGet(r,M)){document.removeEventListener("visibilitychange",_classPrivateFieldGet(r,M));_classPrivateFieldSet(r,M,null)}}};this.eventBus._on("pagerendered",this._onAfterDraw);Promise.all([c,p]).then((function(i){var o,c,p=_slicedToArray(i,2),g=p[0],y=p[1];if(t===r.pdfDocument){r._firstPageCapability.resolve(g);r._optionalContentConfigPromise=d;var m=_classPrivateMethodGet(r,W,_initializePermissions2).call(r,y),w=m.annotationEditorMode,b=m.annotationMode,E=m.textLayerMode;if(E!==u.TextLayerMode.DISABLE){var A=_classPrivateFieldSet(r,k,document.createElement("div"));A.id="hiddenCopyElement";r.viewer.before(A)}if(w!==a.AnnotationEditorType.DISABLE){var x=w;if(t.isPureXfa)console.warn("Warning: XFA-editing is not implemented.");else if(isValidAnnotationEditorMode(x)){_classPrivateFieldSet(r,P,new a.AnnotationEditorUIManager(r.container,r.viewer,r.eventBus,t,r.pageColors));x!==a.AnnotationEditorType.NONE&&_classPrivateFieldGet(r,P).updateMode(x)}else console.error("Invalid AnnotationEditor mode: ".concat(x))}var C=_classPrivateMethodGet(r,V,_layerProperties2).bind(r),T=r._scrollMode===u.ScrollMode.PAGE?null:r.viewer,I=r.currentScale,L=g.getViewport({scale:I*a.PixelsPerInch.PDF_TO_CSS_UNITS});r.viewer.style.setProperty("--scale-factor",L.scale);"CanvasText"!==(null===(o=r.pageColors)||void 0===o?void 0:o.foreground)&&"Canvas"!==(null===(c=r.pageColors)||void 0===c?void 0:c.background)||r.viewer.style.setProperty("--hcm-highligh-filter",t.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"));for(var O=1;O<=l;++O){var M=new h.PDFPageView({container:T,eventBus:r.eventBus,id:O,scale:I,defaultViewport:L.clone(),optionalContentConfigPromise:d,renderingQueue:r.renderingQueue,textLayerMode:E,annotationMode:b,imageResourcesPath:r.imageResourcesPath,removePageBorders:r.removePageBorders,useOnlyCssZoom:r.useOnlyCssZoom,isOffscreenCanvasSupported:r.isOffscreenCanvasSupported,maxCanvasPixels:r.maxCanvasPixels,pageColors:r.pageColors,l10n:r.l10n,layerProperties:C});r._pages.push(M)}var B=r._pages[0];if(B){B.setPdfPage(g);r.linkService.cachePageRef(1,g.ref)}r._scrollMode===u.ScrollMode.PAGE?_classPrivateMethodGet(r,z,_ensurePageViewVisible2).call(r):r._spreadMode!==u.SpreadMode.NONE&&r._updateSpreadMode();_classPrivateMethodGet(r,H,_onePageRenderedOrForceFetch2).call(r).then(_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var i,o,a,u,c;return _regeneratorRuntime().wrap((function _callee3$(h){for(;;)switch(h.prev=h.next){case 0:null===(i=r.findController)||void 0===i||i.setDocument(t);null===(o=r._scriptingManager)||void 0===o||o.setDocument(t);if(_classPrivateFieldGet(r,k)){_classPrivateFieldSet(r,S,_classPrivateMethodGet(r,U,_copyCallback2).bind(r,E));document.addEventListener("copy",_classPrivateFieldGet(r,S))}_classPrivateFieldGet(r,P)&&r.eventBus.dispatch("annotationeditormodechanged",{source:r,mode:_classPrivateFieldGet(r,D)});if(!(t.loadingParams.disableAutoFetch||l>v.FORCE_LAZY_PAGE_INIT)){h.next=7;break}r._pagesCapability.resolve();return h.abrupt("return");case 7:if(!((a=l-1)<=0)){h.next=11;break}r._pagesCapability.resolve();return h.abrupt("return");case 11:u=_regeneratorRuntime().mark((function _loop(i){var o;return _regeneratorRuntime().wrap((function _loop$(u){for(;;)switch(u.prev=u.next){case 0:o=t.getPage(i).then((function(t){var o=r._pages[i-1];o.pdfPage||o.setPdfPage(t);r.linkService.cachePageRef(i,t.ref);0==--a&&r._pagesCapability.resolve()}),(function(t){console.error("Unable to get page ".concat(i," to initialize viewer"),t);0==--a&&r._pagesCapability.resolve()}));if(i%v.PAUSE_EAGER_PAGE_INIT!=0){u.next=4;break}u.next=4;return o;case 4:case"end":return u.stop()}}),_loop)}));c=2;case 13:if(!(c<=l)){h.next=18;break}return h.delegateYield(u(c),"t0",15);case 15:++c;h.next=13;break;case 18:case"end":return h.stop()}}),_callee3)}))));r.hidePagesDependingOnpageViewMode();r.eventBus.dispatch("pagesinit",{source:r});t.getMetadata().then((function(i){var o=i.info;t===r.pdfDocument&&o.Language&&(r.viewer.lang=o.Language)}));r.defaultRenderingQueue&&r.update()}})).catch((function(t){globalThis.ngxConsole.error("Unable to initialize viewer",t);r._pagesCapability.reject(t)}))}}},{key:"setPageLabels",value:function setPageLabels(t){if(this.pdfDocument){if(t)if(Array.isArray(t)&&this.pdfDocument.numPages===t.length)this._pageLabels=t;else{this._pageLabels=null;globalThis.ngxConsole.error("setPageLabels: Invalid page labels.")}else this._pageLabels=null;for(var r=0,i=this._pages.length;r<i;r++){var o,a;this._pages[r].setPageLabel(null!==(o=null===(a=this._pageLabels)||void 0===a?void 0:a[r])&&void 0!==o?o:null)}}}},{key:"_resetView",value:function _resetView(){this._pages=[];this._currentPageNumber=1;this._currentScale=u.UNKNOWN_SCALE;this._currentScaleValue=null;this._pageLabels=null;var t=Number(PDFViewerApplicationOptions.get("defaultCacheSize"))||10;_classPrivateFieldSet(this,b,new w(t));this._location=null;this._pagesRotation=0;this._optionalContentConfigPromise=null;this._firstPageCapability=new a.PromiseCapability;this._onePageRenderedCapability=new a.PromiseCapability;this._pagesCapability=new a.PromiseCapability;this._scrollMode=u.ScrollMode.VERTICAL;this._previousScrollMode=u.ScrollMode.UNKNOWN;this._spreadMode=u.SpreadMode.NONE;_classPrivateFieldSet(this,O,{previousPageNumber:1,scrollDown:!0,pages:[]});if(this._onBeforeDraw){this.eventBus._off("pagerender",this._onBeforeDraw);this._onBeforeDraw=null}if(this._onAfterDraw){this.eventBus._off("pagerendered",this._onAfterDraw);this._onAfterDraw=null}if(_classPrivateFieldGet(this,M)){document.removeEventListener("visibilitychange",_classPrivateFieldGet(this,M));_classPrivateFieldSet(this,M,null)}this.viewer.textContent="";this._updateScrollMode();this.viewer.removeAttribute("lang");if(_classPrivateFieldGet(this,k)){document.removeEventListener("copy",_classPrivateFieldGet(this,S));_classPrivateFieldSet(this,S,null);_classPrivateFieldGet(this,k).remove();_classPrivateFieldSet(this,k,null)}}},{key:"_scrollUpdate",value:function _scrollUpdate(){0!==this.pagesCount&&this.update()}},{key:"scrollPagePosIntoView",value:function scrollPagePosIntoView(t,r){var i=this._pages[t-1].div;if(r){var o=function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}({},r);if("string"==typeof o.top&&o.top.endsWith("%")){var a,u=Number(o.top.replace("%","")),l=null===(a=this.viewer.querySelector(".page"))||void 0===a?void 0:a.clientHeight,c=i.clientHeight?i.clientHeight:l,h=this.viewer.parentElement.clientHeight;c=Math.max(0,c-h);o.top=u*c/100}if("string"==typeof o.left&&o.left.endsWith("%")){var d,p=Number(o.left.replace("%","")),v=null===(d=this.viewer.querySelector(".page"))||void 0===d?void 0:d.clientWidth,g=i.clientWidth?i.clientWidth:v;o.left=p*g/100}_classPrivateMethodGet(this,K,_scrollIntoView2).call(this,{div:i,id:t},o)}else _classPrivateMethodGet(this,K,_scrollIntoView2).call(this,{pageDiv:i,pageNumber:t})}},{key:"pageLabelToPageNumber",value:function pageLabelToPageNumber(t){if(!this._pageLabels)return null;var r=this._pageLabels.indexOf(t);return r<0?null:r+1}},{key:"scrollPageIntoView",value:function scrollPageIntoView(t){var r=this,i=t.pageNumber,o=t.destArray,l=void 0===o?null:o,c=t.allowNegativeOffset,h=void 0!==c&&c,d=t.ignoreDestinationZoom,p=void 0!==d&&d;if(this.pdfDocument){var v=Number.isInteger(i)&&this._pages[i-1];if(v)if(!this.isInPresentationMode&&l){var g,y,m=0,w=0,b=0,D=0,P=v.rotation%180!=0,E=(P?v.height:v.width)/v.scale/a.PixelsPerInch.PDF_TO_CSS_UNITS,A=(P?v.width:v.height)/v.scale/a.PixelsPerInch.PDF_TO_CSS_UNITS,S=0;switch(l[1].name){case"XYZ":m=l[2];w=l[3];S=l[4];m=null!==m?m:0;w=null!==w?w:A;break;case"Fit":case"FitB":S="page-fit";break;case"FitH":case"FitBH":S="page-width";if(null===(w=l[2])&&this._location){m=this._location.left;w=this._location.top}else("number"!=typeof w||w<0)&&(w=A);break;case"FitV":case"FitBV":m=l[2];b=E;D=A;S="page-height";break;case"FitR":m=l[2];w=l[3];b=l[4]-m;D=l[5]-w;var x=u.SCROLLBAR_PADDING,C=u.VERTICAL_PADDING;this.removePageBorders&&(x=C=0);g=(this.container.clientWidth-x)/b/a.PixelsPerInch.PDF_TO_CSS_UNITS;y=(this.container.clientHeight-C)/D/a.PixelsPerInch.PDF_TO_CSS_UNITS;S=Math.min(Math.abs(g),Math.abs(y));break;default:console.error('scrollPageIntoView: "'.concat(l[1].name,'" is not a valid destination type.'));return}p||(S&&S!==this._currentScale?this.currentScaleValue=S:this._currentScale===u.UNKNOWN_SCALE&&(this.currentScaleValue=u.DEFAULT_SCALE_VALUE));_classPrivateMethodGet(this,Q,_ensurePdfPageLoaded2).call(this,v).then((function(){r.renderingQueue.renderView(v);"single"===r.pageViewMode&&r.currentPageNumber!==i&&(r.currentPageNumber=i)}));if("page-fit"!==S||l[4]){var k=[v.viewport.convertToViewportPoint(m,w),v.viewport.convertToViewportPoint(m+b,w+D)],T=Math.min(k[0][0],k[1][0]),I=Math.min(k[0][1],k[1][1]);if(!h){T=Math.max(T,0);I=Math.max(I,0)}_classPrivateMethodGet(this,K,_scrollIntoView2).call(this,v,{left:T,top:I})}else _classPrivateMethodGet(this,K,_scrollIntoView2).call(this,v)}else this._setCurrentPageNumber(i,!0);else console.error('scrollPageIntoView: "'.concat(i,'" is not a valid pageNumber parameter.'))}}},{key:"_updateLocation",value:function _updateLocation(t){var r=this._currentScale,i=this._currentScaleValue,o=parseFloat(i)===r?Math.round(1e4*r)/100:i,a=t.id,u=this._pages[a-1],l=this.container,c=u.getPagePoint(l.scrollLeft-t.x,l.scrollTop-t.y),h=Math.round(c[0]),d=Math.round(c[1]),p="#page=".concat(a);this.isInPresentationMode||(p+="&zoom=".concat(o,",").concat(h,",").concat(d));this._location={pageNumber:a,scale:o,top:d,left:h,rotation:this._pagesRotation,pdfOpenParams:p}}},{key:"update",value:function update(){this.scrollMode===u.ScrollMode.PAGE?this.viewer.classList.add("singlePageView"):this.viewer.classList.remove("singlePageView");var t=this._getVisiblePages(),r=t.views,i=r.length;if(0!==i){var o=Number(PDFViewerApplicationOptions.get("defaultCacheSize"))||10,a=Math.max(o,2*i+1);_classPrivateFieldGet(this,b).resize(a,t.ids);this.renderingQueue.renderHighestPriority(t);var l,c=this._spreadMode===u.SpreadMode.NONE&&(this._scrollMode===u.ScrollMode.PAGE||this._scrollMode===u.ScrollMode.VERTICAL),h=this._currentPageNumber,d=!1,p=_createForOfIteratorHelper(r);try{for(p.s();!(l=p.n()).done;){var v=l.value;if(v.percent<100)break;if(v.id===h&&c){d=!0;break}}}catch(t){p.e(t)}finally{p.f()}if(this.scrollMode!==u.ScrollMode.PAGE){this._setCurrentPageNumber(d?h:r[0].id);this._updateLocation(t.first);this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}this.hidePagesDependingOnpageViewMode()}}},{key:"containsElement",value:function containsElement(t){return this.container.contains(t)}},{key:"focus",value:function focus(){this.container.focus()}},{key:"_isContainerRtl",get:function get(){return"rtl"===getComputedStyle(this.container).direction}},{key:"isInPresentationMode",get:function get(){return this.presentationModeState===u.PresentationModeState.FULLSCREEN}},{key:"isChangingPresentationMode",get:function get(){return this.presentationModeState===u.PresentationModeState.CHANGING}},{key:"isHorizontalScrollbarEnabled",get:function get(){return!this.isInPresentationMode&&this.container.scrollWidth>this.container.clientWidth}},{key:"isVerticalScrollbarEnabled",get:function get(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}},{key:"_getVisiblePages",value:function _getVisiblePages(){var t=this._scrollMode===u.ScrollMode.PAGE?_classPrivateFieldGet(this,O).pages:this._pages,r=this._scrollMode===u.ScrollMode.HORIZONTAL,i=r&&this._isContainerRtl;return(0,u.getVisibleElements)({scrollEl:this.container,views:t,sortByVisibility:!0,horizontal:r,rtl:i})}},{key:"cleanup",value:function cleanup(){var t,r=_createForOfIteratorHelper(this._pages);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.renderingState!==u.RenderingStates.FINISHED&&i.reset()}}catch(t){r.e(t)}finally{r.f()}}},{key:"_cancelRendering",value:function _cancelRendering(){var t,r=_createForOfIteratorHelper(this._pages);try{for(r.s();!(t=r.n()).done;){t.value.cancelRendering()}}catch(t){r.e(t)}finally{r.f()}}},{key:"forceRendering",value:function forceRendering(t){var r=this,i=t||this._getVisiblePages(),o=_classPrivateMethodGet(this,J,_getScrollAhead2).call(this,i),a=this._spreadMode!==u.SpreadMode.NONE&&this._scrollMode!==u.ScrollMode.HORIZONTAL,l=this.renderingQueue.getHighestPriority(i,this._pages,o,a);if(l){_classPrivateMethodGet(this,Q,_ensurePdfPageLoaded2).call(this,l).then((function(){r.renderingQueue.renderView(l)}));return!0}return!1}},{key:"hasEqualPageSizes",get:function get(){for(var t=this._pages[0],r=1,i=this._pages.length;r<i;++r){var o=this._pages[r];if(o.width!==t.width||o.height!==t.height)return!1}return!0}},{key:"getPagesOverview",value:function getPagesOverview(){var t,r=this;return this._pages.map((function(i){var o=i.pdfPage.getViewport({scale:1}),a=(0,u.isPortraitOrientation)(o);if(void 0===t)t=a;else if(r.enablePrintAutoRotate&&a!==t)return{width:o.height,height:o.width,rotation:(o.rotation-90)%360};return{width:o.width,height:o.height,rotation:o.rotation}}))}},{key:"optionalContentConfigPromise",get:function get(){if(!this.pdfDocument)return Promise.resolve(null);if(!this._optionalContentConfigPromise){console.error("optionalContentConfigPromise: Not initialized yet.");return this.pdfDocument.getOptionalContentConfig()}return this._optionalContentConfigPromise},set:function set(t){if(!(t instanceof Promise))throw new Error("Invalid optionalContentConfigPromise: ".concat(t));if(this.pdfDocument&&this._optionalContentConfigPromise){this._optionalContentConfigPromise=t;this.refresh(!1,{optionalContentConfigPromise:t});this.eventBus.dispatch("optionalcontentconfigchanged",{source:this,promise:t})}}},{key:"scrollMode",get:function get(){return this._scrollMode},set:function set(t){if(this._scrollMode!==t){if(!(0,u.isValidScrollMode)(t))throw new Error("Invalid scroll mode: ".concat(t));if(!(this.pagesCount>v.FORCE_SCROLL_MODE_PAGE)){this._previousScrollMode=this._scrollMode;this._scrollMode=t;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:t});this._updateScrollMode(this._currentPageNumber)}}}},{key:"_updateScrollMode",value:function _updateScrollMode(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=this._scrollMode,i=this.viewer;i.classList.toggle("scrollHorizontal",r===u.ScrollMode.HORIZONTAL);i.classList.toggle("scrollWrapped",r===u.ScrollMode.WRAPPED);if(this.pdfDocument&&t){r===u.ScrollMode.PAGE?_classPrivateMethodGet(this,z,_ensurePageViewVisible2).call(this):this._previousScrollMode===u.ScrollMode.PAGE&&this._updateSpreadMode();this._currentScaleValue&&isNaN(this._currentScaleValue)&&_classPrivateMethodGet(this,X,_setScale2).call(this,this._currentScaleValue,{noScroll:!0});this._setCurrentPageNumber(t,!0);this.update()}}},{key:"spreadMode",get:function get(){return this._spreadMode},set:function set(t){if(this._spreadMode!==t){if(!(0,u.isValidSpreadMode)(t))throw new Error("Invalid spread mode: ".concat(t));this._spreadMode=t;this.eventBus.dispatch("spreadmodechanged",{source:this,mode:t});this._updateSpreadMode(this._currentPageNumber)}}},{key:"_updateSpreadMode",value:function _updateSpreadMode(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.pdfDocument){var r=this.viewer,i=this._pages;if(this._scrollMode===u.ScrollMode.PAGE)_classPrivateMethodGet(this,z,_ensurePageViewVisible2).call(this);else{r.textContent="";if(this._spreadMode===u.SpreadMode.NONE){var o,a=_createForOfIteratorHelper(this._pages);try{for(a.s();!(o=a.n()).done;){var l=o.value;r.append(l.div)}}catch(t){a.e(t)}finally{a.f()}}else for(var c=this._spreadMode-1,h=null,d=0,p=i.length;d<p;++d){if(null===h){(h=document.createElement("div")).className="spread";r.append(h)}else if(d%2===c){h=h.cloneNode(!1);r.append(h)}h.append(i[d].div)}}this.hidePagesDependingOnpageViewMode();if(t){this._currentScaleValue&&isNaN(this._currentScaleValue)&&_classPrivateMethodGet(this,X,_setScale2).call(this,this._currentScaleValue,{noScroll:!0});this._setCurrentPageNumber(t,!0);this.update()}}}},{key:"_getPageAdvance",value:function _getPageAdvance(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("book"===this.pageViewMode)return 2;switch(this._scrollMode){case u.ScrollMode.WRAPPED:var i,o=this._getVisiblePages().views,a=new Map,l=_createForOfIteratorHelper(o);try{for(l.s();!(i=l.n()).done;){var c=i.value,h=c.id,d=c.y,p=c.percent,v=c.widthPercent;if(!(0===p||v<100)){var g=a.get(d);g||a.set(d,g||(g=[]));g.push(h)}}}catch(t){l.e(t)}finally{l.f()}var y,m=_createForOfIteratorHelper(a.values());try{for(m.s();!(y=m.n()).done;){var w=y.value,b=w.indexOf(t);if(-1!==b){var D=w.length;if(1===D)break;if(r)for(var P=b-1;P>=0;P--){var E=w[P],A=w[P+1]-1;if(E<A)return t-A}else for(var S=b+1,x=D;S<x;S++){var C=w[S],k=w[S-1]+1;if(C>k)return k-t}if(r){var T=w[0];if(T<t)return t-T+1}else{var I=w[D-1];if(I>t)return I-t+1}break}}}catch(t){m.e(t)}finally{m.f()}break;case u.ScrollMode.HORIZONTAL:break;case u.ScrollMode.PAGE:case u.ScrollMode.VERTICAL:if(this._spreadMode===u.SpreadMode.NONE)break;var L=this._spreadMode-1;if(r&&t%2!==L)break;if(!r&&t%2===L)break;var O,M=r?t-1:t+1,B=_createForOfIteratorHelper(this._getVisiblePages().views);try{for(B.s();!(O=B.n()).done;){var G=O.value,R=G.id,N=G.percent,j=G.widthPercent;if(R===M){if(N>0&&100===j)return 2;break}}}catch(t){B.e(t)}finally{B.f()}}return 1}},{key:"nextPage",value:function nextPage(){var t=this._currentPageNumber,r=this.pagesCount;if(t>=r)return!1;var i=this._getPageAdvance(t,!1)||1;this.currentPageNumber=Math.min(t+i,r);return!0}},{key:"previousPage",value:function previousPage(){var t=this._currentPageNumber;if(t<=1)return!1;var r=this._getPageAdvance(t,!0)||1;this.currentPageNumber=Math.max(t-r,1);return!0}},{key:"increaseScale",value:function increaseScale(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.drawingDelay,i=t.scaleFactor,o=t.steps;if(this.pdfDocument){var a=this._currentScale;if(i>1)a=Math.round(a*i*100)/100;else{var l;null!==(l=o)&&void 0!==l||(o=1);do{a=Math.ceil(10*(a*u.DEFAULT_SCALE_DELTA).toFixed(2))/10}while(--o>0&&a<u.MAX_SCALE)}var c=Number(PDFViewerApplicationOptions.get("maxZoom"));c||(c=u.MAX_SCALE);_classPrivateMethodGet(this,X,_setScale2).call(this,Math.min(c,a),{noScroll:!1,drawingDelay:r})}}},{key:"decreaseScale",value:function decreaseScale(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.drawingDelay,i=t.scaleFactor,o=t.steps;if(this.pdfDocument){var a=this._currentScale;if(i>0&&i<1)a=Math.round(a*i*100)/100;else{var l;null!==(l=o)&&void 0!==l||(o=1);do{a=Math.floor(10*(a/u.DEFAULT_SCALE_DELTA).toFixed(2))/10}while(--o>0&&a>u.MIN_SCALE)}var c=Number(PDFViewerApplicationOptions.get("minZoom"));c||(c=u.MIN_SCALE);_classPrivateMethodGet(this,X,_setScale2).call(this,Math.max(c,a),{noScroll:!1,drawingDelay:r})}}},{key:"containerTopLeft",get:function get(){return _classPrivateFieldGet(this,A)||_classPrivateFieldSet(this,A,[this.container.offsetTop,this.container.offsetLeft])}},{key:"annotationEditorMode",get:function get(){return _classPrivateFieldGet(this,P)?_classPrivateFieldGet(this,D):a.AnnotationEditorType.DISABLE},set:function set(t){var r=t.mode,i=t.editId,o=void 0===i?null:i;if(!_classPrivateFieldGet(this,P))throw new Error("The AnnotationEditor is not enabled.");if(_classPrivateFieldGet(this,D)!==r){if(!isValidAnnotationEditorMode(r))throw new Error("Invalid AnnotationEditor mode: ".concat(r));if(this.pdfDocument){_classPrivateFieldSet(this,D,r);this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:r});_classPrivateFieldGet(this,P).updateMode(r,o)}}}},{key:"annotationEditorParams",set:function set(t){var r=t.type,i=t.value;if(!_classPrivateFieldGet(this,P))throw new Error("The AnnotationEditor is not enabled.");_classPrivateFieldGet(this,P).updateParams(r,i)}},{key:"refresh",value:function refresh(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.create(null);if(this.pdfDocument){var i,o=_createForOfIteratorHelper(this._pages);try{for(o.s();!(i=o.n()).done;){i.value.update(r)}}catch(t){o.e(t)}finally{o.f()}if(null!==_classPrivateFieldGet(this,B)){clearTimeout(_classPrivateFieldGet(this,B));_classPrivateFieldSet(this,B,null)}t||this.update()}}},{key:"getSerializedAnnotations",value:function getSerializedAnnotations(){var t=this.pdfDocument.annotationStorage.getAll();if(t){return Object.values(t).map((function(t){return t.serialize()}))}return null}},{key:"addEditorAnnotation",value:function addEditorAnnotation(t){Array.isArray(t)||(t=[t]);_classPrivateFieldGet(this,P).addSerializedEditor(t,!0,!0,!1)}},{key:"removeEditorAnnotations",value:function removeEditorAnnotations(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};_classPrivateFieldGet(this,P).removeEditors(t)}},{key:"destroyBookMode",value:function destroyBookMode(){if(this.pageFlip){this.pageFlip.destroy();this.pageFlip=null}}},{key:"stopRendering",value:function stopRendering(){this._cancelRendering()}}]);var t,r;return PDFViewer}();function _findParentWithScrollbar2(t){for(;t;){if(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.parentElement}return null}function _layerProperties2(){var t=this;return{get annotationEditorUIManager(){return _classPrivateFieldGet(t,P)},get annotationStorage(){var r;return null===(r=t.pdfDocument)||void 0===r?void 0:r.annotationStorage},get downloadManager(){return t.downloadManager},get enableScripting(){return!!t._scriptingManager},get fieldObjectsPromise(){var r;return null===(r=t.pdfDocument)||void 0===r?void 0:r.getFieldObjects()},get findController(){return t.findController},get hasJSActionsPromise(){var r;return null===(r=t.pdfDocument)||void 0===r?void 0:r.hasJSActions()},get linkService(){return t.linkService}}}function _initializePermissions2(t){var r={annotationEditorMode:_classPrivateFieldGet(this,D),annotationMode:_classPrivateFieldGet(this,E),textLayerMode:_classPrivateFieldGet(this,G)};if(!t)return r;t.includes(a.PermissionFlag.COPY)||_classPrivateFieldGet(this,G)!==u.TextLayerMode.ENABLE||(r.textLayerMode=u.TextLayerMode.ENABLE_PERMISSIONS);t.includes(a.PermissionFlag.MODIFY_CONTENTS)||(r.annotationEditorMode=a.AnnotationEditorType.DISABLE);t.includes(a.PermissionFlag.MODIFY_ANNOTATIONS)||t.includes(a.PermissionFlag.FILL_INTERACTIVE_FORMS)||_classPrivateFieldGet(this,E)!==a.AnnotationMode.ENABLE_FORMS||(r.annotationMode=a.AnnotationMode.ENABLE);return r}function _onePageRenderedOrForceFetch2(){var t=this;if("hidden"===document.visibilityState||!this.container.offsetParent||0===this._getVisiblePages().views.length)return Promise.resolve();var r=new Promise((function(r){_classPrivateFieldSet(t,M,(function(){if("hidden"===document.visibilityState){r();document.removeEventListener("visibilitychange",_classPrivateFieldGet(t,M));_classPrivateFieldSet(t,M,null)}}));document.addEventListener("visibilitychange",_classPrivateFieldGet(t,M))}));return Promise.race([this._onePageRenderedCapability.promise,r])}function _copyCallback2(t,r){var i=this,o=document.getSelection(),a=o.focusNode;if(o.anchorNode&&a&&o.containsNode(_classPrivateFieldGet(this,k))){if(_classPrivateFieldGet(this,C)||t===u.TextLayerMode.ENABLE_PERMISSIONS){r.preventDefault();r.stopPropagation();return}_classPrivateFieldSet(this,C,!0);var l=this.container.style.cursor;this.container.style.cursor="wait";var c=function interruptCopy(t){return _classPrivateFieldSet(i,T,"Escape"===t.key)};window.addEventListener("keydown",c);this.getAllText().then(function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t){return _regeneratorRuntime().wrap((function _callee4$(r){for(;;)switch(r.prev=r.next){case 0:if(null===t){r.next=3;break}r.next=3;return navigator.clipboard.writeText(t);case 3:case"end":return r.stop()}}),_callee4)})));return function(r){return t.apply(this,arguments)}}()).catch((function(t){console.warn("Something goes wrong when extracting the text: ".concat(t.message))})).finally((function(){_classPrivateFieldSet(i,C,!1);_classPrivateFieldSet(i,T,!1);window.removeEventListener("keydown",c);i.container.style.cursor=l}));r.preventDefault();r.stopPropagation()}}function _ensurePageViewVisible2(){if(this._scrollMode!==u.ScrollMode.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");var t=this._currentPageNumber,r=_classPrivateFieldGet(this,O),i=this.viewer;i.textContent="";r.pages.length=0;if(this._spreadMode!==u.SpreadMode.NONE||this.isInPresentationMode){var o=new Set,a=this._spreadMode-1;if(-1===a)o.add(t-1);else if(t%2!==a){o.add(t-1);o.add(t)}else{o.add(t-2);o.add(t-1)}var l=document.createElement("div");l.className="spread";if(this.isInPresentationMode){var c=document.createElement("div");c.className="dummyPage";l.append(c)}var h,d=_createForOfIteratorHelper(o);try{for(d.s();!(h=d.n()).done;){var p=h.value,v=this._pages[p];if(v){l.append(v.div);r.pages.push(v)}}}catch(t){d.e(t)}finally{d.f()}i.append(l)}else{var g=this._pages[t-1];i.append(g.div);r.pages.push(g)}r.scrollDown=t>=r.previousPageNumber;r.previousPageNumber=t}function _scrollIntoView2(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t){var i=t.div,o=t.id;this._currentPageNumber!==o&&this._setCurrentPageNumber(o);if(this._scrollMode===u.ScrollMode.PAGE){_classPrivateMethodGet(this,z,_ensurePageViewVisible2).call(this);this.update()}if(!r&&!this.isInPresentationMode){var a=i.offsetLeft+i.clientLeft,l=a+i.clientWidth,c=this.container,h=c.scrollLeft,d=c.clientWidth;(this._scrollMode===u.ScrollMode.HORIZONTAL||a<h||l>h+d)&&(r={left:0,top:0})}(0,u.scrollIntoView)(i,r,!1,"infinite-scroll"===this.pageViewMode);!this._currentScaleValue&&this._location&&(this._location=null)}}function _isSameScale2(t){return t===this._currentScale||Math.abs(t-this._currentScale)<1e-15}function _setScaleUpdatePages2(t,r,i){var o=this,u=i.noScroll,l=void 0!==u&&u,c=i.preset,h=void 0!==c&&c,d=i.drawingDelay,p=void 0===d?-1:d,v=isNaN(Number(this.currentScale))?void 0:Number(this.currentScale),g=this.currentScaleValue;this._currentScaleValue=r.toString();if(_classPrivateMethodGet(this,Y,_isSameScale2).call(this,t))h&&this.eventBus.dispatch("scalechanging",{source:this,scale:t,presetValue:r,previousScale:v,previousPresetValue:g});else{this.viewer.style.setProperty("--scale-factor",t*a.PixelsPerInch.PDF_TO_CSS_UNITS);var y=p>=0&&p<1e3;this.refresh(!0,{scale:t,drawingDelay:y?p:-1});y&&_classPrivateFieldSet(this,B,setTimeout((function(){_classPrivateFieldSet(o,B,null);o.refresh()}),p));this._currentScale=t;if(!l){var m,w=this._currentPageNumber;if(this._location&&!this.isInPresentationMode&&!this.isChangingPresentationMode){w=this._location.pageNumber;m=[null,{name:"XYZ"},this._location.left,this._location.top,null]}this.scrollPageIntoView({pageNumber:w,destArray:m,allowNegativeOffset:!0})}this.eventBus.dispatch("scalechanging",{source:this,scale:t,presetValue:h?r:void 0,previousScale:v,previousPresetValue:g});this.defaultRenderingQueue&&this.update()}}function _get_pageWidthScaleFactor(){return this._spreadMode!==u.SpreadMode.NONE&&this._scrollMode!==u.ScrollMode.HORIZONTAL?2:1}function _setScale2(t,r){t||(t="auto");var i=parseFloat(t);if(this._currentScale!==i)if(i>0){r.preset=!1;_classPrivateMethodGet(this,$,_setScaleUpdatePages2).call(this,i,t,r)}else{var o=this._pages[this._currentPageNumber-1];if(!o)return;var a=u.SCROLLBAR_PADDING,l=u.VERTICAL_PADDING;if(this.isInPresentationMode){a=l=4;this._spreadMode!==u.SpreadMode.NONE&&(a*=2)}else if(this.removePageBorders)a=l=0;else if(this._scrollMode===u.ScrollMode.HORIZONTAL){var c=[l,a];a=c[0];l=c[1]}var h=(this.container.clientWidth-a)/o.width*o.scale/_classPrivateFieldGet(this,q),d=(this.container.clientHeight-l)/o.height*o.scale;switch(t){case"page-actual":i=1;break;case"page-width":i=h;break;case"page-height":i=d;break;case"page-fit":i=Math.min(h,d);break;case"auto":var p=(0,u.isPortraitOrientation)(o)?h:Math.min(d,h);i=Math.min(u.MAX_AUTO_SCALE,p);break;default:globalThis.ngxConsole.error('#setScale: "'.concat(t,'" is an unknown zoom value.'));return}r.preset=!0;_classPrivateMethodGet(this,$,_setScaleUpdatePages2).call(this,i,t,r)}}function _resetCurrentPageView2(){var t=this._pages[this._currentPageNumber-1];this.isInPresentationMode&&_classPrivateMethodGet(this,X,_setScale2).call(this,this._currentScaleValue,{noScroll:!0});_classPrivateMethodGet(this,K,_scrollIntoView2).call(this,t)}function _ensurePdfPageLoaded2(t){return _ensurePdfPageLoaded3.apply(this,arguments)}function _ensurePdfPageLoaded3(){return(_ensurePdfPageLoaded3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(t){var r,i,o;return _regeneratorRuntime().wrap((function _callee5$(a){for(;;)switch(a.prev=a.next){case 0:if(!t.pdfPage){a.next=2;break}return a.abrupt("return",t.pdfPage);case 2:a.prev=2;a.next=5;return this.pdfDocument.getPage(t.id);case 5:o=a.sent;t.pdfPage||t.setPdfPage(o);null!==(r=(i=this.linkService)._cachedPageNumber)&&void 0!==r&&r.call(i,o.ref)||this.linkService.cachePageRef(t.id,o.ref);return a.abrupt("return",o);case 11:a.prev=11;a.t0=a.catch(2);console.error("Unable to get page for page view",a.t0);return a.abrupt("return",null);case 15:case"end":return a.stop()}}),_callee5,this,[[2,11]])})))).apply(this,arguments)}function _getScrollAhead2(t){var r,i;if(1===(null===(r=t.first)||void 0===r?void 0:r.id))return!0;if((null===(i=t.last)||void 0===i?void 0:i.id)===this.pagesCount)return!1;switch(this._scrollMode){case u.ScrollMode.PAGE:return _classPrivateFieldGet(this,O).scrollDown;case u.ScrollMode.HORIZONTAL:return this.scroll.right}return this.scroll.down}function _updateContainerHeightCss2(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.container.clientHeight;if(t!==_classPrivateFieldGet(this,I)){_classPrivateFieldSet(this,I,t);u.docStyle.setProperty("--viewer-container-height","".concat(t,"px"))}}function _resizeObserverCallback2(t){var r,i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.target===this.container){_classPrivateMethodGet(this,ee,_updateContainerHeightCss2).call(this,Math.floor(o.borderBoxSize[0].blockSize));_classPrivateFieldSet(this,A,null);break}}}catch(t){i.e(t)}finally{i.f()}}},(t,r,i)=>{var o=i(67),a=i(163),u=i(39),l=i(31),c=i(184);o({target:"Iterator",proto:!0,real:!0},{every:function every(t){l(this);u(t);var r=c(this),i=0;return!a(r,(function(r,o){if(!t(r,i++))return o()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},(t,r,i)=>{var o=i(67),a=i(105).find,u=i(46),l="find",c=!0;l in[]&&Array(1)[l]((function(){c=!1}));o({target:"Array",proto:!0,forced:c},{find:function find(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}});u(l)},(t,r,i)=>{var o=i(67),a=i(163),u=i(39),l=i(31),c=i(184);o({target:"Iterator",proto:!0,real:!0},{find:function find(t){l(this);u(t);var r=c(this),i=0;return a(r,(function(r,o){if(t(r,i++))return o(r)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},(t,r,i)=>{var o=i(67),a=i(107),u=i(51).indexOf,l=i(187),c=a([].indexOf),h=!!c&&1/c([1],1,-0)<0;o({target:"Array",proto:!0,forced:h||!l("indexOf")},{indexOf:function indexOf(t){var r=arguments.length>1?arguments[1]:void 0;return h?c(this,t,r)||0:u(this,t,r)}})},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(88);i(142);i(98);i(120);i(1);i(42);i(92);i(95);i(175);i(176);i(177);i(178);i(193);i(126);i(179);i(182);i(183);i(185);i(188);Object.defineProperty(r,"__esModule",{value:!0});r.NullL10n=void 0;r.getL10nFallback=getL10nFallback;i(212);i(254);i(257);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}var o={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",print_progress_percent:"{{progress}}%"};function getL10nFallback(t,r){switch(t){case"find_match_count":t="find_match_count[".concat(1===r.total?"one":"other","]");break;case"find_match_count_limit":t="find_match_count_limit[".concat(1===r.limit?"one":"other","]")}return o[t]||""}function formatL10nValue(t,r){return r?t.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(function(t,i){return i in r?r[i]:"{{"+i+"}}"})):t}r.NullL10n={getLanguage:function getLanguage(){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee(){return _regeneratorRuntime().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return","en-us");case 1:case"end":return t.stop()}}),_callee)})))()},getDirection:function getDirection(){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return","ltr");case 1:case"end":return t.stop()}}),_callee2)})))()},get:function get(t){var r=arguments;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var i,o;return _regeneratorRuntime().wrap((function _callee3$(a){for(;;)switch(a.prev=a.next){case 0:i=r.length>1&&void 0!==r[1]?r[1]:null;o=r.length>2&&void 0!==r[2]?r[2]:getL10nFallback(t,i);return a.abrupt("return",formatL10nValue(o,i));case 3:case"end":return a.stop()}}),_callee3)})))()},translate:function translate(t){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){return _regeneratorRuntime().wrap((function _callee4$(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),_callee4)})))()}}},(t,r,i)=>{i(1);i(193);i(122);i(123);i(195);i(226);i(304);i(202);Object.defineProperty(r,"__esModule",{value:!0});r.PageFlip=void 0;i(135);i(136);i(98);i(120);i(88);i(126);i(138);i(339);i(179);i(336);i(222);i(188);i(229);i(313);i(314);i(212);i(315);i(205);i(42);i(246);i(92);i(95);i(223);function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var o=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(o){var a=Object.getOwnPropertyDescriptor(o,r);return a.get?a.get.call(arguments.length<3?t:i):a.value}};return _get.apply(this,arguments)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}var o=function(){function Page(t,r){_classCallCheck(this,Page);this.state={angle:0,area:[],position:{x:0,y:0},hardAngle:0,hardDrawingAngle:0};this.createdDensity=r;this.nowDrawingDensity=this.createdDensity;this.render=t}_createClass(Page,[{key:"setDensity",value:function setDensity(t){this.createdDensity=t;this.nowDrawingDensity=t}},{key:"setDrawingDensity",value:function setDrawingDensity(t){this.nowDrawingDensity=t}},{key:"setPosition",value:function setPosition(t){this.state.position=t}},{key:"setAngle",value:function setAngle(t){this.state.angle=t}},{key:"setArea",value:function setArea(t){this.state.area=t}},{key:"setHardDrawingAngle",value:function setHardDrawingAngle(t){this.state.hardDrawingAngle=t}},{key:"setHardAngle",value:function setHardAngle(t){this.state.hardAngle=t;this.state.hardDrawingAngle=t}},{key:"setOrientation",value:function setOrientation(t){this.orientation=t}},{key:"getDrawingDensity",value:function getDrawingDensity(){return this.nowDrawingDensity}},{key:"getDensity",value:function getDensity(){return this.createdDensity}},{key:"getHardAngle",value:function getHardAngle(){return this.state.hardAngle}}]);return Page}(),a=function(t){_inherits(ImagePage,t);var r=_createSuper(ImagePage);function ImagePage(t,i,o){var a;_classCallCheck(this,ImagePage);(a=r.call(this,t,o)).image=null;a.isLoad=!1;a.loadingAngle=0;a.image=new Image;a.image.src=i;return a}_createClass(ImagePage,[{key:"draw",value:function draw(t){var r=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,i=canvas.getContext("2d",r),o=this.render.convertToGlobal(this.state.position),a=this.render.getRect().pageWidth,u=this.render.getRect().height;i.save();i.translate(o.x,o.y);i.beginPath();var l,c=_createForOfIteratorHelper(this.state.area);try{for(c.s();!(l=c.n()).done;){var h=l.value;if(null!==h){h=this.render.convertToGlobal(h);i.lineTo(h.x-o.x,h.y-o.y)}}}catch(t){c.e(t)}finally{c.f()}i.rotate(this.state.angle);i.clip();this.isLoad?i.drawImage(this.image,0,0,a,u):this.drawLoader(i,{x:0,y:0},a,u);i.restore()}},{key:"simpleDraw",value:function simpleDraw(t){var r=this.render.getRect(),i=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,o=canvas.getContext("2d",i),a=r.pageWidth,u=r.height,l=1===t?r.left+r.pageWidth:r.left,c=r.top;this.isLoad?o.drawImage(this.image,l,c,a,u):this.drawLoader(o,{x:l,y:c},a,u)}},{key:"drawLoader",value:function drawLoader(t,r,i,o){t.beginPath();t.strokeStyle="rgb(200, 200, 200)";t.fillStyle="rgb(255, 255, 255)";t.lineWidth=1;t.rect(r.x+1,r.y+1,i-1,o-1);t.stroke();t.fill();var a={x:r.x+i/2,y:r.y+o/2};t.beginPath();t.lineWidth=10;t.arc(a.x,a.y,20,this.loadingAngle,3*Math.PI/2+this.loadingAngle);t.stroke();t.closePath();this.loadingAngle+=.07;this.loadingAngle>=2*Math.PI&&(this.loadingAngle=0)}},{key:"load",value:function load(){var t=this;this.isLoad||(this.image.onload=function(){t.isLoad=!0})}},{key:"newTemporaryCopy",value:function newTemporaryCopy(){return this}},{key:"getTemporaryCopy",value:function getTemporaryCopy(){return this}},{key:"hideTemporaryCopy",value:function hideTemporaryCopy(){}}]);return ImagePage}(o),u=function(){function PageCollection(t,r){_classCallCheck(this,PageCollection);this.pages=[];this.currentPageIndex=0;this.currentSpreadIndex=0;this.landscapeSpread=[];this.portraitSpread=[];this.render=r;this.app=t;this.currentPageIndex=0;this.isShowCover=this.app.getSettings().showCover}_createClass(PageCollection,[{key:"destroy",value:function destroy(){this.pages=[]}},{key:"createSpread",value:function createSpread(){this.landscapeSpread=[];this.portraitSpread=[];for(var t=0;t<this.pages.length;t++)this.portraitSpread.push([t]);var r=0;if(this.isShowCover){this.pages[0].setDensity("hard");this.landscapeSpread.push([r]);r++}for(var i=r;i<this.pages.length;i+=2)if(i<this.pages.length-1)this.landscapeSpread.push([i,i+1]);else{this.landscapeSpread.push([i]);this.pages[i].setDensity("hard")}}},{key:"getSpread",value:function getSpread(){return"landscape"===this.render.getOrientation()?this.landscapeSpread:this.portraitSpread}},{key:"getSpreadIndexByPage",value:function getSpreadIndexByPage(t){for(var r=this.getSpread(),i=0;i<r.length;i++)if(t===r[i][0]||t===r[i][1])return i;return null}},{key:"getPageCount",value:function getPageCount(){return this.pages.length}},{key:"getPages",value:function getPages(){return this.pages}},{key:"getPage",value:function getPage(t){if(t>=0&&t<this.pages.length)return this.pages[t];throw new Error("Invalid page number")}},{key:"nextBy",value:function nextBy(t){var r=this.pages.indexOf(t);return r<this.pages.length-1?this.pages[r+1]:null}},{key:"prevBy",value:function prevBy(t){var r=this.pages.indexOf(t);return r>0?this.pages[r-1]:null}},{key:"getFlippingPage",value:function getFlippingPage(t){var r=this.currentSpreadIndex;if("portrait"===this.render.getOrientation())return 0===t?this.pages[r].newTemporaryCopy():this.pages[r-1];var i=0===t?this.getSpread()[r+1]:this.getSpread()[r-1];return 1===i.length||0===t?this.pages[i[0]]:this.pages[i[1]]}},{key:"getBottomPage",value:function getBottomPage(t){var r=this.currentSpreadIndex;if("portrait"===this.render.getOrientation())return 0===t?this.pages[r+1]:this.pages[r-1];var i=0===t?this.getSpread()[r+1]:this.getSpread()[r-1];return 1===i.length?this.pages[i[0]]:0===t?this.pages[i[1]]:this.pages[i[0]]}},{key:"showNext",value:function showNext(){if(this.currentSpreadIndex<this.getSpread().length){this.currentSpreadIndex++;this.showSpread()}}},{key:"showPrev",value:function showPrev(){if(this.currentSpreadIndex>0){this.currentSpreadIndex--;this.showSpread()}}},{key:"getCurrentPageIndex",value:function getCurrentPageIndex(){return this.currentPageIndex}},{key:"show",value:function show(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===t&&(t=this.currentPageIndex);if(!(t<0||t>=this.pages.length)){var r=this.getSpreadIndexByPage(t);if(null!==r){this.currentSpreadIndex=r;this.showSpread()}}}},{key:"getCurrentSpreadIndex",value:function getCurrentSpreadIndex(){return this.currentSpreadIndex}},{key:"setCurrentSpreadIndex",value:function setCurrentSpreadIndex(t){if(!(t>=0&&t<this.getSpread().length))throw new Error("Invalid page");this.currentSpreadIndex=t}},{key:"showSpread",value:function showSpread(){var t=this.getSpread()[this.currentSpreadIndex];if(2===t.length){this.render.setLeftPage(this.pages[t[0]]);this.render.setRightPage(this.pages[t[1]])}else if("landscape"===this.render.getOrientation())if(t[0]===this.pages.length-1){this.render.setLeftPage(this.pages[t[0]]);this.render.setRightPage(null)}else{this.render.setLeftPage(null);this.render.setRightPage(this.pages[t[0]])}else{this.render.setLeftPage(null);this.render.setRightPage(this.pages[t[0]])}this.currentPageIndex=t[0];this.app.updatePageIndex(this.currentPageIndex)}}]);return PageCollection}(),l=function(t){_inherits(ImagePageCollection,t);var r=_createSuper(ImagePageCollection);function ImagePageCollection(t,i,o){var a;_classCallCheck(this,ImagePageCollection);(a=r.call(this,t,i)).imagesHref=o;return a}_createClass(ImagePageCollection,[{key:"load",value:function load(){var t,r=_createForOfIteratorHelper(this.imagesHref);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=new a(this.render,i,"soft");o.load();this.pages.push(o)}}catch(t){r.e(t)}finally{r.f()}this.createSpread()}}]);return ImagePageCollection}(u),c=function(){function Helper(){_classCallCheck(this,Helper)}_createClass(Helper,null,[{key:"GetDistanceBetweenTwoPoint",value:function GetDistanceBetweenTwoPoint(t,r){return null===t||null===r?1/0:Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))}},{key:"GetSegmentLength",value:function GetSegmentLength(t){return Helper.GetDistanceBetweenTwoPoint(t[0],t[1])}},{key:"GetAngleBetweenTwoLine",value:function GetAngleBetweenTwoLine(t,r){var i=t[0].y-t[1].y,o=r[0].y-r[1].y,a=t[1].x-t[0].x,u=r[1].x-r[0].x;return Math.acos((i*o+a*u)/(Math.sqrt(i*i+a*a)*Math.sqrt(o*o+u*u)))}},{key:"PointInRect",value:function PointInRect(t,r){return null===r?null:r.x>=t.left&&r.x<=t.width+t.left&&r.y>=t.top&&r.y<=t.top+t.height?r:null}},{key:"GetRotatedPoint",value:function GetRotatedPoint(t,r,i){return{x:t.x*Math.cos(i)+t.y*Math.sin(i)+r.x,y:t.y*Math.cos(i)-t.x*Math.sin(i)+r.y}}},{key:"LimitPointToCircle",value:function LimitPointToCircle(t,r,i){if(Helper.GetDistanceBetweenTwoPoint(t,i)<=r)return i;var o=t.x,a=t.y,u=i.x,l=i.y,c=Math.sqrt(Math.pow(r,2)*Math.pow(o-u,2)/(Math.pow(o-u,2)+Math.pow(a-l,2)))+o;i.x<0&&(c*=-1);var h=(c-o)*(a-l)/(o-u)+a;o-u+a===0&&(h=r);return{x:c,y:h}}},{key:"GetIntersectBetweenTwoSegment",value:function GetIntersectBetweenTwoSegment(t,r,i){return Helper.PointInRect(t,Helper.GetIntersectBeetwenTwoLine(r,i))}},{key:"GetIntersectBeetwenTwoLine",value:function GetIntersectBeetwenTwoLine(t,r){var i=t[0].y-t[1].y,o=r[0].y-r[1].y,a=t[1].x-t[0].x,u=r[1].x-r[0].x,l=t[0].x*t[1].y-t[1].x*t[0].y,c=r[0].x*r[1].y-r[1].x*r[0].y,h=i*c-o*l,d=a*c-u*l,p=-(l*u-c*a)/(i*u-o*a),v=-(i*c-o*l)/(i*u-o*a);if(isFinite(p)&&isFinite(v))return{x:p,y:v};if(Math.abs(h-d)<.1)throw new Error("Segment included");return null}},{key:"GetCordsFromTwoPoint",value:function GetCordsFromTwoPoint(t,r){var i=Math.abs(t.x-r.x),o=Math.abs(t.y-r.y),a=Math.max(i,o),u=[t];function getCord(t,r,i,o,a){return r>t?t+a*(i/o):r<t?t-a*(i/o):t}for(var l=1;l<=a;l+=1)u.push({x:getCord(t.x,r.x,i,a,l),y:getCord(t.y,r.y,o,a,l)});return u}}]);return Helper}(),h=function(t){_inherits(HTMLPage,t);var r=_createSuper(HTMLPage);function HTMLPage(t,i,o){var a;_classCallCheck(this,HTMLPage);(a=r.call(this,t,o)).copiedElement=null;a.temporaryCopy=null;a.isLoad=!1;a.element=i;a.element.classList.add("stf__item");a.element.classList.add("--"+o);return a}_createClass(HTMLPage,[{key:"newTemporaryCopy",value:function newTemporaryCopy(){if("hard"===this.nowDrawingDensity)return this;if(null===this.temporaryCopy){this.copiedElement=this.element.cloneNode(!0);this.element.parentElement.appendChild(this.copiedElement);this.temporaryCopy=new HTMLPage(this.render,this.copiedElement,this.nowDrawingDensity)}return this.getTemporaryCopy()}},{key:"getTemporaryCopy",value:function getTemporaryCopy(){return this.temporaryCopy}},{key:"hideTemporaryCopy",value:function hideTemporaryCopy(){if(null!==this.temporaryCopy){this.copiedElement.remove();this.copiedElement=null;this.temporaryCopy=null}}},{key:"draw",value:function draw(t){var r=t||this.nowDrawingDensity,i=this.render.convertToGlobal(this.state.position),o=this.render.getRect().pageWidth,a=this.render.getRect().height;this.element.classList.remove("--simple");var u="\n            position: absolute;\n            display: block;\n            z-index: ".concat(this.element.style.zIndex,";\n            left: 0;\n            top: 0;\n            width: ").concat(o,"px;\n            height: ").concat(a,"px;\n        ");"hard"===r?this.drawHard(u):this.drawSoft(i,u)}},{key:"drawHard",value:function drawHard(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=this.render.getRect().left+this.render.getRect().width/2,i=this.state.hardDrawingAngle,o=t+"\n                backface-visibility: hidden;\n                -webkit-backface-visibility: hidden;\n                clip-path: none;\n                -webkit-clip-path: none;\n            "+(0===this.orientation?"transform-origin: ".concat(this.render.getRect().pageWidth,"px 0;\n                   transform: translate3d(0, 0, 0) rotateY(").concat(i,"deg);"):"transform-origin: 0 0;\n                   transform: translate3d(".concat(r,"px, 0, 0) rotateY(").concat(i,"deg);"));this.element.style.cssText=o}},{key:"drawSoft",value:function drawSoft(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o="polygon( ",a=_createForOfIteratorHelper(this.state.area);try{for(a.s();!(r=a.n()).done;){var u=r.value;if(null!==u){var l=1===this.render.getDirection()?{x:-u.x+this.state.position.x,y:u.y-this.state.position.y}:{x:u.x-this.state.position.x,y:u.y-this.state.position.y};o+=(l=c.GetRotatedPoint(l,{x:0,y:0},this.state.angle)).x+"px "+l.y+"px, "}}}catch(t){a.e(t)}finally{a.f()}o=o.slice(0,-2);var h=i+"transform-origin: 0 0; clip-path: ".concat(o+=")","; -webkit-clip-path: ").concat(o,";")+(this.render.isSafari()&&0===this.state.angle?"transform: translate(".concat(t.x,"px, ").concat(t.y,"px);"):"transform: translate3d(".concat(t.x,"px, ").concat(t.y,"px, 0) rotate(").concat(this.state.angle,"rad);"));this.element.style.cssText=h}},{key:"simpleDraw",value:function simpleDraw(t){var r=this.render.getRect(),i=r.pageWidth,o=r.height,a=1===t?r.left+r.pageWidth:r.left,u=r.top;this.element.classList.add("--simple");this.element.style.cssText="\n            position: absolute;\n            display: block;\n            height: ".concat(o,"px;\n            left: ").concat(a,"px;\n            top: ").concat(u,"px;\n            width: ").concat(i,"px;\n            z-index: ").concat(this.render.getSettings().startZIndex+1,";")}},{key:"getElement",value:function getElement(){return this.element}},{key:"load",value:function load(){this.isLoad=!0}},{key:"setOrientation",value:function setOrientation(t){_get(_getPrototypeOf(HTMLPage.prototype),"setOrientation",this).call(this,t);this.element.classList.remove("--left","--right");this.element.classList.add(1===t?"--right":"--left")}},{key:"setDrawingDensity",value:function setDrawingDensity(t){this.element.classList.remove("--soft","--hard");this.element.classList.add("--"+t);_get(_getPrototypeOf(HTMLPage.prototype),"setDrawingDensity",this).call(this,t)}}]);return HTMLPage}(o),d=function(t){_inherits(HTMLPageCollection,t);var r=_createSuper(HTMLPageCollection);function HTMLPageCollection(t,i,o,a){var u;_classCallCheck(this,HTMLPageCollection);(u=r.call(this,t,i)).element=o;u.pagesElement=a;return u}_createClass(HTMLPageCollection,[{key:"load",value:function load(){var t,r=_createForOfIteratorHelper(this.pagesElement);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=new h(this.render,i,"hard"===i.dataset.density?"hard":"soft");o.load();this.pages.push(o)}}catch(t){r.e(t)}finally{r.f()}this.createSpread()}}]);return HTMLPageCollection}(u),p=function(){function FlipCalculation(t,r,i,o){_classCallCheck(this,FlipCalculation);this.direction=t;this.corner=r;this.topIntersectPoint=null;this.sideIntersectPoint=null;this.bottomIntersectPoint=null;this.pageWidth=parseInt(i,10);this.pageHeight=parseInt(o,10)}_createClass(FlipCalculation,[{key:"calc",value:function calc(t){try{this.position=this.calcAngleAndPosition(t);this.calculateIntersectPoint(this.position);return!0}catch(t){return!1}}},{key:"getFlippingClipArea",value:function getFlippingClipArea(){var t=[],r=!1;t.push(this.rect.topLeft);t.push(this.topIntersectPoint);if(null===this.sideIntersectPoint)r=!0;else{t.push(this.sideIntersectPoint);null===this.bottomIntersectPoint&&(r=!1)}t.push(this.bottomIntersectPoint);(r||"bottom"===this.corner)&&t.push(this.rect.bottomLeft);return t}},{key:"getBottomClipArea",value:function getBottomClipArea(){var t=[];t.push(this.topIntersectPoint);if("top"===this.corner)t.push({x:this.pageWidth,y:0});else{null!==this.topIntersectPoint&&t.push({x:this.pageWidth,y:0});t.push({x:this.pageWidth,y:this.pageHeight})}null!==this.sideIntersectPoint?c.GetDistanceBetweenTwoPoint(this.sideIntersectPoint,this.topIntersectPoint)>=10&&t.push(this.sideIntersectPoint):"top"===this.corner&&t.push({x:this.pageWidth,y:this.pageHeight});t.push(this.bottomIntersectPoint);t.push(this.topIntersectPoint);return t}},{key:"getAngle",value:function getAngle(){return 0===this.direction?-this.angle:this.angle}},{key:"getRect",value:function getRect(){return this.rect}},{key:"getPosition",value:function getPosition(){return this.position}},{key:"getActiveCorner",value:function getActiveCorner(){return 0===this.direction?this.rect.topLeft:this.rect.topRight}},{key:"getDirection",value:function getDirection(){return this.direction}},{key:"getFlippingProgress",value:function getFlippingProgress(){return Math.abs((this.position.x-this.pageWidth)/(2*this.pageWidth)*100)}},{key:"getCorner",value:function getCorner(){return this.corner}},{key:"getBottomPagePosition",value:function getBottomPagePosition(){return 1===this.direction?{x:this.pageWidth,y:0}:{x:0,y:0}}},{key:"getShadowStartPoint",value:function getShadowStartPoint(){return"top"===this.corner?this.topIntersectPoint:null!==this.sideIntersectPoint?this.sideIntersectPoint:this.topIntersectPoint}},{key:"getShadowAngle",value:function getShadowAngle(){var t=c.GetAngleBetweenTwoLine(this.getSegmentToShadowLine(),[{x:0,y:0},{x:this.pageWidth,y:0}]);return 0===this.direction?t:Math.PI-t}},{key:"calcAngleAndPosition",value:function calcAngleAndPosition(t){var r=t;this.updateAngleAndGeometry(r);r="top"===this.corner?this.checkPositionAtCenterLine(r,{x:0,y:0},{x:0,y:this.pageHeight}):this.checkPositionAtCenterLine(r,{x:0,y:this.pageHeight},{x:0,y:0});if(Math.abs(r.x-this.pageWidth)<1&&Math.abs(r.y)<1)throw new Error("Point is too small");return r}},{key:"updateAngleAndGeometry",value:function updateAngleAndGeometry(t){this.angle=this.calculateAngle(t);this.rect=this.getPageRect(t)}},{key:"calculateAngle",value:function calculateAngle(t){var r=this.pageWidth-t.x+1,i="bottom"===this.corner?this.pageHeight-t.y:t.y,o=2*Math.acos(r/Math.sqrt(i*i+r*r));i<0&&(o=-o);var a=Math.PI-o;if(!isFinite(o)||a>=0&&a<.003)throw new Error("The G point is too small");"bottom"===this.corner&&(o=-o);return o}},{key:"getPageRect",value:function getPageRect(t){return"top"===this.corner?this.getRectFromBasePoint([{x:0,y:0},{x:this.pageWidth,y:0},{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}],t):this.getRectFromBasePoint([{x:0,y:-this.pageHeight},{x:this.pageWidth,y:-this.pageHeight},{x:0,y:0},{x:this.pageWidth,y:0}],t)}},{key:"getRectFromBasePoint",value:function getRectFromBasePoint(t,r){return{topLeft:this.getRotatedPoint(t[0],r),topRight:this.getRotatedPoint(t[1],r),bottomLeft:this.getRotatedPoint(t[2],r),bottomRight:this.getRotatedPoint(t[3],r)}}},{key:"getRotatedPoint",value:function getRotatedPoint(t,r){return{x:t.x*Math.cos(this.angle)+t.y*Math.sin(this.angle)+r.x,y:t.y*Math.cos(this.angle)-t.x*Math.sin(this.angle)+r.y}}},{key:"calculateIntersectPoint",value:function calculateIntersectPoint(t){var r={left:-1,top:-1,width:this.pageWidth+2,height:this.pageHeight+2};if("top"===this.corner){this.topIntersectPoint=c.GetIntersectBetweenTwoSegment(r,[t,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]);this.sideIntersectPoint=c.GetIntersectBetweenTwoSegment(r,[t,this.rect.bottomLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]);this.bottomIntersectPoint=c.GetIntersectBetweenTwoSegment(r,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}])}else{this.topIntersectPoint=c.GetIntersectBetweenTwoSegment(r,[this.rect.topLeft,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]);this.sideIntersectPoint=c.GetIntersectBetweenTwoSegment(r,[t,this.rect.topLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]);this.bottomIntersectPoint=c.GetIntersectBetweenTwoSegment(r,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}])}}},{key:"checkPositionAtCenterLine",value:function checkPositionAtCenterLine(t,r,i){var o=t,a=c.LimitPointToCircle(r,this.pageWidth,o);if(o!==a){o=a;this.updateAngleAndGeometry(o)}var u=Math.sqrt(Math.pow(this.pageWidth,2)+Math.pow(this.pageHeight,2)),l=this.rect.bottomRight,h=this.rect.topLeft;if("bottom"===this.corner){l=this.rect.topRight;h=this.rect.bottomLeft}if(l.x<=0){var d=c.LimitPointToCircle(i,u,h);if(d!==o){o=d;this.updateAngleAndGeometry(o)}}return o}},{key:"getSegmentToShadowLine",value:function getSegmentToShadowLine(){var t=this.getShadowStartPoint();return[t,t!==this.sideIntersectPoint&&null!==this.sideIntersectPoint?this.sideIntersectPoint:this.bottomIntersectPoint]}}]);return FlipCalculation}(),v=function(){function Flip(t,r){_classCallCheck(this,Flip);this.flippingPage=null;this.bottomPage=null;this.calc=null;this.state="read";this.render=t;this.app=r}_createClass(Flip,[{key:"fold",value:function fold(t){this.setState("user_fold");null===this.calc&&this.start(t);this.do(this.render.convertToPage(t))}},{key:"flip",value:function flip(t){if(!this.app.getSettings().disableFlipByClick||this.isPointOnCorners(t)){null!==this.calc&&this.render.finishAnimation();if(this.start(t)){var r=this.getBoundsRect();this.setState("flipping");var i=r.height/10,o="bottom"===this.calc.getCorner()?r.height-i:i,a="bottom"===this.calc.getCorner()?r.height:0;this.calc.calc({x:r.pageWidth-i,y:o});this.animateFlippingTo({x:r.pageWidth-i,y:o},{x:-r.pageWidth,y:a},!0)}}}},{key:"start",value:function start(t){this.reset();var r=this.render.convertToBook(t),i=this.getBoundsRect(),o=this.getDirectionByPoint(r),a=r.y>=i.height/2?"bottom":"top";if(!this.checkDirection(o))return!1;try{this.flippingPage=this.app.getPageCollection().getFlippingPage(o);this.bottomPage=this.app.getPageCollection().getBottomPage(o);if("landscape"===this.render.getOrientation())if(1===o){var u=this.app.getPageCollection().nextBy(this.flippingPage);if(null!==u&&this.flippingPage.getDensity()!==u.getDensity()){this.flippingPage.setDrawingDensity("hard");u.setDrawingDensity("hard")}}else{var l=this.app.getPageCollection().prevBy(this.flippingPage);if(null!==l&&this.flippingPage.getDensity()!==l.getDensity()){this.flippingPage.setDrawingDensity("hard");l.setDrawingDensity("hard")}}this.render.setDirection(o);this.calc=new p(o,a,i.pageWidth.toString(10),i.height.toString(10));return!0}catch(t){return!1}}},{key:"do",value:function _do(t){if(null!==this.calc&&this.calc.calc(t)){var r=this.calc.getFlippingProgress();this.bottomPage.setArea(this.calc.getBottomClipArea());this.bottomPage.setPosition(this.calc.getBottomPagePosition());this.bottomPage.setAngle(0);this.bottomPage.setHardAngle(0);this.flippingPage.setArea(this.calc.getFlippingClipArea());this.flippingPage.setPosition(this.calc.getActiveCorner());this.flippingPage.setAngle(this.calc.getAngle());0===this.calc.getDirection()?this.flippingPage.setHardAngle(90*(200-2*r)/100):this.flippingPage.setHardAngle(-90*(200-2*r)/100);this.render.setPageRect(this.calc.getRect());this.render.setBottomPage(this.bottomPage);this.render.setFlippingPage(this.flippingPage);this.render.setShadowData(this.calc.getShadowStartPoint(),this.calc.getShadowAngle(),r,this.calc.getDirection())}}},{key:"flipToPage",value:function flipToPage(t,r){var i=this.app.getPageCollection().getCurrentSpreadIndex(),o=this.app.getPageCollection().getSpreadIndexByPage(t);try{if(o>i){this.app.getPageCollection().setCurrentSpreadIndex(o-1);this.flipNext(r)}if(o<i){this.app.getPageCollection().setCurrentSpreadIndex(o+1);this.flipPrev(r)}}catch(t){}}},{key:"flipNext",value:function flipNext(t){this.flip({x:this.render.getRect().left+2*this.render.getRect().pageWidth-10,y:"top"===t?1:this.render.getRect().height-2})}},{key:"flipPrev",value:function flipPrev(t){this.flip({x:10,y:"top"===t?1:this.render.getRect().height-2})}},{key:"stopMove",value:function stopMove(){if(null!==this.calc){var t=this.calc.getPosition(),r=this.getBoundsRect(),i="bottom"===this.calc.getCorner()?r.height:0;t.x<=0?this.animateFlippingTo(t,{x:-r.pageWidth,y:i},!0):this.animateFlippingTo(t,{x:r.pageWidth,y:i},!1)}}},{key:"showCorner",value:function showCorner(t){if(this.checkState("read","fold_corner")){var r=this.getBoundsRect(),i=r.pageWidth;if(this.isPointOnCorners(t))if(null===this.calc){if(!this.start(t))return;this.setState("fold_corner");this.calc.calc({x:i-1,y:1});var o="bottom"===this.calc.getCorner()?r.height-1:1,a="bottom"===this.calc.getCorner()?r.height-50:50;this.animateFlippingTo({x:i-1,y:o},{x:i-50,y:a},!1,!1)}else this.do(this.render.convertToPage(t));else{this.setState("read");this.render.finishAnimation();this.stopMove()}}}},{key:"animateFlippingTo",value:function animateFlippingTo(t,r,i){var o,a=this,u=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=c.GetCordsFromTwoPoint(t,r),h=[],d=_createForOfIteratorHelper(l);try{var p=function _loop(){var t=o.value;h.push((function(){return a.do(t)}))};for(d.s();!(o=d.n()).done;)p()}catch(t){d.e(t)}finally{d.f()}var v=this.getAnimationDuration(l.length);this.render.startAnimation(h,v,(function(){if(a.calc){i&&(1===a.calc.getDirection()?a.app.turnToPrevPage():a.app.turnToNextPage());if(u){a.render.setBottomPage(null);a.render.setFlippingPage(null);a.render.clearShadow();a.setState("read");a.reset()}}}))}},{key:"getCalculation",value:function getCalculation(){return this.calc}},{key:"getState",value:function getState(){return this.state}},{key:"setState",value:function setState(t){if(this.state!==t){this.app.updateState(t);this.state=t}}},{key:"getDirectionByPoint",value:function getDirectionByPoint(t){var r=this.getBoundsRect();if("portrait"===this.render.getOrientation()){if(t.x-r.pageWidth<=r.width/5)return 1}else if(t.x<r.width/2)return 1;return 0}},{key:"getAnimationDuration",value:function getAnimationDuration(t){var r=this.app.getSettings().flippingTime;return t>=1e3?r:t/1e3*r}},{key:"checkDirection",value:function checkDirection(t){return 0===t?this.app.getCurrentPageIndex()<this.app.getPageCount()-1:this.app.getCurrentPageIndex()>=1}},{key:"reset",value:function reset(){this.calc=null;this.flippingPage=null;this.bottomPage=null}},{key:"getBoundsRect",value:function getBoundsRect(){return this.render.getRect()}},{key:"checkState",value:function checkState(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var u=a[o];if(this.state===u)return!0}return!1}},{key:"isPointOnCorners",value:function isPointOnCorners(t){var r=this.getBoundsRect(),i=r.pageWidth,o=Math.sqrt(Math.pow(i,2)+Math.pow(r.height,2))/5,a=this.render.convertToBook(t);return a.x>0&&a.y>0&&a.x<r.width&&a.y<r.height&&(a.x<o||a.x>r.width-o)&&(a.y<o||a.y>r.height-o)}}]);return Flip}(),g=function(){function Render(t,r){_classCallCheck(this,Render);this.leftPage=null;this.rightPage=null;this.flippingPage=null;this.bottomPage=null;this.direction=null;this.orientation=null;this.shadow=null;this.animation=null;this.pageRect=null;this.boundsRect=null;this.timer=0;this.safari=!1;this.setting=r;this.app=t;var i=new RegExp("Version\\/[\\d\\.]+.*Safari/");this.safari=null!==i.exec(window.navigator.userAgent)}_createClass(Render,[{key:"render",value:function render(t){if(null!==this.animation){var r=Math.round((t-this.animation.startedAt)/this.animation.durationFrame);if(r<this.animation.frames.length)this.animation.frames[r]();else{this.animation.onAnimateEnd();this.animation=null}}this.timer=t;this.drawFrame()}},{key:"start",value:function start(){var t=this;this.update();var r=function loop(r){window.ngxZone.runOutsideAngular((function(){t.render(r);requestAnimationFrame(loop)}))};window.ngxZone.runOutsideAngular((function(){requestAnimationFrame(r)}))}},{key:"startAnimation",value:function startAnimation(t,r,i){this.finishAnimation();this.animation={frames:t,duration:r,durationFrame:r/t.length,onAnimateEnd:i,startedAt:this.timer}}},{key:"finishAnimation",value:function finishAnimation(){if(null!==this.animation){this.animation.frames[this.animation.frames.length-1]();null!==this.animation.onAnimateEnd&&this.animation.onAnimateEnd()}this.animation=null}},{key:"update",value:function update(){this.boundsRect=null;var t=this.calculateBoundsRect();if(this.orientation!==t){this.orientation=t;this.app.updateOrientation(t)}}},{key:"calculateBoundsRect",value:function calculateBoundsRect(){var t="landscape",r=this.getBlockWidth(),i=r/2,o=this.getBlockHeight()/2,a=this.setting.width/this.setting.height,u=this.setting.width,l=this.setting.height,c=i-u;if("stretch"===this.setting.size){r<2*this.setting.minWidth&&this.app.getSettings().usePortrait&&(t="portrait");(u="portrait"===t?this.getBlockWidth():this.getBlockWidth()/2)>this.setting.maxWidth&&(u=this.setting.maxWidth);(l=u/a)>this.getBlockHeight()&&(u=(l=this.getBlockHeight())*a);c="portrait"===t?i-u/2-u:i-u}else if(r<2*u&&this.app.getSettings().usePortrait){t="portrait";c=i-u/2-u}this.boundsRect={left:c,top:o-l/2,width:2*u,height:l,pageWidth:u};return t}},{key:"setShadowData",value:function setShadowData(t,r,i,o){if(this.app.getSettings().drawShadow){var a=100*this.getSettings().maxShadowOpacity;this.shadow={pos:t,angle:r,width:3*this.getRect().pageWidth/4*i/100,opacity:(100-i)*a/100/100,direction:o,progress:2*i}}}},{key:"clearShadow",value:function clearShadow(){this.shadow=null}},{key:"getBlockWidth",value:function getBlockWidth(){return this.app.getUI().getDistElement().offsetWidth}},{key:"getBlockHeight",value:function getBlockHeight(){return this.app.getUI().getDistElement().offsetHeight}},{key:"getDirection",value:function getDirection(){return this.direction}},{key:"getRect",value:function getRect(){null===this.boundsRect&&this.calculateBoundsRect();return this.boundsRect}},{key:"getSettings",value:function getSettings(){return this.app.getSettings()}},{key:"getOrientation",value:function getOrientation(){return this.orientation}},{key:"setPageRect",value:function setPageRect(t){this.pageRect=t}},{key:"setDirection",value:function setDirection(t){this.direction=t}},{key:"setRightPage",value:function setRightPage(t){null!==t&&t.setOrientation(1);this.rightPage=t}},{key:"setLeftPage",value:function setLeftPage(t){null!==t&&t.setOrientation(0);this.leftPage=t}},{key:"setBottomPage",value:function setBottomPage(t){null!==t&&t.setOrientation(1===this.direction?0:1);this.bottomPage=t}},{key:"setFlippingPage",value:function setFlippingPage(t){null!==t&&t.setOrientation(0===this.direction&&"portrait"!==this.orientation?0:1);this.flippingPage=t}},{key:"convertToBook",value:function convertToBook(t){var r=this.getRect();return{x:t.x-r.left,y:t.y-r.top}}},{key:"isSafari",value:function isSafari(){return this.safari}},{key:"convertToPage",value:function convertToPage(t,r){r||(r=this.direction);var i=this.getRect();return{x:0===r?t.x-i.left-i.width/2:i.width/2-t.x+i.left,y:t.y-i.top}}},{key:"convertToGlobal",value:function convertToGlobal(t,r){r||(r=this.direction);if(null==t)return null;var i=this.getRect();return{x:0===r?t.x+i.left+i.width/2:i.width/2-t.x+i.left,y:t.y+i.top}}},{key:"convertRectToGlobal",value:function convertRectToGlobal(t,r){r||(r=this.direction);return{topLeft:this.convertToGlobal(t.topLeft,r),topRight:this.convertToGlobal(t.topRight,r),bottomLeft:this.convertToGlobal(t.bottomLeft,r),bottomRight:this.convertToGlobal(t.bottomRight,r)}}}]);return Render}(),y=function(t){_inherits(CanvasRender,t);var r=_createSuper(CanvasRender);function CanvasRender(t,i,o){var a;_classCallCheck(this,CanvasRender);(a=r.call(this,t,i)).canvas=o;var u=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0;canvas.getContext("2d",u);return a}_createClass(CanvasRender,[{key:"getContext",value:function getContext(){return this.ctx}},{key:"reload",value:function reload(){}},{key:"drawFrame",value:function drawFrame(){this.clear();"portrait"!==this.orientation&&null!=this.leftPage&&this.leftPage.simpleDraw(0);null!=this.rightPage&&this.rightPage.simpleDraw(1);null!=this.bottomPage&&this.bottomPage.draw();this.drawBookShadow();null!=this.flippingPage&&this.flippingPage.draw();if(null!=this.shadow){this.drawOuterShadow();this.drawInnerShadow()}var t=this.getRect();if("portrait"===this.orientation){this.ctx.beginPath();this.ctx.rect(t.left+t.pageWidth,t.top,t.width,t.height);this.ctx.clip()}}},{key:"drawBookShadow",value:function drawBookShadow(){var t=this.getRect();this.ctx.save();this.ctx.beginPath();var r=t.width/20;this.ctx.rect(t.left,t.top,t.width,t.height);var i={x:t.left+t.width/2-r/2,y:0};this.ctx.translate(i.x,i.y);var o=this.ctx.createLinearGradient(0,0,r,0);o.addColorStop(0,"rgba(0, 0, 0, 0)");o.addColorStop(.4,"rgba(0, 0, 0, 0.2)");o.addColorStop(.49,"rgba(0, 0, 0, 0.1)");o.addColorStop(.5,"rgba(0, 0, 0, 0.5)");o.addColorStop(.51,"rgba(0, 0, 0, 0.4)");o.addColorStop(1,"rgba(0, 0, 0, 0)");this.ctx.clip();this.ctx.fillStyle=o;this.ctx.fillRect(0,0,r,2*t.height);this.ctx.restore()}},{key:"drawOuterShadow",value:function drawOuterShadow(){var t=this.getRect();this.ctx.save();this.ctx.beginPath();this.ctx.rect(t.left,t.top,t.width,t.height);var r=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y});this.ctx.translate(r.x,r.y);this.ctx.rotate(Math.PI+this.shadow.angle+Math.PI/2);var i=this.ctx.createLinearGradient(0,0,this.shadow.width,0);if(0===this.shadow.direction){this.ctx.translate(0,-100);i.addColorStop(0,"rgba(0, 0, 0, "+this.shadow.opacity+")");i.addColorStop(1,"rgba(0, 0, 0, 0)")}else{this.ctx.translate(-this.shadow.width,-100);i.addColorStop(0,"rgba(0, 0, 0, 0)");i.addColorStop(1,"rgba(0, 0, 0, "+this.shadow.opacity+")")}this.ctx.clip();this.ctx.fillStyle=i;this.ctx.fillRect(0,0,this.shadow.width,2*t.height);this.ctx.restore()}},{key:"drawInnerShadow",value:function drawInnerShadow(){var t=this.getRect();this.ctx.save();this.ctx.beginPath();var r=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y}),i=this.convertRectToGlobal(this.pageRect);this.ctx.moveTo(i.topLeft.x,i.topLeft.y);this.ctx.lineTo(i.topRight.x,i.topRight.y);this.ctx.lineTo(i.bottomRight.x,i.bottomRight.y);this.ctx.lineTo(i.bottomLeft.x,i.bottomLeft.y);this.ctx.translate(r.x,r.y);this.ctx.rotate(Math.PI+this.shadow.angle+Math.PI/2);var o=3*this.shadow.width/4,a=this.ctx.createLinearGradient(0,0,o,0);if(0===this.shadow.direction){this.ctx.translate(-o,-100);a.addColorStop(1,"rgba(0, 0, 0, "+this.shadow.opacity+")");a.addColorStop(.9,"rgba(0, 0, 0, 0.05)");a.addColorStop(.7,"rgba(0, 0, 0, "+this.shadow.opacity+")");a.addColorStop(0,"rgba(0, 0, 0, 0)")}else{this.ctx.translate(0,-100);a.addColorStop(0,"rgba(0, 0, 0, "+this.shadow.opacity+")");a.addColorStop(.1,"rgba(0, 0, 0, 0.05)");a.addColorStop(.3,"rgba(0, 0, 0, "+this.shadow.opacity+")");a.addColorStop(1,"rgba(0, 0, 0, 0)")}this.ctx.clip();this.ctx.fillStyle=a;this.ctx.fillRect(0,0,o,2*t.height);this.ctx.restore()}},{key:"clear",value:function clear(){this.ctx.fillStyle="white";this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}}]);return CanvasRender}(g),m=function(){function UI(t,r,i){var o=this;_classCallCheck(this,UI);this.touchPoint=null;this.swipeTimeout=250;this.onResize=function(){o.update()};this.onMouseDown=function(t){if(o.checkTarget(t.target)){var r=o.getMousePos(t.clientX,t.clientY);o.app.startUserTouch(r);t.preventDefault()}};this.onTouchStart=function(t){if(o.checkTarget(t.target)&&t.changedTouches.length>0){var r=t.changedTouches[0],i=o.getMousePos(r.clientX,r.clientY);o.touchPoint={point:i,time:Date.now()};setTimeout((function(){null!==o.touchPoint&&o.app.startUserTouch(i)}),o.swipeTimeout);o.app.getSettings().mobileScrollSupport||t.preventDefault()}};this.onMouseUp=function(t){var r=o.getMousePos(t.clientX,t.clientY);o.app.userStop(r)};this.onMouseMove=function(t){var r=o.getMousePos(t.clientX,t.clientY);o.app.userMove(r,!1)};this.onTouchMove=function(t){if(t.changedTouches.length>0){var r=t.changedTouches[0],i=o.getMousePos(r.clientX,r.clientY);if(o.app.getSettings().mobileScrollSupport){null!==o.touchPoint&&(Math.abs(o.touchPoint.point.x-i.x)>10||"read"!==o.app.getState())&&t.cancelable&&o.app.userMove(i,!0);"read"!==o.app.getState()&&t.preventDefault()}else o.app.userMove(i,!0)}};this.onTouchEnd=function(t){if(t.changedTouches.length>0){var r=t.changedTouches[0],i=o.getMousePos(r.clientX,r.clientY),a=!1;if(null!==o.touchPoint){var u=i.x-o.touchPoint.point.x,l=Math.abs(i.y-o.touchPoint.point.y);if(Math.abs(u)>o.swipeDistance&&l<2*o.swipeDistance&&Date.now()-o.touchPoint.time<o.swipeTimeout){u>0?o.app.flipPrev(o.touchPoint.point.y<o.app.getRender().getRect().height/2?"top":"bottom"):o.app.flipNext(o.touchPoint.point.y<o.app.getRender().getRect().height/2?"top":"bottom");a=!0}o.touchPoint=null}o.app.userStop(i,a)}};this.parentElement=t;t.classList.add("stf__parent");t.insertAdjacentHTML("afterbegin",'<div class="stf__wrapper"></div>');this.wrapper=t.querySelector(".stf__wrapper");this.app=r;var a=this.app.getSettings().usePortrait?1:2;t.style.minWidth=i.minWidth*a+"px";t.style.minHeight=i.minHeight+"px";if("fixed"===i.size){t.style.minWidth=i.width*a+"px";t.style.minHeight=i.height+"px"}if(i.autoSize){t.style.width="100%";t.style.maxWidth=2*i.maxWidth+"px"}t.style.display="block";window.addEventListener("resize",this.onResize,!1);this.swipeDistance=i.swipeDistance}_createClass(UI,[{key:"destroy",value:function destroy(){this.app.getSettings().useMouseEvents&&this.removeHandlers();this.distElement.remove();this.wrapper.remove()}},{key:"getDistElement",value:function getDistElement(){return this.distElement}},{key:"getWrapper",value:function getWrapper(){return this.wrapper}},{key:"setOrientationStyle",value:function setOrientationStyle(t){this.wrapper.classList.remove("--portrait","--landscape");if("portrait"===t){this.app.getSettings().autoSize&&(this.wrapper.style.paddingBottom=this.app.getSettings().height/this.app.getSettings().width*100+"%");this.wrapper.classList.add("--portrait")}else{this.app.getSettings().autoSize&&(this.wrapper.style.paddingBottom=this.app.getSettings().height/(2*this.app.getSettings().width)*100+"%");this.wrapper.classList.add("--landscape")}this.update()}},{key:"removeHandlers",value:function removeHandlers(){window.removeEventListener("resize",this.onResize);this.distElement.removeEventListener("mousedown",this.onMouseDown);this.distElement.removeEventListener("touchstart",this.onTouchStart);window.removeEventListener("mousemove",this.onMouseMove);window.removeEventListener("touchmove",this.onTouchMove);window.removeEventListener("mouseup",this.onMouseUp);window.removeEventListener("touchend",this.onTouchEnd)}},{key:"setHandlers",value:function setHandlers(){window.addEventListener("resize",this.onResize,!1);if(this.app.getSettings().useMouseEvents){this.distElement.addEventListener("mousedown",this.onMouseDown);this.distElement.addEventListener("touchstart",this.onTouchStart);window.addEventListener("mousemove",this.onMouseMove);window.addEventListener("touchmove",this.onTouchMove,{passive:!this.app.getSettings().mobileScrollSupport});window.addEventListener("mouseup",this.onMouseUp);window.addEventListener("touchend",this.onTouchEnd)}}},{key:"getMousePos",value:function getMousePos(t,r){var i=this.distElement.getBoundingClientRect();return{x:t-i.left,y:r-i.top}}},{key:"checkTarget",value:function checkTarget(t){return!this.app.getSettings().clickEventForward||!["a","button"].includes(t.tagName.toLowerCase())}}]);return UI}(),w=function(t){_inherits(HTMLUI,t);var r=_createSuper(HTMLUI);function HTMLUI(t,i,o,a){var u;_classCallCheck(this,HTMLUI);(u=r.call(this,t,i,o)).wrapper.insertAdjacentHTML("afterbegin",'<div class="stf__block"></div>');u.distElement=t.querySelector(".stf__block");u.items=a;var l,c=_createForOfIteratorHelper(a);try{for(c.s();!(l=c.n()).done;){var h=l.value;u.distElement.appendChild(h)}}catch(t){c.e(t)}finally{c.f()}u.setHandlers();return u}_createClass(HTMLUI,[{key:"clear",value:function clear(){var t,r=_createForOfIteratorHelper(this.items);try{for(r.s();!(t=r.n()).done;){var i=t.value;this.parentElement.appendChild(i)}}catch(t){r.e(t)}finally{r.f()}}},{key:"updateItems",value:function updateItems(t){this.removeHandlers();this.distElement.innerHTML="";var r,i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;this.distElement.appendChild(o)}}catch(t){i.e(t)}finally{i.f()}this.items=t;this.setHandlers()}},{key:"update",value:function update(){this.app.getRender().update()}}]);return HTMLUI}(m),b=function(t){_inherits(CanvasUI,t);var r=_createSuper(CanvasUI);function CanvasUI(t,i,o){var a;_classCallCheck(this,CanvasUI);(a=r.call(this,t,i,o)).wrapper.innerHTML='<canvas class="stf__canvas"></canvas>';a.canvas=t.querySelectorAll("canvas")[0];a.distElement=a.canvas;a.resizeCanvas();a.setHandlers();return a}_createClass(CanvasUI,[{key:"resizeCanvas",value:function resizeCanvas(){var t=getComputedStyle(this.canvas),r=parseInt(t.getPropertyValue("width"),10),i=parseInt(t.getPropertyValue("height"),10);this.canvas.width=r;this.canvas.height=i}},{key:"getCanvas",value:function getCanvas(){return this.canvas}},{key:"update",value:function update(){this.resizeCanvas();this.app.getRender().update()}}]);return CanvasUI}(m),D=function(){function EventObject(){_classCallCheck(this,EventObject);this.events=new Map}_createClass(EventObject,[{key:"on",value:function on(t,r){this.events.has(t)?this.events.get(t).push(r):this.events.set(t,[r]);return this}},{key:"off",value:function off(t){this.events.delete(t)}},{key:"trigger",value:function trigger(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(this.events.has(t)){var o,a=_createForOfIteratorHelper(this.events.get(t));try{for(a.s();!(o=a.n()).done;){(0,o.value)({data:i,object:r})}}catch(t){a.e(t)}finally{a.f()}}}}]);return EventObject}(),P=function(t){_inherits(HTMLRender,t);var r=_createSuper(HTMLRender);function HTMLRender(t,i,o){var a;_classCallCheck(this,HTMLRender);(a=r.call(this,t,i)).outerShadow=null;a.innerShadow=null;a.hardShadow=null;a.hardInnerShadow=null;a.element=o;a.createShadows();return a}_createClass(HTMLRender,[{key:"createShadows",value:function createShadows(){this.element.insertAdjacentHTML("beforeend",'<div class="stf__outerShadow"></div>\n             <div class="stf__innerShadow"></div>\n             <div class="stf__hardShadow"></div>\n             <div class="stf__hardInnerShadow"></div>');this.outerShadow=this.element.querySelector(".stf__outerShadow");this.innerShadow=this.element.querySelector(".stf__innerShadow");this.hardShadow=this.element.querySelector(".stf__hardShadow");this.hardInnerShadow=this.element.querySelector(".stf__hardInnerShadow")}},{key:"clearShadow",value:function clearShadow(){_get(_getPrototypeOf(HTMLRender.prototype),"clearShadow",this).call(this);this.outerShadow.style.cssText="display: none";this.innerShadow.style.cssText="display: none";this.hardShadow.style.cssText="display: none";this.hardInnerShadow.style.cssText="display: none"}},{key:"reload",value:function reload(){this.element.querySelector(".stf__outerShadow")||this.createShadows()}},{key:"drawHardInnerShadow",value:function drawHardInnerShadow(){var t=this.getRect(),r=this.shadow.progress>100?200-this.shadow.progress:this.shadow.progress,i=(100-r)*(2.5*t.pageWidth)/100+20;i>t.pageWidth&&(i=t.pageWidth);var o="\n            display: block;\n            z-index: ".concat((this.getSettings().startZIndex+5).toString(10),";\n            width: ").concat(i,"px;\n            height: ").concat(t.height,"px;\n            background: linear-gradient(to right,\n                rgba(0, 0, 0, ").concat(this.shadow.opacity*r/100,") 5%,\n                rgba(0, 0, 0, 0) 100%);\n            left: ").concat(t.left+t.width/2,"px;\n            transform-origin: 0 0;\n        ");o+=0===this.getDirection()&&this.shadow.progress>100||1===this.getDirection()&&this.shadow.progress<=100?"transform: translate3d(0, 0, 0);":"transform: translate3d(0, 0, 0) rotateY(180deg);";this.hardInnerShadow.style.cssText=o}},{key:"drawHardOuterShadow",value:function drawHardOuterShadow(){var t=this.getRect(),r=(100-(this.shadow.progress>100?200-this.shadow.progress:this.shadow.progress))*(2.5*t.pageWidth)/100+20;r>t.pageWidth&&(r=t.pageWidth);var i="\n            display: block;\n            z-index: ".concat((this.getSettings().startZIndex+4).toString(10),";\n            width: ").concat(r,"px;\n            height: ").concat(t.height,"px;\n            background: linear-gradient(to left, rgba(0, 0, 0, ").concat(this.shadow.opacity,") 5%, rgba(0, 0, 0, 0) 100%);\n            left: ").concat(t.left+t.width/2,"px;\n            transform-origin: 0 0;\n        ");i+=0===this.getDirection()&&this.shadow.progress>100||1===this.getDirection()&&this.shadow.progress<=100?"transform: translate3d(0, 0, 0) rotateY(180deg);":"transform: translate3d(0, 0, 0);";this.hardShadow.style.cssText=i}},{key:"drawInnerShadow",value:function drawInnerShadow(){for(var t=this.getRect(),r=3*this.shadow.width/4,i=0===this.getDirection()?r:0,o=0===this.getDirection()?"to left":"to right",a=this.convertToGlobal(this.shadow.pos),u=this.shadow.angle+3*Math.PI/2,l="polygon( ",h=0,d=[this.pageRect.topLeft,this.pageRect.topRight,this.pageRect.bottomRight,this.pageRect.bottomLeft];h<d.length;h++){var p=d[h],v=1===this.getDirection()?{x:-p.x+this.shadow.pos.x,y:p.y-this.shadow.pos.y}:{x:p.x-this.shadow.pos.x,y:p.y-this.shadow.pos.y};l+=(v=c.GetRotatedPoint(v,{x:i,y:100},u)).x+"px "+v.y+"px, "}l=l.slice(0,-2);l+=")";var g="\n            display: block;\n            z-index: ".concat((this.getSettings().startZIndex+10).toString(10),";\n            width: ").concat(r,"px;\n            height: ").concat(2*t.height,"px;\n            background: linear-gradient(").concat(o,",\n                rgba(0, 0, 0, ").concat(this.shadow.opacity,") 5%,\n                rgba(0, 0, 0, 0.05) 15%,\n                rgba(0, 0, 0, ").concat(this.shadow.opacity,") 35%,\n                rgba(0, 0, 0, 0) 100%);\n            transform-origin: ").concat(i,"px 100px;\n            transform: translate3d(").concat(a.x-i,"px, ").concat(a.y-100,"px, 0) rotate(").concat(u,"rad);\n            clip-path: ").concat(l,";\n            -webkit-clip-path: ").concat(l,";\n        ");this.innerShadow.style.cssText=g}},{key:"drawOuterShadow",value:function drawOuterShadow(){for(var t=this.getRect(),r=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y}),i=this.shadow.angle+3*Math.PI/2,o=1===this.getDirection()?this.shadow.width:0,a=0===this.getDirection()?"to right":"to left",u="polygon( ",l=0,h=[{x:0,y:0},{x:t.pageWidth,y:0},{x:t.pageWidth,y:t.height},{x:0,y:t.height}];l<h.length;l++){var d=h[l];if(null!==d){var p=1===this.getDirection()?{x:-d.x+this.shadow.pos.x,y:d.y-this.shadow.pos.y}:{x:d.x-this.shadow.pos.x,y:d.y-this.shadow.pos.y};u+=(p=c.GetRotatedPoint(p,{x:o,y:100},i)).x+"px "+p.y+"px, "}}u=u.slice(0,-2);u+=")";var v="\n            display: block;\n            z-index: ".concat((this.getSettings().startZIndex+10).toString(10),";\n            width: ").concat(this.shadow.width,"px;\n            height: ").concat(2*t.height,"px;\n            background: linear-gradient(").concat(a,", rgba(0, 0, 0, ").concat(this.shadow.opacity,"), rgba(0, 0, 0, 0));\n            transform-origin: ").concat(o,"px 100px;\n            transform: translate3d(").concat(r.x-o,"px, ").concat(r.y-100,"px, 0) rotate(").concat(i,"rad);\n            clip-path: ").concat(u,";\n            -webkit-clip-path: ").concat(u,";\n        ");this.outerShadow.style.cssText=v}},{key:"drawLeftPage",value:function drawLeftPage(){if("portrait"!==this.orientation&&null!==this.leftPage)if(1===this.direction&&null!==this.flippingPage&&"hard"===this.flippingPage.getDrawingDensity()){if(this.flippingPage.getHardAngle()<-90){this.leftPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10);this.leftPage.setHardDrawingAngle(180+this.flippingPage.getHardAngle());this.leftPage.draw(this.flippingPage.getDrawingDensity())}else this.leftPage.getElement().style.display="none"}else this.leftPage.simpleDraw(0)}},{key:"drawRightPage",value:function drawRightPage(){if(null!==this.rightPage)if(0===this.direction&&null!==this.flippingPage&&"hard"===this.flippingPage.getDrawingDensity()){if(this.flippingPage.getHardAngle()>90){this.rightPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10);this.rightPage.setHardDrawingAngle(180+this.flippingPage.getHardAngle());this.rightPage.draw(this.flippingPage.getDrawingDensity())}else this.rightPage.getElement().style.display="none"}else this.rightPage.simpleDraw(1)}},{key:"drawBottomPage",value:function drawBottomPage(){if(null!==this.bottomPage){var t=null!=this.flippingPage?this.flippingPage.getDrawingDensity():null;if("portrait"!==this.orientation||1!==this.direction){this.bottomPage.getElement().style.zIndex=(this.getSettings().startZIndex+3).toString(10);this.bottomPage.draw(t)}}}},{key:"drawFrame",value:function drawFrame(){if(null!==this.flippingPage){if(this.flippingPage.getHardAngle()===this.lastAngle)return;this.lastAngle=this.flippingPage.getHardAngle()}else this.lastAngle=-1234;this.clear();this.drawLeftPage();this.drawRightPage();this.drawBottomPage();if(null!=this.flippingPage){if(this.flippingPage.state.hardDrawingAngle<=90){this.flippingPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10);this.flippingPage.draw()}else this.flippingPage.getElement().style.display="none"}if(null!=this.shadow&&null!==this.flippingPage)if("soft"===this.flippingPage.getDrawingDensity()){this.drawOuterShadow();this.drawInnerShadow()}else{this.drawHardOuterShadow();this.drawHardInnerShadow()}}},{key:"clear",value:function clear(){var t,r=_createForOfIteratorHelper(this.app.getPageCollection().getPages());try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i!==this.leftPage&&i!==this.rightPage&&i!==this.flippingPage&&i!==this.bottomPage){var o=i.getElement().style;"none"!==o.display&&(o.cssText="display: none")}i.getTemporaryCopy()!==this.flippingPage&&i.hideTemporaryCopy()}}catch(t){r.e(t)}finally{r.f()}}},{key:"update",value:function update(){_get(_getPrototypeOf(HTMLRender.prototype),"update",this).call(this);null!==this.rightPage&&this.rightPage.setOrientation(1);null!==this.leftPage&&this.leftPage.setOrientation(0)}}]);return HTMLRender}(g),E=function(){function Settings(){_classCallCheck(this,Settings);this._default={startPage:0,size:"fixed",width:0,height:0,minWidth:0,maxWidth:0,minHeight:0,maxHeight:0,drawShadow:!0,flippingTime:1e3,usePortrait:!0,startZIndex:0,autoSize:!0,maxShadowOpacity:1,showCover:!1,mobileScrollSupport:!0,swipeDistance:30,clickEventForward:!0,useMouseEvents:!0,showPageCorners:!0,disableFlipByClick:!1}}_createClass(Settings,[{key:"getSettings",value:function getSettings(t){var r=this._default;Object.assign(r,t);if("stretch"!==r.size&&"fixed"!==r.size)throw new Error('Invalid size type. Available only "fixed" and "stretch" value');if(r.width<=0||r.height<=0)throw new Error("Invalid width or height");if(r.flippingTime<=0)throw new Error("Invalid flipping time");if("stretch"===r.size){r.minWidth<=0&&(r.minWidth=100);r.maxWidth<r.minWidth&&(r.maxWidth=2e3);r.minHeight<=0&&(r.minHeight=100);r.maxHeight<r.minHeight&&(r.maxHeight=2e3)}else{r.minWidth=r.width;r.maxWidth=r.width;r.minHeight=r.height;r.maxHeight=r.height}return r}}]);return Settings}();!function styleInject(t,r){void 0===r&&(r={});var i=r.insertAt;if(t&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css";"top"===i&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a);a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}}(".stf__parent {\n  position: relative;\n  display: block;\n  box-sizing: border-box;\n  transform: translateZ(0);\n\n  -ms-touch-action: pan-y;\n  touch-action: pan-y;\n}\n\n.sft__wrapper {\n  position: relative;\n  width: 100%;\n  box-sizing: border-box;\n}\n\n.stf__parent canvas {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  left: 0;\n  top: 0;\n}\n\n.stf__block {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  box-sizing: border-box;\n  perspective: 2000px;\n}\n\n.stf__item {\n  display: none;\n  position: absolute;\n  transform-style: preserve-3d;\n}\n\n.stf__outerShadow {\n  position: absolute;\n  left: 0;\n  top: 0;\n}\n\n.stf__innerShadow {\n  position: absolute;\n  left: 0;\n  top: 0;\n}\n\n.stf__hardShadow {\n  position: absolute;\n  left: 0;\n  top: 0;\n}\n\n.stf__hardInnerShadow {\n  position: absolute;\n  left: 0;\n  top: 0;\n}");r.PageFlip=function(t){_inherits(PageFlip,t);var r=_createSuper(PageFlip);function PageFlip(t,i){var o;_classCallCheck(this,PageFlip);(o=r.call(this)).isUserTouch=!1;o.isUserMove=!1;o.setting=null;o.pages=null;o.setting=(new E).getSettings(i);o.block=t;return o}_createClass(PageFlip,[{key:"destroy",value:function destroy(){this.ui.destroy()}},{key:"update",value:function update(){this.render.update();this.pages.show()}},{key:"loadFromImages",value:function loadFromImages(t){var r=this;this.ui=new b(this.block,this,this.setting);var i=this.ui.getCanvas();this.render=new y(this,this.setting,i);this.flipController=new v(this.render,this);this.pages=new l(this,this.render,t);this.pages.load();this.render.start();this.pages.show(this.setting.startPage);setTimeout((function(){r.ui.update();r.trigger("init",r,{page:r.setting.startPage,mode:r.render.getOrientation()})}),1)}},{key:"loadFromHTML",value:function loadFromHTML(t){var r=this;this.ui=new w(this.block,this,this.setting,t);this.render=new P(this,this.setting,this.ui.getDistElement());this.flipController=new v(this.render,this);this.pages=new d(this,this.render,this.ui.getDistElement(),t);this.pages.load();this.render.start();this.pages.show(this.setting.startPage);setTimeout((function(){r.ui.update();r.trigger("init",r,{page:r.setting.startPage,mode:r.render.getOrientation()})}),1)}},{key:"updateFromImages",value:function updateFromImages(t){var r=this.pages.getCurrentPageIndex();this.pages.destroy();this.pages=new l(this,this.render,t);this.pages.load();this.pages.show(r);this.trigger("update",this,{page:r,mode:this.render.getOrientation()})}},{key:"updateFromHtml",value:function updateFromHtml(t){var r=this.pages.getCurrentPageIndex();this.pages.destroy();this.pages=new d(this,this.render,this.ui.getDistElement(),t);this.pages.load();this.ui.updateItems(t);this.render.reload();this.pages.show(r);this.trigger("update",this,{page:r,mode:this.render.getOrientation()})}},{key:"clear",value:function clear(){this.pages.destroy();this.ui.clear()}},{key:"turnToPrevPage",value:function turnToPrevPage(){this.pages.showPrev()}},{key:"turnToNextPage",value:function turnToNextPage(){this.pages.showNext()}},{key:"turnToPage",value:function turnToPage(t){this.pages.show(t)}},{key:"flipNext",value:function flipNext(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"top";this.flipController.flipNext(t)}},{key:"flipPrev",value:function flipPrev(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"top";this.flipController.flipPrev(t)}},{key:"flip",value:function flip(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top";this.flipController.flipToPage(t,r)}},{key:"updateState",value:function updateState(t){this.trigger("changeState",this,t)}},{key:"updatePageIndex",value:function updatePageIndex(t){this.trigger("flip",this,t)}},{key:"updateOrientation",value:function updateOrientation(t){this.ui.setOrientationStyle(t);this.update();this.trigger("changeOrientation",this,t)}},{key:"getPageCount",value:function getPageCount(){return this.pages.getPageCount()}},{key:"getCurrentPageIndex",value:function getCurrentPageIndex(){return this.pages.getCurrentPageIndex()}},{key:"getPage",value:function getPage(t){return this.pages.getPage(t)}},{key:"getRender",value:function getRender(){return this.render}},{key:"getFlipController",value:function getFlipController(){return this.flipController}},{key:"getOrientation",value:function getOrientation(){return this.render.getOrientation()}},{key:"getBoundsRect",value:function getBoundsRect(){return this.render.getRect()}},{key:"getSettings",value:function getSettings(){return this.setting}},{key:"getUI",value:function getUI(){return this.ui}},{key:"getState",value:function getState(){return this.flipController.getState()}},{key:"getPageCollection",value:function getPageCollection(){return this.pages}},{key:"startUserTouch",value:function startUserTouch(t){this.mousePosition=t;this.isUserTouch=!0;this.isUserMove=!1}},{key:"userMove",value:function userMove(t,r){if(this.isUserTouch||r||!this.setting.showPageCorners){if(this.isUserTouch&&c.GetDistanceBetweenTwoPoint(this.mousePosition,t)>5){this.isUserMove=!0;this.flipController.fold(t)}}else this.flipController.showCorner(t)}},{key:"userStop",value:function userStop(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.isUserTouch){this.isUserTouch=!1;r||(this.isUserMove?this.flipController.stopMove():this.flipController.flip(t))}}}]);return PageFlip}(D)},(t,r,i)=>{var o=i(67),a=i(340),u=i(46);o({target:"Array",proto:!0},{fill:a});u("fill")},(t,r,i)=>{var o=i(9),a=i(52),u=i(55);t.exports=function fill(t){for(var r=o(this),i=u(r),l=arguments.length,c=a(l>1?arguments[1]:void 0,i),h=l>2?arguments[2]:void 0,d=void 0===h?i:a(h,i);d>c;)r[c++]=t;return r}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);i(175);i(176);i(177);i(178);i(193);i(182);i(183);i(185);i(188);i(229);i(195);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFPageView=void 0;i(42);i(88);i(92);i(288);i(95);i(142);i(222);i(204);i(126);i(246);i(212);i(226);i(298);i(179);var o=i(291),a=i(245),u=i(342),l=i(343),c=i(293),h=i(337),d=(i(296),i(344)),p=i(345),v=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(346)),g=i(348),y=i(417),m=i(418),w=i(419);function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var b=c.compatibilityParams.maxCanvasPixels||16777216,D=function DEFAULT_LAYER_PROPERTIES(){return null},P=new WeakMap,E=new WeakMap,A=new WeakMap,S=new WeakMap,x=new WeakMap,C=new WeakMap,k=new WeakMap,T=new WeakMap,I=new WeakMap,L=new WeakMap,O=new WeakSet,M=new WeakSet,B=new WeakSet,G=new WeakSet,R=new WeakSet,N=new WeakSet,j=new WeakSet,V=new WeakSet;r.PDFPageView=function(){function PDFPageView(t){var r,i,u,l,c,d=this;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFPageView);_classPrivateMethodInitSpec(this,V);_classPrivateMethodInitSpec(this,j);_classPrivateMethodInitSpec(this,N);_classPrivateMethodInitSpec(this,R);_classPrivateMethodInitSpec(this,G);_classPrivateMethodInitSpec(this,B);_classPrivateMethodInitSpec(this,M);_classPrivateMethodInitSpec(this,O);_classPrivateFieldInitSpec(this,P,{writable:!0,value:o.AnnotationMode.ENABLE_FORMS});_classPrivateFieldInitSpec(this,E,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,A,{writable:!0,value:null});_classPrivateFieldInitSpec(this,S,{writable:!0,value:null});_classPrivateFieldInitSpec(this,x,{writable:!0,value:null});_classPrivateFieldInitSpec(this,C,{writable:!0,value:null});_classPrivateFieldInitSpec(this,k,{writable:!0,value:a.RenderingStates.INITIAL});_classPrivateFieldInitSpec(this,T,{writable:!0,value:a.TextLayerMode.ENABLE});_classPrivateFieldInitSpec(this,I,{writable:!0,value:{directDrawing:!0,initialOptionalContent:!0,regularAnnotations:!0}});_classPrivateFieldInitSpec(this,L,{writable:!0,value:new WeakMap});var p=t.container,v=t.defaultViewport;this.id=t.id;this.renderingId="page"+this.id;_classPrivateFieldSet(this,A,t.layerProperties||D);this.pdfPage=null;this.pageLabel=null;this.rotation=0;this.scale=t.scale||a.DEFAULT_SCALE;this.viewport=v;this.pdfPageRotate=v.rotation;this._optionalContentConfigPromise=t.optionalContentConfigPromise||null;_classPrivateFieldSet(this,T,null!==(r=t.textLayerMode)&&void 0!==r?r:a.TextLayerMode.ENABLE);_classPrivateFieldSet(this,P,null!==(i=t.annotationMode)&&void 0!==i?i:o.AnnotationMode.ENABLE_FORMS);this.imageResourcesPath=t.imageResourcesPath||"";this.isOffscreenCanvasSupported=null===(u=t.isOffscreenCanvasSupported)||void 0===u||u;this.maxCanvasPixels=null!==(l=t.maxCanvasPixels)&&void 0!==l?l:b;this.pageColors=t.pageColors||null;this.eventBus=t.eventBus;this.renderingQueue=t.renderingQueue;this.l10n=t.l10n||h.NullL10n;this.renderTask=null;this.resume=null;this._isStandalone=!(null!==(c=this.renderingQueue)&&void 0!==c&&c.hasViewer());this._container=p;if(t.useOnlyCssZoom){console.error("useOnlyCssZoom was removed, please use `maxCanvasPixels = 0` instead.");this.maxCanvasPixels=0}this._annotationCanvasMap=null;this.annotationLayer=null;this.annotationEditorLayer=null;this.textLayer=null;this.zoomLayer=null;this.xfaLayer=null;this.structTreeLayer=null;var g=document.createElement("div");g.className="page";g.setAttribute("data-page-number",this.id);g.setAttribute("role","region");this.l10n.get("page_landmark",{page:this.id}).then((function(t){g.setAttribute("aria-label",t)}));this.div=g;_classPrivateMethodGet(this,O,_setDimensions2).call(this);null==p||p.append(g);if(this._isStandalone){null==p||p.style.setProperty("--scale-factor",this.scale*o.PixelsPerInch.PDF_TO_CSS_UNITS);var y=t.optionalContentConfigPromise;y&&y.then((function(t){y===d._optionalContentConfigPromise&&(_classPrivateFieldGet(d,I).initialOptionalContent=t.hasInitialVisibility)}))}}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFPageView,[{key:"renderingState",get:function get(){return _classPrivateFieldGet(this,k)},set:function set(t){var r=this;if(t!==_classPrivateFieldGet(this,k)){_classPrivateFieldSet(this,k,t);if(_classPrivateFieldGet(this,S)){clearTimeout(_classPrivateFieldGet(this,S));_classPrivateFieldSet(this,S,null)}switch(t){case a.RenderingStates.PAUSED:this.div.classList.remove("loading");break;case a.RenderingStates.RUNNING:this.div.classList.add("loadingIcon");_classPrivateFieldSet(this,S,setTimeout((function(){r.div.classList.add("loading");_classPrivateFieldSet(r,S,null)}),0));break;case a.RenderingStates.INITIAL:case a.RenderingStates.FINISHED:this.div.classList.remove("loadingIcon","loading")}}}},{key:"setPdfPage",value:function setPdfPage(t){var r,i;if(this._isStandalone&&("CanvasText"===(null===(r=this.pageColors)||void 0===r?void 0:r.foreground)||"Canvas"===(null===(i=this.pageColors)||void 0===i?void 0:i.background))){var a;null===(a=this._container)||void 0===a||a.style.setProperty("--hcm-highligh-filter",t.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"))}this.pdfPage=t;this.pdfPageRotate=t.rotate;var u=(this.rotation+this.pdfPageRotate)%360;this.viewport=t.getViewport({scale:this.scale*o.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:u});_classPrivateMethodGet(this,O,_setDimensions2).call(this);this.reset()}},{key:"destroy",value:function destroy(){var t;this.reset();null===(t=this.pdfPage)||void 0===t||t.cleanup()}},{key:"_textHighlighter",get:function get(){return(0,o.shadow)(this,"_textHighlighter",new y.TextHighlighter({pageIndex:this.id-1,eventBus:this.eventBus,findController:_classPrivateFieldGet(this,A).call(this).findController}))}},{key:"_resetZoomLayer",value:function _resetZoomLayer(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.zoomLayer){var r=this.zoomLayer.firstChild;_classPrivateFieldGet(this,L).delete(r);r.width=0;r.height=0;t&&this.zoomLayer.remove();this.zoomLayer=null}}},{key:"reset",value:function reset(){var t,r,i,o,u,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=l.keepZoomLayer,h=void 0!==c&&c,d=l.keepAnnotationLayer,p=void 0!==d&&d,v=l.keepAnnotationEditorLayer,g=void 0!==v&&v,y=l.keepXfaLayer,m=void 0!==y&&y,w=l.keepTextLayer,b=void 0!==w&&w;this.cancelRendering({keepAnnotationLayer:p,keepAnnotationEditorLayer:g,keepXfaLayer:m,keepTextLayer:b});this.renderingState=a.RenderingStates.INITIAL;for(var D=this.div,P=D.childNodes,E=h&&this.zoomLayer||null,A=p&&(null===(t=this.annotationLayer)||void 0===t?void 0:t.div)||null,S=g&&(null===(r=this.annotationEditorLayer)||void 0===r?void 0:r.div)||null,x=m&&(null===(i=this.xfaLayer)||void 0===i?void 0:i.div)||null,C=b&&(null===(o=this.textLayer)||void 0===o?void 0:o.div)||null,k=P.length-1;k>=0;k--){var T=P[k];switch(T){case E:case A:case S:case x:case C:continue}T.remove()}D.removeAttribute("data-loaded");A&&this.annotationLayer.hide();S&&this.annotationEditorLayer.hide();x&&this.xfaLayer.hide();C&&this.textLayer.hide();null===(u=this.structTreeLayer)||void 0===u||u.hide();if(!E){if(this.canvas){_classPrivateFieldGet(this,L).delete(this.canvas);this.canvas.width=0;this.canvas.height=0;delete this.canvas}this._resetZoomLayer()}}},{key:"update",value:function update(t){var r=this,i=t.scale,u=void 0===i?0:i,l=t.rotation,c=void 0===l?null:l,h=t.optionalContentConfigPromise,d=void 0===h?null:h,p=t.drawingDelay,v=void 0===p?-1:p;this.scale=u||this.scale;"number"==typeof c&&(this.rotation=c);if(d instanceof Promise){this._optionalContentConfigPromise=d;d.then((function(t){d===r._optionalContentConfigPromise&&(_classPrivateFieldGet(r,I).initialOptionalContent=t.hasInitialVisibility)}))}_classPrivateFieldGet(this,I).directDrawing=!0;var g=(this.rotation+this.pdfPageRotate)%360;this.viewport=this.viewport.clone({scale:this.scale*o.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:g});_classPrivateMethodGet(this,O,_setDimensions2).call(this);if(this._isStandalone){var y;null===(y=this._container)||void 0===y||y.style.setProperty("--scale-factor",this.viewport.scale)}if(this.canvas){var m=!1;if(_classPrivateFieldGet(this,E))if(0===this.maxCanvasPixels)m=!0;else if(this.maxCanvasPixels>0){var w=this.viewport,b=w.width,D=w.height,P=this.outputScale,A=P.sx,S=P.sy;m=(Math.floor(b)*A|0)*(Math.floor(D)*S|0)>this.maxCanvasPixels}var x=!m&&v>=0&&v<1e3;if(x||m){if(x&&this.renderingState!==a.RenderingStates.FINISHED){this.cancelRendering({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0,cancelExtraDelay:v});this.renderingState=a.RenderingStates.FINISHED;_classPrivateFieldGet(this,I).directDrawing=!1}this.cssTransform({target:this.canvas,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0,redrawTextLayer:!x,hideTextLayer:x});if(x)return;this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:_classPrivateFieldGet(this,C)});return}if(!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})}},{key:"cancelRendering",value:function cancelRendering(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.keepAnnotationLayer,i=void 0!==r&&r,o=t.keepAnnotationEditorLayer,a=void 0!==o&&o,u=t.keepXfaLayer,l=void 0!==u&&u,c=t.keepTextLayer,h=void 0!==c&&c,d=t.cancelExtraDelay,p=void 0===d?0:d;if(this.renderTask){this.renderTask.cancel(p);this.renderTask=null}this.resume=null;if(this.textLayer&&(!h||!this.textLayer.div)){this.textLayer.cancel();this.textLayer=null}this.structTreeLayer&&!this.textLayer&&(this.structTreeLayer=null);if(this.annotationLayer&&(!i||!this.annotationLayer.div)){this.annotationLayer.cancel();this.annotationLayer=null;this._annotationCanvasMap=null}if(this.annotationEditorLayer&&(!a||!this.annotationEditorLayer.div)){this.annotationEditorLayer.cancel();this.annotationEditorLayer=null}if(this.xfaLayer&&(!l||!this.xfaLayer.div)){var v;this.xfaLayer.cancel();this.xfaLayer=null;null===(v=this._textHighlighter)||void 0===v||v.disable()}}},{key:"cssTransform",value:function cssTransform(t){var r=t.target,i=t.redrawAnnotationLayer,o=void 0!==i&&i,a=t.redrawAnnotationEditorLayer,u=void 0!==a&&a,l=t.redrawXfaLayer,c=void 0!==l&&l,h=t.redrawTextLayer,d=void 0!==h&&h,p=t.hideTextLayer,v=void 0!==p&&p;if(!r.hasAttribute("zooming")){r.setAttribute("zooming",!0);var g=r.style;g.width=g.height=""}var y=_classPrivateFieldGet(this,L).get(r);if(this.viewport!==y){var m=this.viewport.rotation-y.rotation,w=Math.abs(m),b=1,D=1;if(90===w||270===w){var P=this.viewport,E=P.width,A=P.height;b=A/E;D=E/A}r.style.transform="rotate(".concat(m,"deg) scale(").concat(b,", ").concat(D,")")}o&&this.annotationLayer&&_classPrivateMethodGet(this,M,_renderAnnotationLayer2).call(this);u&&this.annotationEditorLayer&&_classPrivateMethodGet(this,B,_renderAnnotationEditorLayer2).call(this);c&&this.xfaLayer&&_classPrivateMethodGet(this,G,_renderXfaLayer2).call(this);if(this.textLayer)if(v){var S;this.textLayer.hide();null===(S=this.structTreeLayer)||void 0===S||S.hide()}else d&&_classPrivateMethodGet(this,R,_renderTextLayer2).call(this)}},{key:"width",get:function get(){return this.viewport.width}},{key:"height",get:function get(){return this.viewport.height}},{key:"getPagePoint",value:function getPagePoint(t,r){return this.viewport.convertToPdfPoint(t,r)}},{key:"draw",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r,i,c,h,d,y,b,D,S,x,C,k,I,O,N,j,W,H,U,z,K,Y,$,q,X,Z,Q,J,ee,te,re,ne,ie,oe,ae,se,ue,le=this;return _regeneratorRuntime().wrap((function _callee2$(ce){for(;;)switch(ce.prev=ce.next){case 0:if(this.renderingState!==a.RenderingStates.INITIAL){globalThis.ngxConsole.error("Must be in new state before drawing");this.reset()}t=this.div,r=this.l10n,i=this.pageColors,c=this.pdfPage,h=this.viewport;if(c){ce.next=5;break}this.renderingState=a.RenderingStates.FINISHED;throw new Error("pdfPage is not loaded");case 5:this.renderingState=a.RenderingStates.RUNNING;(d=document.createElement("div")).classList.add("canvasWrapper");t.append(d);if(!this.textLayer&&_classPrivateFieldGet(this,T)!==a.TextLayerMode.DISABLE&&!c.isPureXfa){this._accessibilityManager||(this._accessibilityManager=new p.TextAccessibilityManager);this.textLayer=new m.TextLayerBuilder({highlighter:this._textHighlighter,accessibilityManager:this._accessibilityManager,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,enablePermissions:_classPrivateFieldGet(this,T)===a.TextLayerMode.ENABLE_PERMISSIONS});t.append(this.textLayer.div)}if(!this.annotationLayer&&_classPrivateFieldGet(this,P)!==o.AnnotationMode.DISABLE){y=_classPrivateFieldGet(this,A).call(this),b=y.annotationStorage,D=y.downloadManager,S=y.enableScripting,x=y.fieldObjectsPromise,C=y.hasJSActionsPromise,k=y.linkService;this._annotationCanvasMap||(this._annotationCanvasMap=new Map);this.annotationLayer=new l.AnnotationLayerBuilder({pageDiv:t,pdfPage:c,annotationStorage:b,imageResourcesPath:this.imageResourcesPath,renderForms:_classPrivateFieldGet(this,P)===o.AnnotationMode.ENABLE_FORMS,linkService:k,downloadManager:D,l10n:r,enableScripting:S,hasJSActionsPromise:C,fieldObjectsPromise:x,annotationCanvasMap:this._annotationCanvasMap,accessibilityManager:this._accessibilityManager})}I=function renderContinueCallback(t){var r;null===(r=H)||void 0===r||r(!1);if(!le.renderingQueue||le.renderingQueue.isHighestPriority(le))t();else{le.renderingState=a.RenderingStates.PAUSED;le.resume=function(){le.renderingState=a.RenderingStates.RUNNING;t()}}};O=h.width,N=h.height;(j=document.createElement("canvas")).setAttribute("role","presentation");j.hidden=!0;W=!(null==i||!i.background||null==i||!i.foreground);H=function showCanvas(t){if(!W||t){j.hidden=!1;H=null}};d.append(j);this.canvas=j;U=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0,alpha:!1}:{alpha:!1};z=j.getContext("2d",U);K=this.outputScale=new a.OutputScale;if(0===this.maxCanvasPixels){Y=1/this.scale;K.sx*=Y;K.sy*=Y;_classPrivateFieldSet(this,E,!0)}else if(this.maxCanvasPixels>0){$=O*N;q=Math.sqrt(this.maxCanvasPixels/$);if(K.sx>q||K.sy>q){K.sx=q;K.sy=q;_classPrivateFieldSet(this,E,!0)}else _classPrivateFieldSet(this,E,!1)}X=(0,a.approximateFraction)(K.sx);Z=(0,a.approximateFraction)(K.sy);O=(0,a.roundToDivide)(O*K.sx,X[0]);N=(0,a.roundToDivide)(N*K.sy,Z[0]);Q=1;if((O>=4096||N>=4096)&&(this.maxWidth||!v.default.test({width:O,height:N}))){J=this.determineMaxDimensions();if((Q=Math.max(O/J,N/J))>1){ee=Math.floor(100*this.scale/Q)/100;Q=this.scale/ee;h.width/=Q;h.height/=Q;(0,g.warn)("Page ".concat(this.id,": Reduced the maximum zoom to ").concat(ee," because the browser can't render larger canvases."))}else Q=1}j.width=(0,a.roundToDivide)(h.width*K.sx,X[0]);j.height=(0,a.roundToDivide)(h.height*K.sy,Z[0]);(te=j.style).width=(0,a.roundToDivide)(h.width,X[1])+"px";te.height=(0,a.roundToDivide)(h.height,Z[1])+"px";_classPrivateFieldGet(this,L).set(j,h);re=K.scaled?[K.sx,0,0,K.sy,0,0]:null;ne={canvasContext:z,transform:re,viewport:h,annotationMode:_classPrivateFieldGet(this,P),optionalContentConfigPromise:this._optionalContentConfigPromise,annotationCanvasMap:this._annotationCanvasMap,pageColors:i};(ie=this.renderTask=this.pdfPage.render(ne)).onContinue=I;oe=ie.promise.then(_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var i,o,a,l;return _regeneratorRuntime().wrap((function _callee$(h){for(;;)switch(h.prev=h.next){case 0:null===(i=H)||void 0===i||i(!0);h.next=3;return _classPrivateMethodGet(le,V,_finishRenderTask2).call(le,ie);case 3:_classPrivateMethodGet(le,R,_renderTextLayer2).call(le);if(!le.annotationLayer){h.next=7;break}h.next=7;return _classPrivateMethodGet(le,M,_renderAnnotationLayer2).call(le);case 7:if(le.annotationEditorLayer){h.next=12;break}a=_classPrivateFieldGet(le,A).call(le);if(l=a.annotationEditorUIManager){h.next=11;break}return h.abrupt("return");case 11:le.annotationEditorLayer=new u.AnnotationEditorLayerBuilder({uiManager:l,pageDiv:t,pdfPage:c,l10n:r,accessibilityManager:le._accessibilityManager,annotationLayer:null===(o=le.annotationLayer)||void 0===o?void 0:o.annotationLayer});case 12:_classPrivateMethodGet(le,B,_renderAnnotationEditorLayer2).call(le);case 13:case"end":return h.stop()}}),_callee)}))),(function(t){if(!(t instanceof o.RenderingCancelledException)){var r;null===(r=H)||void 0===r||r(!0)}return _classPrivateMethodGet(le,V,_finishRenderTask2).call(le,ie,t)}));if(c.isPureXfa){if(this.xfaLayer)this.xfaLayer.div&&t.append(this.xfaLayer.div);else{ae=_classPrivateFieldGet(this,A).call(this),se=ae.annotationStorage,ue=ae.linkService;this.xfaLayer=new w.XfaLayerBuilder({pageDiv:t,pdfPage:c,annotationStorage:se,linkService:ue})}_classPrivateMethodGet(this,G,_renderXfaLayer2).call(this)}t.setAttribute("data-loaded",!0);this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id});return ce.abrupt("return",oe);case 45:case"end":return ce.stop()}}),_callee2,this)}))),function draw(){return t.apply(this,arguments)})},{key:"setPageLabel",value:function setPageLabel(t){this.pageLabel="string"==typeof t?t:null;null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}},{key:"determineMaxDimensions",value:function determineMaxDimensions(){if(this.maxWidth)return this.maxWidth;for(var t=0,r=[4096,8192,10836,11180,11402,14188,16384];t<r.length;t++){var i=r[t];if(!v.default.test({width:i+1,height:i+1})){this.maxWidth=i;return this.maxWidth}}return 16384}},{key:"thumbnailCanvas",get:function get(){var t=_classPrivateFieldGet(this,I),r=t.directDrawing,i=t.initialOptionalContent,o=t.regularAnnotations;return r&&i&&o?this.canvas:null}}]);var t;return PDFPageView}();function _setDimensions2(){var t=this.viewport;if(this.pdfPage){if(_classPrivateFieldGet(this,x)===t.rotation)return;_classPrivateFieldSet(this,x,t.rotation)}(0,o.setLayerDimensions)(this.div,t,!0,!1)}function _renderAnnotationLayer2(){return _renderAnnotationLayer3.apply(this,arguments)}function _renderAnnotationLayer3(){return(_renderAnnotationLayer3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t;return _regeneratorRuntime().wrap((function _callee3$(r){for(;;)switch(r.prev=r.next){case 0:t=null;r.prev=1;r.next=4;return this.annotationLayer.render(this.viewport,"display");case 4:r.next=10;break;case 6:r.prev=6;r.t0=r.catch(1);console.error('#renderAnnotationLayer: "'.concat(r.t0,'".'));t=r.t0;case 10:r.prev=10;this.eventBus.dispatch("annotationlayerrendered",{source:this,pageNumber:this.id,error:t});return r.finish(10);case 13:case"end":return r.stop()}}),_callee3,this,[[1,6,10,13]])})))).apply(this,arguments)}function _renderAnnotationEditorLayer2(){return _renderAnnotationEditorLayer3.apply(this,arguments)}function _renderAnnotationEditorLayer3(){return(_renderAnnotationEditorLayer3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){var t;return _regeneratorRuntime().wrap((function _callee4$(r){for(;;)switch(r.prev=r.next){case 0:t=null;r.prev=1;r.next=4;return this.annotationEditorLayer.render(this.viewport,"display");case 4:r.next=10;break;case 6:r.prev=6;r.t0=r.catch(1);console.error('#renderAnnotationEditorLayer: "'.concat(r.t0,'".'));t=r.t0;case 10:r.prev=10;this.eventBus.dispatch("annotationeditorlayerrendered",{source:this,pageNumber:this.id,error:t});return r.finish(10);case 13:case"end":return r.stop()}}),_callee4,this,[[1,6,10,13]])})))).apply(this,arguments)}function _renderXfaLayer2(){return _renderXfaLayer3.apply(this,arguments)}function _renderXfaLayer3(){return(_renderXfaLayer3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(){var t,r;return _regeneratorRuntime().wrap((function _callee5$(i){for(;;)switch(i.prev=i.next){case 0:t=null;i.prev=1;i.next=4;return this.xfaLayer.render(this.viewport,"display");case 4:null!=(r=i.sent)&&r.textDivs&&this._textHighlighter&&_classPrivateMethodGet(this,j,_buildXfaTextContentItems2).call(this,r.textDivs);i.next=12;break;case 8:i.prev=8;i.t0=i.catch(1);console.error('#renderXfaLayer: "'.concat(i.t0,'".'));t=i.t0;case 12:i.prev=12;this.eventBus.dispatch("xfalayerrendered",{source:this,pageNumber:this.id,error:t});return i.finish(12);case 15:case"end":return i.stop()}}),_callee5,this,[[1,8,12,15]])})))).apply(this,arguments)}function _renderTextLayer2(){return _renderTextLayer3.apply(this,arguments)}function _renderTextLayer3(){return(_renderTextLayer3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(){var t,r,i,a,u;return _regeneratorRuntime().wrap((function _callee6$(l){for(;;)switch(l.prev=l.next){case 0:t=this.pdfPage,r=this.textLayer,i=this.viewport;if(r){l.next=3;break}return l.abrupt("return");case 3:a=null;l.prev=4;if(!r.renderingDone){u=t.streamTextContent({includeMarkedContent:!0,disableNormalization:!0});r.setTextContentSource(u)}l.next=8;return r.render(i);case 8:l.next=16;break;case 10:l.prev=10;l.t0=l.catch(4);if(!(l.t0 instanceof o.AbortException)){l.next=14;break}return l.abrupt("return");case 14:console.error('#renderTextLayer: "'.concat(l.t0,'".'));a=l.t0;case 16:this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.id,numTextDivs:r.numTextDivs,error:a});_classPrivateMethodGet(this,N,_renderStructTreeLayer2).call(this);case 18:case"end":return l.stop()}}),_callee6,this,[[4,10]])})))).apply(this,arguments)}function _renderStructTreeLayer2(){return _renderStructTreeLayer3.apply(this,arguments)}function _renderStructTreeLayer3(){return(_renderStructTreeLayer3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee7(){var t,r,i,o,a;return _regeneratorRuntime().wrap((function _callee7$(u){for(;;)switch(u.prev=u.next){case 0:if(this.textLayer){u.next=2;break}return u.abrupt("return");case 2:this.structTreeLayer||(this.structTreeLayer=new d.StructTreeLayerBuilder);u.next=5;return this.structTreeLayer.renderingDone?null:this.pdfPage.getStructTree();case 5:i=u.sent;(o=null===(t=this.structTreeLayer)||void 0===t?void 0:t.render(i))&&(null===(a=this.canvas)||void 0===a||a.append(o));null===(r=this.structTreeLayer)||void 0===r||r.show();case 9:case"end":return u.stop()}}),_callee7,this)})))).apply(this,arguments)}function _buildXfaTextContentItems2(t){return _buildXfaTextContentItems3.apply(this,arguments)}function _buildXfaTextContentItems3(){return(_buildXfaTextContentItems3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee8(t){var r,i,o,a,u;return _regeneratorRuntime().wrap((function _callee8$(l){for(;;)switch(l.prev=l.next){case 0:l.next=2;return this.pdfPage.getTextContent();case 2:r=l.sent;i=[];o=_createForOfIteratorHelper(r.items);try{for(o.s();!(a=o.n()).done;){u=a.value;i.push(u.str)}}catch(t){o.e(t)}finally{o.f()}this._textHighlighter.setTextMapping(t,i);this._textHighlighter.enable();case 8:case"end":return l.stop()}}),_callee8,this)})))).apply(this,arguments)}function _finishRenderTask2(t){return _finishRenderTask3.apply(this,arguments)}function _finishRenderTask3(){_finishRenderTask3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee9(t){var r,i=arguments;return _regeneratorRuntime().wrap((function _callee9$(u){for(;;)switch(u.prev=u.next){case 0:r=i.length>1&&void 0!==i[1]?i[1]:null;t===this.renderTask&&(this.renderTask=null);if(!(r instanceof o.RenderingCancelledException)){u.next=5;break}_classPrivateFieldSet(this,C,null);return u.abrupt("return");case 5:_classPrivateFieldSet(this,C,r);this.renderingState=a.RenderingStates.FINISHED;this._resetZoomLayer(!0);_classPrivateFieldGet(this,I).regularAnnotations=!t.separateAnnots;this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now(),error:_classPrivateFieldGet(this,C)});if(!r){u.next=12;break}throw r;case 12:case"end":return u.stop()}}),_callee9,this)})));return _finishRenderTask3.apply(this,arguments)}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(175);i(176);i(177);i(178);i(193);i(179);i(182);i(183);i(185);i(188);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationEditorLayerBuilder=void 0;i(126);i(42);i(88);i(92);i(288);i(95);var o=i(291),a=i(337);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var u=new WeakMap,l=new WeakMap;r.AnnotationEditorLayerBuilder=function(){function AnnotationEditorLayerBuilder(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AnnotationEditorLayerBuilder);_classPrivateFieldInitSpec(this,u,{writable:!0,value:null});_classPrivateFieldInitSpec(this,l,{writable:!0,value:void 0});this.pageDiv=t.pageDiv;this.pdfPage=t.pdfPage;this.accessibilityManager=t.accessibilityManager;this.l10n=t.l10n||a.NullL10n;this.annotationEditorLayer=null;this.div=null;this._cancelled=!1;_classPrivateFieldSet(this,l,t.uiManager);_classPrivateFieldSet(this,u,t.annotationLayer||null)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(AnnotationEditorLayerBuilder,[{key:"render",value:(t=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r,i,a,c,h=arguments;return _regeneratorRuntime().wrap((function _callee$(d){for(;;)switch(d.prev=d.next){case 0:if("display"===(r=h.length>1&&void 0!==h[1]?h[1]:"display")){d.next=3;break}return d.abrupt("return");case 3:if(!this._cancelled){d.next=5;break}return d.abrupt("return");case 5:i=t.clone({dontFlip:!0});if(!this.div){d.next=10;break}this.annotationEditorLayer.update({viewport:i});this.show();return d.abrupt("return");case 10:(a=this.div=document.createElement("div")).className="annotationEditorLayer";a.tabIndex=0;a.hidden=!0;this.pageDiv.append(a);this.annotationEditorLayer=new o.AnnotationEditorLayer({uiManager:_classPrivateFieldGet(this,l),div:a,accessibilityManager:this.accessibilityManager,pageIndex:this.pdfPage.pageNumber-1,l10n:this.l10n,viewport:i,annotationLayer:_classPrivateFieldGet(this,u)});c={viewport:i,div:a,annotations:null,intent:r};this.annotationEditorLayer.render(c);this.show();case 19:case"end":return d.stop()}}),_callee,this)}))),function render(r){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(){this._cancelled=!0;if(this.div){this.pageDiv=null;this.annotationEditorLayer.destroy();this.div.remove()}}},{key:"hide",value:function hide(){this.div&&(this.div.hidden=!0)}},{key:"show",value:function show(){this.div&&!this.annotationEditorLayer.isEmpty&&(this.div.hidden=!1)}}]);var t;return AnnotationEditorLayerBuilder}()},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);i(179);i(188);i(229);i(195);i(212);i(226);i(175);i(176);i(177);i(178);i(193);i(182);i(183);i(185);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationLayerBuilder=void 0;i(88);i(142);i(42);i(92);i(95);i(126);i(288);i(298);var o=i(291),a=i(337),u=i(245);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var l=new WeakMap,c=new WeakSet;r.AnnotationLayerBuilder=function(){function AnnotationLayerBuilder(t){var r=t.pageDiv,i=t.pdfPage,o=t.linkService,u=t.downloadManager,h=t.annotationStorage,d=void 0===h?null:h,p=t.imageResourcesPath,v=void 0===p?"":p,g=t.renderForms,y=void 0===g||g,m=t.l10n,w=void 0===m?a.NullL10n:m,b=t.enableScripting,D=void 0!==b&&b,P=t.hasJSActionsPromise,E=void 0===P?null:P,A=t.fieldObjectsPromise,S=void 0===A?null:A,x=t.annotationCanvasMap,C=void 0===x?null:x,k=t.accessibilityManager,T=void 0===k?null:k;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AnnotationLayerBuilder);!function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}(this,c);!function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}(this,l,{writable:!0,value:null});this.pageDiv=r;this.pdfPage=i;this.linkService=o;this.downloadManager=u;this.imageResourcesPath=v;this.renderForms=y;this.l10n=w;this.annotationStorage=d;this.enableScripting=D;this._hasJSActionsPromise=E||Promise.resolve(!1);this._fieldObjectsPromise=S||Promise.resolve(null);this._annotationCanvasMap=C;this._accessibilityManager=T;this.annotationLayer=null;this.div=null;this._cancelled=!1;this._eventBus=o.eventBus}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(AnnotationLayerBuilder,[{key:"render",value:(t=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r,i,a,h,d,p,v,g,y=this,m=arguments;return _regeneratorRuntime().wrap((function _callee$(w){for(;;)switch(w.prev=w.next){case 0:r=m.length>1&&void 0!==m[1]?m[1]:"display";if(!this.div){w.next=6;break}if(!this._cancelled&&this.annotationLayer){w.next=4;break}return w.abrupt("return");case 4:this.annotationLayer.update({viewport:t.clone({dontFlip:!0})});return w.abrupt("return");case 6:w.next=8;return Promise.all([this.pdfPage.getAnnotations({intent:r}),this._hasJSActionsPromise,this._fieldObjectsPromise]);case 8:i=w.sent;a=_slicedToArray(i,3);h=a[0];d=a[1];p=a[2];if(!this._cancelled){w.next=15;break}return w.abrupt("return");case 15:(v=this.div=document.createElement("div")).className="annotationLayer";this.pageDiv.append(v);if(0!==h.length){w.next=21;break}this.hide();return w.abrupt("return");case 21:this.annotationLayer=new o.AnnotationLayer({div:v,accessibilityManager:this._accessibilityManager,annotationCanvasMap:this._annotationCanvasMap,l10n:this.l10n,page:this.pdfPage,viewport:t.clone({dontFlip:!0})});w.next=24;return this.annotationLayer.render({annotations:h,imageResourcesPath:this.imageResourcesPath,renderForms:this.renderForms,linkService:this.linkService,downloadManager:this.downloadManager,annotationStorage:this.annotationStorage,enableScripting:this.enableScripting,hasJSActions:d,fieldObjects:p});case 24:this.linkService.isInPresentationMode&&_classPrivateMethodGet(this,c,_updatePresentationModeState2).call(this,u.PresentationModeState.FULLSCREEN);if(!_classPrivateFieldGet(this,l)){_classPrivateFieldSet(this,l,(function(t){_classPrivateMethodGet(y,c,_updatePresentationModeState2).call(y,t.state)}));null===(g=this._eventBus)||void 0===g||g._on("presentationmodechanged",_classPrivateFieldGet(this,l))}case 26:case"end":return w.stop()}}),_callee,this)}))),function render(r){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(){this._cancelled=!0;if(_classPrivateFieldGet(this,l)){var t;null===(t=this._eventBus)||void 0===t||t._off("presentationmodechanged",_classPrivateFieldGet(this,l));_classPrivateFieldSet(this,l,null)}}},{key:"hide",value:function hide(){this.div&&(document.querySelector("[data-pdfjsprinting=true]")||(this.div.hidden=!0))}}]);var t;return AnnotationLayerBuilder}();function _updatePresentationModeState2(t){if(this.div){var r=!1;switch(t){case u.PresentationModeState.FULLSCREEN:r=!0;break;case u.PresentationModeState.NORMAL:break;default:return}var i,o=function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}(this.div.childNodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.hasAttribute("data-internal-link")||(a.inert=r)}}catch(t){o.e(t)}finally{o.f()}}}},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(126);i(135);i(136);i(98);i(120);i(138);i(188);i(229);i(195);i(226);i(1);Object.defineProperty(r,"__esModule",{value:!0});r.StructTreeLayerBuilder=void 0;i(42);i(88);i(92);i(288);i(95);i(298);i(212);i(297);function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var o={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+)$/,u=new WeakMap,l=new WeakSet,c=new WeakSet;r.StructTreeLayerBuilder=function(){function StructTreeLayerBuilder(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,StructTreeLayerBuilder);_classPrivateMethodInitSpec(this,c);_classPrivateMethodInitSpec(this,l);!function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}(this,u,{writable:!0,value:void 0})}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(StructTreeLayerBuilder,[{key:"renderingDone",get:function get(){return void 0!==_classPrivateFieldGet(this,u)}},{key:"render",value:function render(t){if(void 0!==_classPrivateFieldGet(this,u))return _classPrivateFieldGet(this,u);var r=_classPrivateMethodGet(this,c,_walk2).call(this,t);null==r||r.classList.add("structTree");return _classPrivateFieldSet(this,u,r)}},{key:"hide",value:function hide(){_classPrivateFieldGet(this,u)&&!_classPrivateFieldGet(this,u).hidden&&(_classPrivateFieldGet(this,u).hidden=!0)}},{key:"show",value:function show(){var t;null!==(t=_classPrivateFieldGet(this,u))&&void 0!==t&&t.hidden&&(_classPrivateFieldGet(this,u).hidden=!1)}}]);return StructTreeLayerBuilder}();function _setAttributes2(t,r){void 0!==t.alt&&r.setAttribute("aria-label",t.alt);void 0!==t.id&&r.setAttribute("aria-owns",t.id);void 0!==t.lang&&r.setAttribute("lang",t.lang)}function _walk2(t){if(!t)return null;var r=document.createElement("span");if("role"in t){var i=t.role,u=i.match(a);if(u){r.setAttribute("role","heading");r.setAttribute("aria-level",u[1])}else o[i]&&r.setAttribute("role",o[i])}_classPrivateMethodGet(this,l,_setAttributes2).call(this,t,r);if(t.children)if(1===t.children.length&&"id"in t.children[0])_classPrivateMethodGet(this,l,_setAttributes2).call(this,t.children[0],r);else{var h,d=_createForOfIteratorHelper(t.children);try{for(d.s();!(h=d.n()).done;){var p=h.value;r.append(_classPrivateMethodGet(this,c,_walk2).call(this,p))}}catch(t){d.e(t)}finally{d.f()}}return r}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(229);i(212);i(226);i(1);i(179);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.TextAccessibilityManager=void 0;i(42);i(246);i(88);i(92);i(95);i(126);i(188);i(283);i(205);i(206);i(198);i(182);i(199);i(195);i(288);i(298);i(222);var o=i(245);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classStaticPrivateMethodGet(t,r,i){!function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap,h=new WeakSet;r.TextAccessibilityManager=function(){function TextAccessibilityManager(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,TextAccessibilityManager);!function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}(this,h);_classPrivateFieldInitSpec(this,a,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,u,{writable:!0,value:null});_classPrivateFieldInitSpec(this,l,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,c,{writable:!0,value:new Map})}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(TextAccessibilityManager,[{key:"setTextMapping",value:function setTextMapping(t){_classPrivateFieldSet(this,u,t)}},{key:"enable",value:function enable(){if(_classPrivateFieldGet(this,a))throw new Error("TextAccessibilityManager is already enabled.");if(!_classPrivateFieldGet(this,u))throw new Error("Text divs and strings have not been set.");_classPrivateFieldSet(this,a,!0);_classPrivateFieldSet(this,u,_classPrivateFieldGet(this,u).slice());_classPrivateFieldGet(this,u).sort(_classStaticPrivateMethodGet(TextAccessibilityManager,TextAccessibilityManager,_compareElementPositions));if(_classPrivateFieldGet(this,l).size>0){var t,r=_classPrivateFieldGet(this,u),i=_createForOfIteratorHelper(_classPrivateFieldGet(this,l));try{for(i.s();!(t=i.n()).done;){var o=_slicedToArray(t.value,2),d=o[0],p=o[1];document.getElementById(d)?_classPrivateMethodGet(this,h,_addIdToAriaOwns2).call(this,d,r[p]):_classPrivateFieldGet(this,l).delete(d)}}catch(t){i.e(t)}finally{i.f()}}var v,g=_createForOfIteratorHelper(_classPrivateFieldGet(this,c));try{for(g.s();!(v=g.n()).done;){var y=_slicedToArray(v.value,2),m=y[0],w=y[1];this.addPointerInTextLayer(m,w)}}catch(t){g.e(t)}finally{g.f()}_classPrivateFieldGet(this,c).clear()}},{key:"disable",value:function disable(){if(_classPrivateFieldGet(this,a)){_classPrivateFieldGet(this,c).clear();_classPrivateFieldSet(this,u,null);_classPrivateFieldSet(this,a,!1)}}},{key:"removePointerInTextLayer",value:function removePointerInTextLayer(t){var r;if(_classPrivateFieldGet(this,a)){var i=_classPrivateFieldGet(this,u);if(i&&0!==i.length){var o=t.id,h=_classPrivateFieldGet(this,l).get(o);if(void 0!==h){var d=i[h];_classPrivateFieldGet(this,l).delete(o);var p=d.getAttribute("aria-owns");if(null!==(r=p)&&void 0!==r&&r.includes(o))if(p=p.split(" ").filter((function(t){return t!==o})).join(" "))d.setAttribute("aria-owns",p);else{d.removeAttribute("aria-owns");d.setAttribute("role","presentation")}}}}else _classPrivateFieldGet(this,c).delete(t)}},{key:"addPointerInTextLayer",value:function addPointerInTextLayer(t,r){var i=t.id;if(i)if(_classPrivateFieldGet(this,a)){r&&this.removePointerInTextLayer(t);var d=_classPrivateFieldGet(this,u);if(d&&0!==d.length){var p=(0,o.binarySearchFirstItem)(d,(function(r){return _classStaticPrivateMethodGet(TextAccessibilityManager,TextAccessibilityManager,_compareElementPositions).call(TextAccessibilityManager,t,r)<0})),v=Math.max(0,p-1);_classPrivateMethodGet(this,h,_addIdToAriaOwns2).call(this,i,d[v]);_classPrivateFieldGet(this,l).set(i,v)}}else _classPrivateFieldGet(this,c).set(t,r)}},{key:"moveElementInDOM",value:function moveElementInDOM(t,r,i,a){this.addPointerInTextLayer(i,a);if(t.hasChildNodes()){var u=Array.from(t.childNodes).filter((function(t){return t!==r}));if(0!==u.length){var l=i||r,c=(0,o.binarySearchFirstItem)(u,(function(t){return _classStaticPrivateMethodGet(TextAccessibilityManager,TextAccessibilityManager,_compareElementPositions).call(TextAccessibilityManager,l,t)<0}));0===c?u[0].before(r):u[c-1].after(r)}}else t.append(r)}}]);return TextAccessibilityManager}();function _compareElementPositions(t,r){var i=t.getBoundingClientRect(),o=r.getBoundingClientRect();if(0===i.width&&0===i.height)return 1;if(0===o.width&&0===o.height)return-1;var a=i.y,u=i.y+i.height,l=i.y+i.height/2,c=o.y,h=o.y+o.height,d=o.y+o.height/2;return l<=c&&d>=u?-1:d<=a&&l>=h?1:i.x+i.width/2-(o.x+o.width/2)}function _addIdToAriaOwns2(t,r){var i=r.getAttribute("aria-owns");null!=i&&i.includes(t)||r.setAttribute("aria-owns",i?"".concat(i," ").concat(t):t);r.removeAttribute("role")}},(t,r,i)=>{Object.defineProperty(r,"__esModule",{value:!0});r.default=void 0;i(98);i(120);i(88);i(1);i(42);i(92);i(95);i(179);i(190);i(198);i(182);i(199);i(202);i(183);i(185);i(203);i(336);i(195);i(188);i(229);i(212);i(226);i(126);i(135);i(136);i(138);i(347);i(232);i(238);i(239);i(240);i(241);i(142);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,o)}return i}function _objectSpread2(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}function _defineProperty(t,r,i){(r=function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _objectWithoutProperties(t,r){if(null==t)return{};var i,o,a=function _objectWithoutPropertiesLoose(t,r){if(null==t)return{};var i,o,a={},u=Object.keys(t);for(o=0;o<u.length;o++){i=u[o];r.indexOf(i)>=0||(a[i]=t[i])}return a}(t,r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(o=0;o<u.length;o++){i=u[o];r.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(a[i]=t[i])}}return a}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function canvasTest(t){var r,i,o=t.sizes.shift(),a=Math.max(Math.ceil(o[0]),1),u=Math.max(Math.ceil(o[1]),1),l=[a-1,u-1,1,1],c=Date.now(),h="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;if(h){r=new OffscreenCanvas(1,1);i=new OffscreenCanvas(a,u)}else{(r=document.createElement("canvas")).width=1;r.height=1;(i=document.createElement("canvas")).width=a;i.height=u}var d=r.getContext("2d"),p=i.getContext("2d");if(p){p.fillRect.apply(p,l);d.drawImage(i,a-1,u-1,1,1,0,0,1,1)}var v=d&&0!==d.getImageData(0,0,1,1).data[3],g=Date.now()-c;[r,i].forEach((function(t){t.height=0;t.width=0}));if(h){postMessage({width:a,height:u,benchmark:g,isTestPass:v});!v&&t.sizes.length&&canvasTest(t)}else if(v)t.onSuccess(a,u,g);else{t.onError(a,u,g);t.sizes.length&&canvasTest(t)}return v}var o=[16384,14188,11402,11180,10836,8192,4096,1],a=[8388607,65535,32767,16384,8192,4096,1],u=[4194303,65535,32767,16384,8192,4096,1],l=["onError","onSuccess"],c={max:null,min:1,sizes:[],step:1024,usePromise:!1,useWorker:!1,onError:Function.prototype,onSuccess:Function.prototype},h={};function createSizesArray(t){var r=t.width===t.height,i=1===t.height,o=1===t.width,a=[];if(t.width&&t.height)for(var u=t.min||c.min,l=t.step||c.step,h=Math.max(t.width,t.height);h>=u;){var d=r||i?h:1,p=r||o?h:1;a.push([d,p]);h-=l}else t.sizes.forEach((function(t){var u=r||i?t:1,l=r||o?t:1;a.push([u,l])}));return a}function handleMethod(t){var r=window&&"HTMLCanvasElement"in window,i=window&&"OffscreenCanvas"in window,o=Date.now(),a=t.onError,u=t.onSuccess,c=_objectWithoutProperties(t,l),d=null;if(!r)return!1;if(t.useWorker&&i){var p="\n            var canvasTest = ".concat(canvasTest.toString(),";\n            onmessage = function(e) {\n                canvasTest(e.data);\n            };\n        "),v=new Blob([p],{type:"application/javascript"}),g=URL.createObjectURL(v);d=new Worker(g);URL.revokeObjectURL(g);d.onmessage=function(t){var r=t.data,i=r.width,a=r.height,u=r.benchmark;if(r.isTestPass){h[o].onSuccess(i,a,u);delete h[o]}else h[o].onError(i,a,u)}}if(t.usePromise)return new Promise((function(r,i){var l=_objectSpread2(_objectSpread2({},t),{},{onError:function onError(r,o,u){var l;if(0===t.sizes.length)l=!0;else{var c=_slicedToArray(t.sizes.slice(-1),1),h=_slicedToArray(c[0],2),d=h[0],p=h[1];l=r===d&&o===p}a(r,o,u);l&&i({width:r,height:o,benchmark:u})},onSuccess:function onSuccess(t,i,o){u(t,i,o);r({width:t,height:i,benchmark:o})}});if(d){var p=l.onError,v=l.onSuccess;h[o]={onError:p,onSuccess:v};d.postMessage(c)}else canvasTest(l)}));if(!d)return canvasTest(t);h[o]={onError:a,onSuccess:u};d.postMessage(c)}r.default={maxArea:function maxArea(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=createSizesArray({width:t.max,height:t.max,min:t.min,step:t.step,sizes:_toConsumableArray(o)});return handleMethod(_objectSpread2(_objectSpread2(_objectSpread2({},c),t),{},{sizes:r}))},maxHeight:function maxHeight(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=createSizesArray({width:1,height:t.max,min:t.min,step:t.step,sizes:_toConsumableArray(a)});return handleMethod(_objectSpread2(_objectSpread2(_objectSpread2({},c),t),{},{sizes:r}))},maxWidth:function maxWidth(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=createSizesArray({width:t.max,height:1,min:t.min,step:t.step,sizes:_toConsumableArray(u)});return handleMethod(_objectSpread2(_objectSpread2(_objectSpread2({},c),t),{},{sizes:r}))},test:function test(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=_objectSpread2(_objectSpread2({},c),t);r.sizes=_toConsumableArray(r.sizes);r.width&&r.height&&(r.sizes=[[r.width,r.height]]);return handleMethod(r)}}},(t,r,i)=>{var o=i(67),a=i(4),u=i(103),l=i(24),c=TypeError,h=Object.defineProperty,d=a.self!==a;try{if(l){var p=Object.getOwnPropertyDescriptor(a,"self");!d&&p&&p.get&&p.enumerable||u(a,"self",{get:function self(){return a},set:function self(t){if(this!==a)throw new c("Illegal invocation");h(a,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else o({global:!0,simple:!0,forced:d},{self:a})}catch(t){}},(t,r,i)=>{i(193);i(122);i(123);i(135);i(136);i(195);i(226);Object.defineProperty(r,"__esModule",{value:!0});r.VerbosityLevel=r.Util=r.UnknownErrorException=r.UnexpectedResponseException=r.TextRenderingMode=r.RenderingIntentFlag=r.PromiseCapability=r.PermissionFlag=r.PasswordResponses=r.PasswordException=r.PageActionEventType=r.OPS=r.MissingPDFException=r.MAX_IMAGE_SIZE_TO_CACHE=r.LINE_FACTOR=r.LINE_DESCENT_FACTOR=r.InvalidPDFException=r.ImageKind=r.IDENTITY_MATRIX=r.FormatError=r.FeatureTest=r.FONT_IDENTITY_MATRIX=r.DocumentActionEventType=r.CMapCompressionType=r.BaseException=r.BASELINE_FACTOR=r.AnnotationType=r.AnnotationReplyType=r.AnnotationMode=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationEditorType=r.AnnotationEditorPrefix=r.AnnotationEditorParamsType=r.AnnotationBorderStyleType=r.AnnotationActionEventType=r.AbortException=void 0;r.assert=function assert(t,r){t||unreachable(r)};r.bytesToString=bytesToString;r.createValidAbsoluteUrl=function createValidAbsoluteUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(i&&"string"==typeof t){if(i.addDefaultProtocol&&t.startsWith("www.")){var o=t.match(/\./g);(null==o?void 0:o.length)>=2&&(t="http://".concat(t))}if(i.tryConvertEncoding)try{t=stringToUTF8String(t)}catch(t){}}var a=r?new URL(t,r):new URL(t);if(function _isValidProtocol(t){switch(null==t?void 0:t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":case"capacitor":return!0;default:return!1}}(a))return a}catch(t){}return null};r.getModificationDate=function getModificationDate(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")].join("")};r.getUuid=function getUuid(){var t,r;if("undefined"!=typeof crypto&&"function"==typeof(null===(t=crypto)||void 0===t?void 0:t.randomUUID))return crypto.randomUUID();var i=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof(null===(r=crypto)||void 0===r?void 0:r.getRandomValues))crypto.getRandomValues(i);else for(var o=0;o<32;o++)i[o]=Math.floor(255*Math.random());return bytesToString(i)};r.getVerbosityLevel=function getVerbosityLevel(){return l};r.info=function info(t){l>=u.INFOS&&("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?console.log("Info: ".concat(t)):Window&&globalThis.ngxConsole?globalThis.ngxConsole.log("Info: ".concat(t)):console.log("Info: ".concat(t)))};r.isArrayBuffer=function isArrayBuffer(t){return"object"===_typeof(t)&&void 0!==(null==t?void 0:t.byteLength)};r.isArrayEqual=function isArrayEqual(t,r){if(t.length!==r.length)return!1;for(var i=0,o=t.length;i<o;i++)if(t[i]!==r[i])return!1;return!0};r.isNodeJS=void 0;r.normalizeUnicode=function normalizeUnicode(t){if(!v){v=/([\xA0\xB5\u037E\u0EB3\u2000-\u200A\u202F\u2126\uFB00-\uFB04\uFB06\uFB20-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBA1\uFBA4-\uFBA9\uFBAE-\uFBB1\uFBD3-\uFBDC\uFBDE-\uFBE7\uFBEA-\uFBF8\uFBFC\uFBFD\uFC00-\uFC5D\uFC64-\uFCF1\uFCF5-\uFD3D\uFD88\uFDF4\uFDFA\uFDFB\uFE71\uFE77\uFE79\uFE7B\uFE7D]+)|(\uFB05+)/g;g=new Map([["ſt","ſt"]])}return t.replaceAll(v,(function(t,r,i){return r?r.normalize("NFKC"):g.get(i)}))};r.objectFromMap=function objectFromMap(t){var r,i=Object.create(null),o=function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=(c=r.value,h=2,function _arrayWithHoles(t){if(Array.isArray(t))return t}(c)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(c,h)||_unsupportedIterableToArray(c,h)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=a[0],l=a[1];i[u]=l}}catch(t){o.e(t)}finally{o.f()}var c,h;return i};r.objectSize=function objectSize(t){return Object.keys(t).length};r.setVerbosityLevel=function setVerbosityLevel(t){Number.isInteger(t)&&(l=t)};r.shadow=shadow;r.string32=function string32(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)};r.stringToBytes=stringToBytes;r.stringToPDFString=function stringToPDFString(t){if(t[0]>="ï"){var r;"þ"===t[0]&&"ÿ"===t[1]?r="utf-16be":"ÿ"===t[0]&&"þ"===t[1]?r="utf-16le":"ï"===t[0]&&"»"===t[1]&&"¿"===t[2]&&(r="utf-8");if(r)try{var i=new TextDecoder(r,{fatal:!0}),o=stringToBytes(t);return i.decode(o)}catch(t){warn('stringToPDFString: "'.concat(t,'".'))}}for(var a=[],u=0,l=t.length;u<l;u++){var c=d[t.charCodeAt(u)];a.push(c?String.fromCharCode(c):t.charAt(u))}return a.join("")};r.stringToUTF8String=stringToUTF8String;r.unreachable=unreachable;r.utf8StringToString=function utf8StringToString(t){return unescape(encodeURIComponent(t))};r.warn=warn;i(138);i(347);i(204);i(126);i(322);i(212);i(297);i(42);i(88);i(92);i(95);i(232);i(238);i(239);i(240);i(241);i(179);i(349);i(366);i(367);i(369);i(370);i(371);i(375);i(376);i(377);i(379);i(380);i(381);i(382);i(383);i(384);i(385);i(387);i(388);i(390);i(391);i(392);i(393);i(394);i(395);i(396);i(397);i(399);i(400);i(401);i(403);i(406);i(411);i(190);i(412);i(205);i(206);i(317);i(318);i(413);i(229);i(222);i(188);i(142);i(246);i(254);i(257);i(98);i(120);i(1);i(288);function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}r.isNodeJS=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),r.IDENTITY_MATRIX=[1,0,0,1,0,0],r.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],r.MAX_IMAGE_SIZE_TO_CACHE=1e7;var o=r.LINE_FACTOR=1.35,a=r.LINE_DESCENT_FACTOR=.35,u=(r.BASELINE_FACTOR=a/o,r.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},r.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},r.AnnotationEditorPrefix="pdfjs_internal_editor_",r.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15},r.AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23},r.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},r.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},r.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},r.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},r.AnnotationReplyType={GROUP:"Group",REPLY:"R"},r.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},r.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},r.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},r.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},r.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},r.PageActionEventType={O:"PageOpen",C:"PageClose"},r.VerbosityLevel={ERRORS:0,WARNINGS:1,INFOS:5}),l=(r.CMapCompressionType={NONE:0,BINARY:1},r.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},r.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},u.WARNINGS);function warn(t){l>=u.WARNINGS&&("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?console.log("Warning: ".concat(t)):Window&&globalThis.ngxConsole?globalThis.ngxConsole.log("Warning: ".concat(t)):console.log("Warning: ".concat(t)))}function unreachable(t){throw new Error(t)}function shadow(t,r,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object.defineProperty(t,r,{value:i,enumerable:!o,configurable:!0,writable:!1});return i}var c=r.BaseException=function BaseExceptionClosure(){function BaseException(t,r){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=r}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();r.PasswordException=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,i){var o;_classCallCheck(this,PasswordException);(o=r.call(this,t,"PasswordException")).code=i;return o}return _createClass(PasswordException)}(c),r.UnknownErrorException=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,i){var o;_classCallCheck(this,UnknownErrorException);(o=r.call(this,t,"UnknownErrorException")).details=i;return o}return _createClass(UnknownErrorException)}(c),r.InvalidPDFException=function(t){_inherits(InvalidPDFException,t);var r=_createSuper(InvalidPDFException);function InvalidPDFException(t){_classCallCheck(this,InvalidPDFException);return r.call(this,t,"InvalidPDFException")}return _createClass(InvalidPDFException)}(c),r.MissingPDFException=function(t){_inherits(MissingPDFException,t);var r=_createSuper(MissingPDFException);function MissingPDFException(t){_classCallCheck(this,MissingPDFException);return r.call(this,t,"MissingPDFException")}return _createClass(MissingPDFException)}(c),r.UnexpectedResponseException=function(t){_inherits(UnexpectedResponseException,t);var r=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(t,i){var o;_classCallCheck(this,UnexpectedResponseException);(o=r.call(this,t,"UnexpectedResponseException")).status=i;return o}return _createClass(UnexpectedResponseException)}(c),r.FormatError=function(t){_inherits(FormatError,t);var r=_createSuper(FormatError);function FormatError(t){_classCallCheck(this,FormatError);return r.call(this,t,"FormatError")}return _createClass(FormatError)}(c),r.AbortException=function(t){_inherits(AbortException,t);var r=_createSuper(AbortException);function AbortException(t){_classCallCheck(this,AbortException);return r.call(this,t,"AbortException")}return _createClass(AbortException)}(c);function bytesToString(t){"object"===_typeof(t)&&void 0!==(null==t?void 0:t.length)||unreachable("Invalid argument for bytesToString");var r=t.length,i=8192;if(r<i)return String.fromCharCode.apply(null,t);for(var o=[],a=0;a<r;a+=i){var u=Math.min(a+i,r),l=t.subarray(a,u);o.push(String.fromCharCode.apply(null,l))}return o.join("")}function stringToBytes(t){"string"!=typeof t&&unreachable("Invalid argument for stringToBytes");for(var r=t.length,i=new Uint8Array(r),o=0;o<r;++o)i[o]=255&t.charCodeAt(o);return i}r.FeatureTest=function(){function FeatureTest(){_classCallCheck(this,FeatureTest)}_createClass(FeatureTest,null,[{key:"isLittleEndian",get:function get(){return shadow(this,"isLittleEndian",function isLittleEndian(){var t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}},{key:"isEvalSupported",get:function get(){return shadow(this,"isEvalSupported",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}},{key:"isOffscreenCanvasSupported",get:function get(){return shadow(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}},{key:"platform",get:function get(){return"undefined"==typeof navigator?shadow(this,"platform",{isWin:!1,isMac:!1}):shadow(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}},{key:"isCSSRoundSupported",get:function get(){var t,r;return shadow(this,"isCSSRoundSupported",null===(t=globalThis.CSS)||void 0===t||null===(r=t.supports)||void 0===r?void 0:r.call(t,"width: round(1.5px, 1px)"))}}]);return FeatureTest}();var h=_toConsumableArray(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")})),d=(r.Util=function(){function Util(){_classCallCheck(this,Util)}_createClass(Util,null,[{key:"makeHexColor",value:function makeHexColor(t,r,i){return"#".concat(h[t]).concat(h[r]).concat(h[i])}},{key:"scaleMinMax",value:function scaleMinMax(t,r){var i;if(t[0]){if(t[0]<0){i=r[0];r[0]=r[1];r[1]=i}r[0]*=t[0];r[1]*=t[0];if(t[3]<0){i=r[2];r[2]=r[3];r[3]=i}r[2]*=t[3];r[3]*=t[3]}else{i=r[0];r[0]=r[2];r[2]=i;i=r[1];r[1]=r[3];r[3]=i;if(t[1]<0){i=r[2];r[2]=r[3];r[3]=i}r[2]*=t[1];r[3]*=t[1];if(t[2]<0){i=r[0];r[0]=r[1];r[1]=i}r[0]*=t[2];r[1]*=t[2]}r[0]+=t[4];r[1]+=t[4];r[2]+=t[5];r[3]+=t[5]}},{key:"transform",value:function transform(t,r){return[t[0]*r[0]+t[2]*r[1],t[1]*r[0]+t[3]*r[1],t[0]*r[2]+t[2]*r[3],t[1]*r[2]+t[3]*r[3],t[0]*r[4]+t[2]*r[5]+t[4],t[1]*r[4]+t[3]*r[5]+t[5]]}},{key:"applyTransform",value:function applyTransform(t,r){return[t[0]*r[0]+t[1]*r[2]+r[4],t[0]*r[1]+t[1]*r[3]+r[5]]}},{key:"applyInverseTransform",value:function applyInverseTransform(t,r){var i=r[0]*r[3]-r[1]*r[2];return[(t[0]*r[3]-t[1]*r[2]+r[2]*r[5]-r[4]*r[3])/i,(-t[0]*r[1]+t[1]*r[0]+r[4]*r[1]-r[5]*r[0])/i]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(t,r){var i=this.applyTransform(t,r),o=this.applyTransform(t.slice(2,4),r),a=this.applyTransform([t[0],t[3]],r),u=this.applyTransform([t[2],t[1]],r);return[Math.min(i[0],o[0],a[0],u[0]),Math.min(i[1],o[1],a[1],u[1]),Math.max(i[0],o[0],a[0],u[0]),Math.max(i[1],o[1],a[1],u[1])]}},{key:"inverseTransform",value:function inverseTransform(t){var r=t[0]*t[3]-t[1]*t[2];return[t[3]/r,-t[1]/r,-t[2]/r,t[0]/r,(t[2]*t[5]-t[4]*t[3])/r,(t[4]*t[1]-t[5]*t[0])/r]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(t){var r=[t[0],t[2],t[1],t[3]],i=t[0]*r[0]+t[1]*r[2],o=t[0]*r[1]+t[1]*r[3],a=t[2]*r[0]+t[3]*r[2],u=t[2]*r[1]+t[3]*r[3],l=(i+u)/2,c=Math.sqrt(Math.pow(i+u,2)-4*(i*u-a*o))/2,h=l+c||1,d=l-c||1;return[Math.sqrt(h),Math.sqrt(d)]}},{key:"normalizeRect",value:function normalizeRect(t){var r=t.slice(0);if(t[0]>t[2]){r[0]=t[2];r[2]=t[0]}if(t[1]>t[3]){r[1]=t[3];r[3]=t[1]}return r}},{key:"intersect",value:function intersect(t,r){var i=Math.max(Math.min(t[0],t[2]),Math.min(r[0],r[2])),o=Math.min(Math.max(t[0],t[2]),Math.max(r[0],r[2]));if(i>o)return null;var a=Math.max(Math.min(t[1],t[3]),Math.min(r[1],r[3])),u=Math.min(Math.max(t[1],t[3]),Math.max(r[1],r[3]));return a>u?null:[i,a,o,u]}},{key:"bezierBoundingBox",value:function bezierBoundingBox(t,r,i,o,a,u,l,c){for(var h,d,p,v,g,y,m,w,b=[],D=[[],[]],P=0;P<2;++P){if(0===P){d=6*t-12*i+6*a;h=-3*t+9*i-9*a+3*l;p=3*i-3*t}else{d=6*r-12*o+6*u;h=-3*r+9*o-9*u+3*c;p=3*o-3*r}if(Math.abs(h)<1e-12){if(Math.abs(d)<1e-12)continue;0<(v=-p/d)&&v<1&&b.push(v)}else{m=d*d-4*p*h;w=Math.sqrt(m);if(!(m<0)){0<(g=(-d+w)/(2*h))&&g<1&&b.push(g);0<(y=(-d-w)/(2*h))&&y<1&&b.push(y)}}}for(var E,A=b.length,S=A;A--;){E=1-(v=b[A]);D[0][A]=E*E*E*t+3*E*E*v*i+3*E*v*v*a+v*v*v*l;D[1][A]=E*E*E*r+3*E*E*v*o+3*E*v*v*u+v*v*v*c}D[0][S]=t;D[1][S]=r;D[0][S+1]=l;D[1][S+1]=c;D[0].length=D[1].length=S+2;return[Math.min.apply(Math,_toConsumableArray(D[0])),Math.min.apply(Math,_toConsumableArray(D[1])),Math.max.apply(Math,_toConsumableArray(D[0])),Math.max.apply(Math,_toConsumableArray(D[1]))]}}]);return Util}(),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364]);function stringToUTF8String(t){return decodeURIComponent(escape(t))}var p=new WeakMap,v=(r.PromiseCapability=function(){function PromiseCapability(){var t=this;_classCallCheck(this,PromiseCapability);_classPrivateFieldInitSpec(this,p,{writable:!0,value:!1});this.promise=new Promise((function(r,i){t.resolve=function(i){_classPrivateFieldSet(t,p,!0);r(i)};t.reject=function(r){_classPrivateFieldSet(t,p,!0);i(r)}}))}_createClass(PromiseCapability,[{key:"settled",get:function get(){return function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}(this,p)}}]);return PromiseCapability}(),null),g=null},(t,r,i)=>{i(350)("Uint8",(function(t){return function Uint8Array(r,i,o){return t(this,r,i,o)}}))},(t,r,i)=>{var o=i(67),a=i(4),u=i(34),l=i(24),c=i(351),h=i(352),d=i(354),p=i(146),v=i(65),g=i(64),y=i(359),m=i(56),w=i(355),b=i(360),D=i(362),P=i(32),E=i(5),A=i(91),S=i(27),x=i(35),C=i(47),k=i(37),T=i(84),I=i(76).f,L=i(363),O=i(105).forEach,M=i(145),B=i(103),G=i(23),R=i(68),N=i(62),j=i(129),V=N.get,W=N.set,H=N.enforce,U=G.f,z=R.f,K=a.RangeError,Y=d.ArrayBuffer,$=Y.prototype,q=d.DataView,X=h.NATIVE_ARRAY_BUFFER_VIEWS,Z=h.TYPED_ARRAY_TAG,Q=h.TypedArray,J=h.TypedArrayPrototype,ee=h.aTypedArrayConstructor,te=h.isTypedArray,re="BYTES_PER_ELEMENT",ne="Wrong length",fromList=function(t,r){ee(t);for(var i=0,o=r.length,a=new t(o);o>i;)a[i]=r[i++];return a},addGetter=function(t,r){B(t,r,{configurable:!0,get:function(){return V(this)[r]}})},isArrayBuffer=function(t){var r;return k($,t)||"ArrayBuffer"===(r=A(t))||"SharedArrayBuffer"===r},isTypedArrayIndex=function(t,r){return te(t)&&!x(r)&&r in t&&y(+r)&&r>=0},ie=function getOwnPropertyDescriptor(t,r){r=P(r);return isTypedArrayIndex(t,r)?v(2,t[r]):z(t,r)},oe=function defineProperty(t,r,i){r=P(r);if(isTypedArrayIndex(t,r)&&S(i)&&E(i,"value")&&!E(i,"get")&&!E(i,"set")&&!i.configurable&&(!E(i,"writable")||i.writable)&&(!E(i,"enumerable")||i.enumerable)){t[r]=i.value;return t}return U(t,r,i)};if(l){if(!X){R.f=ie;G.f=oe;addGetter(J,"buffer");addGetter(J,"byteOffset");addGetter(J,"byteLength");addGetter(J,"length")}o({target:"Object",stat:!0,forced:!X},{getOwnPropertyDescriptor:ie,defineProperty:oe});t.exports=function(t,r,i){var l=t.match(/\d+/)[0]/8,h=t+(i?"Clamped":"")+"Array",d="get"+t,v="set"+t,y=a[h],P=y,E=P&&P.prototype,A={},addElement=function(t,r){U(t,r,{get:function(){return function(t,r){var i=V(t);return i.view[d](r*l+i.byteOffset,!0)}(this,r)},set:function(t){return function(t,r,o){var a=V(t);a.view[v](r*l+a.byteOffset,i?D(o):o,!0)}(this,r,t)},enumerable:!0})};if(X){if(c){P=r((function(t,r,i,o){p(t,E);return j(S(r)?isArrayBuffer(r)?void 0!==o?new y(r,b(i,l),o):void 0!==i?new y(r,b(i,l)):new y(r):te(r)?fromList(P,r):u(L,P,r):new y(w(r)),t,P)}));T&&T(P,Q);O(I(y),(function(t){t in P||g(P,t,y[t])}));P.prototype=E}}else{P=r((function(t,r,i,o){p(t,E);var a,c,h,d=0,v=0;if(S(r)){if(!isArrayBuffer(r))return te(r)?fromList(P,r):u(L,P,r);a=r;v=b(i,l);var g=r.byteLength;if(void 0===o){if(g%l)throw new K(ne);if((c=g-v)<0)throw new K(ne)}else if((c=m(o)*l)+v>g)throw new K(ne);h=c/l}else{h=w(r);a=new Y(c=h*l)}W(t,{buffer:a,byteOffset:v,byteLength:c,length:h,view:new q(a)});for(;d<h;)addElement(t,d++)}));T&&T(P,Q);E=P.prototype=C(J)}E.constructor!==P&&g(E,"constructor",P);H(E).TypedArrayConstructor=P;Z&&g(E,Z,h);var x=P!==y;A[h]=P;o({global:!0,constructor:!0,forced:x,sham:!X},A);re in P||g(P,re,l);re in E||g(E,re,l);M(h)}}else t.exports=function(){}},(t,r,i)=>{var o=i(4),a=i(8),u=i(169),l=i(352).NATIVE_ARRAY_BUFFER_VIEWS,c=o.ArrayBuffer,h=o.Int8Array;t.exports=!l||!a((function(){h(1)}))||!a((function(){new h(-1)}))||!u((function(t){new h;new h(null);new h(1.5);new h(t)}),!0)||a((function(){return 1!==new h(new c(2),1,void 0).length}))},(t,r,i)=>{var o,a,u,l=i(353),c=i(24),h=i(4),d=i(28),p=i(27),v=i(5),g=i(91),y=i(40),m=i(64),w=i(70),b=i(103),D=i(37),P=i(81),E=i(84),A=i(13),S=i(18),x=i(62),C=x.enforce,k=x.get,T=h.Int8Array,I=T&&T.prototype,L=h.Uint8ClampedArray,O=L&&L.prototype,M=T&&P(T),B=I&&P(I),G=Object.prototype,R=h.TypeError,N=A("toStringTag"),j=S("TYPED_ARRAY_TAG"),V="TypedArrayConstructor",W=l&&!!E&&"Opera"!==g(h.opera),H=!1,U={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},z={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(t){var r=P(t);if(p(r)){var i=k(r);return i&&v(i,V)?i[V]:getTypedArrayConstructor(r)}},isTypedArray=function(t){if(!p(t))return!1;var r=g(t);return v(U,r)||v(z,r)};for(o in U)(u=(a=h[o])&&a.prototype)?C(u)[V]=a:W=!1;for(o in z)(u=(a=h[o])&&a.prototype)&&(C(u)[V]=a);if(!W||!d(M)||M===Function.prototype){M=function TypedArray(){throw new R("Incorrect invocation")};if(W)for(o in U)h[o]&&E(h[o],M)}if(!W||!B||B===G){B=M.prototype;if(W)for(o in U)h[o]&&E(h[o].prototype,B)}W&&P(O)!==B&&E(O,B);if(c&&!v(B,N)){H=!0;b(B,N,{configurable:!0,get:function(){return p(this)?this[j]:void 0}});for(o in U)h[o]&&m(h[o],j,o)}t.exports={NATIVE_ARRAY_BUFFER_VIEWS:W,TYPED_ARRAY_TAG:H&&j,aTypedArray:function(t){if(isTypedArray(t))return t;throw new R("Target is not a typed array")},aTypedArrayConstructor:function(t){if(d(t)&&(!E||D(M,t)))return t;throw new R(y(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,r,i,o){if(c){if(i)for(var a in U){var u=h[a];if(u&&v(u.prototype,t))try{delete u.prototype[t]}catch(i){try{u.prototype[t]=r}catch(t){}}}B[t]&&!i||w(B,t,i?r:W&&I[t]||r,o)}},exportTypedArrayStaticMethod:function(t,r,i){var o,a;if(c){if(E){if(i)for(o in U)if((a=h[o])&&v(a,t))try{delete a[t]}catch(t){}if(M[t]&&!i)return;try{return w(M,t,i?r:W&&M[t]||r)}catch(t){}}for(o in U)!(a=h[o])||a[t]&&!i||w(a,t,r)}},getTypedArrayConstructor:getTypedArrayConstructor,isView:function isView(t){if(!p(t))return!1;var r=g(t);return"DataView"===r||v(U,r)||v(z,r)},isTypedArray:isTypedArray,TypedArray:M,TypedArrayPrototype:B}},t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},(t,r,i)=>{var o=i(4),a=i(6),u=i(24),l=i(353),c=i(72),h=i(64),d=i(103),p=i(201),v=i(8),g=i(146),y=i(53),m=i(56),w=i(355),b=i(356),D=i(358),P=i(81),E=i(84),A=i(76).f,S=i(340),x=i(101),C=i(83),k=i(62),T=c.PROPER,I=c.CONFIGURABLE,L="ArrayBuffer",O="DataView",M="prototype",B="Wrong index",G=k.getterFor(L),R=k.getterFor(O),N=k.set,j=o[L],V=j,W=V&&V[M],H=o[O],U=H&&H[M],z=Object.prototype,K=o.Array,Y=o.RangeError,$=a(S),q=a([].reverse),X=D.pack,Z=D.unpack,packInt8=function(t){return[255&t]},packInt16=function(t){return[255&t,t>>8&255]},packInt32=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},unpackInt32=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},packFloat32=function(t){return X(b(t),23,4)},packFloat64=function(t){return X(t,52,8)},addGetter=function(t,r,i){d(t[M],r,{configurable:!0,get:function(){return i(this)[r]}})},get=function(t,r,i,o){var a=R(t),u=w(i),l=!!o;if(u+r>a.byteLength)throw new Y(B);var c=a.bytes,h=u+a.byteOffset,d=x(c,h,h+r);return l?d:q(d)},set=function(t,r,i,o,a,u){var l=R(t),c=w(i),h=o(+a),d=!!u;if(c+r>l.byteLength)throw new Y(B);for(var p=l.bytes,v=c+l.byteOffset,g=0;g<r;g++)p[v+g]=h[d?g:r-g-1]};if(l){var Q=T&&j.name!==L;if(v((function(){j(1)}))&&v((function(){new j(-1)}))&&!v((function(){new j;new j(1.5);new j(NaN);return 1!==j.length||Q&&!I})))Q&&I&&h(j,"name",L);else{(V=function ArrayBuffer(t){g(this,W);return new j(w(t))})[M]=W;for(var J,ee=A(j),te=0;ee.length>te;)(J=ee[te++])in V||h(V,J,j[J]);W.constructor=V}E&&P(U)!==z&&E(U,z);var re=new H(new V(2)),ne=a(U.setInt8);re.setInt8(0,2147483648);re.setInt8(1,2147483649);!re.getInt8(0)&&re.getInt8(1)||p(U,{setInt8:function setInt8(t,r){ne(this,t,r<<24>>24)},setUint8:function setUint8(t,r){ne(this,t,r<<24>>24)}},{unsafe:!0})}else{W=(V=function ArrayBuffer(t){g(this,W);var r=w(t);N(this,{type:L,bytes:$(K(r),0),byteLength:r});if(!u){this.byteLength=r;this.detached=!1}})[M];U=(H=function DataView(t,r,i){g(this,U);g(t,W);var o=G(t),a=o.byteLength,l=y(r);if(l<0||l>a)throw new Y("Wrong offset");if(l+(i=void 0===i?a-l:m(i))>a)throw new Y("Wrong length");N(this,{type:O,buffer:t,byteLength:i,byteOffset:l,bytes:o.bytes});if(!u){this.buffer=t;this.byteLength=i;this.byteOffset=l}})[M];if(u){addGetter(V,"byteLength",G);addGetter(H,"buffer",R);addGetter(H,"byteLength",R);addGetter(H,"byteOffset",R)}p(U,{getInt8:function getInt8(t){return get(this,1,t)[0]<<24>>24},getUint8:function getUint8(t){return get(this,1,t)[0]},getInt16:function getInt16(t){var r=get(this,2,t,arguments.length>1&&arguments[1]);return(r[1]<<8|r[0])<<16>>16},getUint16:function getUint16(t){var r=get(this,2,t,arguments.length>1&&arguments[1]);return r[1]<<8|r[0]},getInt32:function getInt32(t){return unpackInt32(get(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function getUint32(t){return unpackInt32(get(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function getFloat32(t){return Z(get(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function getFloat64(t){return Z(get(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function setInt8(t,r){set(this,1,t,packInt8,r)},setUint8:function setUint8(t,r){set(this,1,t,packInt8,r)},setInt16:function setInt16(t,r){set(this,2,t,packInt16,r,arguments.length>2&&arguments[2])},setUint16:function setUint16(t,r){set(this,2,t,packInt16,r,arguments.length>2&&arguments[2])},setInt32:function setInt32(t,r){set(this,4,t,packInt32,r,arguments.length>2&&arguments[2])},setUint32:function setUint32(t,r){set(this,4,t,packInt32,r,arguments.length>2&&arguments[2])},setFloat32:function setFloat32(t,r){set(this,4,t,packFloat32,r,arguments.length>2&&arguments[2])},setFloat64:function setFloat64(t,r){set(this,8,t,packFloat64,r,arguments.length>2&&arguments[2])}})}C(V,L);C(H,O);t.exports={ArrayBuffer:V,DataView:H}},(t,r,i)=>{var o=i(53),a=i(56),u=RangeError;t.exports=function(t){if(void 0===t)return 0;var r=o(t),i=a(r);if(r!==i)throw new u("Wrong length or index");return i}},(t,r,i)=>{var o=i(357);t.exports=Math.fround||function fround(t){return o(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},(t,r,i)=>{var o=i(243),a=Math.abs,u=2220446049250313e-31,l=1/u;t.exports=function(t,r,i,c){var h=+t,d=a(h),p=o(h);if(d<c)return p*function(t){return t+l-l}(d/c/r)*c*r;var v=(1+r/u)*d,g=v-(v-d);return g>i||g!=g?p*(1/0):p*g}},t=>{var r=Array,i=Math.abs,o=Math.pow,a=Math.floor,u=Math.log,l=Math.LN2;t.exports={pack:function(t,c,h){var d,p,v,g=r(h),y=8*h-c-1,m=(1<<y)-1,w=m>>1,b=23===c?o(2,-24)-o(2,-77):0,D=t<0||0===t&&1/t<0?1:0,P=0;if((t=i(t))!=t||t===1/0){p=t!=t?1:0;d=m}else{d=a(u(t)/l);if(t*(v=o(2,-d))<1){d--;v*=2}if((t+=d+w>=1?b/v:b*o(2,1-w))*v>=2){d++;v/=2}if(d+w>=m){p=0;d=m}else if(d+w>=1){p=(t*v-1)*o(2,c);d+=w}else{p=t*o(2,w-1)*o(2,c);d=0}}for(;c>=8;){g[P++]=255&p;p/=256;c-=8}d=d<<c|p;y+=c;for(;y>0;){g[P++]=255&d;d/=256;y-=8}g[--P]|=128*D;return g},unpack:function(t,r){var i,a=t.length,u=8*a-r-1,l=(1<<u)-1,c=l>>1,h=u-7,d=a-1,p=t[d--],v=127&p;p>>=7;for(;h>0;){v=256*v+t[d--];h-=8}i=v&(1<<-h)-1;v>>=-h;h+=r;for(;h>0;){i=256*i+t[d--];h-=8}if(0===v)v=1-c;else{if(v===l)return i?NaN:p?-1/0:1/0;i+=o(2,r);v-=c}return(p?-1:1)*i*o(2,v-r)}}},(t,r,i)=>{var o=i(27),a=Math.floor;t.exports=Number.isInteger||function isInteger(t){return!o(t)&&isFinite(t)&&a(t)===t}},(t,r,i)=>{var o=i(361),a=RangeError;t.exports=function(t,r){var i=o(t);if(i%r)throw new a("Wrong offset");return i}},(t,r,i)=>{var o=i(53),a=RangeError;t.exports=function(t){var r=o(t);if(r<0)throw new a("The argument can't be less than 0");return r}},t=>{var r=Math.round;t.exports=function(t){var i=r(t);return i<0?0:i>255?255:255&i}},(t,r,i)=>{var o=i(106),a=i(34),u=i(125),l=i(9),c=i(55),h=i(165),d=i(166),p=i(164),v=i(364),g=i(352).aTypedArrayConstructor,y=i(365);t.exports=function from(t){var r,i,m,w,b,D,P,E,A=u(this),S=l(t),x=arguments.length,C=x>1?arguments[1]:void 0,k=void 0!==C,T=d(S);if(T&&!p(T)){E=(P=h(S,T)).next;S=[];for(;!(D=a(E,P)).done;)S.push(D.value)}k&&x>2&&(C=o(C,arguments[2]));i=c(S);m=new(g(A))(i);w=v(m);for(r=0;i>r;r++){b=k?C(S[r],r):S[r];m[r]=w?y(b):+b}return m}},(t,r,i)=>{var o=i(91);t.exports=function(t){var r=o(t);return"BigInt64Array"===r||"BigUint64Array"===r}},(t,r,i)=>{var o=i(33),a=TypeError;t.exports=function(t){var r=o(t,"number");if("number"==typeof r)throw new a("Can't convert number to bigint");return BigInt(r)}},(t,r,i)=>{var o=i(352),a=i(55),u=i(53),l=o.aTypedArray;(0,o.exportTypedArrayMethod)("at",(function at(t){var r=l(this),i=a(r),o=u(t),c=o>=0?o:i+o;return c<0||c>=i?void 0:r[c]}))},(t,r,i)=>{var o=i(6),a=i(352),u=o(i(368)),l=a.aTypedArray;(0,a.exportTypedArrayMethod)("copyWithin",(function copyWithin(t,r){return u(l(this),t,r,arguments.length>2?arguments[2]:void 0)}))},(t,r,i)=>{var o=i(9),a=i(52),u=i(55),l=i(284),c=Math.min;t.exports=[].copyWithin||function copyWithin(t,r){var i=o(this),h=u(i),d=a(t,h),p=a(r,h),v=arguments.length>2?arguments[2]:void 0,g=c((void 0===v?h:a(v,h))-p,h-d),y=1;if(p<d&&d<p+g){y=-1;p+=g-1;d+=g-1}for(;g-- >0;){p in i?i[d]=i[p]:l(i,d);d+=y;p+=y}return i}},(t,r,i)=>{var o=i(352),a=i(105).every,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("every",(function every(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var o=i(352),a=i(340),u=i(365),l=i(91),c=i(34),h=i(6),d=i(8),p=o.aTypedArray,v=o.exportTypedArrayMethod,g=h("".slice);v("fill",(function fill(t){var r=arguments.length;p(this);var i="Big"===g(l(this),0,3)?u(t):+t;return c(a,this,i,r>1?arguments[1]:void 0,r>2?arguments[2]:void 0)}),d((function(){var t=0;new Int8Array(2).fill({valueOf:function(){return t++}});return 1!==t})))},(t,r,i)=>{var o=i(352),a=i(105).filter,u=i(372),l=o.aTypedArray;(0,o.exportTypedArrayMethod)("filter",(function filter(t){var r=a(l(this),t,arguments.length>1?arguments[1]:void 0);return u(this,r)}))},(t,r,i)=>{var o=i(373),a=i(374);t.exports=function(t,r){return o(a(t),r)}},(t,r,i)=>{var o=i(55);t.exports=function(t,r){for(var i=0,a=o(r),u=new t(a);a>i;)u[i]=r[i++];return u}},(t,r,i)=>{var o=i(352),a=i(147),u=o.aTypedArrayConstructor,l=o.getTypedArrayConstructor;t.exports=function(t){return u(a(t,l(t)))}},(t,r,i)=>{var o=i(352),a=i(105).find,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("find",(function find(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var o=i(352),a=i(105).findIndex,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("findIndex",(function findIndex(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var o=i(352),a=i(378).findLast,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("findLast",(function findLast(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var o=i(106),a=i(44),u=i(9),l=i(55),createMethod=function(t){var r=1===t;return function(i,c,h){for(var d,p=u(i),v=a(p),g=o(c,h),y=l(v);y-- >0;)if(g(d=v[y],y,p))switch(t){case 0:return d;case 1:return y}return r?-1:void 0}};t.exports={findLast:createMethod(0),findLastIndex:createMethod(1)}},(t,r,i)=>{var o=i(352),a=i(378).findLastIndex,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("findLastIndex",(function findLastIndex(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var o=i(352),a=i(105).forEach,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("forEach",(function forEach(t){a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var o=i(352),a=i(51).includes,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("includes",(function includes(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var o=i(352),a=i(51).indexOf,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("indexOf",(function indexOf(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var o=i(4),a=i(8),u=i(6),l=i(352),c=i(42),h=i(13)("iterator"),d=o.Uint8Array,p=u(c.values),v=u(c.keys),g=u(c.entries),y=l.aTypedArray,m=l.exportTypedArrayMethod,w=d&&d.prototype,b=!a((function(){w[h].call([1])})),D=!!w&&w.values&&w[h]===w.values&&"values"===w.values.name,P=function values(){return p(y(this))};m("entries",(function entries(){return g(y(this))}),b);m("keys",(function keys(){return v(y(this))}),b);m("values",P,b||!D,{name:"values"});m(h,P,b||!D,{name:"values"})},(t,r,i)=>{var o=i(352),a=i(6),u=o.aTypedArray,l=o.exportTypedArrayMethod,c=a([].join);l("join",(function join(t){return c(u(this),t)}))},(t,r,i)=>{var o=i(352),a=i(116),u=i(386),l=o.aTypedArray;(0,o.exportTypedArrayMethod)("lastIndexOf",(function lastIndexOf(t){var r=arguments.length;return a(u,l(this),r>1?[t,arguments[1]]:[t])}))},(t,r,i)=>{var o=i(116),a=i(43),u=i(53),l=i(55),c=i(187),h=Math.min,d=[].lastIndexOf,p=!!d&&1/[1].lastIndexOf(1,-0)<0,v=c("lastIndexOf"),g=p||!v;t.exports=g?function lastIndexOf(t){if(p)return o(d,this,arguments)||0;var r=a(this),i=l(r),c=i-1;arguments.length>1&&(c=h(c,u(arguments[1])));c<0&&(c=i+c);for(;c>=0;c--)if(c in r&&r[c]===t)return c||0;return-1}:d},(t,r,i)=>{var o=i(352),a=i(105).map,u=i(374),l=o.aTypedArray;(0,o.exportTypedArrayMethod)("map",(function map(t){return a(l(this),t,arguments.length>1?arguments[1]:void 0,(function(t,r){return new(u(t))(r)}))}))},(t,r,i)=>{var o=i(352),a=i(389).left,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduce",(function reduce(t){var r=arguments.length;return a(u(this),t,r,r>1?arguments[1]:void 0)}))},(t,r,i)=>{var o=i(39),a=i(9),u=i(44),l=i(55),c=TypeError,createMethod=function(t){return function(r,i,h,d){o(i);var p=a(r),v=u(p),g=l(p),y=t?g-1:0,m=t?-1:1;if(h<2)for(;;){if(y in v){d=v[y];y+=m;break}y+=m;if(t?y<0:g<=y)throw new c("Reduce of empty array with no initial value")}for(;t?y>=0:g>y;y+=m)y in v&&(d=i(d,v[y],y,p));return d}};t.exports={left:createMethod(!1),right:createMethod(!0)}},(t,r,i)=>{var o=i(352),a=i(389).right,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduceRight",(function reduceRight(t){var r=arguments.length;return a(u(this),t,r,r>1?arguments[1]:void 0)}))},(t,r,i)=>{var o=i(352),a=o.aTypedArray,u=o.exportTypedArrayMethod,l=Math.floor;u("reverse",(function reverse(){for(var t,r=this,i=a(r).length,o=l(i/2),u=0;u<o;){t=r[u];r[u++]=r[--i];r[i]=t}return r}))},(t,r,i)=>{var o=i(4),a=i(34),u=i(352),l=i(55),c=i(360),h=i(9),d=i(8),p=o.RangeError,v=o.Int8Array,g=v&&v.prototype,y=g&&g.set,m=u.aTypedArray,w=u.exportTypedArrayMethod,b=!d((function(){var t=new Uint8ClampedArray(2);a(y,t,{length:1,0:3},1);return 3!==t[1]})),D=b&&u.NATIVE_ARRAY_BUFFER_VIEWS&&d((function(){var t=new v(2);t.set(1);t.set("2",1);return 0!==t[0]||2!==t[1]}));w("set",(function set(t){m(this);var r=c(arguments.length>1?arguments[1]:void 0,1),i=h(t);if(b)return a(y,this,i,r);var o=this.length,u=l(i),d=0;if(u+r>o)throw new p("Wrong length");for(;d<u;)this[r+d]=i[d++]}),!b||D)},(t,r,i)=>{var o=i(352),a=i(374),u=i(8),l=i(117),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("slice",(function slice(t,r){for(var i=l(c(this),t,r),o=a(this),u=0,h=i.length,d=new o(h);h>u;)d[u]=i[u++];return d}),u((function(){new Int8Array(1).slice()})))},(t,r,i)=>{var o=i(352),a=i(105).some,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("some",(function some(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var o=i(4),a=i(107),u=i(8),l=i(39),c=i(237),h=i(352),d=i(285),p=i(286),v=i(20),g=i(287),y=h.aTypedArray,m=h.exportTypedArrayMethod,w=o.Uint16Array,b=w&&a(w.prototype.sort),D=!(!b||u((function(){b(new w(2),null)}))&&u((function(){b(new w(2),{})}))),P=!!b&&!u((function(){if(v)return v<74;if(d)return d<67;if(p)return!0;if(g)return g<602;var t,r,i=new w(516),o=Array(516);for(t=0;t<516;t++){r=t%4;i[t]=515-t;o[t]=t-2*r+3}b(i,(function(t,r){return(t/4|0)-(r/4|0)}));for(t=0;t<516;t++)if(i[t]!==o[t])return!0}));m("sort",(function sort(t){void 0!==t&&l(t);return P?b(this,t):c(y(this),function(t){return function(r,i){return void 0!==t?+t(r,i)||0:i!=i?-1:r!=r?1:0===r&&0===i?1/r>0&&1/i<0?1:-1:r>i}}(t))}),!P||D)},(t,r,i)=>{var o=i(4),a=i(116),u=i(352),l=i(8),c=i(117),h=o.Int8Array,d=u.aTypedArray,p=u.exportTypedArrayMethod,v=[].toLocaleString,g=!!h&&l((function(){v.call(new h(1))}));p("toLocaleString",(function toLocaleString(){return a(v,g?c(d(this)):d(this),c(arguments))}),l((function(){return[1,2].toLocaleString()!==new h([1,2]).toLocaleString()}))||!l((function(){h.prototype.toLocaleString.call([1,2])})))},(t,r,i)=>{var o=i(398),a=i(352),u=a.aTypedArray,l=a.exportTypedArrayMethod,c=a.getTypedArrayConstructor;l("toReversed",(function toReversed(){return o(u(this),c(this))}))},(t,r,i)=>{var o=i(55);t.exports=function(t,r){for(var i=o(t),a=new r(i),u=0;u<i;u++)a[u]=t[i-u-1];return a}},(t,r,i)=>{var o=i(352),a=i(6),u=i(39),l=i(373),c=o.aTypedArray,h=o.getTypedArrayConstructor,d=o.exportTypedArrayMethod,p=a(o.TypedArrayPrototype.sort);d("toSorted",(function toSorted(t){void 0!==t&&u(t);var r=c(this),i=l(h(r),r);return p(i,t)}))},(t,r,i)=>{var o=i(352).exportTypedArrayMethod,a=i(8),u=i(4),l=i(6),c=u.Uint8Array,h=c&&c.prototype||{},d=[].toString,p=l([].join);a((function(){d.call({})}))&&(d=function toString(){return p(this)});var v=h.toString!==d;o("toString",d,v)},(t,r,i)=>{var o=i(402),a=i(352),u=i(364),l=i(53),c=i(365),h=a.aTypedArray,d=a.getTypedArrayConstructor,p=a.exportTypedArrayMethod,v=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();p("with",{with:function(t,r){var i=h(this),a=l(t),p=u(i)?c(r):+r;return o(i,d(i),a,p)}}.with,!v)},(t,r,i)=>{var o=i(55),a=i(53),u=RangeError;t.exports=function(t,r,i,l){var c=o(t),h=a(i),d=h<0?c+h:h;if(d>=c||d<0)throw new u("Incorrect index");for(var p=new r(c),v=0;v<c;v++)p[v]=v===d?l:t[v];return p}},(t,r,i)=>{var o=i(24),a=i(103),u=i(404),l=ArrayBuffer.prototype;o&&!("detached"in l)&&a(l,"detached",{configurable:!0,get:function detached(){return u(this)}})},(t,r,i)=>{var o=i(6),a=i(405),u=o(ArrayBuffer.prototype.slice);t.exports=function(t){if(0!==a(t))return!1;try{u(t,0,0);return!1}catch(t){return!0}}},(t,r,i)=>{var o=i(85),a=i(45),u=TypeError;t.exports=o(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==a(t))throw new u("ArrayBuffer expected");return t.byteLength}},(t,r,i)=>{var o=i(67),a=i(407);a&&o({target:"ArrayBuffer",proto:!0},{transfer:function transfer(){return a(this,arguments.length?arguments[0]:void 0,!0)}})},(t,r,i)=>{var o=i(4),a=i(6),u=i(85),l=i(355),c=i(404),h=i(405),d=i(408),p=i(410),v=o.structuredClone,g=o.ArrayBuffer,y=o.DataView,m=o.TypeError,w=Math.min,b=g.prototype,D=y.prototype,P=a(b.slice),E=u(b,"resizable","get"),A=u(b,"maxByteLength","get"),S=a(D.getInt8),x=a(D.setInt8);t.exports=(p||d)&&function(t,r,i){var o,a=h(t),u=void 0===r?a:l(r),b=!E||!E(t);if(c(t))throw new m("ArrayBuffer is detached");if(p){t=v(t,{transfer:[t]});if(a===u&&(i||b))return t}if(a>=u&&(!i||b))o=P(t,0,u);else{var D=i&&!b&&A?{maxByteLength:A(t)}:void 0;o=new g(u,D);for(var C=new y(t),k=new y(o),T=w(u,a),I=0;I<T;I++)x(k,I,S(C,I))}p||d(t);return o}},(t,r,i)=>{var o,a,u,l,c=i(4),h=i(409),d=i(410),p=c.structuredClone,v=c.ArrayBuffer,g=c.MessageChannel,y=!1;if(d)y=function(t){p(t,{transfer:[t]})};else if(v)try{g||(o=h("worker_threads"))&&(g=o.MessageChannel);if(g){a=new g;u=new v(2);l=function(t){a.port1.postMessage(null,[t])};if(2===u.byteLength){l(u);0===u.byteLength&&(y=l)}}}catch(t){}t.exports=y},(t,r,i)=>{var o=i(144);t.exports=function(t){try{if(o)return Function('return require("'+t+'")')()}catch(t){}}},(t,r,i)=>{var o=i(4),a=i(8),u=i(20),l=i(159),c=i(160),h=i(144),d=o.structuredClone;t.exports=!!d&&!a((function(){if(c&&u>92||h&&u>94||l&&u>97)return!1;var t=new ArrayBuffer(8),r=d(t,{transfer:[t]});return 0!==t.byteLength||8!==r.byteLength}))},(t,r,i)=>{var o=i(67),a=i(407);a&&o({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function transferToFixedLength(){return a(this,arguments.length?arguments[0]:void 0,!1)}})},(t,r,i)=>{i(350)("Uint32",(function(t){return function Uint32Array(r,i,o){return t(this,r,i,o)}}))},(t,r,i)=>{var o=i(67),a=i(414).start;o({target:"String",proto:!0,forced:i(416)},{padStart:function padStart(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var o=i(6),a=i(56),u=i(94),l=i(415),c=i(10),h=o(l),d=o("".slice),p=Math.ceil,createMethod=function(t){return function(r,i,o){var l,v,g=u(c(r)),y=a(i),m=g.length,w=void 0===o?" ":u(o);if(y<=m||""===w)return g;(v=h(w,p((l=y-m)/w.length))).length>l&&(v=d(v,0,l));return t?g+v:v+g}};t.exports={start:createMethod(!1),end:createMethod(!0)}},(t,r,i)=>{var o=i(53),a=i(94),u=i(10),l=RangeError;t.exports=function repeat(t){var r=a(u(this)),i="",c=o(t);if(c<0||c===1/0)throw new l("Wrong number of repetitions");for(;c>0;(c>>>=1)&&(r+=r))1&c&&(i+=r);return i}},(t,r,i)=>{var o=i(21);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(o)},(t,r,i)=>{i(188);i(229);i(195);i(92);i(212);i(226);i(1);i(42);i(95);Object.defineProperty(r,"__esModule",{value:!0});r.TextHighlighter=void 0;i(126);i(204);i(179);i(205);i(206);i(135);i(136);i(98);i(120);i(88);i(138);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}r.TextHighlighter=function(){function TextHighlighter(t){var r=t.findController,i=t.eventBus,o=t.pageIndex;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,TextHighlighter);this.findController=r;this.matches=[];this.eventBus=i;this.pageIdx=o;this._onUpdateTextLayerMatches=null;this.textDivs=null;this.textContentItemsStr=null;this.enabled=!1}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(TextHighlighter,[{key:"setTextMapping",value:function setTextMapping(t,r){this.textDivs=t;this.textContentItemsStr=r}},{key:"enable",value:function enable(){var t=this;if(!this.textDivs||!this.textContentItemsStr)throw new Error("Text divs and strings have not been set.");if(!this.enabled){this.enabled=!0;if(!this._onUpdateTextLayerMatches){this._onUpdateTextLayerMatches=function(r){r.pageIndex!==t.pageIdx&&-1!==r.pageIndex||t._updateMatches()};this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches)}this._updateMatches()}}},{key:"disable",value:function disable(){if(this.enabled){this.enabled=!1;if(this._onUpdateTextLayerMatches){this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches);this._onUpdateTextLayerMatches=null}this._updateMatches(!0)}}},{key:"_convertMatches",value:function _convertMatches(t,r){if(!t)return[];for(var i=this.textContentItemsStr,o=0,a=0,u=i.length-1,l=[],c=0,h=t.length;c<h;c++){for(var d=t[c];o!==u&&d>=a+i[o].length;){a+=i[o].length;o++}o===i.length&&globalThis.ngxConsole.error("Could not find a matching mapping");var p={begin:{divIdx:o,offset:d-a}};d+=r[c];for(;o!==u&&d>a+i[o].length;){a+=i[o].length;o++}p.end={divIdx:o,offset:d-a};l.push(p)}return l}},{key:"_renderMatches",value:function _renderMatches(t){if(0!==t.length){var r=this.findController,i=this.pageIdx,o=this.textContentItemsStr,a=this.textDivs,u=i===r.selected.pageIdx,l=r.selected.matchIdx,c=null,h={divIdx:-1,offset:void 0},d=l,p=d+1;if(r.state.highlightAll){d=0;p=t.length}else if(!u)return;for(var v=-1,g=-1,y=d;y<p;y++){var m=t[y],w=m.begin;if(w.divIdx!==v||w.offset!==g){v=w.divIdx;g=w.offset;var b=m.end,D=u&&y===l,P=D?" selected":"",E=0;if(c&&w.divIdx===c.divIdx)appendTextToDiv(c.divIdx,c.offset,w.offset);else{null!==c&&appendTextToDiv(c.divIdx,c.offset,h.offset);beginText(w)}if(w.divIdx===b.divIdx)E=appendTextToDiv(w.divIdx,w.offset,b.offset,"highlight"+P);else{E=appendTextToDiv(w.divIdx,w.offset,h.offset,"highlight begin"+P);for(var A=w.divIdx+1,S=b.divIdx;A<S;A++)a[A].className="highlight middle"+P;beginText(b,"highlight end"+P)}c=b;D&&r.scrollMatchIntoView({element:a[w.divIdx],selectedLeft:E,pageIndex:i,matchIndex:l})}}c&&appendTextToDiv(c.divIdx,c.offset,h.offset)}function beginText(t,r){var i=t.divIdx;a[i].textContent="";return appendTextToDiv(i,0,t.offset,r)}function appendTextToDiv(t,r,i,u){var l=a[t];if(l.nodeType===Node.TEXT_NODE){var c=document.createElement("span");l.before(c);c.append(l);a[t]=c;l=c}var h=o[t].substring(r,i),d=document.createTextNode(h);if(u){var p=document.createElement("span");p.className="".concat(u," appended");p.append(d);l.append(p);return u.includes("selected")?p.offsetLeft:0}l.append(d);return 0}}},{key:"_updateMatches",value:function _updateMatches(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.enabled||t){var r,i=this.findController,o=this.matches,a=this.pageIdx,u=this.textContentItemsStr,l=this.textDivs,c=-1,h=_createForOfIteratorHelper(o);try{for(h.s();!(r=h.n()).done;){for(var d=r.value,p=Math.max(c,d.begin.divIdx),v=d.end.divIdx;p<=v;p++){var g=l[p];g.textContent=u[p];g.className=""}c=d.end.divIdx+1}}catch(t){h.e(t)}finally{h.f()}if(null!=i&&i.highlightMatches&&!t){var y=i.pageMatches[a]||null,m=i.pageMatchesLength[a]||null;this.matches=this._convertMatches(y,m);this._renderMatches(this.matches)}}}}]);return TextHighlighter}()},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(175);i(176);i(177);i(178);i(193);i(179);i(182);i(183);i(185);i(188);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.TextLayerBuilder=void 0;i(42);i(88);i(92);i(288);i(95);i(126);i(204);i(298);i(229);var o=i(291),a=i(245);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var u=new WeakMap,l=new WeakMap,c=new WeakMap,h=new WeakMap,d=new WeakSet,p=new WeakSet;r.TextLayerBuilder=function(){function TextLayerBuilder(t){var r=t.highlighter,i=void 0===r?null:r,o=t.accessibilityManager,a=void 0===o?null:o,v=t.isOffscreenCanvasSupported,g=void 0===v||v,y=t.enablePermissions,m=void 0!==y&&y;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,TextLayerBuilder);_classPrivateMethodInitSpec(this,p);_classPrivateMethodInitSpec(this,d);_classPrivateFieldInitSpec(this,u,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,l,{writable:!0,value:0});_classPrivateFieldInitSpec(this,c,{writable:!0,value:0});_classPrivateFieldInitSpec(this,h,{writable:!0,value:null});this.textContentItemsStr=[];this.renderingDone=!1;this.textDivs=[];this.textDivProperties=new WeakMap;this.textLayerRenderTask=null;this.highlighter=i;this.accessibilityManager=a;this.isOffscreenCanvasSupported=g;_classPrivateFieldSet(this,u,!0===m);this.div=document.createElement("div");this.div.className="textLayer";this.hide()}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(TextLayerBuilder,[{key:"numTextDivs",get:function get(){return this.textDivs.length}},{key:"render",value:(t=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r,i,a,u,p,v,g;return _regeneratorRuntime().wrap((function _callee$(y){for(;;)switch(y.prev=y.next){case 0:if(_classPrivateFieldGet(this,h)){y.next=2;break}throw new Error('No "textContentSource" parameter specified.');case 2:u=t.scale*(globalThis.devicePixelRatio||1);p=t.rotation;if(!this.renderingDone){y.next=10;break}v=p!==_classPrivateFieldGet(this,l);g=u!==_classPrivateFieldGet(this,c);if(v||g){this.hide();(0,o.updateTextLayer)({container:this.div,viewport:t,textDivs:this.textDivs,textDivProperties:this.textDivProperties,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,mustRescale:g,mustRotate:v});_classPrivateFieldSet(this,c,u);_classPrivateFieldSet(this,l,p)}this.show();return y.abrupt("return");case 10:this.cancel();null===(r=this.highlighter)||void 0===r||r.setTextMapping(this.textDivs,this.textContentItemsStr);null===(i=this.accessibilityManager)||void 0===i||i.setTextMapping(this.textDivs);this.textLayerRenderTask=(0,o.renderTextLayer)({textContentSource:_classPrivateFieldGet(this,h),container:this.div,viewport:t,textDivs:this.textDivs,textDivProperties:this.textDivProperties,textContentItemsStr:this.textContentItemsStr,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported});y.next=16;return this.textLayerRenderTask.promise;case 16:_classPrivateMethodGet(this,d,_finishRendering2).call(this);_classPrivateFieldSet(this,c,u);_classPrivateFieldSet(this,l,p);this.show();null===(a=this.accessibilityManager)||void 0===a||a.enable();case 21:case"end":return y.stop()}}),_callee,this)}))),function render(r){return t.apply(this,arguments)})},{key:"hide",value:function hide(){if(!this.div.hidden){var t;null===(t=this.highlighter)||void 0===t||t.disable();this.div.hidden=!0}}},{key:"show",value:function show(){if(this.div.hidden&&this.renderingDone){var t;this.div.hidden=!1;null===(t=this.highlighter)||void 0===t||t.enable()}}},{key:"cancel",value:function cancel(){var t,r;if(this.textLayerRenderTask){this.textLayerRenderTask.cancel();this.textLayerRenderTask=null}null===(t=this.highlighter)||void 0===t||t.disable();null===(r=this.accessibilityManager)||void 0===r||r.disable();this.textContentItemsStr.length=0;this.textDivs.length=0;this.textDivProperties=new WeakMap}},{key:"setTextContentSource",value:function setTextContentSource(t){this.cancel();_classPrivateFieldSet(this,h,t)}}]);var t;return TextLayerBuilder}();function _finishRendering2(){this.renderingDone=!0;var t=document.createElement("div");t.className="endOfContent";this.div.append(t);_classPrivateMethodGet(this,p,_bindMouse2).call(this)}function _bindMouse2(){var t=this,r=this.div;r.addEventListener("mousedown",(function(t){var i=r.querySelector(".endOfContent");if(i){var o=t.target!==r;o&&(o="none"!==getComputedStyle(i).getPropertyValue("-moz-user-select"));if(o){var a=r.getBoundingClientRect(),u=Math.max(0,(t.pageY-a.top)/a.height);i.style.top=(100*u).toFixed(2)+"%"}i.classList.add("active")}}));r.addEventListener("mouseup",(function(){var t=r.querySelector(".endOfContent");if(t){t.style.top="";t.classList.remove("active")}}));r.addEventListener("copy",(function(r){if(!_classPrivateFieldGet(t,u)){var i=document.getSelection();r.clipboardData.setData("text/plain",(0,a.removeNullCharacters)((0,o.normalizeUnicode)(i.toString())))}r.preventDefault();r.stopPropagation()}))}},(t,r,i)=>{i(142);i(1);i(42);i(92);i(95);i(175);i(176);i(177);i(178);i(193);i(179);i(182);i(183);i(185);i(188);Object.defineProperty(r,"__esModule",{value:!0});r.XfaLayerBuilder=void 0;i(135);i(136);i(98);i(120);i(88);i(126);i(138);var o=i(291);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}r.XfaLayerBuilder=function(){function XfaLayerBuilder(t){var r=t.pageDiv,i=t.pdfPage,o=t.annotationStorage,a=void 0===o?null:o,u=t.linkService,l=t.xfaHtml,c=void 0===l?null:l;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,XfaLayerBuilder);this.pageDiv=r;this.pdfPage=i;this.annotationStorage=a;this.linkService=u;this.xfaHtml=c;this.div=null;this._cancelled=!1}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(XfaLayerBuilder,[{key:"render",value:(t=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r,i,a,u,l,c=arguments;return _regeneratorRuntime().wrap((function _callee$(h){for(;;)switch(h.prev=h.next){case 0:if("print"!==(r=c.length>1&&void 0!==c[1]?c[1]:"display")){h.next=7;break}i={viewport:t.clone({dontFlip:!0}),div:this.div,xfaHtml:this.xfaHtml,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:r};a=document.createElement("div");this.pageDiv.append(a);i.div=a;return h.abrupt("return",o.XfaLayer.render(i));case 7:h.next=9;return this.pdfPage.getXfa();case 9:u=h.sent;if(!this._cancelled&&u){h.next=12;break}return h.abrupt("return",{textDivs:[]});case 12:l={viewport:t.clone({dontFlip:!0}),div:this.div,xfaHtml:u,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:r};if(!this.div){h.next=15;break}return h.abrupt("return",o.XfaLayer.update(l));case 15:this.div=document.createElement("div");this.pageDiv.append(this.div);l.div=this.div;return h.abrupt("return",o.XfaLayer.render(l));case 19:case"end":return h.stop()}}),_callee,this)}))),function render(r){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(){this._cancelled=!0}},{key:"hide",value:function hide(){this.div&&(this.div.hidden=!0)}}]);var t;return XfaLayerBuilder}()},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(188);i(229);i(195);i(212);i(226);i(1);i(190);i(198);i(182);i(199);i(202);i(183);i(185);i(203);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.SecondaryToolbar=void 0;i(179);i(126);i(42);i(88);i(92);i(298);i(95);var o=i(245),a=i(332);function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,o)}return i}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,_toPropertyKey(o.key),o)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var u=new WeakSet,l=new WeakSet,c=new WeakSet,h=new WeakSet,d=new WeakSet;r.SecondaryToolbar=function(){function SecondaryToolbar(t,r,i){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,SecondaryToolbar);_classPrivateMethodInitSpec(this,d);_classPrivateMethodInitSpec(this,h);_classPrivateMethodInitSpec(this,c);_classPrivateMethodInitSpec(this,l);_classPrivateMethodInitSpec(this,u);this.toolbar=t.toolbar;this.toggleButton=t.toggleButton;this.buttons=[{element:t.presentationModeButton,eventName:"presentationmode",close:!0},{element:t.printButton,eventName:"print",close:!0},{element:t.downloadButton,eventName:"download",close:!0},{element:t.viewBookmarkButton,eventName:null,close:!0},{element:t.firstPageButton,eventName:"firstpage",close:!0},{element:t.lastPageButton,eventName:"lastpage",close:!0},{element:t.pageRotateCwButton,eventName:"rotatecw",close:!1},{element:t.pageRotateCcwButton,eventName:"rotateccw",close:!1},{element:t.cursorSelectToolButton,eventName:"switchcursortool",eventDetails:{tool:o.CursorTool.SELECT},close:!0},{element:t.cursorHandToolButton,eventName:"switchcursortool",eventDetails:{tool:o.CursorTool.HAND},close:!0},{element:t.scrollPageButton,eventName:"switchscrollmode",eventDetails:{mode:o.ScrollMode.PAGE},close:!0},{element:t.scrollVerticalButton,eventName:"switchscrollmode",eventDetails:{mode:o.ScrollMode.VERTICAL},close:!0},{element:t.scrollHorizontalButton,eventName:"switchscrollmode",eventDetails:{mode:o.ScrollMode.HORIZONTAL},close:!0},{element:t.scrollWrappedButton,eventName:"switchscrollmode",eventDetails:{mode:o.ScrollMode.WRAPPED},close:!0},{element:t.spreadNoneButton,eventName:"switchspreadmode",eventDetails:{mode:o.SpreadMode.NONE},close:!0},{element:t.spreadOddButton,eventName:"switchspreadmode",eventDetails:{mode:o.SpreadMode.ODD},close:!0},{element:t.spreadEvenButton,eventName:"switchspreadmode",eventDetails:{mode:o.SpreadMode.EVEN},close:!0},{element:t.documentPropertiesButton,eventName:"documentproperties",close:!0}];this.buttons.push({element:t.openFileButton,eventName:"openfile",close:!0});this.items={firstPage:t.firstPageButton,lastPage:t.lastPageButton,pageRotateCw:t.pageRotateCwButton,pageRotateCcw:t.pageRotateCcwButton};this.eventBus=r;this.externalServices=i;this.opened=!1;_classPrivateMethodGet(this,l,_bindClickListeners2).call(this);_classPrivateMethodGet(this,c,_bindCursorToolsListener2).call(this,t);_classPrivateMethodGet(this,h,_bindScrollModeListener2).call(this,t);_classPrivateMethodGet(this,d,_bindSpreadModeListener2).call(this,t);this.reset()}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(SecondaryToolbar,[{key:"isOpen",get:function get(){return this.opened}},{key:"setPageNumber",value:function setPageNumber(t){this.pageNumber=t;_classPrivateMethodGet(this,u,_updateUIState2).call(this)}},{key:"setPagesCount",value:function setPagesCount(t){this.pagesCount=t;_classPrivateMethodGet(this,u,_updateUIState2).call(this)}},{key:"reset",value:function reset(){this.pageNumber=0;this.pagesCount=0;_classPrivateMethodGet(this,u,_updateUIState2).call(this);this.eventBus.dispatch("secondarytoolbarreset",{source:this})}},{key:"open",value:function open(){if(!this.opened){this.opened=!0;(0,o.toggleExpandedBtn)(this.toggleButton,!0,this.toolbar)}}},{key:"close",value:function close(){if(this.opened){this.opened=!1;(0,o.toggleExpandedBtn)(this.toggleButton,!1,this.toolbar)}}},{key:"toggle",value:function toggle(){this.opened?this.close():this.open()}}]);return SecondaryToolbar}();function _updateUIState2(){this.items.firstPage.disabled=this.pageNumber<=1;document.getElementById("previousPage")&&(document.getElementById("previousPage").disabled=this.pageNumber<=1);this.items.lastPage.disabled=this.pageNumber>=this.pagesCount;document.getElementById("nextPage")&&(document.getElementById("nextPage").disabled=this.pageNumber>=this.pagesCount);this.items.pageRotateCw.disabled=0===this.pagesCount;this.items.pageRotateCcw.disabled=0===this.pagesCount;this.eventBus.dispatch("updateuistate",{source:this,widget:"SecondaryToolbar",pageNumber:this.pageNumber,pagesCount:this.pagesCount})}function _bindClickListeners2(){var t=this;this.toggleButton.addEventListener("click",this.toggle.bind(this));var r,i=_createForOfIteratorHelper(this.buttons);try{var o=function _loop(){var i=r.value,o=i.element,a=i.eventName,u=i.close,l=i.eventDetails;null==o||o.addEventListener("click",(function(r){null!==a&&t.eventBus.dispatch(a,function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}({source:t},l));u&&t.close();t.externalServices.reportTelemetry({type:"buttons",data:{id:o.id}})}))};for(i.s();!(r=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}}function _bindCursorToolsListener2(t){var r=t.cursorSelectToolButton,i=t.cursorHandToolButton;this.eventBus._on("cursortoolchanged",(function(t){var a=t.tool;(0,o.toggleCheckedBtn)(r,a===o.CursorTool.SELECT);(0,o.toggleCheckedBtn)(i,a===o.CursorTool.HAND)}))}function _bindScrollModeListener2(t){var r=this,i=t.scrollPageButton,u=t.scrollVerticalButton,l=t.scrollHorizontalButton,c=t.scrollWrappedButton,h=t.spreadNoneButton,d=t.spreadOddButton,p=t.spreadEvenButton,v=function scrollModeChanged(t){var v=t.mode;(0,o.toggleCheckedBtn)(i,v===o.ScrollMode.PAGE);(0,o.toggleCheckedBtn)(u,v===o.ScrollMode.VERTICAL);(0,o.toggleCheckedBtn)(l,v===o.ScrollMode.HORIZONTAL);(0,o.toggleCheckedBtn)(c,v===o.ScrollMode.WRAPPED);var g=r.pagesCount>a.PagesCountLimit.FORCE_SCROLL_MODE_PAGE;i.disabled=g;u.disabled=g;l.disabled=g;c.disabled=g;var y=v===o.ScrollMode.HORIZONTAL;h.disabled=y;d.disabled=y;p.disabled=y};this.eventBus._on("scrollmodechanged",v);this.eventBus._on("secondarytoolbarreset",(function(t){t.source===r&&v({mode:o.ScrollMode.VERTICAL})}))}function _bindSpreadModeListener2(t){var r=this,i=t.spreadNoneButton,a=t.spreadOddButton,u=t.spreadEvenButton,l=function spreadModeChanged(t){var r=t.mode;(0,o.toggleCheckedBtn)(i,r===o.SpreadMode.NONE);(0,o.toggleCheckedBtn)(a,r===o.SpreadMode.ODD);(0,o.toggleCheckedBtn)(u,r===o.SpreadMode.EVEN)};this.eventBus._on("spreadmodechanged",l);this.eventBus._on("secondarytoolbarreset",(function(t){t.source===r&&l({mode:o.SpreadMode.NONE})}))}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(188);i(195);i(212);i(226);i(1);i(190);i(198);i(182);i(199);i(202);i(183);i(185);i(203);i(175);i(176);i(177);i(178);i(193);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.Toolbar=void 0;i(179);i(88);i(229);i(138);i(126);i(42);i(92);i(288);i(95);i(298);i(142);i(222);var o=i(245),a=i(291);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,o)}return i}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,_toPropertyKey(o.key),o)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var u=new WeakMap,l=new WeakSet,c=new WeakSet,h=new WeakSet,d=new WeakSet;r.Toolbar=function(){function Toolbar(t,r,i){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Toolbar);_classPrivateMethodInitSpec(this,d);_classPrivateMethodInitSpec(this,h);_classPrivateMethodInitSpec(this,c);_classPrivateMethodInitSpec(this,l);!function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}(this,u,{writable:!0,value:!1});this.toolbar=t.container;this.eventBus=r;this.l10n=i;this.buttons=[{element:t.previous,eventName:"previouspage"},{element:t.next,eventName:"nextpage"},{element:t.zoomIn,eventName:"zoomin"},{element:t.zoomOut,eventName:"zoomout"},{element:t.print,eventName:"print"},{element:t.presentationModeButton,eventName:"presentationmode"},{element:t.download,eventName:"download"},{element:t.editorFreeTextButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){return t.editorFreeTextButton.classList.contains("toggled")?a.AnnotationEditorType.NONE:a.AnnotationEditorType.FREETEXT}}},{element:t.editorInkButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){return t.editorInkButton.classList.contains("toggled")?a.AnnotationEditorType.NONE:a.AnnotationEditorType.INK}}},{element:t.editorStampButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){return t.editorStampButton.classList.contains("toggled")?a.AnnotationEditorType.NONE:a.AnnotationEditorType.STAMP}}}];this.buttons.push({element:t.openFile,eventName:"openfile"});this.items={numPages:t.numPages,pageNumber:t.pageNumber,scaleSelect:t.scaleSelect,customScaleOption:t.customScaleOption,previous:t.previous,next:t.next,zoomIn:t.zoomIn,zoomOut:t.zoomOut};_classPrivateMethodGet(this,l,_bindListeners2).call(this,t);this.reset()}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(Toolbar,[{key:"setPageNumber",value:function setPageNumber(t,r){this.pageNumber=t;this.pageLabel=r;_classPrivateMethodGet(this,h,_updateUIState2).call(this,!1)}},{key:"setPagesCount",value:function setPagesCount(t,r){this.pagesCount=t;this.hasPageLabels=r;_classPrivateMethodGet(this,h,_updateUIState2).call(this,!0)}},{key:"setPageScale",value:function setPageScale(t,r){this.pageScaleValue=(t||r).toString();this.pageScale=r;_classPrivateMethodGet(this,h,_updateUIState2).call(this,!1)}},{key:"reset",value:function reset(){this.pageNumber=0;this.pageLabel=null;this.hasPageLabels=!1;this.pagesCount=0;var t=PDFViewerApplicationOptions.get("defaultZoomValue");if(t){this.pageScaleValue=t;Number(t)&&(this.pageScale=Number(t))}else{this.pageScaleValue=o.DEFAULT_SCALE_VALUE;this.pageScale=o.DEFAULT_SCALE}_classPrivateMethodGet(this,h,_updateUIState2).call(this,!0);this.updateLoadingIndicatorState();this.eventBus.dispatch("toolbarreset",{source:this})}},{key:"updateLoadingIndicatorState",value:function updateLoadingIndicatorState(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.items.pageNumber.classList.toggle("visiblePageIsLoading",t)}}]);return Toolbar}();function _bindListeners2(t){var r,i=this,a=this.items,l=a.pageNumber,p=a.scaleSelect,v=this,g=_createForOfIteratorHelper(this.buttons);try{var y=function _loop(){var t=r.value,o=t.element,a=t.eventName,u=t.eventDetails;null==o||o.addEventListener("click",(function(t){null!==a&&i.eventBus.dispatch(a,function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}({source:i},u))}))};for(g.s();!(r=g.n()).done;)y()}catch(t){g.e(t)}finally{g.f()}l.addEventListener("click",(function(){this.select()}));l.addEventListener("change",(function(){v.eventBus.dispatch("pagenumberchanged",{source:v,value:this.value})}));p.addEventListener("change",(function(){"custom"!==this.value&&v.eventBus.dispatch("scalechanged",{source:v,value:this.value})}));p.addEventListener("click",(function(t){var r=t.target;this.value===v.pageScaleValue&&"OPTION"===r.tagName.toUpperCase()&&this.blur()}));p.oncontextmenu=o.noContextMenuHandler;this.eventBus._on("localized",(function(){_classPrivateFieldSet(i,u,!0);_classPrivateMethodGet(i,d,_adjustScaleWidth2).call(i);_classPrivateMethodGet(i,h,_updateUIState2).call(i,!0)}));_classPrivateMethodGet(this,c,_bindEditorToolsListener2).call(this,t)}function _bindEditorToolsListener2(t){var r=this,i=t.editorFreeTextButton,u=t.editorFreeTextParamsToolbar,l=t.editorInkButton,c=t.editorInkParamsToolbar,h=t.editorStampButton,d=t.editorStampParamsToolbar,p=function editorModeChanged(t){var r=t.mode;(0,o.toggleCheckedBtn)(i,r===a.AnnotationEditorType.FREETEXT,u);(0,o.toggleCheckedBtn)(l,r===a.AnnotationEditorType.INK,c);(0,o.toggleCheckedBtn)(h,r===a.AnnotationEditorType.STAMP,d);var p=r===a.AnnotationEditorType.DISABLE;i.disabled=p;l.disabled=p;h.disabled=p};this.eventBus._on("annotationeditormodechanged",p);this.eventBus._on("toolbarreset",(function(t){t.source===r&&p({mode:a.AnnotationEditorType.DISABLE})}))}function _updateUIState2(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}(this,u)){var r=this.pageNumber,i=this.pagesCount,a=this.pageScaleValue,l=this.pageScale,c=this.items;if(t){if(this.hasPageLabels)c.pageNumber.type="text";else{c.pageNumber.type="number";this.l10n.get("of_pages",{pagesCount:i}).then((function(t){c.numPages.textContent=t}))}c.pageNumber.max=i}if(this.hasPageLabels){c.pageNumber.value=this.pageLabel;this.l10n.get("page_of_pages",{pageNumber:r,pagesCount:i}).then((function(t){c.numPages.textContent=t}))}else c.pageNumber.value=r;c.previous.disabled=r<=1;c.next.disabled=r>=i;c.zoomOut.disabled=l<=o.MIN_SCALE;c.zoomIn.disabled=l>=o.MAX_SCALE;this.l10n.get("page_scale_percent",{scale:Math.round(1e4*l)/100}).then((function(t){var r=!1;if(c.scaleSelect.options){var i,o=_createForOfIteratorHelper(c.scaleSelect.options);try{for(o.s();!(i=o.n()).done;){var u=i.value;if(u.value===a){u.selected=!0;r=!0}else u.selected=!1}}catch(t){o.e(t)}finally{o.f()}}if(!r){c.customScaleOption.textContent=t;c.customScaleOption.selected=!0}}));this.eventBus.dispatch("updateuistate",{source:this,widget:"Toolbar",pageNumber:r,pagesCount:i,pageScaleValue:a,pageScale:l})}}function _adjustScaleWidth2(){return _adjustScaleWidth3.apply(this,arguments)}function _adjustScaleWidth3(){_adjustScaleWidth3=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(){var t,r,i,a,u,l,c,h,d,p,v,g,y,m;return _regeneratorRuntime().wrap((function _callee$(w){for(;;)switch(w.prev=w.next){case 0:t=this.items,r=this.l10n;i=Promise.all([r.get("page_scale_auto"),r.get("page_scale_actual"),r.get("page_scale_fit"),r.get("page_scale_width")]);w.next=4;return o.animationStarted;case 4:a=getComputedStyle(t.scaleSelect);u=parseFloat(a.getPropertyValue("--scale-select-width"));l=document.createElement("canvas");c=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0,alpha:!1}:{alpha:!1};(h=l.getContext("2d",c)).font="".concat(a.fontSize," ").concat(a.fontFamily);d=0;w.t0=_createForOfIteratorHelper;w.next=14;return i;case 14:w.t1=w.sent;p=(0,w.t0)(w.t1);try{for(p.s();!(v=p.n()).done;){g=v.value;try{y=h.measureText(g);(m=y.width)>d&&(d=m)}catch(t){}}}catch(t){p.e(t)}finally{p.f()}(d+=.3*u)>u&&t.scaleSelect.parentNode.style.setProperty("--scale-select-width","".concat(d,"px"));l.width=0;l.height=0;case 21:case"end":return w.stop()}}),_callee,this)})));return _adjustScaleWidth3.apply(this,arguments)}},(t,r,i)=>{i(142);i(1);i(42);i(92);i(95);i(175);i(176);i(177);i(178);i(193);i(182);i(183);i(185);i(188);Object.defineProperty(r,"__esModule",{value:!0});r.ViewHistory=void 0;i(190);i(191);i(179);i(115);i(135);i(136);i(98);i(120);i(88);i(126);i(138);var o=i(293);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}r.ViewHistory=function(){function ViewHistory(t){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,ViewHistory);this.fingerprint=t;this.cacheSize=i;this._initializedPromise=this._readFromStorage().then((function(t){var i=JSON.parse(t||"{}"),o=-1;if(Array.isArray(i.files)){for(;i.files.length>=r.cacheSize;)i.files.shift();for(var a=0,u=i.files.length;a<u;a++){if(i.files[a].fingerprint===r.fingerprint){o=a;break}}}else i.files=[];-1===o&&(o=i.files.push({fingerprint:r.fingerprint})-1);r.file=i.files[o];r.database=i}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(ViewHistory,[{key:"_writeToStorage",value:(l=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t;return _regeneratorRuntime().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:if(!o.AppOptions.get("disableHistory")){r.next=2;break}return r.abrupt("return");case 2:t=JSON.stringify(this.database);try{localStorage.setItem("pdfjs.history",t)}catch(t){}case 4:case"end":return r.stop()}}),_callee,this)}))),function _writeToStorage(){return l.apply(this,arguments)})},{key:"_readFromStorage",value:(u=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:if(!o.AppOptions.get("disableHistory")){t.next=2;break}return t.abrupt("return",void 0);case 2:t.prev=2;return t.abrupt("return",localStorage.getItem("pdfjs.history"));case 6:t.prev=6;t.t0=t.catch(2);return t.abrupt("return",void 0);case 9:case"end":return t.stop()}}),_callee2,null,[[2,6]])}))),function _readFromStorage(){return u.apply(this,arguments)})},{key:"set",value:(a=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(t,r){return _regeneratorRuntime().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return this._initializedPromise;case 2:this.file[t]=r;return i.abrupt("return",this._writeToStorage());case 4:case"end":return i.stop()}}),_callee3,this)}))),function set(t,r){return a.apply(this,arguments)})},{key:"setMultiple",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t){var r;return _regeneratorRuntime().wrap((function _callee4$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return this._initializedPromise;case 2:for(r in t)this.file[r]=t[r];return i.abrupt("return",this._writeToStorage());case 4:case"end":return i.stop()}}),_callee4,this)}))),function setMultiple(t){return i.apply(this,arguments)})},{key:"get",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(t,r){var i;return _regeneratorRuntime().wrap((function _callee5$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return this._initializedPromise;case 2:i=this.file[t];return o.abrupt("return",void 0!==i?i:r);case 4:case"end":return o.stop()}}),_callee5,this)}))),function get(t,i){return r.apply(this,arguments)})},{key:"getMultiple",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(t){var r,i,o;return _regeneratorRuntime().wrap((function _callee6$(a){for(;;)switch(a.prev=a.next){case 0:a.next=2;return this._initializedPromise;case 2:r=Object.create(null);for(i in t){o=this.file[i];r[i]=void 0!==o?o:t[i]}return a.abrupt("return",r);case 5:case"end":return a.stop()}}),_callee6,this)}))),function getMultiple(r){return t.apply(this,arguments)})}]);var t,r,i,a,u,l;return ViewHistory}()},(t,r,i)=>{i(135);i(136);i(98);i(120);i(1);i(142);i(175);i(176);i(177);i(178);i(193);i(179);i(182);i(183);i(185);i(188);Object.defineProperty(r,"__esModule",{value:!0});r.BasePreferences=void 0;i(310);i(126);i(88);i(229);i(222);i(138);i(42);i(92);i(288);i(95);i(293);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var o=new WeakMap,a=new WeakMap,u=new WeakMap;r.BasePreferences=function(){function BasePreferences(){var t=this;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,BasePreferences);_classPrivateFieldInitSpec(this,o,{writable:!0,value:Object.freeze({annotationEditorMode:0,annotationMode:2,cursorToolOnLoad:0,defaultZoomDelay:400,defaultZoomValue:"",disablePageLabels:!1,enablePermissions:!1,enablePrintAutoRotate:!0,enableScripting:!0,enableStampEditor:!0,externalLinkTarget:0,historyUpdateUrl:!1,ignoreDestinationZoom:!1,forcePageColors:!1,pageColorsBackground:"Canvas",pageColorsForeground:"CanvasText",pdfBugEnabled:!1,removePageBorders:!1,sidebarViewOnLoad:-1,scrollModeOnLoad:-1,spreadModeOnLoad:-1,textLayerMode:1,viewerCssTheme:0,viewOnLoad:0,disableAutoFetch:!1,disableFontFace:!1,disableRange:!1,disableStream:!1,enableXfa:!0})});_classPrivateFieldInitSpec(this,a,{writable:!0,value:Object.create(null)});_classPrivateFieldInitSpec(this,u,{writable:!0,value:null});if(this.constructor===BasePreferences)throw new Error("Cannot initialize BasePreferences.");_classPrivateFieldSet(this,u,this._readFromStorage(_classPrivateFieldGet(this,o)).then((function(r){for(var i in _classPrivateFieldGet(t,o)){var u=null==r?void 0:r[i];_typeof(u)===_typeof(_classPrivateFieldGet(t,o)[i])&&(_classPrivateFieldGet(t,a)[i]=u)}})))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(BasePreferences,[{key:"_writeToStorage",value:(h=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){return _regeneratorRuntime().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("Not implemented: _writeToStorage");case 1:case"end":return t.stop()}}),_callee)}))),function _writeToStorage(t){return h.apply(this,arguments)})},{key:"_readFromStorage",value:(c=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("Not implemented: _readFromStorage");case 1:case"end":return t.stop()}}),_callee2)}))),function _readFromStorage(t){return c.apply(this,arguments)})},{key:"reset",value:(l=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t,r=this;return _regeneratorRuntime().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return _classPrivateFieldGet(this,u);case 2:t=_classPrivateFieldGet(this,a);_classPrivateFieldSet(this,a,Object.create(null));return i.abrupt("return",this._writeToStorage(_classPrivateFieldGet(this,o)).catch((function(i){_classPrivateFieldSet(r,a,t);throw i})));case 5:case"end":return i.stop()}}),_callee3,this)}))),function reset(){return l.apply(this,arguments)})},{key:"set",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t,r){var i,l,c,h,d=this;return _regeneratorRuntime().wrap((function _callee4$(p){for(;;)switch(p.prev=p.next){case 0:p.next=2;return _classPrivateFieldGet(this,u);case 2:i=_classPrivateFieldGet(this,o)[t],l=_classPrivateFieldGet(this,a);if(void 0!==i){p.next=7;break}throw new Error('Set preference: "'.concat(t,'" is undefined.'));case 7:if(void 0!==r){p.next=9;break}throw new Error("Set preference: no value is specified.");case 9:c=_typeof(r),h=_typeof(i);if(c===h){p.next=18;break}if("number"!==c||"string"!==h){p.next=15;break}r=r.toString();p.next=16;break;case 15:throw new Error('Set preference: "'.concat(r,'" is a ').concat(c,", expected a ").concat(h,"."));case 16:p.next=20;break;case 18:if("number"!==c||Number.isInteger(r)){p.next=20;break}throw new Error('Set preference: "'.concat(r,'" must be an integer.'));case 20:_classPrivateFieldGet(this,a)[t]=r;return p.abrupt("return",this._writeToStorage(_classPrivateFieldGet(this,a)).catch((function(t){_classPrivateFieldSet(d,a,l);throw t})));case 22:case"end":return p.stop()}}),_callee4,this)}))),function set(t,r){return i.apply(this,arguments)})},{key:"get",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(t){var r,i;return _regeneratorRuntime().wrap((function _callee5$(l){for(;;)switch(l.prev=l.next){case 0:l.next=2;return _classPrivateFieldGet(this,u);case 2:if(void 0!==(i=_classPrivateFieldGet(this,o)[t])){l.next=5;break}throw new Error('Get preference: "'.concat(t,'" is undefined.'));case 5:return l.abrupt("return",null!==(r=_classPrivateFieldGet(this,a)[t])&&void 0!==r?r:i);case 6:case"end":return l.stop()}}),_callee5,this)}))),function get(t){return r.apply(this,arguments)})},{key:"getAll",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(){var t,r,i;return _regeneratorRuntime().wrap((function _callee6$(l){for(;;)switch(l.prev=l.next){case 0:l.next=2;return _classPrivateFieldGet(this,u);case 2:t=Object.create(null);for(r in _classPrivateFieldGet(this,o))t[r]=null!==(i=_classPrivateFieldGet(this,a)[r])&&void 0!==i?i:_classPrivateFieldGet(this,o)[r];return l.abrupt("return",t);case 5:case"end":return l.stop()}}),_callee6,this)}))),function getAll(){return t.apply(this,arguments)})}]);var t,r,i,l,c,h;return BasePreferences}()},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.DownloadManager=void 0;i(126);i(42);i(88);i(92);i(288);i(95);i(204);i(232);i(238);i(239);i(240);i(241);var o=i(291);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldGet(t,r){var i=function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}(t,r,"get");return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,i)}function _download(t,r){var i=document.createElement("a");if(!i.click)throw new Error('DownloadManager: "a.click()" is not supported.');i.href=t;i.target="_parent";"download"in i&&(i.download=r);(document.body||document.documentElement).append(i);i.click();i.remove()}var a=new WeakMap;r.DownloadManager=function(){function DownloadManager(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,DownloadManager);_classPrivateFieldInitSpec(this,a,{writable:!0,value:new WeakMap})}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(DownloadManager,[{key:"downloadUrl",value:function downloadUrl(t,r,i){(0,o.createValidAbsoluteUrl)(t,"http://example.com")?_download(t+"#pdfjs.action=download",r):globalThis.ngxConsole.error("downloadUrl - not a valid URL: ".concat(t))}},{key:"downloadData",value:function downloadData(t,r,i){_download(URL.createObjectURL(new Blob([t],{type:i})),r)}},{key:"openOrDownloadData",value:function openOrDownloadData(t,r,i){var u=(0,o.isPdfFile)(i),l=u?"application/pdf":"";if(u){var c=_classPrivateFieldGet(this,a).get(t);if(!c){c=URL.createObjectURL(new Blob([r],{type:l}));_classPrivateFieldGet(this,a).set(t,c)}try{window.open(c);return!0}catch(r){globalThis.ngxConsole.error("openOrDownloadData: ".concat(r));URL.revokeObjectURL(c);_classPrivateFieldGet(this,a).delete(t)}}this.downloadData(r,i,l);return!1}},{key:"download",value:function download(t,r,i,o){_download(URL.createObjectURL(t),i)}}]);return DownloadManager}()},(t,r,i)=>{i(1);i(42);i(92);i(95);i(175);i(176);i(177);i(178);i(193);i(179);i(182);i(183);i(185);i(188);Object.defineProperty(r,"__esModule",{value:!0});r.GenericL10n=void 0;i(88);i(142);i(135);i(136);i(98);i(120);i(126);i(138);i(426);var o=i(337);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}var a={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"};r.GenericL10n=function(){function GenericL10n(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,GenericL10n);var r=document.webL10n;this._lang=t;this._ready=new Promise((function(i,o){r.setLanguage(function fixupLangCode(t){return a[null==t?void 0:t.toLowerCase()]||t}(t),(function(){i(r)}))}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(GenericL10n,[{key:"getLanguage",value:(u=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t;return _regeneratorRuntime().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:r.next=2;return this._ready;case 2:t=r.sent;return r.abrupt("return",t.getLanguage());case 4:case"end":return r.stop()}}),_callee,this)}))),function getLanguage(){return u.apply(this,arguments)})},{key:"getDirection",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t;return _regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:r.next=2;return this._ready;case 2:t=r.sent;return r.abrupt("return",t.getDirection());case 4:case"end":return r.stop()}}),_callee2,this)}))),function getDirection(){return i.apply(this,arguments)})},{key:"get",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(t){var r,i,a,u=arguments;return _regeneratorRuntime().wrap((function _callee3$(l){for(;;)switch(l.prev=l.next){case 0:r=u.length>1&&void 0!==u[1]?u[1]:null;i=u.length>2&&void 0!==u[2]?u[2]:(0,o.getL10nFallback)(t,r);l.next=4;return this._ready;case 4:a=l.sent;return l.abrupt("return",a.get(t,r,i));case 6:case"end":return l.stop()}}),_callee3,this)}))),function get(t){return r.apply(this,arguments)})},{key:"translate",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t){var r;return _regeneratorRuntime().wrap((function _callee4$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return this._ready;case 2:r=i.sent;return i.abrupt("return",r.translate(t));case 4:case"end":return i.stop()}}),_callee4,this)}))),function translate(r){return t.apply(this,arguments)})}]);var t,r,i,u;return GenericL10n}()},(t,r,i)=>{i(190);i(191);i(204);i(212);i(254);i(427);i(428);i(226);i(297);i(336);document.webL10n=function(t,r){var i={},o="",a="textContent",u="",l={},c="loading",h=!0;function fireL10nReadyEvent(t){var i=r.createEvent("Event");i.initEvent("localized",!0,!1);i.language=t;r.dispatchEvent(i)}function xhrLoadText(t,r,i){r=r||function _onSuccess(t){};i=i||function _onFailure(){};var o=new XMLHttpRequest;o.open("GET",t,h);o.overrideMimeType&&o.overrideMimeType("text/plain; charset=utf-8");o.onreadystatechange=function(){4==o.readyState&&(200==o.status||0===o.status?r(o.responseText):i())};o.onerror=i;o.ontimeout=i;try{o.send(null)}catch(t){i()}}function parseResource(r,u,l,c){var h=r.replace(/[^\/]*$/,"")||"./";function evalString(t){return t.lastIndexOf("\\")<0?t:t.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}xhrLoadText(r,(function(r){o+=r;!function parseProperties(r,i){var o={},a=/^\s*|\s*$/,l=/^\s*#|^\s*$/,c=/^\s*\[(.*)\]\s*$/,d=/^\s*@import\s+url\((.*)\)\s*$/i,p=/^([^=\s]*)\s*=\s*(.+)$/;function parseRawLines(t,r,i){var v=t.replace(a,"").split(/[\r\n]+/),g="*",y=u.split("-",1)[0],m=!1,w="",b=!1;!function nextEntry(){for(var t=void 0;;){if(!v.length&&t){b?nextEntry():loadImport(t,nextEntry);return}if(!v.length){i();return}var a=v.shift();if(!l.test(a)){if(r){if(w=c.exec(a)){g=w[1].toLowerCase();m="*"!==g&&g!==u&&g!==y;continue}if(m)continue;if(w=d.exec(a)){if("*"===g||g===u){loadImport(h+w[1],nextEntry);b=!0;return}t=h+w[1]}}var D=a.match(p);D&&3==D.length&&(o[D[1]]=evalString(D[2]))}}}()}function loadImport(r,i){xhrLoadText(r,(function(t){parseRawLines(t,!1,i)}),(function(){var o=t.PDFViewerApplicationOptions;(!o||o.get("verbosity")>0)&&globalThis.ngxConsole.warn(r+" not found.");i()}))}parseRawLines(r,!0,(function(){i(o)}))}(r,(function(t){for(var r in t){var o,u,c=r.lastIndexOf(".");if(c>0){o=r.substring(0,c);u=r.substring(c+1)}else{o=r;u=a}i[o]||(i[o]={});i[o][u]=t[r]}l&&l()}))}),c)}function loadLocale(a,l){var h=a;a&&(a=a.toLowerCase());l=l||function _callback(){};!function clear(){i={};o="";u=""}();u=a;var d=function getL10nResourceLinks(){return r.querySelectorAll('link[type="application/l10n"]')}(),p=d.length;if(0!==p){var v,g=0;v=function onResourceLoaded(){if(++g>=p){l();fireL10nReadyEvent(a);c="complete"}};for(var y=0;y<p;y++){new L10nResourceLink(d[y]).load(a,v)}}else{var m=function getL10nDictionary(){var t=r.querySelector('script[type="application/l10n"]');return t?JSON.parse(t.innerHTML):null}();if(m&&m.locales&&m.default_locale){globalThis.ngxConsole.log("The PDF viewer uses the pre-compiled language bundle stored in the HTML page.");if(!(i=m.locales[h])){var w=m.default_locale.toLowerCase();for(var b in m.locales){h=b;if((b=b.toLowerCase())===a){i=m.locales[h];break}b===w&&(i=m.locales[h])}}l()}else globalThis.ngxConsole.log("Could not load the translation files for the PDF viewer. Check the flag useBrowserLocale, check the locales subfolder of the assets folder, or add the locale definition to the index.html");fireL10nReadyEvent(a);c="complete"}function L10nResourceLink(r){var i=r.href;this.load=function(r,o){parseResource(i,r,o,(function(){var a=t.PDFViewerApplicationOptions;if(!a||a.get("verbosity")>0){globalThis.ngxConsole.warn(i+" not found.");globalThis.ngxConsole.warn('"'+r+'" resource not found')}u="";o()}))}}}l.plural=function(r,o,c,h){var d=parseFloat(o);if(isNaN(d))return r;if(h!=a)return r;l._pluralRules||(l._pluralRules=function getPluralRules(r){function isIn(t,r){return-1!==r.indexOf(t)}function isBetween(t,r,i){return r<=t&&t<=i}var i={0:function _(t){return"other"},1:function _(t){return isBetween(t%100,3,10)?"few":0===t?"zero":isBetween(t%100,11,99)?"many":2==t?"two":1==t?"one":"other"},2:function _(t){return 0!==t&&t%10==0?"many":2==t?"two":1==t?"one":"other"},3:function _(t){return 1==t?"one":"other"},4:function _(t){return isBetween(t,0,1)?"one":"other"},5:function _(t){return isBetween(t,0,2)&&2!=t?"one":"other"},6:function _(t){return 0===t?"zero":t%10==1&&t%100!=11?"one":"other"},7:function _(t){return 2==t?"two":1==t?"one":"other"},8:function _(t){return isBetween(t,3,6)?"few":isBetween(t,7,10)?"many":2==t?"two":1==t?"one":"other"},9:function _(t){return 0===t||1!=t&&isBetween(t%100,1,19)?"few":1==t?"one":"other"},10:function _(t){return isBetween(t%10,2,9)&&!isBetween(t%100,11,19)?"few":t%10!=1||isBetween(t%100,11,19)?"other":"one"},11:function _(t){return isBetween(t%10,2,4)&&!isBetween(t%100,12,14)?"few":t%10==0||isBetween(t%10,5,9)||isBetween(t%100,11,14)?"many":t%10==1&&t%100!=11?"one":"other"},12:function _(t){return isBetween(t,2,4)?"few":1==t?"one":"other"},13:function _(t){return isBetween(t%10,2,4)&&!isBetween(t%100,12,14)?"few":1!=t&&isBetween(t%10,0,1)||isBetween(t%10,5,9)||isBetween(t%100,12,14)?"many":1==t?"one":"other"},14:function _(t){return isBetween(t%100,3,4)?"few":t%100==2?"two":t%100==1?"one":"other"},15:function _(t){return 0===t||isBetween(t%100,2,10)?"few":isBetween(t%100,11,19)?"many":1==t?"one":"other"},16:function _(t){return t%10==1&&11!=t?"one":"other"},17:function _(t){return 3==t?"few":0===t?"zero":6==t?"many":2==t?"two":1==t?"one":"other"},18:function _(t){return 0===t?"zero":isBetween(t,0,2)&&0!==t&&2!=t?"one":"other"},19:function _(t){return isBetween(t,2,10)?"few":isBetween(t,0,1)?"one":"other"},20:function _(t){return!isBetween(t%10,3,4)&&t%10!=9||isBetween(t%100,10,19)||isBetween(t%100,70,79)||isBetween(t%100,90,99)?t%1e6==0&&0!==t?"many":t%10!=2||isIn(t%100,[12,72,92])?t%10!=1||isIn(t%100,[11,71,91])?"other":"one":"two":"few"},21:function _(t){return 0===t?"zero":1==t?"one":"other"},22:function _(t){return isBetween(t,0,1)||isBetween(t,11,99)?"one":"other"},23:function _(t){return isBetween(t%10,1,2)||t%20==0?"one":"other"},24:function _(t){return isBetween(t,3,10)||isBetween(t,13,19)?"few":isIn(t,[2,12])?"two":isIn(t,[1,11])?"one":"other"}},o={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3}[r.replace(/-.*$/,"")];if(!(o in i)){var a=t.PDFViewerApplicationOptions;(!a||a.get("verbosity")>0)&&globalThis.ngxConsole.warn("plural form unknown for ["+r+"]");return function(){return"other"}}return i[o]}(u));var p="["+l._pluralRules(d)+"]";0===d&&c+"[zero]"in i?r=i[c+"[zero]"][h]:1==d&&c+"[one]"in i?r=i[c+"[one]"][h]:2==d&&c+"[two]"in i?r=i[c+"[two]"][h]:c+p in i?r=i[c+p][h]:c+"[other]"in i&&(r=i[c+"[other]"][h]);return r};function getL10nData(r,o,a){var u=i[r];if(!u){var l=t.PDFViewerApplicationOptions;(!l||l.get("verbosity")>0)&&globalThis.ngxConsole.warn("Translation for the key #"+r+" is missing.");if(!a)return null;u=a}var c={};for(var h in u){var d=u[h];d=substArguments(d=substIndexes(d,o,r,h),o,r);c[h]=d}return c}function substIndexes(t,r,o,a){var u=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/.exec(t);if(!u||!u.length)return t;var c,h=u[1],d=u[2];r&&d in r?c=r[d]:d in i&&(c=i[d]);if(h in l){t=(0,l[h])(t,c,o,a)}return t}function substArguments(t,r,o){return t.replace(/\{\{\s*(.+?)\s*\}\}/g,(function(t,a){if(r&&a in r)return r[a];if(a in i)return i[a];globalThis.ngxConsole.log("argument {{"+a+"}} for #"+o+" is undefined.");return t}))}function translateElement(i){var o=function getL10nAttributes(r){if(!r)return{};var i=r.getAttribute("data-l10n-id"),o=r.getAttribute("data-l10n-args"),a={};if(o)try{a=JSON.parse(o)}catch(r){var u=t.PDFViewerApplicationOptions;(!u||u.get("verbosity")>0)&&globalThis.ngxConsole.warn("could not parse arguments for #"+i)}return{id:i,args:a}}(i);if(o.id){var u=getL10nData(o.id,o.args);if(u){if(u[a]){if(0===function getChildElementCount(t){if(t.children)return t.children.length;if(void 0!==t.childElementCount)return t.childElementCount;for(var r=0,i=0;i<t.childNodes.length;i++)r+=1===t.nodeType?1:0;return r}(i))i[a]=u[a];else{for(var l=i.childNodes,c=!1,h=0,d=l.length;h<d;h++)if(3===l[h].nodeType&&/\S/.test(l[h].nodeValue))if(c)l[h].nodeValue="";else{l[h].nodeValue=u[a];c=!0}if(!c){var p=r.createTextNode(u[a]);i.prepend(p)}}delete u[a]}for(var v in u)i[v]=u[v]}else{var g=t.PDFViewerApplicationOptions;(!g||g.get("verbosity")>0)&&globalThis.ngxConsole.warn("#"+o.id+" is undefined.")}}}return{get:function get(t,r,i){var o,u=t.lastIndexOf("."),l=a;if(u>0){l=t.substring(u+1);t=t.substring(0,u)}i&&((o={})[l]=i);var c=getL10nData(t,r,o);return c&&l in c?c[l]:"{{"+t+"}}"},getData:function getData(){return i},getText:function getText(){return o},getLanguage:function getLanguage(){return u},setLanguage:function setLanguage(t,r){loadLocale(t,(function(){r&&r()}))},getDirection:function getDirection(){var t=u.split("-",1)[0];return["ar","he","fa","ps","ur"].indexOf(t)>=0?"rtl":"ltr"},translate:function translateFragment(t){for(var i=function getTranslatableChildren(t){return t?t.querySelectorAll("*[data-l10n-id]"):[]}(t=t||r.documentElement),o=i.length,a=0;a<o;a++)translateElement(i[a]);translateElement(t)},getReadyState:function getReadyState(){return c},ready:function ready(i){i&&("complete"==c||"interactive"==c?t.setTimeout((function(){i()})):r.addEventListener&&r.addEventListener("localized",(function once(){r.removeEventListener("localized",once);i()})))}}}(window,document)},(t,r,i)=>{var o=i(67),a=i(386);o({target:"Array",proto:!0,forced:a!==[].lastIndexOf},{lastIndexOf:a})},(t,r,i)=>{var o=i(116),a=i(34),u=i(6),l=i(219),c=i(31),h=i(11),d=i(208),p=i(10),v=i(147),g=i(255),y=i(56),m=i(94),w=i(38),b=i(101),D=i(221),P=i(213),E=i(215),A=i(8),S=E.UNSUPPORTED_Y,x=4294967295,C=Math.min,k=[].push,T=u(/./.exec),I=u(k),L=u("".slice);l("split",(function(t,r,i){var u;u="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var u=m(p(this)),l=void 0===i?x:i>>>0;if(0===l)return[];if(void 0===t)return[u];if(!d(t))return a(r,u,t,l);for(var c,h,v,g=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),w=0,D=new RegExp(t.source,y+"g");c=a(P,D,u);){if((h=D.lastIndex)>w){I(g,L(u,w,c.index));c.length>1&&c.index<u.length&&o(k,g,b(c,1));v=c[0].length;w=h;if(g.length>=l)break}D.lastIndex===c.index&&D.lastIndex++}w===u.length?!v&&T(D,"")||I(g,""):I(g,L(u,w));return g.length>l?b(g,0,l):g}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:a(r,this,t,i)}:r;return[function split(r,i){var o=p(this),l=h(r)?void 0:w(r,t);return l?a(l,r,o,i):a(u,m(o),r,i)},function(t,o){var a=c(this),l=m(t),h=i(u,a,l,o,u!==r);if(h.done)return h.value;var d=v(a,RegExp),p=a.unicode,w=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(S?"g":"y"),b=new d(S?"^(?:"+a.source+")":a,w),P=void 0===o?x:o>>>0;if(0===P)return[];if(0===l.length)return null===D(b,l)?[l]:[];for(var E=0,A=0,k=[];A<l.length;){b.lastIndex=S?0:A;var T,O=D(b,S?L(l,A):l);if(null===O||(T=C(y(b.lastIndex+(S?A:0)),l.length))===E)A=g(l,A,p);else{I(k,L(l,E,A));if(k.length===P)return k;for(var M=1;M<=O.length-1;M++){I(k,O[M]);if(k.length===P)return k}A=E=T}}I(k,L(l,E));return k}]}),!!A((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),S)},(t,r,i)=>{i(135);i(136);i(98);i(120);i(126);i(138);i(1);i(42);i(92);i(95);i(175);i(176);i(177);i(178);i(193);i(179);i(182);i(183);i(185);i(188);i(190);i(198);i(199);i(202);i(203);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.GenericScripting=void 0;r.docProperties=function docProperties(t){return _docProperties.apply(this,arguments)};i(88);i(142);var o=i(291);function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,o)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var u=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(u.prototype),c=new Context(o||[]);return a(l,"_invoke",{value:makeInvokeMethod(t,i,c)}),l}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="suspendedYield",v="executing",g="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,l,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(values([])));b&&b!==i&&o.call(b,l)&&(m=b);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,a,u,l){var c=tryCatch(t[i],t,a);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function value(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,i,o){var a=d;return function(u,l){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===u)throw l;return{value:t,done:!0}}for(o.method=u,o.arg=l;;){var c=o.delegate;if(c){var h=maybeInvokeDelegate(c,o);if(h){if(h===y)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=v;var m=tryCatch(r,i,o);if("normal"===m.type){if(a=o.done?g:p,m.arg===y)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=g,o.method="throw",o.arg=m.arg)}}}function maybeInvokeDelegate(r,i){var o=i.method,a=r.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&r.iterator.return&&(i.method="return",i.arg=t,maybeInvokeDelegate(r,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,y;var l=u.arg;return l?l.done?(i[r.resultName]=l.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,y):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var i=r[l];if(i)return i.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,u=function next(){for(;++a<r.length;)if(o.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(D,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(D),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(D),define(D,h,"Generator"),define(D,l,(function(){return this})),define(D,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),i=[];for(var o in r)i.push(o);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var i=this;function handle(o,a){return l.type="throw",l.arg=r,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(c&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,y):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),y}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,i,o){return this.delegate={iterator:values(r),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,_toPropertyKey(o.key),o)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var c=t[u](l),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _docProperties(){return(_docProperties=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t){var r,i,a,u,l,c,h,d,p;return _regeneratorRuntime().wrap((function _callee4$(v){for(;;)switch(v.prev=v.next){case 0:i=(r="").split("#")[0];v.next=3;return t.getMetadata();case 3:a=v.sent;u=a.info;l=a.metadata;c=a.contentDispositionFilename;if(h=a.contentLength){v.next=14;break}v.next=11;return t.getDownloadInfo();case 11:d=v.sent;p=d.length;h=p;case 14:return v.abrupt("return",_objectSpread(_objectSpread({},u),{},{baseURL:i,filesize:h,filename:c||(0,o.getPdfFilenameFromUrl)(r),metadata:null==l?void 0:l.getRaw(),authors:null==l?void 0:l.get("dc:creator"),numPages:t.numPages,URL:r}));case 15:case"end":return v.stop()}}),_callee4)})))).apply(this,arguments)}r.GenericScripting=function(){function GenericScripting(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,GenericScripting);this._ready=(0,o.loadScript)(t,!0).then((function(){return window.pdfjsSandbox.QuickJSSandbox()}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(GenericScripting,[{key:"createSandbox",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){return _regeneratorRuntime().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:r.next=2;return this._ready;case 2:r.sent.create(t);case 4:case"end":return r.stop()}}),_callee,this)}))),function createSandbox(t){return i.apply(this,arguments)})},{key:"dispatchEventInSandbox",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r;return _regeneratorRuntime().wrap((function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return this._ready;case 2:r=i.sent;setTimeout((function(){return r.dispatchEvent(t)}),0);case 4:case"end":return i.stop()}}),_callee2,this)}))),function dispatchEventInSandbox(t){return r.apply(this,arguments)})},{key:"destroySandbox",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){return _regeneratorRuntime().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:t.next=2;return this._ready;case 2:t.sent.nukeSandbox();case 4:case"end":return t.stop()}}),_callee3,this)}))),function destroySandbox(){return t.apply(this,arguments)})}]);var t,r,i;return GenericScripting}()},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(98);i(120);i(1);i(179);i(188);i(229);i(195);i(135);i(136);i(138);Object.defineProperty(r,"__esModule",{value:!0});r.PDFPrintService=void 0;i(212);i(226);i(42);i(88);i(142);i(92);i(95);i(182);i(333);i(204);i(222);i(232);i(238);i(239);i(240);i(241);i(205);i(206);i(126);var o=i(291),a=i(194),u=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(346)),l=i(431),c=i(348);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,(a=o.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(a,"string"),"symbol"===_typeof(u)?u:String(u)),o)}var a,u}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,l,c=[],h=!0,d=!1;try{if(u=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=u.call(i)).done)&&(c.push(o.value),c.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}var h=null,d=null,p=null;function renderPage(t,r,i,a,l,d,p){var v=h.scratchCanvas,g=l/o.PixelsPerInch.PDF,y=1,m=Math.floor(a.width*g),w=Math.floor(a.height*g);if(m>=4096||w>=4096){if(!u.default.test({width:m,height:w})){var b=function determineMaxDimensions(){for(var t=0,r=[4096,8192,10836,11180,11402,14188,16384];t<r.length;t++){var i=r[t];if(!u.default.test({width:i+1,height:i+1}))return i}return 16384}();y=.95*Math.min(b/m,b/w)}(0,c.warn)("Page "+i+": Reduced the [printResolution] to "+Math.floor(l*y)+" because the browser can't render larger canvases. If you see blank page in the print preview, reduce [printResolution] manually to a lower value.")}g*=y;v.width=Math.floor(a.width*g);v.height=Math.floor(a.height*g);var D=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,P=v.getContext("2d",D);P.save();P.fillStyle="rgb(255, 255, 255)";P.fillRect(0,0,v.width,v.height);P.restore();return Promise.all([r.getPage(i),p]).then((function(t){var r=_slicedToArray(t,2),i=r[0],u=r[1],l={canvasContext:P,transform:[g,0,0,g,0,0],viewport:i.getViewport({scale:1,rotation:a.rotation}),intent:"print",annotationMode:o.AnnotationMode.ENABLE_STORAGE,optionalContentConfigPromise:d,printAnnotationStorage:u};return i.render(l).promise}))}var v,g=r.PDFPrintService=function(){function PDFPrintService(t,r,i,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=arguments.length>6?arguments[6]:void 0,c=arguments.length>7?arguments[7]:void 0;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFPrintService);this.pdfDocument=t;this.pagesOverview=r;this.printContainer=i;this._printResolution=o||150;this._optionalContentConfigPromise=a||t.getOptionalContentConfig();this._printAnnotationStoragePromise=u||Promise.resolve();this.l10n=l;this.currentPage=-1;this.scratchCanvas=document.createElement("canvas");this.eventBus=c}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFPrintService,[{key:"layout",value:function layout(){this.throwIfInactive();var t=document.querySelector("body");t.setAttribute("data-pdfjsprinting",!0);document.querySelector("html").setAttribute("data-pdfjsprinting",!0);var r=this.pagesOverview[0],i=r.width,o=r.height;this.pagesOverview.every((function(t){return t.width===i&&t.height===o}))||globalThis.ngxConsole.warn("Not all pages have the same size. The printed result may be incorrect!");this.pageStyleSheet=document.createElement("style");this.pageStyleSheet.textContent="@page { size: ".concat(i,"pt ").concat(o,"pt;}");t.append(this.pageStyleSheet)}},{key:"destroy",value:function destroy(){if(h===this){this.printContainer.textContent="";document.querySelector("body").removeAttribute("data-pdfjsprinting");document.querySelector("html").removeAttribute("data-pdfjsprinting");if(this.pageStyleSheet){this.pageStyleSheet.remove();this.pageStyleSheet=null}this.scratchCanvas.width=this.scratchCanvas.height=0;this.scratchCanvas=null;h=null;ensureOverlay().then((function(){p.active===d&&p.close(d)}))}}},{key:"renderPages",value:function renderPages(){var t=this;if(this.pdfDocument.isPureXfa){(0,l.getXfaHtmlForPrinting)(this.printContainer,this.pdfDocument);return Promise.resolve()}var r=this.pagesOverview.length;return new Promise((function renderNextPage(i,o){t.throwIfInactive();for(;;){++t.currentPage;if(t.currentPage>=r)break;if(!window.isInPDFPrintRange||window.isInPDFPrintRange(t.currentPage))break}if(t.currentPage>=r){renderProgress(window.filteredPageCount|r,window.filteredPageCount|r,t.l10n,t.eventBus);i()}else{var a=t.currentPage;renderProgress(a,window.filteredPageCount|r,t.l10n,t.eventBus);renderPage(0,t.pdfDocument,a+1,t.pagesOverview[a],t._printResolution,t._optionalContentConfigPromise,t._printAnnotationStoragePromise).then(t.useRenderedPage.bind(t)).then((function(){renderNextPage(i,o)}),o)}}))}},{key:"useRenderedPage",value:function useRenderedPage(){this.throwIfInactive();var t=document.createElement("img"),r=this.scratchCanvas;"toBlob"in r?r.toBlob((function(r){t.src=URL.createObjectURL(r)})):t.src=r.toDataURL();var i=document.createElement("div");i.className="printedPage";i.append(t);this.printContainer.append(i);return new Promise((function(r,i){t.onload=r;t.onerror=i}))}},{key:"performPrint",value:function performPrint(){var t=this;this.throwIfInactive();return new Promise((function(r){setTimeout((function(){if(t.active){y.call(window);var i=navigator.platform&&["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document;setTimeout(r,i?1500:20)}else r()}),0)}))}},{key:"active",get:function get(){return this===h}},{key:"throwIfInactive",value:function throwIfInactive(){if(!this.active)throw new Error("This print request was cancelled or completed.")}}]);return PDFPrintService}(),y=window.print;window.printPDF=function printPdf(){if(a.PDFViewerApplication.enablePrint)if(h)globalThis.ngxConsole.warn("Ignored window.printPDF() because of a pending print job.");else{ensureOverlay().then((function(){h&&p.open(d)}));try{dispatchEvent("beforeprint")}finally{if(!h){globalThis.ngxConsole.error("Expected print service to be initialized.");ensureOverlay().then((function(){p.active===d&&p.close(d)}));return}var t=h;h.renderPages().then((function(){var r=document.getElementById("printServiceDialog");r&&r.classList.add("hidden");return t.performPrint()})).catch((function(){})).then((function(){t.active&&abort()}))}}};function dispatchEvent(t){var r=new CustomEvent(t,{bubbles:!1,cancelable:!1,detail:"custom"});window.dispatchEvent(r)}function abort(){if(h){h.destroy();dispatchEvent("afterprint")}}function renderProgress(t,r,i,o){d=document.getElementById("printServiceDialog");var a=Math.round(100*t/r),u=d.querySelector("progress"),l=d.querySelector(".relative-progress");u.value=a;i.get("print_progress_percent",{progress:a}).then((function(t){l.textContent=t}));o.dispatch("progress",{source:this,type:"print",total:r,page:t,percent:100*t/r})}window.addEventListener("keydown",(function(t){if(80===t.keyCode&&(t.ctrlKey||t.metaKey)&&!t.altKey&&(!t.shiftKey||window.chrome||window.opera)){window.print();t.preventDefault();t.stopImmediatePropagation()}}),!0);if("onbeforeprint"in window){var m=function stopPropagationIfNeeded(t){"custom"!==t.detail&&t.stopImmediatePropagation()};window.addEventListener("beforeprint",m);window.addEventListener("afterprint",m)}function ensureOverlay(){if(!v){if(!(p=a.PDFViewerApplication.overlayManager))throw new Error("The overlay manager has not yet been initialized.");d=document.getElementById("printServiceDialog");v=p.register(d,!0);document.getElementById("printCancel").onclick=abort;d.addEventListener("close",abort)}return v}a.PDFPrintServiceFactory.instance={supportsPrinting:!0,createPrintService:function createPrintService(t,r,i,o,a,u,l,c){if(h)throw new Error("The print service is created and active.");return h=new g(t,r,i,o,a,u,l,c)}}},(t,r,i)=>{i(188);i(88);i(229);i(195);i(92);i(212);i(226);i(98);i(120);i(1);i(42);i(95);i(126);Object.defineProperty(r,"__esModule",{value:!0});r.getXfaHtmlForPrinting=function getXfaHtmlForPrinting(t,r){var i,l=r.allXfaHtml,c=new a.SimpleLinkService,h=Math.round(100*o.PixelsPerInch.PDF_TO_CSS_UNITS)/100,d=function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,l=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=!0;u=t},f:function f(){try{l||null==i.return||i.return()}finally{if(c)throw u}}}}(l.children);try{for(d.s();!(i=d.n()).done;){var p=i.value,v=document.createElement("div");v.className="xfaPrintedPage";t.append(v);var g=new u.XfaLayerBuilder({pageDiv:v,pdfPage:null,annotationStorage:r.annotationStorage,linkService:c,xfaHtml:p}),y=(0,o.getXfaPageViewport)(p,{scale:h});g.render(y,"print")}}catch(t){d.e(t)}finally{d.f()}};var o=i(291),a=i(296),u=i(419);function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}}],r={};function __webpack_require__(i){var o=r[i];if(void 0!==o)return o.exports;var a=r[i]={exports:{}};t[i].call(a.exports,a,a.exports,__webpack_require__);return a.exports}var i={};(()=>{var t=i;Object.defineProperty(t,"__esModule",{value:!0});Object.defineProperty(t,"PDFViewerApplication",{enumerable:!0,get:function get(){return c.PDFViewerApplication}});t.PDFViewerApplicationConstants=void 0;Object.defineProperty(t,"PDFViewerApplicationOptions",{enumerable:!0,get:function get(){return u.AppOptions}});__webpack_require__(1);__webpack_require__(42);__webpack_require__(88);__webpack_require__(92);__webpack_require__(95);__webpack_require__(98);__webpack_require__(120);__webpack_require__(121);__webpack_require__(430);var r,o,a=__webpack_require__(245),u=__webpack_require__(293),l=__webpack_require__(296),c=__webpack_require__(194),h=t.PDFViewerApplicationConstants={LinkTarget:l.LinkTarget,RenderingStates:a.RenderingStates,ScrollMode:a.ScrollMode,SpreadMode:a.SpreadMode};window.PDFViewerApplication=c.PDFViewerApplication;window.PDFViewerApplicationConstants=h;window.PDFViewerApplicationOptions=u.AppOptions;HTMLCollection.prototype[Symbol.iterator]||(HTMLCollection.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator]);"function"!=typeof window.CustomEvent&&(window.CustomEvent=function CustomEvent(t,r){r=r||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");i.initCustomEvent(t,r.bubbles,r.cancelable,r.detail);return i});null===(r=(o=document).blockUnblockOnload)||void 0===r||r.call(o,!0);window.webViewerLoad=function webViewerLoad(){var t=function getViewerConfiguration(){return{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"),openFile:document.getElementById("openFile"),print:document.getElementById("print"),editorFreeTextButton:document.getElementById("editorFreeText"),editorFreeTextParamsToolbar:document.getElementById("editorFreeTextParamsToolbar"),editorInkButton:document.getElementById("editorInk"),editorInkParamsToolbar:document.getElementById("editorInkParamsToolbar"),editorStampButton:document.getElementById("editorStamp"),presentationModeButton:document.getElementById("presentationMode"),editorStampParamsToolbar:document.getElementById("editorStampParamsToolbar"),download:document.getElementById("download")},secondaryToolbar:{toolbar:document.getElementById("secondaryToolbar"),toggleButton:document.getElementById("secondaryToolbarToggle"),presentationModeButton:document.getElementById("secondaryPresentationMode"),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"),outlineOptionsContainer:document.getElementById("outlineOptionsContainer"),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")}},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.js"}}(),r=new CustomEvent("webviewerloaded",{bubbles:!0,cancelable:!0,detail:{source:window}});try{parent.document.dispatchEvent(r)}catch(t){console.error("webviewerloaded: ".concat(t));document.dispatchEvent(r)}c.PDFViewerApplication.run(t)}})()})();
});