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.

21 lines 1.06 MB
/**
 * @licstart The following is the entire license notice for the
 * JavaScript code in this page
 *
 * Copyright 2023 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @licend The above is the entire license notice for the
 * JavaScript code in this page
 */var t,r,i,o,a={1483:(t,r,i)=>{i.d(r,{default:()=>d});i(9366),i(6678),i(895),i(2926),i(6180),i(1747),i(2374),i(4226),i(4668),i(1585),i(7121),i(2993),i(7262),i(6770),i(1378),i(7335),i(8649),i(9593),i(171),i(924),i(7942),i(5776),i(3352),i(5598),i(8806),i(5897),i(5057),i(7529),i(3757),i(3655),i(2555),i(2202),i(5666);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,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}(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),c=[a-1,u-1,1,1],l=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,c);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],y=Date.now()-l;[r,i].forEach((function(t){t.height=0;t.width=0}));if(h){postMessage({width:a,height:u,benchmark:y,isTestPass:v});!v&&t.sizes.length&&canvasTest(t)}else if(v)t.onSuccess(a,u,y);else{t.onError(a,u,y);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],c=["onError","onSuccess"],l={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||l.min,c=t.step||l.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-=c}else t.sizes.forEach((function(t){var u=r||i?t:1,c=r||o?t:1;a.push([u,c])}));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,l=_objectWithoutProperties(t,c),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"}),y=URL.createObjectURL(v);d=new Worker(y);URL.revokeObjectURL(y);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 c=_objectSpread2(_objectSpread2({},t),{},{onError:function onError(r,o,u){var c;if(0===t.sizes.length)c=!0;else{var l=_slicedToArray(t.sizes.slice(-1),1),h=_slicedToArray(l[0],2),d=h[0],p=h[1];c=r===d&&o===p}a(r,o,u);c&&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=c.onError,v=c.onSuccess;h[o]={onError:p,onSuccess:v};d.postMessage(l)}else canvasTest(c)}));if(!d)return canvasTest(t);h[o]={onError:a,onSuccess:u};d.postMessage(l)}var d={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({},l),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({},l),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({},l),t),{},{sizes:r}))},test:function test(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=_objectSpread2(_objectSpread2({},l),t);r.sizes=_toConsumableArray(r.sizes);r.width&&r.height&&(r.sizes=[[r.width,r.height]]);return handleMethod(r)}}},1782:(t,r,i)=>{var o=i(7316),a=i(9762),u=TypeError;t.exports=function(t){if(o(t))return t;throw new u(a(t)+" is not a function")}},7073:(t,r,i)=>{var o=i(1694),a=i(9762),u=TypeError;t.exports=function(t){if(o(t))return t;throw new u(a(t)+" is not a constructor")}},4958:(t,r,i)=>{var o=i(7316),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")}},5690:(t,r,i)=>{var o=i(23).has;t.exports=function(t){o(t);return t}},5463:(t,r,i)=>{var o=i(2292),a=i(6941),u=i(7744).f,c=o("unscopables"),l=Array.prototype;void 0===l[c]&&u(l,c,{configurable:!0,value:a(null)});t.exports=function(t){l[c][t]=!0}},9047:(t,r,i)=>{var o=i(6819).charAt;t.exports=function(t,r,i){return r+(i?o(t,r).length:1)}},5834:(t,r,i)=>{var o=i(2658),a=TypeError;t.exports=function(t,r){if(o(r,t))return t;throw new a("Incorrect invocation")}},4719:(t,r,i)=>{var o=i(7633),a=String,u=TypeError;t.exports=function(t){if(o(t))return t;throw new u(a(t)+" is not an object")}},5115:t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7585:(t,r,i)=>{var o=i(1299),a=i(8374),u=TypeError;t.exports=o(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==a(t))throw new u("ArrayBuffer expected");return t.byteLength}},582:(t,r,i)=>{var o=i(8403),a=i(7585),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}}},6944:(t,r,i)=>{var o=i(8154);t.exports=o((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},4358:(t,r,i)=>{var o=i(9298),a=i(8403),u=i(1299),c=i(9548),l=i(582),h=i(7585),d=i(8126),p=i(4837),v=o.structuredClone,y=o.ArrayBuffer,g=o.DataView,m=o.TypeError,_=Math.min,b=y.prototype,w=g.prototype,P=a(b.slice),D=u(b,"resizable","get"),E=u(b,"maxByteLength","get"),x=a(w.getInt8),S=a(w.setInt8);t.exports=(p||d)&&function(t,r,i){var o,a=h(t),u=void 0===r?a:c(r),b=!D||!D(t);if(l(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 w=i&&!b&&E?{maxByteLength:E(t)}:void 0;o=new y(u,w);for(var A=new g(t),C=new g(o),k=_(u,a),I=0;I<k;I++)S(C,I,x(A,I))}p||d(t);return o}},5861:(t,r,i)=>{var o,a,u,c=i(5115),l=i(940),h=i(9298),d=i(7316),p=i(7633),v=i(936),y=i(8329),g=i(9762),m=i(9293),_=i(7041),b=i(9691),w=i(2658),P=i(2176),D=i(9763),E=i(2292),x=i(7561),S=i(1649),A=S.enforce,C=S.get,k=h.Int8Array,I=k&&k.prototype,T=h.Uint8ClampedArray,L=T&&T.prototype,O=k&&P(k),M=I&&P(I),B=Object.prototype,G=h.TypeError,R=E("toStringTag"),j=x("TYPED_ARRAY_TAG"),N="TypedArrayConstructor",V=c&&!!D&&"Opera"!==y(h.opera),W=!1,z={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},H={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(t){var r=P(t);if(p(r)){var i=C(r);return i&&v(i,N)?i[N]:getTypedArrayConstructor(r)}},isTypedArray=function(t){if(!p(t))return!1;var r=y(t);return v(z,r)||v(H,r)};for(o in z)(u=(a=h[o])&&a.prototype)?A(u)[N]=a:V=!1;for(o in H)(u=(a=h[o])&&a.prototype)&&(A(u)[N]=a);if(!V||!d(O)||O===Function.prototype){O=function TypedArray(){throw new G("Incorrect invocation")};if(V)for(o in z)h[o]&&D(h[o],O)}if(!V||!M||M===B){M=O.prototype;if(V)for(o in z)h[o]&&D(h[o].prototype,M)}V&&P(L)!==M&&D(L,M);if(l&&!v(M,R)){W=!0;b(M,R,{configurable:!0,get:function(){return p(this)?this[j]:void 0}});for(o in z)h[o]&&m(h[o],j,o)}t.exports={NATIVE_ARRAY_BUFFER_VIEWS:V,TYPED_ARRAY_TAG:W&&j,aTypedArray:function(t){if(isTypedArray(t))return t;throw new G("Target is not a typed array")},aTypedArrayConstructor:function(t){if(d(t)&&(!D||w(O,t)))return t;throw new G(g(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,r,i,o){if(l){if(i)for(var a in z){var u=h[a];if(u&&v(u.prototype,t))try{delete u.prototype[t]}catch(i){try{u.prototype[t]=r}catch(t){}}}M[t]&&!i||_(M,t,i?r:V&&I[t]||r,o)}},exportTypedArrayStaticMethod:function(t,r,i){var o,a;if(l){if(D){if(i)for(o in z)if((a=h[o])&&v(a,t))try{delete a[t]}catch(t){}if(O[t]&&!i)return;try{return _(O,t,i?r:V&&O[t]||r)}catch(t){}}for(o in z)!(a=h[o])||a[t]&&!i||_(a,t,r)}},getTypedArrayConstructor:getTypedArrayConstructor,isView:function isView(t){if(!p(t))return!1;var r=y(t);return"DataView"===r||v(z,r)||v(H,r)},isTypedArray:isTypedArray,TypedArray:O,TypedArrayPrototype:M}},5050:(t,r,i)=>{var o=i(9298),a=i(8403),u=i(940),c=i(5115),l=i(5145),h=i(9293),d=i(9691),p=i(6880),v=i(8154),y=i(5834),g=i(1003),m=i(8293),_=i(9548),b=i(796),w=i(3106),P=i(2176),D=i(9763),E=i(5455).f,x=i(8041),S=i(6071),A=i(7536),C=i(1649),k=l.PROPER,I=l.CONFIGURABLE,T="ArrayBuffer",L="DataView",O="prototype",M="Wrong index",B=C.getterFor(T),G=C.getterFor(L),R=C.set,j=o[T],N=j,V=N&&N[O],W=o[L],z=W&&W[O],H=Object.prototype,U=o.Array,K=o.RangeError,$=a(x),Y=a([].reverse),q=w.pack,X=w.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 q(b(t),23,4)},packFloat64=function(t){return q(t,52,8)},addGetter=function(t,r,i){d(t[O],r,{configurable:!0,get:function(){return i(this)[r]}})},get=function(t,r,i,o){var a=G(t),u=_(i),c=!!o;if(u+r>a.byteLength)throw new K(M);var l=a.bytes,h=u+a.byteOffset,d=S(l,h,h+r);return c?d:Y(d)},set=function(t,r,i,o,a,u){var c=G(t),l=_(i),h=o(+a),d=!!u;if(l+r>c.byteLength)throw new K(M);for(var p=c.bytes,v=l+c.byteOffset,y=0;y<r;y++)p[v+y]=h[d?y:r-y-1]};if(c){var Z=k&&j.name!==T;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||Z&&!I})))Z&&I&&h(j,"name",T);else{(N=function ArrayBuffer(t){y(this,V);return new j(_(t))})[O]=V;for(var Q,J=E(j),ee=0;J.length>ee;)(Q=J[ee++])in N||h(N,Q,j[Q]);V.constructor=N}D&&P(z)!==H&&D(z,H);var te=new W(new N(2)),re=a(z.setInt8);te.setInt8(0,2147483648);te.setInt8(1,2147483649);!te.getInt8(0)&&te.getInt8(1)||p(z,{setInt8:function setInt8(t,r){re(this,t,r<<24>>24)},setUint8:function setUint8(t,r){re(this,t,r<<24>>24)}},{unsafe:!0})}else{V=(N=function ArrayBuffer(t){y(this,V);var r=_(t);R(this,{type:T,bytes:$(U(r),0),byteLength:r});if(!u){this.byteLength=r;this.detached=!1}})[O];z=(W=function DataView(t,r,i){y(this,z);y(t,V);var o=B(t),a=o.byteLength,c=g(r);if(c<0||c>a)throw new K("Wrong offset");if(c+(i=void 0===i?a-c:m(i))>a)throw new K("Wrong length");R(this,{type:L,buffer:t,byteLength:i,byteOffset:c,bytes:o.bytes});if(!u){this.buffer=t;this.byteLength=i;this.byteOffset=c}})[O];if(u){addGetter(N,"byteLength",B);addGetter(W,"buffer",G);addGetter(W,"byteLength",G);addGetter(W,"byteOffset",G)}p(z,{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 X(get(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function getFloat64(t){return X(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])}})}A(N,T);A(W,L);t.exports={ArrayBuffer:N,DataView:W}},1474:(t,r,i)=>{var o=i(2007),a=i(6985),u=i(451),c=i(2322),l=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,y=l((void 0===v?h:a(v,h))-p,h-d),g=1;if(p<d&&d<p+y){g=-1;p+=y-1;d+=y-1}for(;y-- >0;){p in i?i[d]=i[p]:c(i,d);d+=g;p+=g}return i}},8041:(t,r,i)=>{var o=i(2007),a=i(6985),u=i(451);t.exports=function fill(t){for(var r=o(this),i=u(r),c=arguments.length,l=a(c>1?arguments[1]:void 0,i),h=c>2?arguments[2]:void 0,d=void 0===h?i:a(h,i);d>l;)r[l++]=t;return r}},8208:(t,r,i)=>{var o=i(2423).forEach,a=i(8321)("forEach");t.exports=a?[].forEach:function forEach(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}},7003:(t,r,i)=>{var o=i(451);t.exports=function(t,r,i){for(var a=0,u=arguments.length>2?i:o(r),c=new t(u);u>a;)c[a]=r[a++];return c}},7609:(t,r,i)=>{var o=i(7789),a=i(2026),u=i(2007),c=i(5723),l=i(5191),h=i(1694),d=i(451),p=i(8947),v=i(7612),y=i(273),g=Array;t.exports=function from(t){var r=u(t),i=h(this),m=arguments.length,_=m>1?arguments[1]:void 0,b=void 0!==_;b&&(_=o(_,m>2?arguments[2]:void 0));var w,P,D,E,x,S,A=y(r),C=0;if(!A||this===g&&l(A)){w=d(r);P=i?new this(w):g(w);for(;w>C;C++){S=b?_(r[C],C):r[C];p(P,C,S)}}else{x=(E=v(r,A)).next;P=i?new this:[];for(;!(D=a(x,E)).done;C++){S=b?c(E,_,[D.value,C],!0):D.value;p(P,C,S)}}P.length=C;return P}},9773:(t,r,i)=>{var o=i(4115),a=i(6985),u=i(451),createMethod=function(t){return function(r,i,c){var l,h=o(r),d=u(h),p=a(c,d);if(t&&i!=i){for(;d>p;)if((l=h[p++])!=l)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)}},4026:(t,r,i)=>{var o=i(7789),a=i(3622),u=i(2007),c=i(451),createMethod=function(t){var r=1===t;return function(i,l,h){for(var d,p=u(i),v=a(p),y=c(v),g=o(l,h);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)}},2423:(t,r,i)=>{var o=i(7789),a=i(8403),u=i(3622),c=i(2007),l=i(451),h=i(8097),d=a([].push),createMethod=function(t){var r=1===t,i=2===t,a=3===t,p=4===t,v=6===t,y=7===t,g=5===t||v;return function(m,_,b,w){for(var P,D,E=c(m),x=u(E),S=l(x),A=o(_,b),C=0,k=w||h,I=r?k(m,S):i||y?k(m,0):void 0;S>C;C++)if(g||C in x){D=A(P=x[C],C,E);if(t)if(r)I[C]=D;else if(D)switch(t){case 3:return!0;case 5:return P;case 6:return C;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)}},8671:(t,r,i)=>{var o=i(7294),a=i(4115),u=i(1003),c=i(451),l=i(8321),h=Math.min,d=[].lastIndexOf,p=!!d&&1/[1].lastIndexOf(1,-0)<0,v=l("lastIndexOf"),y=p||!v;t.exports=y?function lastIndexOf(t){if(p)return o(d,this,arguments)||0;var r=a(this),i=c(r),l=i-1;arguments.length>1&&(l=h(l,u(arguments[1])));l<0&&(l=i+l);for(;l>=0;l--)if(l in r&&r[l]===t)return l||0;return-1}:d},3577:(t,r,i)=>{var o=i(8154),a=i(2292),u=i(2171),c=a("species");t.exports=function(t){return u>=51||!o((function(){var r=[];(r.constructor={})[c]=function(){return{foo:1}};return 1!==r[t](Boolean).foo}))}},8321:(t,r,i)=>{var o=i(8154);t.exports=function(t,r){var i=[][t];return!!i&&o((function(){i.call(null,r||function(){return 1},1)}))}},2741:(t,r,i)=>{var o=i(1782),a=i(2007),u=i(3622),c=i(451),l=TypeError,createMethod=function(t){return function(r,i,h,d){var p=a(r),v=u(p),y=c(p);o(i);var g=t?y-1:0,m=t?-1:1;if(h<2)for(;;){if(g in v){d=v[g];g+=m;break}g+=m;if(t?g<0:y<=g)throw new l("Reduce of empty array with no initial value")}for(;t?g>=0:y>g;g+=m)g in v&&(d=i(d,v[g],g,p));return d}};t.exports={left:createMethod(!1),right:createMethod(!0)}},6661:(t,r,i)=>{var o=i(940),a=i(6998),u=TypeError,c=Object.getOwnPropertyDescriptor,l=o&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=l?function(t,r){if(a(t)&&!c(t,"length").writable)throw new u("Cannot set read only .length");return t.length=r}:function(t,r){return t.length=r}},6071:(t,r,i)=>{var o=i(6985),a=i(451),u=i(8947),c=Array,l=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=c(l(p-d,0)),y=0;d<p;d++,y++)u(v,y,t[d]);v.length=y;return v}},2251:(t,r,i)=>{var o=i(8403);t.exports=o([].slice)},4689:(t,r,i)=>{var o=i(6071),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,c=0,l=0;c<a||l<u;)t[c+l]=c<a&&l<u?o(r[c],i[l])<=0?r[c++]:i[l++]:c<a?r[c++]:i[l++];return t};t.exports=mergeSort},751:(t,r,i)=>{var o=i(6998),a=i(1694),u=i(7633),c=i(2292)("species"),l=Array;t.exports=function(t){var r;if(o(t)){r=t.constructor;(a(r)&&(r===l||o(r.prototype))||u(r)&&null===(r=r[c]))&&(r=void 0)}return void 0===r?l:r}},8097:(t,r,i)=>{var o=i(751);t.exports=function(t,r){return new(o(t))(0===r?0:r)}},2304:(t,r,i)=>{var o=i(451);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}},5886:(t,r,i)=>{var o=i(451),a=i(1003),u=RangeError;t.exports=function(t,r,i,c){var l=o(t),h=a(i),d=h<0?l+h:h;if(d>=l||d<0)throw new u("Incorrect index");for(var p=new r(l),v=0;v<l;v++)p[v]=v===d?c:t[v];return p}},5723:(t,r,i)=>{var o=i(4719),a=i(3316);t.exports=function(t,r,i,u){try{return u?r(o(i)[0],i[1]):r(i)}catch(r){a(t,"throw",r)}}},1374:(t,r,i)=>{var o=i(2292)("iterator"),a=!1;try{var u=0,c={next:function(){return{done:!!u++}},return:function(){a=!0}};c[o]=function(){return this};Array.from(c,(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}},8374:(t,r,i)=>{var o=i(8403),a=o({}.toString),u=o("".slice);t.exports=function(t){return u(a(t),8,-1)}},8329:(t,r,i)=>{var o=i(3077),a=i(7316),u=i(8374),c=i(2292)("toStringTag"),l=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=l(t),c))?i:h?u(r):"Object"===(o=u(r))&&a(r.callee)?"Arguments":o}},6122:(t,r,i)=>{var o=i(6941),a=i(9691),u=i(6880),c=i(7789),l=i(5834),h=i(3734),d=i(6837),p=i(7301),v=i(1111),y=i(5963),g=i(940),m=i(4694).fastKey,_=i(1649),b=_.set,w=_.getterFor;t.exports={getConstructor:function(t,r,i,p){var v=t((function(t,a){l(t,y);b(t,{type:r,index:o(null),first:void 0,last:void 0,size:0});g||(t.size=0);h(a)||d(a,t[p],{that:t,AS_ENTRIES:i})})),y=v.prototype,_=w(r),define=function(t,r,i){var o,a,u=_(t),c=getEntry(t,r);if(c)c.value=i;else{u.last=c={index:a=m(r,!0),key:r,value:i,previous:o=u.last,next:void 0,removed:!1};u.first||(u.first=c);o&&(o.next=c);g?u.size++:t.size++;"F"!==a&&(u.index[a]=c)}return t},getEntry=function(t,r){var i,o=_(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(y,{clear:function clear(){for(var t=_(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;g?t.size=0:this.size=0},delete:function(t){var r=this,i=_(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);g?i.size--:r.size--}return!!o},forEach:function forEach(t){for(var r,i=_(this),o=c(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(y,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)}});g&&a(y,"size",{configurable:!0,get:function(){return _(this).size}});return v},setStrong:function(t,r,i){var o=r+" Iterator",a=w(r),u=w(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);y(r)}}},9609:(t,r,i)=>{var o=i(8403),a=i(6880),u=i(4694).getWeakData,c=i(5834),l=i(4719),h=i(3734),d=i(7633),p=i(6837),v=i(2423),y=i(936),g=i(1649),m=g.set,_=g.getterFor,b=v.find,w=v.findIndex,P=o([].splice),D=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=w(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){c(t,g);m(t,{type:r,id:D++,frozen:void 0});h(a)||p(a,t[o],{that:t,AS_ENTRIES:i})})),g=v.prototype,b=_(r),define=function(t,r,i){var o=b(t),a=u(l(r),!0);!0===a?uncaughtFrozenStore(o).set(r,i):a[o.id]=i;return t};a(g,{delete:function(t){var r=b(this);if(!d(t))return!1;var i=u(t);return!0===i?uncaughtFrozenStore(r).delete(t):i&&y(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&&y(i,r.id)}});a(g,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}}},4981:(t,r,i)=>{var o=i(4978),a=i(9298),u=i(8403),c=i(7007),l=i(7041),h=i(4694),d=i(6837),p=i(5834),v=i(7316),y=i(3734),g=i(7633),m=i(8154),_=i(1374),b=i(7536),w=i(7523);t.exports=function(t,r,i){var P=-1!==t.indexOf("Map"),D=-1!==t.indexOf("Weak"),E=P?"set":"add",x=a[t],S=x&&x.prototype,A=x,C={},fixMethod=function(t){var r=u(S[t]);l(S,t,"add"===t?function add(t){r(this,0===t?0:t);return this}:"delete"===t?function(t){return!(D&&!g(t))&&r(this,0===t?0:t)}:"get"===t?function get(t){return D&&!g(t)?void 0:r(this,0===t?0:t)}:"has"===t?function has(t){return!(D&&!g(t))&&r(this,0===t?0:t)}:function set(t,i){r(this,0===t?0:t,i);return this})};if(c(t,!v(x)||!(D||S.forEach&&!m((function(){(new x).entries().next()}))))){A=i.getConstructor(r,t,P,E);h.enable()}else if(c(t,!0)){var k=new A,I=k[E](D?{}:-0,1)!==k,T=m((function(){k.has(1)})),L=_((function(t){new x(t)})),O=!D&&m((function(){for(var t=new x,r=5;r--;)t[E](r,r);return!t.has(-0)}));if(!L){(A=r((function(t,r){p(t,S);var i=w(new x,t,A);y(r)||d(r,i[E],{that:i,AS_ENTRIES:P});return i}))).prototype=S;S.constructor=A}if(T||O){fixMethod("delete");fixMethod("has");P&&fixMethod("get")}(O||I)&&fixMethod(E);D&&S.clear&&delete S.clear}C[t]=A;o({global:!0,constructor:!0,forced:A!==x},C);b(A,t);D||i.setStrong(A,t,P);return A}},1425:(t,r,i)=>{var o=i(936),a=i(8953),u=i(5764),c=i(7744);t.exports=function(t,r,i){for(var l=a(r),h=c.f,d=u.f,p=0;p<l.length;p++){var v=l[p];o(t,v)||i&&o(i,v)||h(t,v,d(r,v))}}},2280:(t,r,i)=>{var o=i(2292)("match");t.exports=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{r[o]=!1;return"/./"[t](r)}catch(t){}}return!1}},7888:(t,r,i)=>{var o=i(8154);t.exports=!o((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},1111:t=>{t.exports=function(t,r){return{value:t,done:r}}},9293:(t,r,i)=>{var o=i(940),a=i(7744),u=i(1198);t.exports=o?function(t,r,i){return a.f(t,r,u(1,i))}:function(t,r,i){t[r]=i;return t}},1198:t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},8947:(t,r,i)=>{var o=i(4871),a=i(7744),u=i(1198);t.exports=function(t,r,i){var c=o(r);c in t?a.f(t,c,u(0,i)):t[c]=i}},3612:(t,r,i)=>{var o=i(4719),a=i(2923),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)}},9691:(t,r,i)=>{var o=i(9687),a=i(7744);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)}},7041:(t,r,i)=>{var o=i(7316),a=i(7744),u=i(9687),c=i(6e3);t.exports=function(t,r,i,l){l||(l={});var h=l.enumerable,d=void 0!==l.name?l.name:r;o(i)&&u(i,d,l);if(l.global)h?t[r]=i:c(r,i);else{try{l.unsafe?t[r]&&(h=!0):delete t[r]}catch(t){}h?t[r]=i:a.f(t,r,{value:i,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return t}},6880:(t,r,i)=>{var o=i(7041);t.exports=function(t,r,i){for(var a in r)o(t,a,r[a],i);return t}},6e3:(t,r,i)=>{var o=i(9298),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}},2322:(t,r,i)=>{var o=i(9762),a=TypeError;t.exports=function(t,r){if(!delete t[r])throw new a("Cannot delete property "+o(r)+" of "+o(t))}},940:(t,r,i)=>{var o=i(8154);t.exports=!o((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8126:(t,r,i)=>{var o,a,u,c,l=i(9298),h=i(2276),d=i(4837),p=l.structuredClone,v=l.ArrayBuffer,y=l.MessageChannel,g=!1;if(d)g=function(t){p(t,{transfer:[t]})};else if(v)try{y||(o=h("worker_threads"))&&(y=o.MessageChannel);if(y){a=new y;u=new v(2);c=function(t){a.port1.postMessage(null,[t])};if(2===u.byteLength){c(u);0===u.byteLength&&(g=c)}}}catch(t){}t.exports=g},1558:t=>{var r="object"==typeof document&&document.all,i=void 0===r&&void 0!==r;t.exports={all:r,IS_HTMLDDA:i}},5584:(t,r,i)=>{var o=i(9298),a=i(7633),u=o.document,c=a(u)&&a(u.createElement);t.exports=function(t){return c?u.createElement(t):{}}},4287:t=>{var r=TypeError;t.exports=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}},2411: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}},3942:(t,r,i)=>{var o=i(5584)("span").classList,a=o&&o.constructor&&o.constructor.prototype;t.exports=a===Object.prototype?void 0:a},7614:(t,r,i)=>{var o=i(234).match(/firefox\/(\d+)/i);t.exports=!!o&&+o[1]},3413:(t,r,i)=>{var o=i(8471),a=i(4864);t.exports=!o&&!a&&"object"==typeof window&&"object"==typeof document},8471:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},7463:(t,r,i)=>{var o=i(234);t.exports=/MSIE|Trident/.test(o)},1458:(t,r,i)=>{var o=i(234);t.exports=/ipad|iphone|ipod/i.test(o)&&"undefined"!=typeof Pebble},2589:(t,r,i)=>{var o=i(234);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(o)},4864:(t,r,i)=>{var o=i(9298),a=i(8374);t.exports="process"===a(o.process)},8173:(t,r,i)=>{var o=i(234);t.exports=/web0s(?!.*chrome)/i.test(o)},234:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},2171:(t,r,i)=>{var o,a,u=i(9298),c=i(234),l=u.process,h=u.Deno,d=l&&l.versions||h&&h.version,p=d&&d.v8;p&&(a=(o=p.split("."))[0]>0&&o[0]<4?1:+(o[0]+o[1]));!a&&c&&(!(o=c.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=c.match(/Chrome\/(\d+)/))&&(a=+o[1]);t.exports=a},7906:(t,r,i)=>{var o=i(234).match(/AppleWebKit\/(\d+)\./);t.exports=!!o&&+o[1]},298:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},34:(t,r,i)=>{var o=i(8403),a=Error,u=o("".replace),c=String(new a("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,h=l.test(c);t.exports=function(t,r){if(h&&"string"==typeof t&&!a.prepareStackTrace)for(;r--;)t=u(t,l,"");return t}},1931:(t,r,i)=>{var o=i(9293),a=i(34),u=i(3437),c=Error.captureStackTrace;t.exports=function(t,r,i,l){u&&(c?c(t,r):o(t,"stack",a(i,l)))}},3437:(t,r,i)=>{var o=i(8154),a=i(1198);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}))},4978:(t,r,i)=>{var o=i(9298),a=i(5764).f,u=i(9293),c=i(7041),l=i(6e3),h=i(1425),d=i(7007);t.exports=function(t,r){var i,p,v,y,g,m=t.target,_=t.global,b=t.stat;if(i=_?o:b?o[m]||l(m,{}):(o[m]||{}).prototype)for(p in r){y=r[p];v=t.dontCallGetSet?(g=a(i,p))&&g.value:i[p];if(!d(_?p:m+(b?".":"#")+p,t.forced)&&void 0!==v){if(typeof y==typeof v)continue;h(y,v)}(t.sham||v&&v.sham)&&u(y,"sham",!0);c(i,p,y,t)}}},8154:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},4629:(t,r,i)=>{i(7942);var o=i(6218),a=i(7041),u=i(2178),c=i(8154),l=i(2292),h=i(9293),d=l("species"),p=RegExp.prototype;t.exports=function(t,r,i,v){var y=l(t),g=!c((function(){var r={};r[y]=function(){return 7};return 7!==""[t](r)})),m=g&&!c((function(){var r=!1,i=/a/;if("split"===t){(i={}).constructor={};i.constructor[d]=function(){return i};i.flags="";i[y]=/./[y]}i.exec=function(){r=!0;return null};i[y]("");return!r}));if(!g||!m||i){var _=o(/./[y]),b=r(y,""[t],(function(t,r,i,a,c){var l=o(t),h=r.exec;return h===u||h===p.exec?g&&!c?{done:!0,value:_(r,i,a)}:{done:!0,value:l(i,r,a)}:{done:!1}}));a(String.prototype,t,b[0]);a(p,y,b[1])}v&&h(p[y],"sham",!0)}},7010:(t,r,i)=>{var o=i(8154);t.exports=!o((function(){return Object.isExtensible(Object.preventExtensions({}))}))},7294:(t,r,i)=>{var o=i(2486),a=Function.prototype,u=a.apply,c=a.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?c.bind(u):function(){return c.apply(u,arguments)})},7789:(t,r,i)=>{var o=i(6218),a=i(1782),u=i(2486),c=o(o.bind);t.exports=function(t,r){a(t);return void 0===r?t:u?c(t,r):function(){return t.apply(r,arguments)}}},2486:(t,r,i)=>{var o=i(8154);t.exports=!o((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6520:(t,r,i)=>{var o=i(8403),a=i(1782),u=i(7633),c=i(936),l=i(2251),h=i(2486),d=Function,p=o([].concat),v=o([].join),y={};t.exports=h?d.bind:function bind(t){var r=a(this),i=r.prototype,o=l(arguments,1),h=function bound(){var i=p(o,l(arguments));return this instanceof h?function(t,r,i){if(!c(y,r)){for(var o=[],a=0;a<r;a++)o[a]="a["+a+"]";y[r]=d("C,a","return new C("+v(o,",")+")")}return y[r](t,i)}(r,i.length,i):r.apply(t,i)};u(i)&&(h.prototype=i);return h}},2026:(t,r,i)=>{var o=i(2486),a=Function.prototype.call;t.exports=o?a.bind(a):function(){return a.apply(a,arguments)}},5145:(t,r,i)=>{var o=i(940),a=i(936),u=Function.prototype,c=o&&Object.getOwnPropertyDescriptor,l=a(u,"name"),h=l&&"something"===function something(){}.name,d=l&&(!o||o&&c(u,"name").configurable);t.exports={EXISTS:l,PROPER:h,CONFIGURABLE:d}},1299:(t,r,i)=>{var o=i(8403),a=i(1782);t.exports=function(t,r,i){try{return o(a(Object.getOwnPropertyDescriptor(t,r)[i]))}catch(t){}}},6218:(t,r,i)=>{var o=i(8374),a=i(8403);t.exports=function(t){if("Function"===o(t))return a(t)}},8403:(t,r,i)=>{var o=i(2486),a=Function.prototype,u=a.call,c=o&&a.bind.bind(u,u);t.exports=o?c:function(t){return function(){return u.apply(t,arguments)}}},7187:(t,r,i)=>{var o=i(9298),a=i(7316);t.exports=function(t,r){return arguments.length<2?(i=o[t],a(i)?i:void 0):o[t]&&o[t][r];var i}},9235:t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},273:(t,r,i)=>{var o=i(8329),a=i(8486),u=i(3734),c=i(6596),l=i(2292)("iterator");t.exports=function(t){if(!u(t))return a(t,l)||a(t,"@@iterator")||c[o(t)]}},7612:(t,r,i)=>{var o=i(2026),a=i(1782),u=i(4719),c=i(9762),l=i(273),h=TypeError;t.exports=function(t,r){var i=arguments.length<2?l(t):r;if(a(i))return u(o(i,t));throw new h(c(t)+" is not iterable")}},1801:(t,r,i)=>{var o=i(8403),a=i(6998),u=i(7316),c=i(8374),l=i(5730),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"!==c(d)&&"String"!==c(d)||h(i,l(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}}}},8486:(t,r,i)=>{var o=i(1782),a=i(3734);t.exports=function(t,r){var i=t[r];return a(i)?void 0:o(i)}},1096:(t,r,i)=>{var o=i(1782),a=i(4719),u=i(2026),c=i(1003),l=i(9235),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 l(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=c(r);if(i<0)throw new d(h);return new SetRecord(t,v(i,0),o(t.has),o(t.keys))}},1634:(t,r,i)=>{var o=i(8403),a=i(2007),u=Math.floor,c=o("".charAt),l=o("".replace),h=o("".slice),d=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,p=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,r,i,o,v,y){var g=i+t.length,m=o.length,_=p;if(void 0!==v){v=a(v);_=d}return l(y,_,(function(a,l){var d;switch(c(l,0)){case"$":return"$";case"&":return t;case"`":return h(r,0,i);case"'":return h(r,g);case"<":d=v[h(l,1,-1)];break;default:var p=+l;if(0===p)return a;if(p>m){var y=u(p/10);return 0===y?a:y<=m?void 0===o[y-1]?c(l,1):o[y-1]+c(l,1):a}d=o[p-1]}return void 0===d?"":d}))}},9298: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")()},936:(t,r,i)=>{var o=i(8403),a=i(2007),u=o({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,r){return u(a(t),r)}},6010:t=>{t.exports={}},5285:t=>{t.exports=function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(t){}}},519:(t,r,i)=>{var o=i(7187);t.exports=o("document","documentElement")},9394:(t,r,i)=>{var o=i(940),a=i(8154),u=i(5584);t.exports=!o&&!a((function(){return 7!==Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a}))},3106:t=>{var r=Array,i=Math.abs,o=Math.pow,a=Math.floor,u=Math.log,c=Math.LN2;t.exports={pack:function(t,l,h){var d,p,v,y=r(h),g=8*h-l-1,m=(1<<g)-1,_=m>>1,b=23===l?o(2,-24)-o(2,-77):0,w=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)/c);if(t*(v=o(2,-d))<1){d--;v*=2}if((t+=d+_>=1?b/v:b*o(2,1-_))*v>=2){d++;v/=2}if(d+_>=m){p=0;d=m}else if(d+_>=1){p=(t*v-1)*o(2,l);d+=_}else{p=t*o(2,_-1)*o(2,l);d=0}}for(;l>=8;){y[P++]=255&p;p/=256;l-=8}d=d<<l|p;g+=l;for(;g>0;){y[P++]=255&d;d/=256;g-=8}y[--P]|=128*w;return y},unpack:function(t,r){var i,a=t.length,u=8*a-r-1,c=(1<<u)-1,l=c>>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-l;else{if(v===c)return i?NaN:p?-1/0:1/0;i+=o(2,r);v-=l}return(p?-1:1)*i*o(2,v-r)}}},3622:(t,r,i)=>{var o=i(8403),a=i(8154),u=i(8374),c=Object,l=o("".split);t.exports=a((function(){return!c("z").propertyIsEnumerable(0)}))?function(t){return"String"===u(t)?l(t,""):c(t)}:c},7523:(t,r,i)=>{var o=i(7316),a=i(7633),u=i(9763);t.exports=function(t,r,i){var c,l;u&&o(c=r.constructor)&&c!==i&&a(l=c.prototype)&&l!==i.prototype&&u(t,l);return t}},4993:(t,r,i)=>{var o=i(8403),a=i(7316),u=i(7542),c=o(Function.toString);a(u.inspectSource)||(u.inspectSource=function(t){return c(t)});t.exports=u.inspectSource},8422:(t,r,i)=>{var o=i(7633),a=i(9293);t.exports=function(t,r){o(r)&&"cause"in r&&a(t,"cause",r.cause)}},4694:(t,r,i)=>{var o=i(4978),a=i(8403),u=i(6010),c=i(7633),l=i(936),h=i(7744).f,d=i(5455),p=i(2329),v=i(2191),y=i(7561),g=i(7010),m=!1,_=y("meta"),b=0,setMetadata=function(t){h(t,_,{value:{objectID:"O"+b++,weakData:{}}})},w=t.exports={enable:function(){w.enable=function(){};m=!0;var t=d.f,r=a([].splice),i={};i[_]=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]===_){r(o,a,1);break}return o};o({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:p.f})}},fastKey:function(t,r){if(!c(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!l(t,_)){if(!v(t))return"F";if(!r)return"E";setMetadata(t)}return t[_].objectID},getWeakData:function(t,r){if(!l(t,_)){if(!v(t))return!0;if(!r)return!1;setMetadata(t)}return t[_].weakData},onFreeze:function(t){g&&m&&v(t)&&!l(t,_)&&setMetadata(t);return t}};u[_]=!0},1649:(t,r,i)=>{var o,a,u,c=i(8443),l=i(9298),h=i(7633),d=i(9293),p=i(936),v=i(7542),y=i(3727),g=i(6010),m="Object already initialized",_=l.TypeError,b=l.WeakMap;if(c||v.state){var w=v.state||(v.state=new b);w.get=w.get;w.has=w.has;w.set=w.set;o=function(t,r){if(w.has(t))throw new _(m);r.facade=t;w.set(t,r);return r};a=function(t){return w.get(t)||{}};u=function(t){return w.has(t)}}else{var P=y("state");g[P]=!0;o=function(t,r){if(p(t,P))throw new _(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 _("Incompatible receiver, "+t+" required");return i}}}},5191:(t,r,i)=>{var o=i(2292),a=i(6596),u=o("iterator"),c=Array.prototype;t.exports=function(t){return void 0!==t&&(a.Array===t||c[u]===t)}},6998:(t,r,i)=>{var o=i(8374);t.exports=Array.isArray||function isArray(t){return"Array"===o(t)}},5986:(t,r,i)=>{var o=i(8329);t.exports=function(t){var r=o(t);return"BigInt64Array"===r||"BigUint64Array"===r}},7316:(t,r,i)=>{var o=i(1558),a=o.all;t.exports=o.IS_HTMLDDA?function(t){return"function"==typeof t||t===a}:function(t){return"function"==typeof t}},1694:(t,r,i)=>{var o=i(8403),a=i(8154),u=i(7316),c=i(8329),l=i(7187),h=i(4993),noop=function(){},d=[],p=l("Reflect","construct"),v=/^\s*(?:class|function)\b/,y=o(v.exec),g=!v.test(noop),m=function isConstructor(t){if(!u(t))return!1;try{p(noop,d,t);return!0}catch(t){return!1}},_=function isConstructor(t){if(!u(t))return!1;switch(c(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!y(v,h(t))}catch(t){return!0}};_.sham=!0;t.exports=!p||a((function(){var t;return m(m.call)||!m(Object)||!m((function(){t=!0}))||t}))?_:m},3374:(t,r,i)=>{var o=i(936);t.exports=function(t){return void 0!==t&&(o(t,"value")||o(t,"writable"))}},7007:(t,r,i)=>{var o=i(8154),a=i(7316),u=/#|\.prototype\./,isForced=function(t,r){var i=l[c(t)];return i===d||i!==h&&(a(r)?o(r):!!r)},c=isForced.normalize=function(t){return String(t).replace(u,".").toLowerCase()},l=isForced.data={},h=isForced.NATIVE="N",d=isForced.POLYFILL="P";t.exports=isForced},987:(t,r,i)=>{var o=i(7633),a=Math.floor;t.exports=Number.isInteger||function isInteger(t){return!o(t)&&isFinite(t)&&a(t)===t}},3734:t=>{t.exports=function(t){return null==t}},7633:(t,r,i)=>{var o=i(7316),a=i(1558),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)}},2554:t=>{t.exports=!1},6660:(t,r,i)=>{var o=i(7633),a=i(8374),u=i(2292)("match");t.exports=function(t){var r;return o(t)&&(void 0!==(r=t[u])?!!r:"RegExp"===a(t))}},7814:(t,r,i)=>{var o=i(7187),a=i(7316),u=i(2658),c=i(7960),l=Object;t.exports=c?function(t){return"symbol"==typeof t}:function(t){var r=o("Symbol");return a(r)&&u(r.prototype,l(t))}},5504:(t,r,i)=>{var o=i(2026);t.exports=function(t,r,i){for(var a,u,c=i?t:t.iterator,l=t.next;!(a=o(l,c)).done;)if(void 0!==(u=r(a.value)))return u}},6837:(t,r,i)=>{var o=i(7789),a=i(2026),u=i(4719),c=i(9762),l=i(5191),h=i(451),d=i(2658),p=i(7612),v=i(273),y=i(3316),g=TypeError,Result=function(t,r){this.stopped=t;this.result=r},m=Result.prototype;t.exports=function(t,r,i){var _,b,w,P,D,E,x,S=i&&i.that,A=!(!i||!i.AS_ENTRIES),C=!(!i||!i.IS_RECORD),k=!(!i||!i.IS_ITERATOR),I=!(!i||!i.INTERRUPTED),T=o(r,S),stop=function(t){_&&y(_,"normal",t);return new Result(!0,t)},callFn=function(t){if(A){u(t);return I?T(t[0],t[1],stop):T(t[0],t[1])}return I?T(t,stop):T(t)};if(C)_=t.iterator;else if(k)_=t;else{if(!(b=v(t)))throw new g(c(t)+" is not iterable");if(l(b)){for(w=0,P=h(t);P>w;w++)if((D=callFn(t[w]))&&d(m,D))return D;return new Result(!1)}_=p(t,b)}E=C?t.next:_.next;for(;!(x=a(E,_)).done;){try{D=callFn(x.value)}catch(t){y(_,"throw",t)}if("object"==typeof D&&D&&d(m,D))return D}return new Result(!1)}},3316:(t,r,i)=>{var o=i(2026),a=i(4719),u=i(8486);t.exports=function(t,r,i){var c,l;a(t);try{if(!(c=u(t,"return"))){if("throw"===r)throw i;return i}c=o(c,t)}catch(t){l=!0;c=t}if("throw"===r)throw i;if(l)throw c;a(c);return i}},552:(t,r,i)=>{var o=i(5238).IteratorPrototype,a=i(6941),u=i(1198),c=i(7536),l=i(6596),returnThis=function(){return this};t.exports=function(t,r,i,h){var d=r+" Iterator";t.prototype=a(o,{next:u(+!h,i)});c(t,d,!1,!0);l[d]=returnThis;return t}},375:(t,r,i)=>{var o=i(2026),a=i(6941),u=i(9293),c=i(6880),l=i(2292),h=i(1649),d=i(8486),p=i(5238).IteratorPrototype,v=i(1111),y=i(3316),g=l("toStringTag"),m="IteratorHelper",_="WrapForValidIterator",b=h.set,createIteratorProxyPrototype=function(t){var r=h.getterFor(t?_:m);return c(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{y(i.inner.iterator,"normal")}catch(t){return y(a,"throw",t)}y(a,"normal");return v(void 0,!0)}})},w=createIteratorProxyPrototype(!0),P=createIteratorProxyPrototype(!1);u(P,g,"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?_:m;o.nextHandler=t;o.counter=0;o.done=!1;b(this,o)};i.prototype=r?w:P;return i}},7301:(t,r,i)=>{var o=i(4978),a=i(2026),u=i(2554),c=i(5145),l=i(7316),h=i(552),d=i(2176),p=i(9763),v=i(7536),y=i(9293),g=i(7041),m=i(2292),_=i(6596),b=i(5238),w=c.PROPER,P=c.CONFIGURABLE,D=b.IteratorPrototype,E=b.BUGGY_SAFARI_ITERATORS,x=m("iterator"),S="keys",A="values",C="entries",returnThis=function(){return this};t.exports=function(t,r,i,c,m,b,k){h(i,r,c);var I,T,L,getIterationMethod=function(t){if(t===m&&R)return R;if(!E&&t&&t in B)return B[t];switch(t){case S:return function keys(){return new i(this,t)};case A:return function values(){return new i(this,t)};case C:return function entries(){return new i(this,t)}}return function(){return new i(this)}},O=r+" Iterator",M=!1,B=t.prototype,G=B[x]||B["@@iterator"]||m&&B[m],R=!E&&G||getIterationMethod(m),j="Array"===r&&B.entries||G;if(j&&(I=d(j.call(new t)))!==Object.prototype&&I.next){u||d(I)===D||(p?p(I,D):l(I[x])||g(I,x,returnThis));v(I,O,!0,!0);u&&(_[O]=returnThis)}if(w&&m===A&&G&&G.name!==A)if(!u&&P)y(B,"name",A);else{M=!0;R=function values(){return a(G,this)}}if(m){T={values:getIterationMethod(A),keys:b?R:getIterationMethod(S),entries:getIterationMethod(C)};if(k)for(L in T)(E||M||!(L in B))&&g(B,L,T[L]);else o({target:r,proto:!0,forced:E||M},T)}u&&!k||B[x]===R||g(B,x,R,{name:m});_[r]=R;return T}},8142:(t,r,i)=>{var o=i(2026),a=i(1782),u=i(4719),c=i(9235),l=i(375),h=i(5723),d=l((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(c(this),{mapper:t})}},5238:(t,r,i)=>{var o,a,u,c=i(8154),l=i(7316),h=i(7633),d=i(6941),p=i(2176),v=i(7041),y=i(2292),g=i(2554),m=y("iterator"),_=!1;[].keys&&("next"in(u=[].keys())?(a=p(p(u)))!==Object.prototype&&(o=a):_=!0);!h(o)||c((function(){var t={};return o[m].call(t)!==t}))?o={}:g&&(o=d(o));l(o[m])||v(o,m,(function(){return this}));t.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:_}},6596:t=>{t.exports={}},451:(t,r,i)=>{var o=i(8293);t.exports=function(t){return o(t.length)}},9687:(t,r,i)=>{var o=i(8403),a=i(8154),u=i(7316),c=i(936),l=i(940),h=i(5145).CONFIGURABLE,d=i(4993),p=i(1649),v=p.enforce,y=p.get,g=String,m=Object.defineProperty,_=o("".slice),b=o("".replace),w=o([].join),P=l&&!a((function(){return 8!==m((function(){}),"length",{value:8}).length})),D=String(String).split("String"),E=t.exports=function(t,r,i){"Symbol("===_(g(r),0,7)&&(r="["+b(g(r),/^Symbol\(([^)]*)\)/,"$1")+"]");i&&i.getter&&(r="get "+r);i&&i.setter&&(r="set "+r);(!c(t,"name")||h&&t.name!==r)&&(l?m(t,"name",{value:r,configurable:!0}):t.name=r);P&&i&&c(i,"arity")&&t.length!==i.arity&&m(t,"length",{value:i.arity});try{i&&c(i,"constructor")&&i.constructor?l&&m(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var o=v(t);c(o,"source")||(o.source=w(D,"string"==typeof r?r:""));return t};Function.prototype.toString=E((function toString(){return u(this)&&y(this).source||d(this)}),"toString")},6336:(t,r,i)=>{var o=i(4875),a=Math.abs,u=2220446049250313e-31,c=1/u;t.exports=function(t,r,i,l){var h=+t,d=a(h),p=o(h);if(d<l)return p*function(t){return t+c-c}(d/l/r)*l*r;var v=(1+r/u)*d,y=v-(v-d);return y>i||y!=y?p*(1/0):p*y}},796:(t,r,i)=>{var o=i(6336);t.exports=Math.fround||function fround(t){return o(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},4875:t=>{t.exports=Math.sign||function sign(t){var r=+t;return 0===r||r!=r?r:r<0?-1:1}},8537:t=>{var r=Math.ceil,i=Math.floor;t.exports=Math.trunc||function trunc(t){var o=+t;return(o>0?i:r)(o)}},1627:(t,r,i)=>{var o,a,u,c,l,h=i(9298),d=i(7789),p=i(5764).f,v=i(4578).set,y=i(1397),g=i(2589),m=i(1458),_=i(8173),b=i(4864),w=h.MutationObserver||h.WebKitMutationObserver,P=h.document,D=h.process,E=h.Promise,x=p(h,"queueMicrotask"),S=x&&x.value;if(!S){var A=new y,flush=function(){var t,r;b&&(t=D.domain)&&t.exit();for(;r=A.get();)try{r()}catch(t){A.head&&o();throw t}t&&t.enter()};if(g||b||_||!w||!P)if(!m&&E&&E.resolve){(c=E.resolve(void 0)).constructor=E;l=d(c.then,c);o=function(){l(flush)}}else if(b)o=function(){D.nextTick(flush)};else{v=d(v,h);o=function(){v(flush)}}else{a=!0;u=P.createTextNode("");new w(flush).observe(u,{characterData:!0});o=function(){u.data=a=!a}}S=function(t){A.head||o();A.add(t)}}t.exports=S},1880:(t,r,i)=>{var o=i(1782),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)}},1264:(t,r,i)=>{var o=i(5730);t.exports=function(t,r){return void 0===t?arguments.length<2?"":r:o(t)}},9578:(t,r,i)=>{var o=i(6660),a=TypeError;t.exports=function(t){if(o(t))throw new a("The method doesn't accept regular expressions");return t}},453:(t,r,i)=>{var o=i(940),a=i(8403),u=i(2026),c=i(8154),l=i(1706),h=i(1963),d=i(1879),p=i(2007),v=i(3622),y=Object.assign,g=Object.defineProperty,m=a([].concat);t.exports=!y||c((function(){if(o&&1!==y({b:1},y(g({},"a",{enumerable:!0,get:function(){g(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!==y({},t)[i]||l(y({},r)).join("")!==a}))?function assign(t,r){for(var i=p(t),a=arguments.length,c=1,y=h.f,g=d.f;a>c;)for(var _,b=v(arguments[c++]),w=y?m(l(b),y(b)):l(b),P=w.length,D=0;P>D;){_=w[D++];o&&!u(g,b,_)||(i[_]=b[_])}return i}:y},6941:(t,r,i)=>{var o,a=i(4719),u=i(6617),c=i(298),l=i(6010),h=i(519),d=i(5584),p=i(3727),v="prototype",y="script",g=p("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<"+y+">"+t+"</"+y+">"},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"+y+":";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=c.length;t--;)delete NullProtoObject[v][c[t]];return NullProtoObject()};l[g]=!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[g]=t}else i=NullProtoObject();return void 0===r?i:u.f(i,r)}},6617:(t,r,i)=>{var o=i(940),a=i(9610),u=i(7744),c=i(4719),l=i(4115),h=i(1706);r.f=o&&!a?Object.defineProperties:function defineProperties(t,r){c(t);for(var i,o=l(r),a=h(r),d=a.length,p=0;d>p;)u.f(t,i=a[p++],o[i]);return t}},7744:(t,r,i)=>{var o=i(940),a=i(9394),u=i(9610),c=i(4719),l=i(4871),h=TypeError,d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,v="enumerable",y="configurable",g="writable";r.f=o?u?function defineProperty(t,r,i){c(t);r=l(r);c(i);if("function"==typeof t&&"prototype"===r&&"value"in i&&g in i&&!i[g]){var o=p(t,r);if(o&&o[g]){t[r]=i.value;i={configurable:y in i?i[y]:o[y],enumerable:v in i?i[v]:o[v],writable:!1}}}return d(t,r,i)}:d:function defineProperty(t,r,i){c(t);r=l(r);c(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}},5764:(t,r,i)=>{var o=i(940),a=i(2026),u=i(1879),c=i(1198),l=i(4115),h=i(4871),d=i(936),p=i(9394),v=Object.getOwnPropertyDescriptor;r.f=o?v:function getOwnPropertyDescriptor(t,r){t=l(t);r=h(r);if(p)try{return v(t,r)}catch(t){}if(d(t,r))return c(!a(u.f,t,r),t[r])}},2329:(t,r,i)=>{var o=i(8374),a=i(4115),u=i(5455).f,c=i(6071),l="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function getOwnPropertyNames(t){return l&&"Window"===o(t)?function(t){try{return u(t)}catch(t){return c(l)}}(t):u(a(t))}},5455:(t,r,i)=>{var o=i(9138),a=i(298).concat("length","prototype");r.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return o(t,a)}},1963:(t,r)=>{r.f=Object.getOwnPropertySymbols},2176:(t,r,i)=>{var o=i(936),a=i(7316),u=i(2007),c=i(3727),l=i(7888),h=c("IE_PROTO"),d=Object,p=d.prototype;t.exports=l?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}},2191:(t,r,i)=>{var o=i(8154),a=i(7633),u=i(8374),c=i(6944),l=Object.isExtensible,h=o((function(){l(1)}));t.exports=h||c?function isExtensible(t){return!!a(t)&&((!c||"ArrayBuffer"!==u(t))&&(!l||l(t)))}:l},2658:(t,r,i)=>{var o=i(8403);t.exports=o({}.isPrototypeOf)},9138:(t,r,i)=>{var o=i(8403),a=i(936),u=i(4115),c=i(9773).indexOf,l=i(6010),h=o([].push);t.exports=function(t,r){var i,o=u(t),d=0,p=[];for(i in o)!a(l,i)&&a(o,i)&&h(p,i);for(;r.length>d;)a(o,i=r[d++])&&(~c(p,i)||h(p,i));return p}},1706:(t,r,i)=>{var o=i(9138),a=i(298);t.exports=Object.keys||function keys(t){return o(t,a)}},1879:(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},9763:(t,r,i)=>{var o=i(1299),a=i(4719),u=i(4958);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)},2492:(t,r,i)=>{var o=i(940),a=i(8154),u=i(8403),c=i(2176),l=i(1706),h=i(4115),d=u(i(1879).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=l(a),y=v&&null===c(a),g=u.length,m=0,_=[];g>m;){i=u[m++];o&&!(y?i in a:d(a,i))||p(_,t?[i,a[i]]:a[i])}return _}};t.exports={entries:createMethod(!0),values:createMethod(!1)}},759:(t,r,i)=>{var o=i(3077),a=i(8329);t.exports=o?{}.toString:function toString(){return"[object "+a(this)+"]"}},2923:(t,r,i)=>{var o=i(2026),a=i(7316),u=i(7633),c=TypeError;t.exports=function(t,r){var i,l;if("string"===r&&a(i=t.toString)&&!u(l=o(i,t)))return l;if(a(i=t.valueOf)&&!u(l=o(i,t)))return l;if("string"!==r&&a(i=t.toString)&&!u(l=o(i,t)))return l;throw new c("Can't convert object to primitive value")}},8953:(t,r,i)=>{var o=i(7187),a=i(8403),u=i(5455),c=i(1963),l=i(4719),h=a([].concat);t.exports=o("Reflect","ownKeys")||function ownKeys(t){var r=u.f(l(t)),i=c.f;return i?h(r,i(t)):r}},3713:(t,r,i)=>{var o=i(8403),a=i(936),u=SyntaxError,c=parseInt,l=String.fromCharCode,h=o("".charAt),d=o("".slice),p=o(/./.exec),v={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},y=/^[\da-f]{4}$/i,g=/^[\u0000-\u001F]$/;t.exports=function(t,r){for(var i=!0,o="";r<t.length;){var m=h(t,r);if("\\"===m){var _=d(t,r,r+2);if(a(v,_)){o+=v[_];r+=2}else{if("\\u"!==_)throw new u('Unknown escape sequence: "'+_+'"');var b=d(t,r+=2,r+4);if(!p(y,b))throw new u("Bad Unicode escape at: "+r);o+=l(c(b,16));r+=4}}else{if('"'===m){i=!1;r++;break}if(p(g,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}}},1021:(t,r,i)=>{var o=i(9298);t.exports=o},1518:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},8308:(t,r,i)=>{var o=i(9298),a=i(6639),u=i(7316),c=i(7007),l=i(4993),h=i(2292),d=i(3413),p=i(8471),v=i(2554),y=i(2171),g=a&&a.prototype,m=h("species"),_=!1,b=u(o.PromiseRejectionEvent),w=c("Promise",(function(){var t=l(a),r=t!==String(a);if(!r&&66===y)return!0;if(v&&(!g.catch||!g.finally))return!0;if(!y||y<51||!/native code/.test(t)){var i=new a((function(t){t(1)})),FakePromise=function(t){t((function(){}),(function(){}))};(i.constructor={})[m]=FakePromise;if(!(_=i.then((function(){}))instanceof FakePromise))return!0}return!r&&(d||p)&&!b}));t.exports={CONSTRUCTOR:w,REJECTION_EVENT:b,SUBCLASSING:_}},6639:(t,r,i)=>{var o=i(9298);t.exports=o.Promise},2506:(t,r,i)=>{var o=i(4719),a=i(7633),u=i(1880);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}},3779:(t,r,i)=>{var o=i(6639),a=i(1374),u=i(8308).CONSTRUCTOR;t.exports=u||!a((function(t){o.all(t).then(void 0,(function(){}))}))},6085:(t,r,i)=>{var o=i(7744).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}})}},1397: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},8986:(t,r,i)=>{var o=i(2026),a=i(4719),u=i(7316),c=i(8374),l=i(2178),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"===c(t))return o(l,t,r);throw new h("RegExp#exec called on incompatible receiver")}},2178:(t,r,i)=>{var o=i(2026),a=i(8403),u=i(5730),c=i(9272),l=i(3286),h=i(6807),d=i(6941),p=i(1649).get,v=i(1714),y=i(2513),g=h("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,_=m,b=a("".charAt),w=a("".indexOf),P=a("".replace),D=a("".slice),E=function(){var t=/a/,r=/b*/g;o(m,t,"a");o(m,r,"a");return 0!==t.lastIndex||0!==r.lastIndex}(),x=l.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(E||S||x||v||y)&&(_=function exec(t){var r,i,a,l,h,v,y,A=this,C=p(A),k=u(t),I=C.raw;if(I){I.lastIndex=A.lastIndex;r=o(_,I,k);A.lastIndex=I.lastIndex;return r}var T=C.groups,L=x&&A.sticky,O=o(c,A),M=A.source,B=0,G=k;if(L){O=P(O,"y","");-1===w(O,"g")&&(O+="g");G=D(k,A.lastIndex);if(A.lastIndex>0&&(!A.multiline||A.multiline&&"\n"!==b(k,A.lastIndex-1))){M="(?: "+M+")";G=" "+G;B++}i=new RegExp("^(?:"+M+")",O)}S&&(i=new RegExp("^"+M+"$(?!\\s)",O));E&&(a=A.lastIndex);l=o(m,L?i:A,G);if(L)if(l){l.input=D(l.input,B);l[0]=D(l[0],B);l.index=A.lastIndex;A.lastIndex+=l[0].length}else A.lastIndex=0;else E&&l&&(A.lastIndex=A.global?l.index+l[0].length:a);S&&l&&l.length>1&&o(g,l[0],i,(function(){for(h=1;h<arguments.length-2;h++)void 0===arguments[h]&&(l[h]=void 0)}));if(l&&T){l.groups=v=d(null);for(h=0;h<T.length;h++)v[(y=T[h])[0]]=l[y[1]]}return l});t.exports=_},9272:(t,r,i)=>{var o=i(4719);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}},1043:(t,r,i)=>{var o=i(2026),a=i(936),u=i(2658),c=i(9272),l=RegExp.prototype;t.exports=function(t){var r=t.flags;return void 0!==r||"flags"in l||a(t,"flags")||!u(l,t)?r:o(c,t)}},3286:(t,r,i)=>{var o=i(8154),a=i(9298).RegExp,u=o((function(){var t=a("a","y");t.lastIndex=2;return null!==t.exec("abcd")})),c=u||o((function(){return!a("a","y").sticky})),l=u||o((function(){var t=a("^r","gy");t.lastIndex=2;return null!==t.exec("str")}));t.exports={BROKEN_CARET:l,MISSED_STICKY:c,UNSUPPORTED_Y:u}},1714:(t,r,i)=>{var o=i(8154),a=i(9298).RegExp;t.exports=o((function(){var t=a(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},2513:(t,r,i)=>{var o=i(8154),a=i(9298).RegExp;t.exports=o((function(){var t=a("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},5645:(t,r,i)=>{var o=i(3734),a=TypeError;t.exports=function(t){if(o(t))throw new a("Can't call method on "+t);return t}},8976:t=>{t.exports=Object.is||function is(t,r){return t===r?0!==t||1/t==1/r:t!=t&&r!=r}},4057:(t,r,i)=>{var o=i(23),a=i(8848),u=o.Set,c=o.add;t.exports=function(t){var r=new u;a(t,(function(t){c(r,t)}));return r}},5656:(t,r,i)=>{var o=i(5690),a=i(23),u=i(4057),c=i(6098),l=i(1096),h=i(8848),d=i(5504),p=a.has,v=a.remove;t.exports=function difference(t){var r=o(this),i=l(t),a=u(r);c(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}},23:(t,r,i)=>{var o=i(8403),a=Set.prototype;t.exports={Set:Set,add:o(a.add),has:o(a.has),remove:o(a.delete),proto:a}},8461:(t,r,i)=>{var o=i(5690),a=i(23),u=i(6098),c=i(1096),l=i(8848),h=i(5504),d=a.Set,p=a.add,v=a.has;t.exports=function intersection(t){var r=o(this),i=c(t),a=new d;u(r)>i.size?h(i.getIterator(),(function(t){v(r,t)&&p(a,t)})):l(r,(function(t){i.includes(t)&&p(a,t)}));return a}},8550:(t,r,i)=>{var o=i(5690),a=i(23).has,u=i(6098),c=i(1096),l=i(8848),h=i(5504),d=i(3316);t.exports=function isDisjointFrom(t){var r=o(this),i=c(t);if(u(r)<=i.size)return!1!==l(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)}))}},990:(t,r,i)=>{var o=i(5690),a=i(6098),u=i(8848),c=i(1096);t.exports=function isSubsetOf(t){var r=o(this),i=c(t);return!(a(r)>i.size)&&!1!==u(r,(function(t){if(!i.includes(t))return!1}),!0)}},194:(t,r,i)=>{var o=i(5690),a=i(23).has,u=i(6098),c=i(1096),l=i(5504),h=i(3316);t.exports=function isSupersetOf(t){var r=o(this),i=c(t);if(u(r)<i.size)return!1;var d=i.getIterator();return!1!==l(d,(function(t){if(!a(r,t))return h(d,"normal",!1)}))}},8848:(t,r,i)=>{var o=i(8403),a=i(5504),u=i(23),c=u.Set,l=u.proto,h=o(l.forEach),d=o(l.keys),p=d(new c).next;t.exports=function(t,r,i){return i?a({iterator:d(t),next:p},r):h(t,r)}},507:(t,r,i)=>{var o=i(7187),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}}},6098:(t,r,i)=>{var o=i(1299),a=i(23);t.exports=o(a.proto,"size","get")||function(t){return t.size}},5963:(t,r,i)=>{var o=i(7187),a=i(9691),u=i(2292),c=i(940),l=u("species");t.exports=function(t){var r=o(t);c&&r&&!r[l]&&a(r,l,{configurable:!0,get:function(){return this}})}},3194:(t,r,i)=>{var o=i(5690),a=i(23),u=i(4057),c=i(1096),l=i(5504),h=a.add,d=a.has,p=a.remove;t.exports=function symmetricDifference(t){var r=o(this),i=c(t).getIterator(),a=u(r);l(i,(function(t){d(r,t)?p(a,t):h(a,t)}));return a}},7536:(t,r,i)=>{var o=i(7744).f,a=i(936),u=i(2292)("toStringTag");t.exports=function(t,r,i){t&&!i&&(t=t.prototype);t&&!a(t,u)&&o(t,u,{configurable:!0,value:r})}},5703:(t,r,i)=>{var o=i(5690),a=i(23).add,u=i(4057),c=i(1096),l=i(5504);t.exports=function union(t){var r=o(this),i=c(t).getIterator(),h=u(r);l(i,(function(t){a(h,t)}));return h}},3727:(t,r,i)=>{var o=i(6807),a=i(7561),u=o("keys");t.exports=function(t){return u[t]||(u[t]=a(t))}},7542:(t,r,i)=>{var o=i(9298),a=i(6e3),u="__core-js_shared__",c=o[u]||a(u,{});t.exports=c},6807:(t,r,i)=>{var o=i(2554),a=i(7542);(t.exports=function(t,r){return a[t]||(a[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.34.0",mode:o?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"})},8180:(t,r,i)=>{var o=i(4719),a=i(7073),u=i(3734),c=i(2292)("species");t.exports=function(t,r){var i,l=o(t).constructor;return void 0===l||u(i=o(l)[c])?r:a(i)}},6819:(t,r,i)=>{var o=i(8403),a=i(1003),u=i(5730),c=i(5645),l=o("".charAt),h=o("".charCodeAt),d=o("".slice),createMethod=function(t){return function(r,i){var o,p,v=u(c(r)),y=a(i),g=v.length;return y<0||y>=g?t?"":void 0:(o=h(v,y))<55296||o>56319||y+1===g||(p=h(v,y+1))<56320||p>57343?t?l(v,y):o:t?d(v,y,y+2):p-56320+(o-55296<<10)+65536}};t.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},4819:(t,r,i)=>{var o=i(234);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(o)},6460:(t,r,i)=>{var o=i(8403),a=i(8293),u=i(5730),c=i(947),l=i(5645),h=o(c),d=o("".slice),p=Math.ceil,createMethod=function(t){return function(r,i,o){var c,v,y=u(l(r)),g=a(i),m=y.length,_=void 0===o?" ":u(o);if(g<=m||""===_)return y;(v=h(_,p((c=g-m)/_.length))).length>c&&(v=d(v,0,c));return t?y+v:v+y}};t.exports={start:createMethod(!1),end:createMethod(!0)}},2897:(t,r,i)=>{var o=i(8403),a=2147483647,u=/[^\0-\u007E]/,c=/[.\u3002\uFF0E\uFF61]/g,l="Overflow: input needs wider integers to process",h=RangeError,d=o(c.exec),p=Math.floor,v=String.fromCharCode,y=o("".charCodeAt),g=o([].join),m=o([].push),_=o("".replace),b=o("".split),w=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=y(t,i++);if(a>=55296&&a<=56319&&i<o){var u=y(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,c=128,d=0,_=72;for(i=0;i<t.length;i++)(o=t[i])<128&&m(r,v(o));var b=r.length,w=b;b&&m(r,"-");for(;w<u;){var P=a;for(i=0;i<t.length;i++)(o=t[i])>=c&&o<P&&(P=o);var D=w+1;if(P-c>p((a-d)/D))throw new h(l);d+=(P-c)*D;c=P;for(i=0;i<t.length;i++){if((o=t[i])<c&&++d>a)throw new h(l);if(o===c){for(var E=d,x=36;;){var S=x<=_?1:x>=_+26?26:x-_;if(E<S)break;var A=E-S,C=36-S;m(r,v(digitToBasic(S+A%C)));E=p(A/C);x+=36}m(r,v(digitToBasic(E)));_=adapt(d,D,w===b);d=0;w++}}d++;c++}return g(r,"")};t.exports=function(t){var r,i,o=[],a=b(_(w(t),c,"."),".");for(r=0;r<a.length;r++){i=a[r];m(o,d(u,i)?"xn--"+encode(i):i)}return g(o,".")}},947:(t,r,i)=>{var o=i(1003),a=i(5730),u=i(5645),c=RangeError;t.exports=function repeat(t){var r=a(u(this)),i="",l=o(t);if(l<0||l===1/0)throw new c("Wrong number of repetitions");for(;l>0;(l>>>=1)&&(r+=r))1&l&&(i+=r);return i}},8729:(t,r,i)=>{var o=i(5145).PROPER,a=i(8154),u=i(96);t.exports=function(t){return a((function(){return!!u[t]()||"​…᠎"!=="​…᠎"[t]()||o&&u[t].name!==t}))}},83:(t,r,i)=>{var o=i(8403),a=i(5645),u=i(5730),c=i(96),l=o("".replace),h=RegExp("^["+c+"]+"),d=RegExp("(^|[^"+c+"])["+c+"]+$"),createMethod=function(t){return function(r){var i=u(a(r));1&t&&(i=l(i,h,""));2&t&&(i=l(i,d,"$1"));return i}};t.exports={start:createMethod(1),end:createMethod(2),trim:createMethod(3)}},4837:(t,r,i)=>{var o=i(9298),a=i(8154),u=i(2171),c=i(3413),l=i(8471),h=i(4864),d=o.structuredClone;t.exports=!!d&&!a((function(){if(l&&u>92||h&&u>94||c&&u>97)return!1;var t=new ArrayBuffer(8),r=d(t,{transfer:[t]});return 0!==t.byteLength||8!==r.byteLength}))},3663:(t,r,i)=>{var o=i(2171),a=i(8154),u=i(9298).String;t.exports=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol("symbol detection");return!u(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},5117:(t,r,i)=>{var o=i(2026),a=i(7187),u=i(2292),c=i(7041);t.exports=function(){var t=a("Symbol"),r=t&&t.prototype,i=r&&r.valueOf,l=u("toPrimitive");r&&!r[l]&&c(r,l,(function(t){return o(i,this)}),{arity:1})}},4186:(t,r,i)=>{var o=i(3663);t.exports=o&&!!Symbol.for&&!!Symbol.keyFor},4578:(t,r,i)=>{var o,a,u,c,l=i(9298),h=i(7294),d=i(7789),p=i(7316),v=i(936),y=i(8154),g=i(519),m=i(2251),_=i(5584),b=i(2743),w=i(2589),P=i(4864),D=l.setImmediate,E=l.clearImmediate,x=l.process,S=l.Dispatch,A=l.Function,C=l.MessageChannel,k=l.String,I=0,T={},L="onreadystatechange";y((function(){o=l.location}));var run=function(t){if(v(T,t)){var r=T[t];delete T[t];r()}},runner=function(t){return function(){run(t)}},eventListener=function(t){run(t.data)},globalPostMessageDefer=function(t){l.postMessage(k(t),o.protocol+"//"+o.host)};if(!D||!E){D=function setImmediate(t){b(arguments.length,1);var r=p(t)?t:A(t),i=m(arguments,1);T[++I]=function(){h(r,void 0,i)};a(I);return I};E=function clearImmediate(t){delete T[t]};if(P)a=function(t){x.nextTick(runner(t))};else if(S&&S.now)a=function(t){S.now(runner(t))};else if(C&&!w){c=(u=new C).port2;u.port1.onmessage=eventListener;a=d(c.postMessage,c)}else if(l.addEventListener&&p(l.postMessage)&&!l.importScripts&&o&&"file:"!==o.protocol&&!y(globalPostMessageDefer)){a=globalPostMessageDefer;l.addEventListener("message",eventListener,!1)}else a=L in _("script")?function(t){g.appendChild(_("script"))[L]=function(){g.removeChild(this);run(t)}}:function(t){setTimeout(runner(t),0)}}t.exports={set:D,clear:E}},3328:(t,r,i)=>{var o=i(8403);t.exports=o(1..valueOf)},6985:(t,r,i)=>{var o=i(1003),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)}},212:(t,r,i)=>{var o=i(4151),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)}},9548:(t,r,i)=>{var o=i(1003),a=i(8293),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}},4115:(t,r,i)=>{var o=i(3622),a=i(5645);t.exports=function(t){return o(a(t))}},1003:(t,r,i)=>{var o=i(8537);t.exports=function(t){var r=+t;return r!=r||0===r?0:o(r)}},8293:(t,r,i)=>{var o=i(1003),a=Math.min;t.exports=function(t){return t>0?a(o(t),9007199254740991):0}},2007:(t,r,i)=>{var o=i(5645),a=Object;t.exports=function(t){return a(o(t))}},9892:(t,r,i)=>{var o=i(9817),a=RangeError;t.exports=function(t,r){var i=o(t);if(i%r)throw new a("Wrong offset");return i}},9817:(t,r,i)=>{var o=i(1003),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}},4151:(t,r,i)=>{var o=i(2026),a=i(7633),u=i(7814),c=i(8486),l=i(2923),h=i(2292),d=TypeError,p=h("toPrimitive");t.exports=function(t,r){if(!a(t)||u(t))return t;var i,h=c(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 l(t,r)}},4871:(t,r,i)=>{var o=i(4151),a=i(7814);t.exports=function(t){var r=o(t,"string");return a(r)?r:r+""}},3077:(t,r,i)=>{var o={};o[i(2292)("toStringTag")]="z";t.exports="[object z]"===String(o)},5730:(t,r,i)=>{var o=i(8329),a=String;t.exports=function(t){if("Symbol"===o(t))throw new TypeError("Cannot convert a Symbol value to a string");return a(t)}},9671:t=>{var r=Math.round;t.exports=function(t){var i=r(t);return i<0?0:i>255?255:255&i}},2276:(t,r,i)=>{var o=i(4864);t.exports=function(t){try{if(o)return Function('return require("'+t+'")')()}catch(t){}}},9762:t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},9173:(t,r,i)=>{var o=i(4978),a=i(9298),u=i(2026),c=i(940),l=i(2127),h=i(5861),d=i(5050),p=i(5834),v=i(1198),y=i(9293),g=i(987),m=i(8293),_=i(9548),b=i(9892),w=i(9671),P=i(4871),D=i(936),E=i(8329),x=i(7633),S=i(7814),A=i(6941),C=i(2658),k=i(9763),I=i(5455).f,T=i(1675),L=i(2423).forEach,O=i(5963),M=i(9691),B=i(7744),G=i(5764),R=i(1649),j=i(7523),N=R.get,V=R.set,W=R.enforce,z=B.f,H=G.f,U=a.RangeError,K=d.ArrayBuffer,$=K.prototype,Y=d.DataView,q=h.NATIVE_ARRAY_BUFFER_VIEWS,X=h.TYPED_ARRAY_TAG,Z=h.TypedArray,Q=h.TypedArrayPrototype,J=h.aTypedArrayConstructor,ee=h.isTypedArray,te="BYTES_PER_ELEMENT",re="Wrong length",fromList=function(t,r){J(t);for(var i=0,o=r.length,a=new t(o);o>i;)a[i]=r[i++];return a},addGetter=function(t,r){M(t,r,{configurable:!0,get:function(){return N(this)[r]}})},isArrayBuffer=function(t){var r;return C($,t)||"ArrayBuffer"===(r=E(t))||"SharedArrayBuffer"===r},isTypedArrayIndex=function(t,r){return ee(t)&&!S(r)&&r in t&&g(+r)&&r>=0},ne=function getOwnPropertyDescriptor(t,r){r=P(r);return isTypedArrayIndex(t,r)?v(2,t[r]):H(t,r)},ie=function defineProperty(t,r,i){r=P(r);if(isTypedArrayIndex(t,r)&&x(i)&&D(i,"value")&&!D(i,"get")&&!D(i,"set")&&!i.configurable&&(!D(i,"writable")||i.writable)&&(!D(i,"enumerable")||i.enumerable)){t[r]=i.value;return t}return z(t,r,i)};if(c){if(!q){G.f=ne;B.f=ie;addGetter(Q,"buffer");addGetter(Q,"byteOffset");addGetter(Q,"byteLength");addGetter(Q,"length")}o({target:"Object",stat:!0,forced:!q},{getOwnPropertyDescriptor:ne,defineProperty:ie});t.exports=function(t,r,i){var c=t.match(/\d+/)[0]/8,h=t+(i?"Clamped":"")+"Array",d="get"+t,v="set"+t,g=a[h],P=g,D=P&&P.prototype,E={},addElement=function(t,r){z(t,r,{get:function(){return function(t,r){var i=N(t);return i.view[d](r*c+i.byteOffset,!0)}(this,r)},set:function(t){return function(t,r,o){var a=N(t);a.view[v](r*c+a.byteOffset,i?w(o):o,!0)}(this,r,t)},enumerable:!0})};if(q){if(l){P=r((function(t,r,i,o){p(t,D);return j(x(r)?isArrayBuffer(r)?void 0!==o?new g(r,b(i,c),o):void 0!==i?new g(r,b(i,c)):new g(r):ee(r)?fromList(P,r):u(T,P,r):new g(_(r)),t,P)}));k&&k(P,Z);L(I(g),(function(t){t in P||y(P,t,g[t])}));P.prototype=D}}else{P=r((function(t,r,i,o){p(t,D);var a,l,h,d=0,v=0;if(x(r)){if(!isArrayBuffer(r))return ee(r)?fromList(P,r):u(T,P,r);a=r;v=b(i,c);var y=r.byteLength;if(void 0===o){if(y%c)throw new U(re);if((l=y-v)<0)throw new U(re)}else if((l=m(o)*c)+v>y)throw new U(re);h=l/c}else{h=_(r);a=new K(l=h*c)}V(t,{buffer:a,byteOffset:v,byteLength:l,length:h,view:new Y(a)});for(;d<h;)addElement(t,d++)}));k&&k(P,Z);D=P.prototype=A(Q)}D.constructor!==P&&y(D,"constructor",P);W(D).TypedArrayConstructor=P;X&&y(D,X,h);var S=P!==g;E[h]=P;o({global:!0,constructor:!0,forced:S,sham:!q},E);te in P||y(P,te,c);te in D||y(D,te,c);O(h)}}else t.exports=function(){}},2127:(t,r,i)=>{var o=i(9298),a=i(8154),u=i(1374),c=i(5861).NATIVE_ARRAY_BUFFER_VIEWS,l=o.ArrayBuffer,h=o.Int8Array;t.exports=!c||!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 l(2),1,void 0).length}))},5306:(t,r,i)=>{var o=i(7003),a=i(6239);t.exports=function(t,r){return o(a(t),r)}},1675:(t,r,i)=>{var o=i(7789),a=i(2026),u=i(7073),c=i(2007),l=i(451),h=i(7612),d=i(273),p=i(5191),v=i(5986),y=i(5861).aTypedArrayConstructor,g=i(212);t.exports=function from(t){var r,i,m,_,b,w,P,D,E=u(this),x=c(t),S=arguments.length,A=S>1?arguments[1]:void 0,C=void 0!==A,k=d(x);if(k&&!p(k)){D=(P=h(x,k)).next;x=[];for(;!(w=a(D,P)).done;)x.push(w.value)}C&&S>2&&(A=o(A,arguments[2]));i=l(x);m=new(y(E))(i);_=v(m);for(r=0;i>r;r++){b=C?A(x[r],r):x[r];m[r]=_?g(b):+b}return m}},6239:(t,r,i)=>{var o=i(5861),a=i(8180),u=o.aTypedArrayConstructor,c=o.getTypedArrayConstructor;t.exports=function(t){return u(a(t,c(t)))}},7561:(t,r,i)=>{var o=i(8403),a=0,u=Math.random(),c=o(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+c(++a+u,36)}},8815:(t,r,i)=>{var o=i(8154),a=i(2292),u=i(940),c=i(2554),l=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 c&&(!t.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!r.size&&(c||!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[l]||"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}))},7960:(t,r,i)=>{var o=i(3663);t.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},9610:(t,r,i)=>{var o=i(940),a=i(8154);t.exports=o&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},2743:t=>{var r=TypeError;t.exports=function(t,i){if(t<i)throw new r("Not enough arguments");return t}},8443:(t,r,i)=>{var o=i(9298),a=i(7316),u=o.WeakMap;t.exports=a(u)&&/native code/.test(String(u))},7120:(t,r,i)=>{var o=i(1021),a=i(936),u=i(8890),c=i(7744).f;t.exports=function(t){var r=o.Symbol||(o.Symbol={});a(r,t)||c(r,t,{value:u.f(t)})}},8890:(t,r,i)=>{var o=i(2292);r.f=o},2292:(t,r,i)=>{var o=i(9298),a=i(6807),u=i(936),c=i(7561),l=i(3663),h=i(7960),d=o.Symbol,p=a("wks"),v=h?d.for||d:d&&d.withoutSetter||c;t.exports=function(t){u(p,t)||(p[t]=l&&u(d,t)?d[t]:v("Symbol."+t));return p[t]}},96:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},7342:(t,r,i)=>{var o=i(7187),a=i(936),u=i(9293),c=i(2658),l=i(9763),h=i(1425),d=i(6085),p=i(7523),v=i(1264),y=i(8422),g=i(1931),m=i(940),_=i(2554);t.exports=function(t,r,i,b){var w="stackTraceLimit",P=b?2:1,D=t.split("."),E=D[D.length-1],x=o.apply(null,D);if(x){var S=x.prototype;!_&&a(S,"cause")&&delete S.cause;if(!i)return x;var A=o("Error"),C=r((function(t,r){var i=v(b?r:t,void 0),o=b?new x(t):new x;void 0!==i&&u(o,"message",i);g(o,C,o.stack,2);this&&c(S,this)&&p(o,this,C);arguments.length>P&&y(o,arguments[P]);return o}));C.prototype=S;if("Error"!==E)l?l(C,A):h(C,A,{name:!0});else if(m&&w in x){d(C,x,w);d(C,x,"prepareStackTrace")}h(C,x);if(!_)try{S.name!==E&&u(S,"name",E);S.constructor=C}catch(t){}return C}}},6820:(t,r,i)=>{var o=i(4978),a=i(2007),u=i(451),c=i(1003),l=i(5463);o({target:"Array",proto:!0},{at:function at(t){var r=a(this),i=u(r),o=c(t),l=o>=0?o:i+o;return l<0||l>=i?void 0:r[l]}});l("at")},7874:(t,r,i)=>{var o=i(4978),a=i(8154),u=i(6998),c=i(7633),l=i(2007),h=i(451),d=i(4287),p=i(8947),v=i(8097),y=i(3577),g=i(2292),m=i(2171),_=g("isConcatSpreadable"),b=m>=51||!a((function(){var t=[];t[_]=!1;return t.concat()[0]!==t})),isConcatSpreadable=function(t){if(!c(t))return!1;var r=t[_];return void 0!==r?!!r:u(t)};o({target:"Array",proto:!0,arity:1,forced:!b||!y("concat")},{concat:function concat(t){var r,i,o,a,u,c=l(this),y=v(c,0),g=0;for(r=-1,o=arguments.length;r<o;r++)if(isConcatSpreadable(u=-1===r?c:arguments[r])){a=h(u);d(g+a);for(i=0;i<a;i++,g++)i in u&&p(y,g,u[i])}else{d(g+1);p(y,g++,u)}y.length=g;return y}})},6394:(t,r,i)=>{var o=i(4978),a=i(8041),u=i(5463);o({target:"Array",proto:!0},{fill:a});u("fill")},1585:(t,r,i)=>{var o=i(4978),a=i(2423).filter;o({target:"Array",proto:!0,forced:!i(3577)("filter")},{filter:function filter(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},275:(t,r,i)=>{var o=i(4978),a=i(2423).find,u=i(5463),c="find",l=!0;c in[]&&Array(1)[c]((function(){l=!1}));o({target:"Array",proto:!0,forced:l},{find:function find(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}});u(c)},9593:(t,r,i)=>{var o=i(4978),a=i(7609);o({target:"Array",stat:!0,forced:!i(1374)((function(t){Array.from(t)}))},{from:a})},2796:(t,r,i)=>{var o=i(4978),a=i(9773).includes,u=i(8154),c=i(5463);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)}});c("includes")},8649:(t,r,i)=>{var o=i(4978),a=i(6218),u=i(9773).indexOf,c=i(8321),l=a([].indexOf),h=!!l&&1/l([1],1,-0)<0;o({target:"Array",proto:!0,forced:h||!c("indexOf")},{indexOf:function indexOf(t){var r=arguments.length>1?arguments[1]:void 0;return h?l(this,t,r)||0:u(this,t,r)}})},6180:(t,r,i)=>{var o=i(4115),a=i(5463),u=i(6596),c=i(1649),l=i(7744).f,h=i(7301),d=i(1111),p=i(2554),v=i(940),y="Array Iterator",g=c.set,m=c.getterFor(y);t.exports=h(Array,"Array",(function(t,r){g(this,{type:y,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 _=u.Arguments=u.Array;a("keys");a("values");a("entries");if(!p&&v&&"values"!==_.name)try{l(_,"name",{value:"values"})}catch(t){}},5136:(t,r,i)=>{var o=i(4978),a=i(2423).map;o({target:"Array",proto:!0,forced:!i(3577)("map")},{map:function map(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},4226:(t,r,i)=>{var o=i(4978),a=i(2007),u=i(451),c=i(6661),l=i(4287);o({target:"Array",proto:!0,arity:1,forced:i(8154)((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;l(i+o);for(var h=0;h<o;h++){r[i]=arguments[h];i++}c(r,i);return i}})},171:(t,r,i)=>{var o=i(4978),a=i(6998),u=i(1694),c=i(7633),l=i(6985),h=i(451),d=i(4115),p=i(8947),v=i(2292),y=i(3577),g=i(2251),m=y("slice"),_=v("species"),b=Array,w=Math.max;o({target:"Array",proto:!0,forced:!m},{slice:function slice(t,r){var i,o,v,y=d(this),m=h(y),P=l(t,m),D=l(void 0===r?m:r,m);if(a(y)){i=y.constructor;(u(i)&&(i===b||a(i.prototype))||c(i)&&null===(i=i[_]))&&(i=void 0);if(i===b||void 0===i)return g(y,P,D)}o=new(void 0===i?b:i)(w(D-P,0));for(v=0;P<D;P++,v++)P in y&&p(o,v,y[P]);o.length=v;return o}})},8301:(t,r,i)=>{var o=i(4978),a=i(8403),u=i(1782),c=i(2007),l=i(451),h=i(2322),d=i(5730),p=i(8154),v=i(4689),y=i(8321),g=i(7614),m=i(7463),_=i(2171),b=i(7906),w=[],P=a(w.sort),D=a(w.push),E=p((function(){w.sort(void 0)})),x=p((function(){w.sort(null)})),S=y("sort"),A=!p((function(){if(_)return _<70;if(!(g&&g>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++)w.push({k:r+o,v:i})}w.sort((function(t,r){return r.v-t.v}));for(o=0;o<w.length;o++){r=w[o].k.charAt(0);a.charAt(a.length-1)!==r&&(a+=r)}return"DGBEFHACIJK"!==a}}));o({target:"Array",proto:!0,forced:E||!x||!S||!A},{sort:function sort(t){void 0!==t&&u(t);var r=c(this);if(A)return void 0===t?P(r):P(r,t);var i,o,a=[],p=l(r);for(o=0;o<p;o++)o in r&&D(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=l(a);o=0;for(;o<i;)r[o]=a[o++];for(;o<p;)h(r,o++);return r}})},6302:(t,r,i)=>{var o=i(4978),a=i(2007),u=i(6985),c=i(1003),l=i(451),h=i(6661),d=i(4287),p=i(8097),v=i(8947),y=i(2322),g=i(3577)("splice"),m=Math.max,_=Math.min;o({target:"Array",proto:!0,forced:!g},{splice:function splice(t,r){var i,o,g,b,w,P,D=a(this),E=l(D),x=u(t,E),S=arguments.length;if(0===S)i=o=0;else if(1===S){i=0;o=E-x}else{i=S-2;o=_(m(c(r),0),E-x)}d(E+i-o);g=p(D,o);for(b=0;b<o;b++)(w=x+b)in D&&v(g,b,D[w]);g.length=o;if(i<o){for(b=x;b<E-o;b++){P=b+i;(w=b+o)in D?D[P]=D[w]:y(D,P)}for(b=E;b>E-o+i;b--)y(D,b-1)}else if(i>o)for(b=E-o;b>x;b--){P=b+i-1;(w=b+o-1)in D?D[P]=D[w]:y(D,P)}for(b=0;b<i;b++)D[b+x]=arguments[b+2];h(D,E-o+i);return g}})},8806:(t,r,i)=>{var o=i(936),a=i(7041),u=i(3612),c=i(2292)("toPrimitive"),l=Date.prototype;o(l,c)||a(l,c,u)},3352:(t,r,i)=>{var o=i(4978),a=i(9298),u=i(7294),c=i(7342),l="WebAssembly",h=a[l],d=7!==new Error("e",{cause:7}).cause,exportGlobalErrorCauseWrapper=function(t,r){var i={};i[t]=c(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]=c(l+"."+t,r,d);o({target:l,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)}}))},1210:(t,r,i)=>{var o=i(4978),a=i(9298);o({global:!0,forced:a.globalThis!==a},{globalThis:a})},7254:(t,r,i)=>{var o=i(4978),a=i(7187),u=i(7294),c=i(2026),l=i(8403),h=i(8154),d=i(7316),p=i(7814),v=i(2251),y=i(1801),g=i(3663),m=String,_=a("JSON","stringify"),b=l(/./.exec),w=l("".charAt),P=l("".charCodeAt),D=l("".replace),E=l(1..toString),x=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,A=/^[\uDC00-\uDFFF]$/,C=!g||h((function(){var t=a("Symbol")("stringify detection");return"[null]"!==_([t])||"{}"!==_({a:t})||"{}"!==_(Object(t))})),k=h((function(){return'"\\udf06\\ud834"'!==_("\udf06\ud834")||'"\\udead"'!==_("\udead")})),stringifyWithSymbolsFix=function(t,r){var i=v(arguments),o=y(r);if(d(o)||void 0!==t&&!p(t)){i[1]=function(t,r){d(o)&&(r=c(o,this,m(t),r));if(!p(r))return r};return u(_,null,i)}},fixIllFormed=function(t,r,i){var o=w(i,r-1),a=w(i,r+1);return b(S,t)&&!b(A,a)||b(A,t)&&!b(S,o)?"\\u"+E(P(t,0),16):t};_&&o({target:"JSON",stat:!0,arity:3,forced:C||k},{stringify:function stringify(t,r,i){var o=v(arguments),a=u(C?stringifyWithSymbolsFix:_,null,o);return k&&"string"==typeof a?D(a,x,fixIllFormed):a}})},2630:(t,r,i)=>{var o=i(9298);i(7536)(o.JSON,"JSON",!0)},4147:(t,r,i)=>{i(4981)("Map",(function(t){return function Map(){return t(this,arguments.length?arguments[0]:void 0)}}),i(6122))},5548:(t,r,i)=>{i(4147)},3821:(t,r,i)=>{var o=i(4978),a=Math.hypot,u=Math.abs,c=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,l=0,h=arguments.length,d=0;l<h;)if(d<(i=u(arguments[l++]))){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*c(a)}})},4165:(t,r,i)=>{i(4978)({target:"Math",stat:!0},{sign:i(4875)})},1024:(t,r,i)=>{i(7536)(Math,"Math",!0)},3143:(t,r,i)=>{i(4978)({target:"Math",stat:!0},{trunc:i(8537)})},5897:(t,r,i)=>{var o=i(4978),a=i(2554),u=i(940),c=i(9298),l=i(1021),h=i(8403),d=i(7007),p=i(936),v=i(7523),y=i(2658),g=i(7814),m=i(4151),_=i(8154),b=i(5455).f,w=i(5764).f,P=i(7744).f,D=i(3328),E=i(83).trim,x="Number",S=c[x],A=l[x],C=S.prototype,k=c.TypeError,I=h("".slice),T=h("".charCodeAt),toNumber=function(t){var r,i,o,a,u,c,l,h,d=m(t,"number");if(g(d))throw new k("Cannot convert a Symbol value to a number");if("string"==typeof d&&d.length>2){d=E(d);if(43===(r=T(d,0))||45===r){if(88===(i=T(d,2))||120===i)return NaN}else if(48===r){switch(T(d,1)){case 66:case 98:o=2;a=49;break;case 79:case 111:o=8;a=55;break;default:return+d}c=(u=I(d,2)).length;for(l=0;l<c;l++)if((h=T(u,l))<48||h>a)return NaN;return parseInt(u,o)}}return+d},L=d(x,!S(" 0o1")||!S("0b1")||S("+0x1")),O=function Number(t){var r,i=arguments.length<1?0:S(function(t){var r=m(t,"number");return"bigint"==typeof r?r:toNumber(r)}(t));return y(C,r=this)&&_((function(){D(r)}))?v(Object(i),this,O):i};O.prototype=C;L&&!a&&(C.constructor=O);o({global:!0,constructor:!0,wrap:!0,forced:L},{Number:O});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,w(r,i))};a&&A&&copyConstructorProperties(l[x],A);(L||a)&&copyConstructorProperties(l[x],S)},9142:(t,r,i)=>{var o=i(4978),a=i(453);o({target:"Object",stat:!0,arity:2,forced:Object.assign!==a},{assign:a})},2586:(t,r,i)=>{var o=i(4978),a=i(2492).entries;o({target:"Object",stat:!0},{entries:function entries(t){return a(t)}})},4441:(t,r,i)=>{var o=i(4978),a=i(7010),u=i(8154),c=i(7633),l=i(4694).onFreeze,h=Object.freeze;o({target:"Object",stat:!0,forced:u((function(){h(1)})),sham:!a},{freeze:function freeze(t){return h&&c(t)?h(l(t)):t}})},7262:(t,r,i)=>{var o=i(4978),a=i(8154),u=i(4115),c=i(5764).f,l=i(940);o({target:"Object",stat:!0,forced:!l||a((function(){c(1)})),sham:!l},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(t,r){return c(u(t),r)}})},7335:(t,r,i)=>{var o=i(4978),a=i(940),u=i(8953),c=i(4115),l=i(5764),h=i(8947);o({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(t){for(var r,i,o=c(t),a=l.f,d=u(o),p={},v=0;d.length>v;)void 0!==(i=a(o,r=d[v++]))&&h(p,r,i);return p}})},8564:(t,r,i)=>{var o=i(4978),a=i(3663),u=i(8154),c=i(1963),l=i(2007);o({target:"Object",stat:!0,forced:!a||u((function(){c.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){var r=c.f;return r?r(l(t)):[]}})},13:(t,r,i)=>{var o=i(4978),a=i(8154),u=i(2007),c=i(2176),l=i(7888);o({target:"Object",stat:!0,forced:a((function(){c(1)})),sham:!l},{getPrototypeOf:function getPrototypeOf(t){return c(u(t))}})},4668:(t,r,i)=>{var o=i(4978),a=i(2007),u=i(1706);o({target:"Object",stat:!0,forced:i(8154)((function(){u(1)}))},{keys:function keys(t){return u(a(t))}})},895:(t,r,i)=>{var o=i(3077),a=i(7041),u=i(759);o||a(Object.prototype,"toString",u,{unsafe:!0})},9099:(t,r,i)=>{var o=i(4978),a=i(2492).values;o({target:"Object",stat:!0},{values:function values(t){return a(t)}})},8392:(t,r,i)=>{var o=i(4978),a=i(2026),u=i(1782),c=i(1880),l=i(1518),h=i(6837);o({target:"Promise",stat:!0,forced:i(3779)},{all:function all(t){var r=this,i=c.f(r),o=i.resolve,d=i.reject,p=l((function(){var i=u(r.resolve),c=[],l=0,p=1;h(t,(function(t){var u=l++,h=!1;p++;a(i,r,t).then((function(t){if(!h){h=!0;c[u]=t;--p||o(c)}}),d)}));--p||o(c)}));p.error&&d(p.value);return i.promise}})},3264:(t,r,i)=>{var o=i(4978),a=i(2554),u=i(8308).CONSTRUCTOR,c=i(6639),l=i(7187),h=i(7316),d=i(7041),p=c&&c.prototype;o({target:"Promise",proto:!0,forced:u,real:!0},{catch:function(t){return this.then(void 0,t)}});if(!a&&h(c)){var v=l("Promise").prototype.catch;p.catch!==v&&d(p,"catch",v,{unsafe:!0})}},7930:(t,r,i)=>{var o,a,u,c=i(4978),l=i(2554),h=i(4864),d=i(9298),p=i(2026),v=i(7041),y=i(9763),g=i(7536),m=i(5963),_=i(1782),b=i(7316),w=i(7633),P=i(5834),D=i(8180),E=i(4578).set,x=i(1627),S=i(5285),A=i(1518),C=i(1397),k=i(1649),I=i(6639),T=i(8308),L=i(1880),O="Promise",M=T.CONSTRUCTOR,B=T.REJECTION_EVENT,G=T.SUBCLASSING,R=k.getterFor(O),j=k.set,N=I&&I.prototype,V=I,W=N,z=d.TypeError,H=d.document,U=d.process,K=L.f,$=K,Y=!!(H&&H.createEvent&&d.dispatchEvent),q="unhandledrejection",isThenable=function(t){var r;return!(!w(t)||!b(r=t.then))&&r},callReaction=function(t,r){var i,o,a,u=r.value,c=1===r.state,l=c?t.ok:t.fail,h=t.resolve,d=t.reject,v=t.domain;try{if(l){if(!c){2===r.rejection&&onHandleUnhandled(r);r.rejection=1}if(!0===l)i=u;else{v&&v.enter();i=l(u);if(v){v.exit();a=!0}}i===t.promise?d(new z("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;x((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(Y){(o=H.createEvent("Event")).promise=r;o.reason=i;o.initEvent(t,!1,!0);d.dispatchEvent(o)}else o={promise:r,reason:i};!B&&(a=d["on"+t])?a(o):t===q&&S("Unhandled promise rejection",i)},onUnhandled=function(t){p(E,d,(function(){var r,i=t.facade,o=t.value;if(isUnhandled(t)){r=A((function(){h?U.emit("unhandledRejection",o,i):dispatchEvent(q,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(E,d,(function(){var r=t.facade;h?U.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 z("Promise can't be resolved itself");var o=isThenable(r);if(o)x((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(M){W=(V=function Promise(t){P(this,W);_(t);p(o,this);var r=R(this);try{t(bind(internalResolve,r),bind(internalReject,r))}catch(t){internalReject(r,t)}}).prototype;(o=function Promise(t){j(this,{type:O,done:!1,notified:!1,parent:!1,reactions:new C,rejection:!1,state:0,value:void 0})}).prototype=v(W,"then",(function then(t,r){var i=R(this),o=K(D(this,V));i.parent=!0;o.ok=!b(t)||t;o.fail=b(r)&&r;o.domain=h?U.domain:void 0;0===i.state?i.reactions.add(o):x((function(){callReaction(o,i)}));return o.promise}));a=function(){var t=new o,r=R(t);this.promise=t;this.resolve=bind(internalResolve,r);this.reject=bind(internalReject,r)};L.f=K=function(t){return t===V||undefined===t?new a(t):$(t)};if(!l&&b(I)&&N!==Object.prototype){u=N.then;G||v(N,"then",(function then(t,r){var i=this;return new V((function(t,r){p(u,i,t,r)})).then(t,r)}),{unsafe:!0});try{delete N.constructor}catch(t){}y&&y(N,W)}}c({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:V});g(V,O,!1,!0);m(O)},4750:(t,r,i)=>{var o=i(4978),a=i(2554),u=i(6639),c=i(8154),l=i(7187),h=i(7316),d=i(8180),p=i(2506),v=i(7041),y=u&&u.prototype;o({target:"Promise",proto:!0,real:!0,forced:!!u&&c((function(){y.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var r=d(this,l("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 g=l("Promise").prototype.finally;y.finally!==g&&v(y,"finally",g,{unsafe:!0})}},5666:(t,r,i)=>{i(7930);i(8392);i(3264);i(1078);i(4209);i(935)},1078:(t,r,i)=>{var o=i(4978),a=i(2026),u=i(1782),c=i(1880),l=i(1518),h=i(6837);o({target:"Promise",stat:!0,forced:i(3779)},{race:function race(t){var r=this,i=c.f(r),o=i.reject,d=l((function(){var c=u(r.resolve);h(t,(function(t){a(c,r,t).then(i.resolve,o)}))}));d.error&&o(d.value);return i.promise}})},4209:(t,r,i)=>{var o=i(4978),a=i(2026),u=i(1880);o({target:"Promise",stat:!0,forced:i(8308).CONSTRUCTOR},{reject:function reject(t){var r=u.f(this);a(r.reject,void 0,t);return r.promise}})},935:(t,r,i)=>{var o=i(4978),a=i(7187),u=i(2554),c=i(6639),l=i(8308).CONSTRUCTOR,h=i(2506),d=a("Promise"),p=u&&!l;o({target:"Promise",stat:!0,forced:u||l},{resolve:function resolve(t){return h(p&&this===d?c:this,t)}})},6128:(t,r,i)=>{var o=i(4978),a=i(7187),u=i(7294),c=i(6520),l=i(7073),h=i(4719),d=i(7633),p=i(6941),v=i(8154),y=a("Reflect","construct"),g=Object.prototype,m=[].push,_=v((function(){function F(){}return!(y((function(){}),[],F)instanceof F)})),b=!v((function(){y((function(){}))})),w=_||b;o({target:"Reflect",stat:!0,forced:w,sham:w},{construct:function construct(t,r){l(t);h(r);var i=arguments.length<3?t:l(arguments[2]);if(b&&!_)return y(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(c,t,o))}var a=i.prototype,v=p(d(a)?a:g),w=u(t,v,r);return d(w)?w:v}})},9718:(t,r,i)=>{var o=i(4978),a=i(2026),u=i(7633),c=i(4719),l=i(3374),h=i(5764),d=i(2176);o({target:"Reflect",stat:!0},{get:function get(t,r){var i,o,p=arguments.length<3?t:arguments[2];return c(t)===p?t[r]:(i=h.f(t,r))?l(i)?i.value:void 0===i.get?void 0:a(i.get,p):u(o=d(t))?get(o,r,p):void 0}})},9175:(t,r,i)=>{var o=i(4978),a=i(9298),u=i(7536);o({global:!0},{Reflect:{}});u(a.Reflect,"Reflect",!0)},3032:(t,r,i)=>{var o=i(940),a=i(9298),u=i(8403),c=i(7007),l=i(7523),h=i(9293),d=i(6941),p=i(5455).f,v=i(2658),y=i(6660),g=i(5730),m=i(1043),_=i(3286),b=i(6085),w=i(7041),P=i(8154),D=i(936),E=i(1649).enforce,x=i(5963),S=i(2292),A=i(1714),C=i(2513),k=S("match"),I=a.RegExp,T=I.prototype,L=a.SyntaxError,O=u(T.exec),M=u("".charAt),B=u("".replace),G=u("".indexOf),R=u("".slice),j=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,N=/a/g,V=/a/g,W=new I(N)!==N,z=_.MISSED_STICKY,H=_.UNSUPPORTED_Y,U=o&&(!W||z||A||C||P((function(){V[k]=!1;return I(N)!==N||I(V)===V||"/a/i"!==String(I(N,"i"))})));if(c("RegExp",U)){for(var K=function RegExp(t,r){var i,o,a,u,c,p,_=v(T,this),b=y(t),w=void 0===r,P=[],x=t;if(!_&&b&&w&&t.constructor===K)return t;if(b||v(T,t)){t=t.source;w&&(r=m(x))}t=void 0===t?"":g(t);r=void 0===r?"":g(r);x=t;A&&"dotAll"in N&&(o=!!r&&G(r,"s")>-1)&&(r=B(r,/s/g,""));i=r;z&&"sticky"in N&&(a=!!r&&G(r,"y")>-1)&&H&&(r=B(r,/y/g,""));if(C){u=function(t){for(var r,i=t.length,o=0,a="",u=[],c=d(null),l=!1,h=!1,p=0,v="";o<=i;o++){if("\\"===(r=M(t,o)))r+=M(t,++o);else if("]"===r)l=!1;else if(!l)switch(!0){case"["===r:l=!0;break;case"("===r:if(O(j,R(t,o+1))){o+=2;h=!0}a+=r;p++;continue;case">"===r&&h:if(""===v||D(c,v))throw new L("Invalid capture group name");c[v]=!0;u[u.length]=[v,p];h=!1;v="";continue}h?v+=r:a+=r}return[a,u]}(t);t=u[0];P=u[1]}c=l(I(t,r),_?this:T,K);if(o||a||P.length){p=E(c);if(o){p.dotAll=!0;p.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&&(p.sticky=!0);P.length&&(p.groups=P)}if(t!==x)try{h(c,"source",""===x?"(?:)":x)}catch(t){}return c},$=p(I),Y=0;$.length>Y;)b(K,I,$[Y++]);T.constructor=K;K.prototype=T;w(a,"RegExp",K,{constructor:!0})}x("RegExp")},5619:(t,r,i)=>{var o=i(940),a=i(1714),u=i(8374),c=i(9691),l=i(1649).get,h=RegExp.prototype,d=TypeError;o&&a&&c(h,"dotAll",{configurable:!0,get:function dotAll(){if(this!==h){if("RegExp"===u(this))return!!l(this).dotAll;throw new d("Incompatible receiver, RegExp required")}}})},7942:(t,r,i)=>{var o=i(4978),a=i(2178);o({target:"RegExp",proto:!0,forced:/./.exec!==a},{exec:a})},9786:(t,r,i)=>{var o=i(940),a=i(3286).MISSED_STICKY,u=i(8374),c=i(9691),l=i(1649).get,h=RegExp.prototype,d=TypeError;o&&a&&c(h,"sticky",{configurable:!0,get:function sticky(){if(this!==h){if("RegExp"===u(this))return!!l(this).sticky;throw new d("Incompatible receiver, RegExp required")}}})},5776:(t,r,i)=>{i(7942);var o=i(4978),a=i(2026),u=i(7316),c=i(4719),l=i(5730),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=c(this),i=l(t),o=r.exec;if(!u(o))return a(d,r,i);var h=a(o,r,i);if(null===h)return!1;c(h);return!0}})},924:(t,r,i)=>{var o=i(5145).PROPER,a=i(7041),u=i(4719),c=i(5730),l=i(8154),h=i(1043),d="toString",p=RegExp.prototype[d],v=l((function(){return"/a/b"!==p.call({source:"a",flags:"b"})})),y=o&&p.name!==d;(v||y)&&a(RegExp.prototype,d,(function toString(){var t=u(this);return"/"+c(t.source)+"/"+c(h(t))}),{unsafe:!0})},3810:(t,r,i)=>{i(4981)("Set",(function(t){return function Set(){return t(this,arguments.length?arguments[0]:void 0)}}),i(6122))},2048:(t,r,i)=>{i(3810)},6133:(t,r,i)=>{var o,a=i(4978),u=i(6218),c=i(5764).f,l=i(8293),h=i(5730),d=i(9578),p=i(5645),v=i(2280),y=i(2554),g=u("".endsWith),m=u("".slice),_=Math.min,b=v("endsWith");a({target:"String",proto:!0,forced:!(!y&&!b&&!!(o=c(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:_(l(i),o),u=h(t);return g?g(r,u,a):m(r,a-u.length,a)===u}})},2707:(t,r,i)=>{var o=i(4978),a=i(8403),u=i(6985),c=RangeError,l=String.fromCharCode,h=String.fromCodePoint,d=a([].join);o({target:"String",stat:!0,arity:1,forced:!!h&&1!==h.length},{fromCodePoint:function fromCodePoint(t){for(var r,i=[],o=arguments.length,a=0;o>a;){r=+arguments[a++];if(u(r,1114111)!==r)throw new c(r+" is not a valid code point");i[a]=r<65536?l(r):l(55296+((r-=65536)>>10),r%1024+56320)}return d(i,"")}})},2613:(t,r,i)=>{var o=i(4978),a=i(8403),u=i(9578),c=i(5645),l=i(5730),h=i(2280),d=a("".indexOf);o({target:"String",proto:!0,forced:!h("includes")},{includes:function includes(t){return!!~d(l(c(this)),l(u(t)),arguments.length>1?arguments[1]:void 0)}})},1747:(t,r,i)=>{var o=i(6819).charAt,a=i(5730),u=i(1649),c=i(7301),l=i(1111),h="String Iterator",d=u.set,p=u.getterFor(h);c(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 l(void 0,!0);t=o(i,a);r.index+=t.length;return l(t,!1)}))},469:(t,r,i)=>{var o=i(2026),a=i(4629),u=i(4719),c=i(3734),l=i(8293),h=i(5730),d=i(5645),p=i(8486),v=i(9047),y=i(8986);a("match",(function(t,r,i){return[function match(r){var i=d(this),a=c(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),c=i(r,o,a);if(c.done)return c.value;if(!o.global)return y(o,a);var d=o.unicode;o.lastIndex=0;for(var p,g=[],m=0;null!==(p=y(o,a));){var _=h(p[0]);g[m]=_;""===_&&(o.lastIndex=v(a,l(o.lastIndex),d));m++}return 0===m?null:g}]}))},7230:(t,r,i)=>{var o=i(4978),a=i(6460).start;o({target:"String",proto:!0,forced:i(4819)},{padStart:function padStart(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},7600:(t,r,i)=>{var o=i(4978),a=i(2026),u=i(8403),c=i(5645),l=i(7316),h=i(3734),d=i(6660),p=i(5730),v=i(8486),y=i(1043),g=i(1634),m=i(2292),_=i(2554),b=m("replace"),w=TypeError,P=u("".indexOf),D=u("".replace),E=u("".slice),x=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,S,A,C,k,I,T=c(this),L=0,O=0,M="";if(!h(t)){if(i=d(t)){o=p(c(y(t)));if(!~P(o,"g"))throw new w("`.replaceAll` does not allow non-global regexes")}if(u=v(t,b))return a(u,t,T,r);if(_&&i)return D(p(T),t,r)}m=p(T);S=p(t);(A=l(r))||(r=p(r));C=S.length;k=x(1,C);L=stringIndexOf(m,S,0);for(;-1!==L;){I=A?p(r(S,L,m)):g(S,m,L,[],void 0,r);M+=E(m,O,L)+I;O=L+C;L=stringIndexOf(m,S,L+k)}O<m.length&&(M+=E(m,O));return M}})},4711:(t,r,i)=>{var o=i(7294),a=i(2026),u=i(8403),c=i(4629),l=i(8154),h=i(4719),d=i(7316),p=i(3734),v=i(1003),y=i(8293),g=i(5730),m=i(5645),_=i(9047),b=i(8486),w=i(1634),P=i(8986),D=i(2292)("replace"),E=Math.max,x=Math.min,S=u([].concat),A=u([].push),C=u("".indexOf),k=u("".slice),I="$0"==="a".replace(/./,"$0"),T=!!/./[D]&&""===/./[D]("a","$0");c("replace",(function(t,r,i){var u=T?"$":"$0";return[function replace(t,i){var o=m(this),u=p(t)?void 0:b(t,D);return u?a(u,t,o,i):a(r,g(o),t,i)},function(t,a){var c=h(this),l=g(t);if("string"==typeof a&&-1===C(a,u)&&-1===C(a,"$<")){var p=i(r,c,l,a);if(p.done)return p.value}var m=d(a);m||(a=g(a));var b,D=c.global;if(D){b=c.unicode;c.lastIndex=0}for(var I,T=[];null!==(I=P(c,l));){A(T,I);if(!D)break;""===g(I[0])&&(c.lastIndex=_(l,y(c.lastIndex),b))}for(var L,O="",M=0,B=0;B<T.length;B++){for(var G,R=g((I=T[B])[0]),j=E(x(v(I.index),l.length),0),N=[],V=1;V<I.length;V++)A(N,void 0===(L=I[V])?L:String(L));var W=I.groups;if(m){var z=S([R],N,j,l);void 0!==W&&A(z,W);G=g(o(a,void 0,z))}else G=w(R,l,j,N,W,a);if(j>=M){O+=k(l,M,j)+G;M=j+R.length}}return O+k(l,M)}]}),!!l((function(){var t=/./;t.exec=function(){var t=[];t.groups={a:"7"};return t};return"7"!=="".replace(t,"$<a>")}))||!I||T)},5459:(t,r,i)=>{var o=i(2026),a=i(4629),u=i(4719),c=i(3734),l=i(5645),h=i(8976),d=i(5730),p=i(8486),v=i(8986);a("search",(function(t,r,i){return[function search(r){var i=l(this),a=c(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),c=i(r,o,a);if(c.done)return c.value;var l=o.lastIndex;h(l,0)||(o.lastIndex=0);var p=v(o,a);h(o.lastIndex,l)||(o.lastIndex=l);return null===p?-1:p.index}]}))},6421:(t,r,i)=>{var o,a=i(4978),u=i(6218),c=i(5764).f,l=i(8293),h=i(5730),d=i(9578),p=i(5645),v=i(2280),y=i(2554),g=u("".startsWith),m=u("".slice),_=Math.min,b=v("startsWith");a({target:"String",proto:!0,forced:!(!y&&!b&&!!(o=c(String.prototype,"startsWith"),o&&!o.writable))&&!b},{startsWith:function startsWith(t){var r=h(p(this));d(t);var i=l(_(arguments.length>1?arguments[1]:void 0,r.length)),o=h(t);return g?g(r,o,i):m(r,i,i+o.length)===o}})},8341:(t,r,i)=>{var o=i(4978),a=i(83).trim;o({target:"String",proto:!0,forced:i(8729)("trim")},{trim:function trim(){return a(this)}})},1133:(t,r,i)=>{i(7120)("asyncIterator")},1532:(t,r,i)=>{var o=i(4978),a=i(9298),u=i(2026),c=i(8403),l=i(2554),h=i(940),d=i(3663),p=i(8154),v=i(936),y=i(2658),g=i(4719),m=i(4115),_=i(4871),b=i(5730),w=i(1198),P=i(6941),D=i(1706),E=i(5455),x=i(2329),S=i(1963),A=i(5764),C=i(7744),k=i(6617),I=i(1879),T=i(7041),L=i(9691),O=i(6807),M=i(3727),B=i(6010),G=i(7561),R=i(2292),j=i(8890),N=i(7120),V=i(5117),W=i(7536),z=i(1649),H=i(2423).forEach,U=M("hidden"),K="Symbol",$="prototype",Y=z.set,q=z.getterFor(K),X=Object[$],Z=a.Symbol,Q=Z&&Z[$],J=a.RangeError,ee=a.TypeError,te=a.QObject,re=A.f,ne=C.f,ie=x.f,oe=I.f,ae=c([].push),se=O("symbols"),ue=O("op-symbols"),ce=O("wks"),le=!te||!te[$]||!te[$].findChild,fallbackDefineProperty=function(t,r,i){var o=re(X,r);o&&delete X[r];ne(t,r,i);o&&t!==X&&ne(X,r,o)},he=h&&p((function(){return 7!==P(ne({},"a",{get:function(){return ne(this,"a",{value:7}).a}})).a}))?fallbackDefineProperty:ne,wrap=function(t,r){var i=se[t]=P(Q);Y(i,{type:K,tag:t,description:r});h||(i.description=r);return i},fe=function defineProperty(t,r,i){t===X&&fe(ue,r,i);g(t);var o=_(r);g(i);if(v(se,o)){if(i.enumerable){v(t,U)&&t[U][o]&&(t[U][o]=!1);i=P(i,{enumerable:w(0,!1)})}else{v(t,U)||ne(t,U,w(1,{}));t[U][o]=!0}return he(t,o,i)}return ne(t,o,i)},de=function defineProperties(t,r){g(t);var i=m(r),o=D(i).concat($getOwnPropertySymbols(i));H(o,(function(r){h&&!u(pe,i,r)||fe(t,r,i[r])}));return t},pe=function propertyIsEnumerable(t){var r=_(t),i=u(oe,this,r);return!(this===X&&v(se,r)&&!v(ue,r))&&(!(i||!v(this,r)||!v(se,r)||v(this,U)&&this[U][r])||i)},ve=function getOwnPropertyDescriptor(t,r){var i=m(t),o=_(r);if(i!==X||!v(se,o)||v(ue,o)){var a=re(i,o);!a||!v(se,o)||v(i,U)&&i[U][o]||(a.enumerable=!0);return a}},ye=function getOwnPropertyNames(t){var r=ie(m(t)),i=[];H(r,(function(t){v(se,t)||v(B,t)||ae(i,t)}));return i},$getOwnPropertySymbols=function(t){var r=t===X,i=ie(r?ue:m(t)),o=[];H(i,(function(t){!v(se,t)||r&&!v(X,t)||ae(o,se[t])}));return o};if(!d){T(Q=(Z=function Symbol(){if(y(Q,this))throw new ee("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?b(arguments[0]):void 0,r=G(t),setter=function(t){var i=void 0===this?a:this;i===X&&u(setter,ue,t);v(i,U)&&v(i[U],r)&&(i[U][r]=!1);var o=w(1,t);try{he(i,r,o)}catch(t){if(!(t instanceof J))throw t;fallbackDefineProperty(i,r,o)}};h&&le&&he(X,r,{configurable:!0,set:setter});return wrap(r,t)})[$],"toString",(function toString(){return q(this).tag}));T(Z,"withoutSetter",(function(t){return wrap(G(t),t)}));I.f=pe;C.f=fe;k.f=de;A.f=ve;E.f=x.f=ye;S.f=$getOwnPropertySymbols;j.f=function(t){return wrap(R(t),t)};if(h){L(Q,"description",{configurable:!0,get:function description(){return q(this).description}});l||T(X,"propertyIsEnumerable",pe,{unsafe:!0})}}o({global:!0,constructor:!0,wrap:!0,forced:!d,sham:!d},{Symbol:Z});H(D(ce),(function(t){N(t)}));o({target:K,stat:!0,forced:!d},{useSetter:function(){le=!0},useSimple:function(){le=!1}});o({target:"Object",stat:!0,forced:!d,sham:!h},{create:function create(t,r){return void 0===r?P(t):de(P(t),r)},defineProperty:fe,defineProperties:de,getOwnPropertyDescriptor:ve});o({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:ye});V();W(Z,K);B[U]=!0},6678:(t,r,i)=>{var o=i(4978),a=i(940),u=i(9298),c=i(8403),l=i(936),h=i(7316),d=i(2658),p=i(5730),v=i(9691),y=i(1425),g=u.Symbol,m=g&&g.prototype;if(a&&h(g)&&(!("description"in m)||void 0!==g().description)){var _={},b=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:p(arguments[0]),r=d(m,this)?new g(t):void 0===t?g():g(t);""===t&&(_[r]=!0);return r};y(b,g);b.prototype=m;m.constructor=b;var w="Symbol(description detection)"===String(g("description detection")),P=c(m.valueOf),D=c(m.toString),E=/^Symbol\((.*)\)[^)]+$/,x=c("".replace),S=c("".slice);v(m,"description",{configurable:!0,get:function description(){var t=P(this);if(l(_,t))return"";var r=D(t),i=w?S(r,7,-1):x(r,E,"$1");return""===i?void 0:i}});o({global:!0,constructor:!0,forced:!0},{Symbol:b})}},2389:(t,r,i)=>{var o=i(4978),a=i(7187),u=i(936),c=i(5730),l=i(6807),h=i(4186),d=l("string-to-symbol-registry"),p=l("symbol-to-string-registry");o({target:"Symbol",stat:!0,forced:!h},{for:function(t){var r=c(t);if(u(d,r))return d[r];var i=a("Symbol")(r);d[r]=i;p[i]=r;return i}})},2926:(t,r,i)=>{i(7120)("iterator")},9366:(t,r,i)=>{i(1532);i(2389);i(5876);i(7254);i(8564)},5876:(t,r,i)=>{var o=i(4978),a=i(936),u=i(7814),c=i(9762),l=i(6807),h=i(4186),d=l("symbol-to-string-registry");o({target:"Symbol",stat:!0,forced:!h},{keyFor:function keyFor(t){if(!u(t))throw new TypeError(c(t)+" is not a symbol");if(a(d,t))return d[t]}})},5598:(t,r,i)=>{var o=i(7120),a=i(5117);o("toPrimitive");a()},2173:(t,r,i)=>{var o=i(7187),a=i(7120),u=i(7536);a("toStringTag");u(o("Symbol"),"Symbol")},739:(t,r,i)=>{var o=i(5861),a=i(451),u=i(1003),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("at",(function at(t){var r=c(this),i=a(r),o=u(t),l=o>=0?o:i+o;return l<0||l>=i?void 0:r[l]}))},4816:(t,r,i)=>{var o=i(8403),a=i(5861),u=o(i(1474)),c=a.aTypedArray;(0,a.exportTypedArrayMethod)("copyWithin",(function copyWithin(t,r){return u(c(this),t,r,arguments.length>2?arguments[2]:void 0)}))},6923:(t,r,i)=>{var o=i(5861),a=i(2423).every,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("every",(function every(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},6775:(t,r,i)=>{var o=i(5861),a=i(8041),u=i(212),c=i(8329),l=i(2026),h=i(8403),d=i(8154),p=o.aTypedArray,v=o.exportTypedArrayMethod,y=h("".slice);v("fill",(function fill(t){var r=arguments.length;p(this);var i="Big"===y(c(this),0,3)?u(t):+t;return l(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})))},6474:(t,r,i)=>{var o=i(5861),a=i(2423).filter,u=i(5306),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("filter",(function filter(t){var r=a(c(this),t,arguments.length>1?arguments[1]:void 0);return u(this,r)}))},1665:(t,r,i)=>{var o=i(5861),a=i(2423).findIndex,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("findIndex",(function findIndex(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},9803:(t,r,i)=>{var o=i(5861),a=i(4026).findLastIndex,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("findLastIndex",(function findLastIndex(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},8837:(t,r,i)=>{var o=i(5861),a=i(4026).findLast,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("findLast",(function findLast(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},6450:(t,r,i)=>{var o=i(5861),a=i(2423).find,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("find",(function find(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},1293:(t,r,i)=>{var o=i(5861),a=i(2423).forEach,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("forEach",(function forEach(t){a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},1051:(t,r,i)=>{var o=i(5861),a=i(9773).includes,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("includes",(function includes(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},8260:(t,r,i)=>{var o=i(5861),a=i(9773).indexOf,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("indexOf",(function indexOf(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},5746:(t,r,i)=>{var o=i(9298),a=i(8154),u=i(8403),c=i(5861),l=i(6180),h=i(2292)("iterator"),d=o.Uint8Array,p=u(l.values),v=u(l.keys),y=u(l.entries),g=c.aTypedArray,m=c.exportTypedArrayMethod,_=d&&d.prototype,b=!a((function(){_[h].call([1])})),w=!!_&&_.values&&_[h]===_.values&&"values"===_.values.name,P=function values(){return p(g(this))};m("entries",(function entries(){return y(g(this))}),b);m("keys",(function keys(){return v(g(this))}),b);m("values",P,b||!w,{name:"values"});m(h,P,b||!w,{name:"values"})},202:(t,r,i)=>{var o=i(5861),a=i(8403),u=o.aTypedArray,c=o.exportTypedArrayMethod,l=a([].join);c("join",(function join(t){return l(u(this),t)}))},2138:(t,r,i)=>{var o=i(5861),a=i(7294),u=i(8671),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("lastIndexOf",(function lastIndexOf(t){var r=arguments.length;return a(u,c(this),r>1?[t,arguments[1]]:[t])}))},368:(t,r,i)=>{var o=i(5861),a=i(2423).map,u=i(6239),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("map",(function map(t){return a(c(this),t,arguments.length>1?arguments[1]:void 0,(function(t,r){return new(u(t))(r)}))}))},917:(t,r,i)=>{var o=i(5861),a=i(2741).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)}))},9782:(t,r,i)=>{var o=i(5861),a=i(2741).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)}))},3650:(t,r,i)=>{var o=i(5861),a=o.aTypedArray,u=o.exportTypedArrayMethod,c=Math.floor;u("reverse",(function reverse(){for(var t,r=this,i=a(r).length,o=c(i/2),u=0;u<o;){t=r[u];r[u++]=r[--i];r[i]=t}return r}))},8347:(t,r,i)=>{var o=i(9298),a=i(2026),u=i(5861),c=i(451),l=i(9892),h=i(2007),d=i(8154),p=o.RangeError,v=o.Int8Array,y=v&&v.prototype,g=y&&y.set,m=u.aTypedArray,_=u.exportTypedArrayMethod,b=!d((function(){var t=new Uint8ClampedArray(2);a(g,t,{length:1,0:3},1);return 3!==t[1]})),w=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]}));_("set",(function set(t){m(this);var r=l(arguments.length>1?arguments[1]:void 0,1),i=h(t);if(b)return a(g,this,i,r);var o=this.length,u=c(i),d=0;if(u+r>o)throw new p("Wrong length");for(;d<u;)this[r+d]=i[d++]}),!b||w)},7192:(t,r,i)=>{var o=i(5861),a=i(6239),u=i(8154),c=i(2251),l=o.aTypedArray;(0,o.exportTypedArrayMethod)("slice",(function slice(t,r){for(var i=c(l(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()})))},354:(t,r,i)=>{var o=i(5861),a=i(2423).some,u=o.aTypedArray;(0,o.exportTypedArrayMethod)("some",(function some(t){return a(u(this),t,arguments.length>1?arguments[1]:void 0)}))},9080:(t,r,i)=>{var o=i(9298),a=i(6218),u=i(8154),c=i(1782),l=i(4689),h=i(5861),d=i(7614),p=i(7463),v=i(2171),y=i(7906),g=h.aTypedArray,m=h.exportTypedArrayMethod,_=o.Uint16Array,b=_&&a(_.prototype.sort),w=!(!b||u((function(){b(new _(2),null)}))&&u((function(){b(new _(2),{})}))),P=!!b&&!u((function(){if(v)return v<74;if(d)return d<67;if(p)return!0;if(y)return y<602;var t,r,i=new _(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&&c(t);return P?b(this,t):l(g(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||w)},7238:(t,r,i)=>{var o=i(9298),a=i(7294),u=i(5861),c=i(8154),l=i(2251),h=o.Int8Array,d=u.aTypedArray,p=u.exportTypedArrayMethod,v=[].toLocaleString,y=!!h&&c((function(){v.call(new h(1))}));p("toLocaleString",(function toLocaleString(){return a(v,y?l(d(this)):d(this),l(arguments))}),c((function(){return[1,2].toLocaleString()!==new h([1,2]).toLocaleString()}))||!c((function(){h.prototype.toLocaleString.call([1,2])})))},7995:(t,r,i)=>{var o=i(2304),a=i(5861),u=a.aTypedArray,c=a.exportTypedArrayMethod,l=a.getTypedArrayConstructor;c("toReversed",(function toReversed(){return o(u(this),l(this))}))},62:(t,r,i)=>{var o=i(5861),a=i(8403),u=i(1782),c=i(7003),l=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=l(this),i=c(h(r),r);return p(i,t)}))},6635:(t,r,i)=>{var o=i(5861).exportTypedArrayMethod,a=i(8154),u=i(9298),c=i(8403),l=u.Uint8Array,h=l&&l.prototype||{},d=[].toString,p=c([].join);a((function(){d.call({})}))&&(d=function toString(){return p(this)});var v=h.toString!==d;o("toString",d,v)},4624:(t,r,i)=>{i(9173)("Uint32",(function(t){return function Uint32Array(r,i,o){return t(this,r,i,o)}}))},4699:(t,r,i)=>{i(9173)("Uint8",(function(t){return function Uint8Array(r,i,o){return t(this,r,i,o)}}))},4602:(t,r,i)=>{var o=i(5886),a=i(5861),u=i(5986),c=i(1003),l=i(212),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=c(t),p=u(i)?l(r):+r;return o(i,d(i),a,p)}}.with,!v)},4507:(t,r,i)=>{var o,a=i(7010),u=i(9298),c=i(8403),l=i(6880),h=i(4694),d=i(4981),p=i(9609),v=i(7633),y=i(1649).enforce,g=i(8154),m=i(8443),_=Object,b=Array.isArray,w=_.isExtensible,P=_.isFrozen,D=_.isSealed,E=_.freeze,x=_.seal,S={},A={},C=!u.ActiveXObject&&"ActiveXObject"in u,wrapper=function(t){return function WeakMap(){return t(this,arguments.length?arguments[0]:void 0)}},k=d("WeakMap",wrapper,p),I=k.prototype,T=c(I.set);if(m)if(C){o=p.getConstructor(wrapper,"WeakMap",!0);h.enable();var L=c(I.delete),O=c(I.has),M=c(I.get);l(I,{delete:function(t){if(v(t)&&!w(t)){var r=y(this);r.frozen||(r.frozen=new o);return L(this,t)||r.frozen.delete(t)}return L(this,t)},has:function has(t){if(v(t)&&!w(t)){var r=y(this);r.frozen||(r.frozen=new o);return O(this,t)||r.frozen.has(t)}return O(this,t)},get:function get(t){if(v(t)&&!w(t)){var r=y(this);r.frozen||(r.frozen=new o);return O(this,t)?M(this,t):r.frozen.get(t)}return M(this,t)},set:function set(t,r){if(v(t)&&!w(t)){var i=y(this);i.frozen||(i.frozen=new o);O(this,t)?T(this,t,r):i.frozen.set(t,r)}else T(this,t,r);return this}})}else a&&g((function(){var t=E([]);T(new k,t,1);return!P(t)}))&&l(I,{set:function set(t,r){var i;b(t)&&(P(t)?i=S:D(t)&&(i=A));T(this,t,r);i===S&&E(t);i===A&&x(t);return this}})},7484:(t,r,i)=>{i(4507)},5804:(t,r,i)=>{i(4981)("WeakSet",(function(t){return function WeakSet(){return t(this,arguments.length?arguments[0]:void 0)}}),i(9609))},394:(t,r,i)=>{i(5804)},344:(t,r,i)=>{var o=i(940),a=i(9691),u=i(582),c=ArrayBuffer.prototype;o&&!("detached"in c)&&a(c,"detached",{configurable:!0,get:function detached(){return u(this)}})},7583:(t,r,i)=>{var o=i(4978),a=i(4358);a&&o({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function transferToFixedLength(){return a(this,arguments.length?arguments[0]:void 0,!1)}})},4305:(t,r,i)=>{var o=i(4978),a=i(4358);a&&o({target:"ArrayBuffer",proto:!0},{transfer:function transfer(){return a(this,arguments.length?arguments[0]:void 0,!0)}})},7121:(t,r,i)=>{var o=i(4978),a=i(9298),u=i(5834),c=i(4719),l=i(7316),h=i(2176),d=i(9691),p=i(8947),v=i(8154),y=i(936),g=i(2292),m=i(5238).IteratorPrototype,_=i(940),b=i(2554),w="constructor",P="Iterator",D=g("toStringTag"),E=TypeError,x=a[P],S=b||!l(x)||x.prototype!==m||!v((function(){x({})})),A=function Iterator(){u(this,m);if(h(this)===m)throw new E("Abstract class Iterator not directly constructable")},defineIteratorPrototypeAccessor=function(t,r){_?d(m,t,{configurable:!0,get:function(){return r},set:function(r){c(this);if(this===m)throw new E("You can't redefine this property");y(this,t)?this[t]=r:p(this,t,r)}}):m[t]=r};y(m,D)||defineIteratorPrototypeAccessor(D,P);!S&&y(m,w)&&m[w]!==Object||defineIteratorPrototypeAccessor(w,A);A.prototype=m;o({global:!0,constructor:!0,forced:S},{Iterator:A})},385:(t,r,i)=>{var o=i(4978),a=i(6837),u=i(1782),c=i(4719),l=i(9235);o({target:"Iterator",proto:!0,real:!0},{every:function every(t){c(this);u(t);var r=l(this),i=0;return!a(r,(function(r,o){if(!t(r,i++))return o()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},2993:(t,r,i)=>{var o=i(4978),a=i(2026),u=i(1782),c=i(4719),l=i(9235),h=i(375),d=i(5723),p=i(2554),v=h((function(){for(var t,r,i=this.iterator,o=this.predicate,u=this.next;;){t=c(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){c(this);u(t);return new v(l(this),{predicate:t})}})},5252:(t,r,i)=>{var o=i(4978),a=i(6837),u=i(1782),c=i(4719),l=i(9235);o({target:"Iterator",proto:!0,real:!0},{find:function find(t){c(this);u(t);var r=l(this),i=0;return a(r,(function(r,o){if(t(r,i++))return o(r)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},6770:(t,r,i)=>{var o=i(4978),a=i(6837),u=i(1782),c=i(4719),l=i(9235);o({target:"Iterator",proto:!0,real:!0},{forEach:function forEach(t){c(this);u(t);var r=l(this),i=0;a(r,(function(r){t(r,i++)}),{IS_RECORD:!0})}})},7944:(t,r,i)=>{var o=i(4978),a=i(8142);o({target:"Iterator",proto:!0,real:!0,forced:i(2554)},{map:a})},8518:(t,r,i)=>{var o=i(4978),a=i(6837),u=i(1782),c=i(4719),l=i(9235);o({target:"Iterator",proto:!0,real:!0},{some:function some(t){c(this);u(t);var r=l(this),i=0;return a(r,(function(r,o){if(t(r,i++))return o()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},2808:(t,r,i)=>{var o=i(4978),a=i(940),u=i(9298),c=i(7187),l=i(8403),h=i(2026),d=i(7316),p=i(7633),v=i(6998),y=i(936),g=i(5730),m=i(451),_=i(8947),b=i(8154),w=i(3713),P=i(3663),D=u.JSON,E=u.Number,x=u.SyntaxError,S=D&&D.parse,A=c("Object","keys"),C=Object.getOwnPropertyDescriptor,k=l("".charAt),I=l("".slice),T=l(/./.exec),L=l([].push),O=/^\d$/,M=/^[1-9]$/,B=/^(?:-|\d)$/,G=/^[\t\n\r ]$/,internalize=function(t,r,i,o){var a,u,c,l,d,g=t[r],_=o&&g===o.value,b=_&&"string"==typeof o.source?{source:o.source}:{};if(p(g)){var w=v(g),P=_?o.nodes:w?[]:{};if(w){a=P.length;c=m(g);for(l=0;l<c;l++)internalizeProperty(g,l,internalize(g,""+l,i,l<a?P[l]:void 0))}else{u=A(g);c=m(u);for(l=0;l<c;l++){d=u[l];internalizeProperty(g,d,internalize(g,d,i,y(P,d)?P[d]:void 0))}}}return h(i,t,r,g,b)},internalizeProperty=function(t,r,i){if(a){var o=C(t,r);if(o&&!o.configurable)return}void 0===i?delete t[r]:_(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(G,this.index),i=this.fork(r),o=k(t,r);if(T(B,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 x('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("}"===k(t,r)&&!i){r++;break}var u=this.fork(r).string(),c=u.value;r=u.end;r=this.until([":"],r)+1;r=this.skip(G,r);u=this.fork(r).parse();_(a,c,u);_(o,c,u.value);r=this.until([",","}"],u.end);var l=k(t,r);if(","===l){i=!0;r++}else if("}"===l){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(G,r);if("]"===k(t,r)&&!i){r++;break}var u=this.fork(r).parse();L(a,u);L(o,u.value);r=this.until([",","]"],u.end);if(","===k(t,r)){i=!0;r++}else if("]"===k(t,r)){r++;break}}return this.node(1,o,this.index,r,a)},string:function(){var t=this.index,r=w(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;"-"===k(t,i)&&i++;if("0"===k(t,i))i++;else{if(!T(M,k(t,i)))throw new x("Failed to parse number at: "+i);i=this.skip(O,++i)}"."===k(t,i)&&(i=this.skip(O,++i));if("e"===k(t,i)||"E"===k(t,i)){i++;"+"!==k(t,i)&&"-"!==k(t,i)||i++;if(i===(i=this.skip(O,i)))throw new x("Failed to parse number's exponent value at: "+i)}return this.node(0,E(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 x("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&&T(t,k(i,r));r++);return r},until:function(t,r){r=this.skip(G,r);for(var i=k(this.source,r),o=0;o<t.length;o++)if(t[o]===i)return r;throw new x('Unexpected character: "'+i+'" at: '+r)}};var R=b((function(){var t,r="9007199254740993";S(r,(function(r,i,o){t=o.source}));return t!==r})),j=P&&!b((function(){return 1/S("-0 \t")!=-1/0}));o({target:"JSON",stat:!0,forced:R},{parse:function parse(t,r){return j&&!d(r)?S(t):function(t,r){t=g(t);var i=new Context(t,0,""),o=i.parse(),a=o.value,u=i.skip(G,o.end);if(u<t.length)throw new x('Unexpected extra character: "'+k(t,u)+'" after the parsed data at: '+u);return d(r)?internalize({"":a},"",r,o):a}(t,r)}})},5561:(t,r,i)=>{var o=i(4978),a=i(5656);o({target:"Set",proto:!0,real:!0,forced:!i(507)("difference")},{difference:a})},8587:(t,r,i)=>{var o=i(4978),a=i(8154),u=i(8461);o({target:"Set",proto:!0,real:!0,forced:!i(507)("intersection")||a((function(){return"3,2"!==Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:u})},3247:(t,r,i)=>{var o=i(4978),a=i(8550);o({target:"Set",proto:!0,real:!0,forced:!i(507)("isDisjointFrom")},{isDisjointFrom:a})},3302:(t,r,i)=>{var o=i(4978),a=i(990);o({target:"Set",proto:!0,real:!0,forced:!i(507)("isSubsetOf")},{isSubsetOf:a})},9490:(t,r,i)=>{var o=i(4978),a=i(194);o({target:"Set",proto:!0,real:!0,forced:!i(507)("isSupersetOf")},{isSupersetOf:a})},5438:(t,r,i)=>{var o=i(4978),a=i(3194);o({target:"Set",proto:!0,real:!0,forced:!i(507)("symmetricDifference")},{symmetricDifference:a})},7914:(t,r,i)=>{var o=i(4978),a=i(5703);o({target:"Set",proto:!0,real:!0,forced:!i(507)("union")},{union:a})},1378:(t,r,i)=>{var o=i(9298),a=i(2411),u=i(3942),c=i(8208),l=i(9293),handlePrototype=function(t){if(t&&t.forEach!==c)try{l(t,"forEach",c)}catch(r){t.forEach=c}};for(var h in a)a[h]&&handlePrototype(o[h]&&o[h].prototype);handlePrototype(u)},2374:(t,r,i)=>{var o=i(9298),a=i(2411),u=i(3942),c=i(6180),l=i(9293),h=i(7536),d=i(2292)("iterator"),p=c.values,handlePrototype=function(t,r){if(t){if(t[d]!==p)try{l(t,d,p)}catch(r){t[d]=p}h(t,r,!0);if(a[r])for(var i in c)if(t[i]!==c[i])try{l(t,i,c[i])}catch(r){t[i]=c[i]}}};for(var v in a)handlePrototype(o[v]&&o[v].prototype,v);handlePrototype(u,"DOMTokenList")},5057:(t,r,i)=>{var o=i(4978),a=i(9298),u=i(9691),c=i(940),l=TypeError,h=Object.defineProperty,d=a.self!==a;try{if(c){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 l("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){}},1872:(t,r,i)=>{i(6180);var o=i(4978),a=i(9298),u=i(2026),c=i(8403),l=i(940),h=i(8815),d=i(7041),p=i(9691),v=i(6880),y=i(7536),g=i(552),m=i(1649),_=i(5834),b=i(7316),w=i(936),P=i(7789),D=i(8329),E=i(4719),x=i(7633),S=i(5730),A=i(6941),C=i(1198),k=i(7612),I=i(273),T=i(1111),L=i(2743),O=i(2292),M=i(4689),B=O("iterator"),G="URLSearchParams",R=G+"Iterator",j=m.set,N=m.getterFor(G),V=m.getterFor(R),W=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(t){if(!l)return a[t];var r=W(a,t);return r&&r.value},z=safeGetBuiltIn("fetch"),H=safeGetBuiltIn("Request"),U=safeGetBuiltIn("Headers"),K=H&&H.prototype,$=U&&U.prototype,Y=a.RegExp,q=a.TypeError,X=a.decodeURIComponent,Z=a.encodeURIComponent,Q=c("".charAt),J=c([].join),ee=c([].push),te=c("".replace),re=c([].shift),ne=c([].splice),ie=c("".split),oe=c("".slice),ae=/\+/g,se=Array(4),percentSequence=function(t){return se[t-1]||(se[t-1]=Y("((?:%[\\da-f]{2}){"+t+"})","gi"))},percentDecode=function(t){try{return X(t)}catch(r){return t}},deserialize=function(t){var r=te(t,ae," "),i=4;try{return X(r)}catch(t){for(;i;)r=te(r,percentSequence(i--),percentDecode);return r}},ue=/[!'()~]|%20/g,ce={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return ce[t]},serialize=function(t){return te(Z(t),ue,replacer)},le=g((function Iterator(t,r){j(this,{type:R,target:N(t).entries,index:0,kind:r})}),G,(function next(){var t=V(this),r=t.target,i=t.index++;if(!r||i>=r.length){t.target=void 0;return T(void 0,!0)}var o=r[i];switch(t.kind){case"keys":return T(o.key,!1);case"values":return T(o.value,!1)}return T([o.key,o.value],!1)}),!0),URLSearchParamsState=function(t){this.entries=[];this.url=null;void 0!==t&&(x(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===Q(t,0)?oe(t,1):t:S(t)))};URLSearchParamsState.prototype={type:G,bindURL:function(t){this.url=t;this.update()},parseObject:function(t){var r,i,o,a,c,l,h,d=this.entries,p=I(t);if(p){i=(r=k(t,p)).next;for(;!(o=u(i,r)).done;){c=(a=k(E(o.value))).next;if((l=u(c,a)).done||(h=u(c,a)).done||!u(c,a).done)throw new q("Expected sequence with length 2");ee(d,{key:S(l.value),value:S(h.value)})}}else for(var v in t)w(t,v)&&ee(d,{key:v,value:S(t[v])})},parseQuery:function(t){if(t)for(var r,i,o=this.entries,a=ie(t,"&"),u=0;u<a.length;)if((r=a[u++]).length){i=ie(r,"=");ee(o,{key:deserialize(re(i)),value:deserialize(J(i,"="))})}},serialize:function(){for(var t,r=this.entries,i=[],o=0;o<r.length;){t=r[o++];ee(i,serialize(t.key)+"="+serialize(t.value))}return J(i,"&")},update:function(){this.entries.length=0;this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var he=function URLSearchParams(){_(this,fe);var t=j(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0));l||(this.size=t.entries.length)},fe=he.prototype;v(fe,{append:function append(t,r){var i=N(this);L(arguments.length,2);ee(i.entries,{key:S(t),value:S(r)});l||this.length++;i.updateURL()},delete:function(t){for(var r=N(this),i=L(arguments.length,1),o=r.entries,a=S(t),u=i<2?void 0:arguments[1],c=void 0===u?u:S(u),h=0;h<o.length;){var d=o[h];if(d.key!==a||void 0!==c&&d.value!==c)h++;else{ne(o,h,1);if(void 0!==c)break}}l||(this.size=o.length);r.updateURL()},get:function get(t){var r=N(this).entries;L(arguments.length,1);for(var i=S(t),o=0;o<r.length;o++)if(r[o].key===i)return r[o].value;return null},getAll:function getAll(t){var r=N(this).entries;L(arguments.length,1);for(var i=S(t),o=[],a=0;a<r.length;a++)r[a].key===i&&ee(o,r[a].value);return o},has:function has(t){for(var r=N(this).entries,i=L(arguments.length,1),o=S(t),a=i<2?void 0:arguments[1],u=void 0===a?a:S(a),c=0;c<r.length;){var l=r[c++];if(l.key===o&&(void 0===u||l.value===u))return!0}return!1},set:function set(t,r){var i=N(this);L(arguments.length,1);for(var o,a=i.entries,u=!1,c=S(t),h=S(r),d=0;d<a.length;d++)if((o=a[d]).key===c)if(u)ne(a,d--,1);else{u=!0;o.value=h}u||ee(a,{key:c,value:h});l||(this.size=a.length);i.updateURL()},sort:function sort(){var t=N(this);M(t.entries,(function(t,r){return t.key>r.key?1:-1}));t.updateURL()},forEach:function forEach(t){for(var r,i=N(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 le(this,"keys")},values:function values(){return new le(this,"values")},entries:function entries(){return new le(this,"entries")}},{enumerable:!0});d(fe,B,fe.entries,{name:"entries"});d(fe,"toString",(function toString(){return N(this).serialize()}),{enumerable:!0});l&&p(fe,"size",{get:function size(){return N(this).entries.length},configurable:!0,enumerable:!0});y(he,G);o({global:!0,constructor:!0,forced:!h},{URLSearchParams:he});if(!h&&b(U)){var de=c($.has),pe=c($.set),wrapRequestOptions=function(t){if(x(t)){var r,i=t.body;if(D(i)===G){r=t.headers?new U(t.headers):new U;de(r,"content-type")||pe(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8");return A(t,{body:C(0,S(i)),headers:C(0,r)})}}return t};b(z)&&o({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function fetch(t){return z(t,arguments.length>1?wrapRequestOptions(arguments[1]):{})}});if(b(H)){var ve=function Request(t){_(this,K);return new H(t,arguments.length>1?wrapRequestOptions(arguments[1]):{})};K.constructor=ve;ve.prototype=K;o({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ve})}}t.exports={URLSearchParams:he,getState:N}},3655:(t,r,i)=>{var o=i(7041),a=i(8403),u=i(5730),c=i(2743),l=URLSearchParams,h=l.prototype,d=a(h.append),p=a(h.delete),v=a(h.forEach),y=a([].push),g=new l("a=1&a=2&b=3");g.delete("a",1);g.delete("b",void 0);g+""!="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){y(o,{key:r,value:t})}));c(r,1);for(var a,l=u(t),h=u(i),g=0,m=0,_=!1,b=o.length;g<b;){a=o[g++];if(_||a.key===l){_=!0;p(this,a.key)}else m++}for(;m<b;)(a=o[m++]).key===l&&a.value===h||d(this,a.key,a.value)}),{enumerable:!0,unsafe:!0})},2555:(t,r,i)=>{var o=i(7041),a=i(8403),u=i(5730),c=i(2743),l=URLSearchParams,h=l.prototype,d=a(h.getAll),p=a(h.has),v=new l("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);c(r,1);for(var a=u(i),l=0;l<o.length;)if(o[l++]===a)return!0;return!1}),{enumerable:!0,unsafe:!0})},3757:(t,r,i)=>{i(1872)},2202:(t,r,i)=>{var o=i(940),a=i(8403),u=i(9691),c=URLSearchParams.prototype,l=a(c.forEach);o&&!("size"in c)&&u(c,"size",{get:function size(){var t=0;l(this,(function(){t++}));return t},configurable:!0,enumerable:!0})},9258:(t,r,i)=>{i(1747);var o,a=i(4978),u=i(940),c=i(8815),l=i(9298),h=i(7789),d=i(8403),p=i(7041),v=i(9691),y=i(5834),g=i(936),m=i(453),_=i(7609),b=i(6071),w=i(6819).codeAt,P=i(2897),D=i(5730),E=i(7536),x=i(2743),S=i(1872),A=i(1649),C=A.set,k=A.getterFor("URL"),I=S.URLSearchParams,T=S.getState,L=l.URL,O=l.TypeError,M=l.parseInt,B=Math.floor,G=Math.pow,R=d("".charAt),j=d(/./.exec),N=d([].join),V=d(1..toString),W=d([].pop),z=d([].push),H=d("".replace),U=d([].shift),K=d("".split),$=d("".slice),Y=d("".toLowerCase),q=d([].unshift),X="Invalid scheme",Z="Invalid host",Q="Invalid port",J=/[a-z]/i,ee=/[\d+-.a-z]/i,te=/\d/,re=/^0x/i,ne=/^[0-7]+$/,ie=/^\d+$/,oe=/^[\da-f]+$/i,ae=/[\0\t\n\r #%/:<>?@[\\\]^|]/,se=/[\0\t\n\r #/:<>?@[\\\]^|]/,ue=/^[\u0000-\u0020]+/,ce=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,le=/[\t\n\r]/g,serializeHost=function(t){var r,i,o,a;if("number"==typeof t){r=[];for(i=0;i<4;i++){q(r,t%256);t=B(t/256)}return N(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+=V(t[i],16);i<7&&(r+=":")}}return"["+r+"]"}return t},he={},fe=m({},he,{" ":1,'"':1,"<":1,">":1,"`":1}),de=m({},fe,{"#":1,"?":1,"{":1,"}":1}),pe=m({},de,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,r){var i=w(t,0);return i>32&&i<127&&!g(r,t)?t:encodeURIComponent(t)},ve={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(t,r){var i;return 2===t.length&&j(J,R(t,0))&&(":"===(i=R(t,1))||!r&&"|"===i)},startsWithWindowsDriveLetter=function(t){var r;return t.length>1&&isWindowsDriveLetter($(t,0,2))&&(2===t.length||"/"===(r=R(t,2))||"\\"===r||"?"===r||"#"===r)},isSingleDot=function(t){return"."===t||"%2e"===Y(t)},ye={},ge={},me={},_e={},be={},we={},Pe={},De={},Ee={},Fe={},xe={},Se={},Ae={},Ce={},ke={},Ie={},Te={},Le={},Oe={},Me={},Be={},URLState=function(t,r,i){var o,a,u,c=D(t);if(r){if(a=this.parse(c))throw new O(a);this.searchParams=null}else{void 0!==i&&(o=new URLState(i,!0));if(a=this.parse(c,null,o))throw new O(a);(u=T(new I)).bindURL(this);this.searchParams=u}};URLState.prototype={type:"URL",parse:function(t,r,i){var a,u,c,l,h,d=this,p=r||ye,v=0,y="",m=!1,w=!1,P=!1;t=D(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=H(t,ue,"");t=H(t,ce,"$1")}t=H(t,le,"");a=_(t);for(;v<=a.length;){u=a[v];switch(p){case ye:if(!u||!j(J,u)){if(r)return X;p=me;continue}y+=Y(u);p=ge;break;case ge:if(u&&(j(ee,u)||"+"===u||"-"===u||"."===u))y+=Y(u);else{if(":"!==u){if(r)return X;y="";p=me;v=0;continue}if(r&&(d.isSpecial()!==g(ve,y)||"file"===y&&(d.includesCredentials()||null!==d.port)||"file"===d.scheme&&!d.host))return;d.scheme=y;if(r){d.isSpecial()&&ve[d.scheme]===d.port&&(d.port=null);return}y="";if("file"===d.scheme)p=Ce;else if(d.isSpecial()&&i&&i.scheme===d.scheme)p=_e;else if(d.isSpecial())p=De;else if("/"===a[v+1]){p=be;v++}else{d.cannotBeABaseURL=!0;z(d.path,"");p=Oe}}break;case me:if(!i||i.cannotBeABaseURL&&"#"!==u)return X;if(i.cannotBeABaseURL&&"#"===u){d.scheme=i.scheme;d.path=b(i.path);d.query=i.query;d.fragment="";d.cannotBeABaseURL=!0;p=Be;break}p="file"===i.scheme?Ce:we;continue;case _e:if("/"!==u||"/"!==a[v+1]){p=we;continue}p=Ee;v++;break;case be:if("/"===u){p=Fe;break}p=Le;continue;case we: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=Me}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=Le;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=Be}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=Le;continue}p=Fe}else p=Ee;break;case De:p=Ee;if("/"!==u||"/"!==R(y,v+1))continue;v++;break;case Ee:if("/"!==u&&"\\"!==u){p=Fe;continue}break;case Fe:if("@"===u){m&&(y="%40"+y);m=!0;c=_(y);for(var E=0;E<c.length;E++){var x=c[E];if(":"!==x||P){var S=percentEncode(x,pe);P?d.password+=S:d.username+=S}else P=!0}y=""}else if(u===o||"/"===u||"?"===u||"#"===u||"\\"===u&&d.isSpecial()){if(m&&""===y)return"Invalid authority";v-=_(y).length+1;y="";p=xe}else y+=u;break;case xe:case Se:if(r&&"file"===d.scheme){p=Ie;continue}if(":"!==u||w){if(u===o||"/"===u||"?"===u||"#"===u||"\\"===u&&d.isSpecial()){if(d.isSpecial()&&""===y)return Z;if(r&&""===y&&(d.includesCredentials()||null!==d.port))return;if(l=d.parseHost(y))return l;y="";p=Te;if(r)return;continue}"["===u?w=!0:"]"===u&&(w=!1);y+=u}else{if(""===y)return Z;if(l=d.parseHost(y))return l;y="";p=Ae;if(r===Se)return}break;case Ae:if(!j(te,u)){if(u===o||"/"===u||"?"===u||"#"===u||"\\"===u&&d.isSpecial()||r){if(""!==y){var A=M(y,10);if(A>65535)return Q;d.port=d.isSpecial()&&A===ve[d.scheme]?null:A;y=""}if(r)return;p=Te;continue}return Q}y+=u;break;case Ce:d.scheme="file";if("/"===u||"\\"===u)p=ke;else{if(!i||"file"!==i.scheme){p=Le;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=Me;break;case"#":d.host=i.host;d.path=b(i.path);d.query=i.query;d.fragment="";p=Be;break;default:if(!startsWithWindowsDriveLetter(N(b(a,v),""))){d.host=i.host;d.path=b(i.path);d.shortenPath()}p=Le;continue}}break;case ke:if("/"===u||"\\"===u){p=Ie;break}i&&"file"===i.scheme&&!startsWithWindowsDriveLetter(N(b(a,v),""))&&(isWindowsDriveLetter(i.path[0],!0)?z(d.path,i.path[0]):d.host=i.host);p=Le;continue;case Ie:if(u===o||"/"===u||"\\"===u||"?"===u||"#"===u){if(!r&&isWindowsDriveLetter(y))p=Le;else if(""===y){d.host="";if(r)return;p=Te}else{if(l=d.parseHost(y))return l;"localhost"===d.host&&(d.host="");if(r)return;y="";p=Te}continue}y+=u;break;case Te:if(d.isSpecial()){p=Le;if("/"!==u&&"\\"!==u)continue}else if(r||"?"!==u)if(r||"#"!==u){if(u!==o){p=Le;if("/"!==u)continue}}else{d.fragment="";p=Be}else{d.query="";p=Me}break;case Le:if(u===o||"/"===u||"\\"===u&&d.isSpecial()||!r&&("?"===u||"#"===u)){if(".."===(h=Y(h=y))||"%2e."===h||".%2e"===h||"%2e%2e"===h){d.shortenPath();"/"===u||"\\"===u&&d.isSpecial()||z(d.path,"")}else if(isSingleDot(y))"/"===u||"\\"===u&&d.isSpecial()||z(d.path,"");else{if("file"===d.scheme&&!d.path.length&&isWindowsDriveLetter(y)){d.host&&(d.host="");y=R(y,0)+":"}z(d.path,y)}y="";if("file"===d.scheme&&(u===o||"?"===u||"#"===u))for(;d.path.length>1&&""===d.path[0];)U(d.path);if("?"===u){d.query="";p=Me}else if("#"===u){d.fragment="";p=Be}}else y+=percentEncode(u,de);break;case Oe:if("?"===u){d.query="";p=Me}else if("#"===u){d.fragment="";p=Be}else u!==o&&(d.path[0]+=percentEncode(u,he));break;case Me:if(r||"#"!==u)u!==o&&("'"===u&&d.isSpecial()?d.query+="%27":d.query+="#"===u?"%23":percentEncode(u,he));else{d.fragment="";p=Be}break;case Be:u!==o&&(d.fragment+=percentEncode(u,fe))}v++}},parseHost:function(t){var r,i,o;if("["===R(t,0)){if("]"!==R(t,t.length-1))return Z;r=function(t){var r,i,o,a,u,c,l,h=[0,0,0,0,0,0,0,0],d=0,p=null,v=0,chr=function(){return R(t,v)};if(":"===chr()){if(":"!==R(t,1))return;v+=2;p=++d}for(;chr();){if(8===d)return;if(":"!==chr()){r=i=0;for(;i<4&&j(oe,chr());){r=16*r+M(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(te,chr()))return;for(;j(te,chr());){u=M(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){c=d-p;d=7;for(;0!==d&&c>0;){l=h[d];h[d--]=h[p+c-1];h[p+--c]=l}}else if(8!==d)return;return h}($(t,1,-1));if(!r)return Z;this.host=r}else if(this.isSpecial()){t=P(t);if(j(ae,t))return Z;r=function(t){var r,i,o,a,u,c,l,h=K(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"===R(a,0)){u=j(re,a)?16:8;a=$(a,8===u?1:2)}if(""===a)c=0;else{if(!j(10===u?ie:8===u?ne:oe,a))return t;c=M(a,u)}z(i,c)}for(o=0;o<r;o++){c=i[o];if(o===r-1){if(c>=G(256,5-r))return null}else if(c>255)return null}l=W(i);for(o=0;o<i.length;o++)l+=i[o]*G(256,3-o);return l}(t);if(null===r)return Z;this.host=r}else{if(j(se,t))return Z;r="";i=_(t);for(o=0;o<i.length;o++)r+=percentEncode(i[o],he);this.host=r}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return g(ve,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,c=t.path,l=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?c[0]:c.length?"/"+N(c,"/"):"";null!==l&&(d+="?"+l);null!==h&&(d+="#"+h);return d},setHref:function(t){var r=this.parse(t);if(r)throw new O(r);this.searchParams.update()},getOrigin:function(){var t=this.scheme,r=this.port;if("blob"===t)try{return new Ge(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(D(t)+":",ye)},getUsername:function(){return this.username},setUsername:function(t){var r=_(D(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var i=0;i<r.length;i++)this.username+=percentEncode(r[i],pe)}},getPassword:function(){return this.password},setPassword:function(t){var r=_(D(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var i=0;i<r.length;i++)this.password+=percentEncode(r[i],pe)}},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,xe)},getHostname:function(){var t=this.host;return null===t?"":serializeHost(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Se)},getPort:function(){var t=this.port;return null===t?"":D(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""===(t=D(t))?this.port=null:this.parse(t,Ae))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+N(t,"/"):""},setPathname:function(t){if(!this.cannotBeABaseURL){this.path=[];this.parse(t,Te)}},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){if(""===(t=D(t)))this.query=null;else{"?"===R(t,0)&&(t=$(t,1));this.query="";this.parse(t,Me)}this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){if(""!==(t=D(t))){"#"===R(t,0)&&(t=$(t,1));this.fragment="";this.parse(t,Be)}else this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ge=function URL(t){var r=y(this,Re),i=x(arguments.length,1)>1?arguments[1]:void 0,o=C(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()}},Re=Ge.prototype,accessorDescriptor=function(t,r){return{get:function(){return k(this)[t]()},set:r&&function(t){return k(this)[r](t)},configurable:!0,enumerable:!0}};if(u){v(Re,"href",accessorDescriptor("serialize","setHref"));v(Re,"origin",accessorDescriptor("getOrigin"));v(Re,"protocol",accessorDescriptor("getProtocol","setProtocol"));v(Re,"username",accessorDescriptor("getUsername","setUsername"));v(Re,"password",accessorDescriptor("getPassword","setPassword"));v(Re,"host",accessorDescriptor("getHost","setHost"));v(Re,"hostname",accessorDescriptor("getHostname","setHostname"));v(Re,"port",accessorDescriptor("getPort","setPort"));v(Re,"pathname",accessorDescriptor("getPathname","setPathname"));v(Re,"search",accessorDescriptor("getSearch","setSearch"));v(Re,"searchParams",accessorDescriptor("getSearchParams"));v(Re,"hash",accessorDescriptor("getHash","setHash"))}p(Re,"toJSON",(function toJSON(){return k(this).serialize()}),{enumerable:!0});p(Re,"toString",(function toString(){return k(this).serialize()}),{enumerable:!0});if(L){var je=L.createObjectURL,Ne=L.revokeObjectURL;je&&p(Ge,"createObjectURL",h(je,L));Ne&&p(Ge,"revokeObjectURL",h(Ne,L))}E(Ge,"URL");a({global:!0,constructor:!0,forced:!c,sham:!u},{URL:Ge})},7529:(t,r,i)=>{i(9258)},8759:(t,r,i)=>{i.d(r,{FluentBundle:()=>m,FluentResource:()=>H});i(6180),i(5548),i(895),i(1747),i(2374),i(6421),i(4226),i(3352),i(924),i(5598),i(8806),i(9366),i(6678),i(5897),i(4668),i(1585),i(7121),i(2993),i(7262),i(6770),i(1378),i(7335),i(2926),i(7874),i(171),i(9593),i(7942),i(5776),i(13),i(9175),i(6128);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 _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 _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)||!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=function(){function FluentType(t){_classCallCheck(this,FluentType);this.value=t}_createClass(FluentType,[{key:"valueOf",value:function valueOf(){return this.value}}]);return FluentType}(),a=function(t){_inherits(FluentNone,t);var r=_createSuper(FluentNone);function FluentNone(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"???";_classCallCheck(this,FluentNone);return r.call(this,t)}_createClass(FluentNone,[{key:"toString",value:function toString(t){return"{".concat(this.value,"}")}}]);return FluentNone}(o),u=function(t){_inherits(FluentNumber,t);var r=_createSuper(FluentNumber);function FluentNumber(t){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,FluentNumber);(i=r.call(this,t)).opts=o;return i}_createClass(FluentNumber,[{key:"toString",value:function toString(t){try{return t.memoizeIntlObject(Intl.NumberFormat,this.opts).format(this.value)}catch(r){t.reportError(r);return this.value.toString(10)}}}]);return FluentNumber}(o),c=function(t){_inherits(FluentDateTime,t);var r=_createSuper(FluentDateTime);function FluentDateTime(t){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,FluentDateTime);(i=r.call(this,t)).opts=o;return i}_createClass(FluentDateTime,[{key:"toString",value:function toString(t){try{return t.memoizeIntlObject(Intl.DateTimeFormat,this.opts).format(this.value)}catch(r){t.reportError(r);return new Date(this.value).toISOString()}}}]);return FluentDateTime}(o);function resolver_typeof(t){return resolver_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},resolver_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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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}var l=100,h="⁨",d="⁩";function match(t,r,i){if(i===r)return!0;if(i instanceof u&&r instanceof u&&i.value===r.value)return!0;if(r instanceof u&&"string"==typeof i){if(i===t.memoizeIntlObject(Intl.PluralRules,r.opts).select(r.value))return!0}return!1}function getDefault(t,r,i){if(r[i])return resolvePattern(t,r[i].value);t.reportError(new RangeError("No default"));return new a}function getArguments(t,r){var i,o=[],a=Object.create(null),u=_createForOfIteratorHelper(r);try{for(u.s();!(i=u.n()).done;){var c=i.value;"narg"===c.type?a[c.name]=resolveExpression(t,c.value):o.push(resolveExpression(t,c))}}catch(t){u.e(t)}finally{u.f()}return{positional:o,named:a}}function resolveExpression(t,r){switch(r.type){case"str":return r.value;case"num":return new u(r.value,{minimumFractionDigits:r.precision});case"var":return function resolveVariableReference(t,r){var i,l=r.name;if(t.params){if(!Object.prototype.hasOwnProperty.call(t.params,l))return new a("$".concat(l));i=t.params[l]}else{if(!t.args||!Object.prototype.hasOwnProperty.call(t.args,l)){t.reportError(new ReferenceError("Unknown variable: $".concat(l)));return new a("$".concat(l))}i=t.args[l]}if(i instanceof o)return i;switch(resolver_typeof(i)){case"string":return i;case"number":return new u(i);case"object":if(i instanceof Date)return new c(i.getTime());default:t.reportError(new TypeError("Variable type not supported: $".concat(l,", ").concat(resolver_typeof(i))));return new a("$".concat(l))}}(t,r);case"mesg":return function resolveMessageReference(t,r){var i=r.name,o=r.attr,u=t.bundle._messages.get(i);if(!u){t.reportError(new ReferenceError("Unknown message: ".concat(i)));return new a(i)}if(o){var c=u.attributes[o];if(c)return resolvePattern(t,c);t.reportError(new ReferenceError("Unknown attribute: ".concat(o)));return new a("".concat(i,".").concat(o))}if(u.value)return resolvePattern(t,u.value);t.reportError(new ReferenceError("No value: ".concat(i)));return new a(i)}(t,r);case"term":return function resolveTermReference(t,r){var i=r.name,o=r.attr,u=r.args,c="-".concat(i),l=t.bundle._terms.get(c);if(!l){t.reportError(new ReferenceError("Unknown term: ".concat(c)));return new a(c)}if(o){var h=l.attributes[o];if(h){t.params=getArguments(t,u).named;var d=resolvePattern(t,h);t.params=null;return d}t.reportError(new ReferenceError("Unknown attribute: ".concat(o)));return new a("".concat(c,".").concat(o))}t.params=getArguments(t,u).named;var p=resolvePattern(t,l.value);t.params=null;return p}(t,r);case"func":return function resolveFunctionReference(t,r){var i=r.name,o=r.args,u=t.bundle._functions[i];if(!u){t.reportError(new ReferenceError("Unknown function: ".concat(i,"()")));return new a("".concat(i,"()"))}if("function"!=typeof u){t.reportError(new TypeError("Function ".concat(i,"() is not callable")));return new a("".concat(i,"()"))}try{var c=getArguments(t,o);return u(c.positional,c.named)}catch(r){t.reportError(r);return new a("".concat(i,"()"))}}(t,r);case"select":return function resolveSelectExpression(t,r){var i=r.selector,o=r.variants,u=r.star,c=resolveExpression(t,i);if(c instanceof a)return getDefault(t,o,u);var l,h=_createForOfIteratorHelper(o);try{for(h.s();!(l=h.n()).done;){var d=l.value;if(match(t,c,resolveExpression(t,d.key)))return resolvePattern(t,d.value)}}catch(t){h.e(t)}finally{h.f()}return getDefault(t,o,u)}(t,r);default:return new a}}function resolveComplexPattern(t,r){if(t.dirty.has(r)){t.reportError(new RangeError("Cyclic reference"));return new a}t.dirty.add(r);var i,o=[],u=t.bundle._useIsolating&&r.length>1,c=_createForOfIteratorHelper(r);try{for(c.s();!(i=c.n()).done;){var p=i.value;if("string"!=typeof p){t.placeables++;if(t.placeables>l){t.dirty.delete(r);throw new RangeError("Too many placeables expanded: ".concat(t.placeables,", ")+"max allowed is ".concat(l))}u&&o.push(h);o.push(resolveExpression(t,p).toString(t));u&&o.push(d)}else o.push(t.bundle._transform(p))}}catch(t){c.e(t)}finally{c.f()}t.dirty.delete(r);return o.join("")}function resolvePattern(t,r){return"string"==typeof r?t.bundle._transform(r):resolveComplexPattern(t,r)}i(394),i(7254);function scope_typeof(t){return scope_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},scope_typeof(t)}function scope_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,scope_toPropertyKey(o.key),o)}}function scope_toPropertyKey(t){var r=function scope_toPrimitive(t,r){if("object"!=scope_typeof(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!=scope_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==scope_typeof(r)?r:String(r)}var p=function(){function Scope(t,r,i){!function scope_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Scope);this.dirty=new WeakSet;this.params=null;this.placeables=0;this.bundle=t;this.errors=r;this.args=i}!function scope_createClass(t,r,i){r&&scope_defineProperties(t.prototype,r);i&&scope_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(Scope,[{key:"reportError",value:function reportError(t){if(!(this.errors&&t instanceof Error))throw t;this.errors.push(t)}},{key:"memoizeIntlObject",value:function memoizeIntlObject(t,r){var i=this.bundle._intls.get(t);if(!i){i={};this.bundle._intls.set(t,i)}var o=JSON.stringify(r);i[o]||(i[o]=new t(this.bundle.locales,r));return i[o]}}]);return Scope}();i(2586),i(2796),i(2613);function builtins_typeof(t){return builtins_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},builtins_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 _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=function builtins_toPropertyKey(t){var r=function builtins_toPrimitive(t,r){if("object"!=builtins_typeof(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!=builtins_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==builtins_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 _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,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}(t,r)||function builtins_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return builtins_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 builtins_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 builtins_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 values(t,r){for(var i=Object.create(null),o=0,a=Object.entries(t);o<a.length;o++){var u=_slicedToArray(a[o],2),c=u[0],l=u[1];r.includes(c)&&(i[c]=l.valueOf())}return i}var v=["unitDisplay","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function NUMBER(t,r){var i=t[0];if(i instanceof a)return new a("NUMBER(".concat(i.valueOf(),")"));if(i instanceof u)return new u(i.valueOf(),_objectSpread(_objectSpread({},i.opts),values(r,v)));if(i instanceof c)return new u(i.valueOf(),_objectSpread({},values(r,v)));throw new TypeError("Invalid argument to NUMBER")}var y=["dateStyle","timeStyle","fractionalSecondDigits","dayPeriod","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function DATETIME(t,r){var i=t[0];if(i instanceof a)return new a("DATETIME(".concat(i.valueOf(),")"));if(i instanceof c)return new c(i.valueOf(),_objectSpread(_objectSpread({},i.opts),values(r,y)));if(i instanceof u)return new c(i.valueOf(),_objectSpread({},values(r,y)));throw new TypeError("Invalid argument to DATETIME")}var g=new Map;function bundle_typeof(t){return bundle_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},bundle_typeof(t)}function bundle_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 bundle_defineProperty(t,r,i){(r=bundle_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function bundle_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,bundle_toPropertyKey(o.key),o)}}function bundle_toPropertyKey(t){var r=function bundle_toPrimitive(t,r){if("object"!=bundle_typeof(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!=bundle_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==bundle_typeof(r)?r:String(r)}var m=function(){function FluentBundle(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.functions,o=r.useIsolating,a=void 0===o||o,u=r.transform,c=void 0===u?function(t){return t}:u;!function bundle_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,FluentBundle);this._terms=new Map;this._messages=new Map;this.locales=Array.isArray(t)?t:[t];this._functions=function bundle_objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?bundle_ownKeys(Object(i),!0).forEach((function(r){bundle_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):bundle_ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}({NUMBER:NUMBER,DATETIME:DATETIME},i);this._useIsolating=a;this._transform=c;this._intls=function getMemoizerForLocale(t){var r=Array.isArray(t)?t.join(" "):t,i=g.get(r);if(void 0===i){i=new Map;g.set(r,i)}return i}(t)}!function bundle_createClass(t,r,i){r&&bundle_defineProperties(t.prototype,r);i&&bundle_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(FluentBundle,[{key:"hasMessage",value:function hasMessage(t){return this._messages.has(t)}},{key:"getMessage",value:function getMessage(t){return this._messages.get(t)}},{key:"addResource",value:function addResource(t){for(var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowOverrides,i=void 0!==r&&r,o=[],a=0;a<t.body.length;a++){var u=t.body[a];if(u.id.startsWith("-")){if(!1===i&&this._terms.has(u.id)){o.push(new Error('Attempt to override an existing term: "'.concat(u.id,'"')));continue}this._terms.set(u.id,u)}else{if(!1===i&&this._messages.has(u.id)){o.push(new Error('Attempt to override an existing message: "'.concat(u.id,'"')));continue}this._messages.set(u.id,u)}}return o}},{key:"formatPattern",value:function formatPattern(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("string"==typeof t)return this._transform(t);var o=new p(this,i,r);try{return resolveComplexPattern(o,t).toString(o)}catch(t){if(o.errors&&t instanceof Error){o.errors.push(t);return(new a).toString(o)}throw t}}}]);return FluentBundle}();i(3032),i(5619),i(9786),i(2707),i(4711);function resource_typeof(t){return resource_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},resource_typeof(t)}function resource_slicedToArray(t,r){return function resource_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function resource_iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}(t,r)||resource_unsupportedIterableToArray(t,r)||function resource_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 resource_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 resource_defineProperty(t,r,i){(r=resource_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function resource_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return resource_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)?resource_arrayLikeToArray(t,r):void 0}}function resource_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 resource_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,resource_toPropertyKey(o.key),o)}}function resource_createClass(t,r,i){r&&resource_defineProperties(t.prototype,r);i&&resource_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function resource_toPropertyKey(t){var r=function resource_toPrimitive(t,r){if("object"!=resource_typeof(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!=resource_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==resource_typeof(r)?r:String(r)}function resource_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var _=/^(-?[a-zA-Z][\w-]*) *= */gm,b=new RegExp("\\.([a-zA-Z][\\w-]*) *= *","y"),w=new RegExp("\\*?\\[","y"),P=new RegExp("(-?[0-9]+(?:\\.([0-9]+))?)","y"),D=new RegExp("([a-zA-Z][\\w-]*)","y"),E=new RegExp("([$-])?([a-zA-Z][\\w-]*)(?:\\.([a-zA-Z][\\w-]*))?","y"),x=/^[A-Z][A-Z0-9_-]*$/,S=new RegExp("([^{}\\n\\r]+)","y"),A=new RegExp('([^\\\\"\\n\\r]*)',"y"),C=new RegExp('\\\\([\\\\"])',"y"),k=new RegExp("\\\\u([a-fA-F0-9]{4})|\\\\U([a-fA-F0-9]{6})","y"),I=/^\n+/,T=/ +$/,L=/ *\r?\n/g,O=/( *)$/,M=new RegExp("{\\s*","y"),B=new RegExp("\\s*}","y"),G=new RegExp("\\[\\s*","y"),R=new RegExp("\\s*] *","y"),j=new RegExp("\\s*\\(\\s*","y"),N=new RegExp("\\s*->\\s*","y"),V=new RegExp("\\s*:\\s*","y"),W=new RegExp("\\s*,?\\s*","y"),z=new RegExp("\\s+","y"),H=resource_createClass((function FluentResource(t){resource_classCallCheck(this,FluentResource);this.body=[];_.lastIndex=0;for(var r=0;;){var i=_.exec(t);if(null===i)break;r=_.lastIndex;try{this.body.push(parseMessage(i[1]))}catch(t){if(t instanceof SyntaxError)continue;throw t}}function test(i){i.lastIndex=r;return i.test(t)}function consumeChar(i,o){if(t[r]===i){r++;return!0}if(o)throw new o("Expected ".concat(i));return!1}function consumeToken(t,i){if(test(t)){r=t.lastIndex;return!0}if(i)throw new i("Expected ".concat(t.toString()));return!1}function match(i){i.lastIndex=r;var o=i.exec(t);if(null===o)throw new SyntaxError("Expected ".concat(i.toString()));r=i.lastIndex;return o}function match1(t){return match(t)[1]}function parseMessage(t){var r=parsePattern(),i=function parseAttributes(){var t=Object.create(null);for(;test(b);){var r=match1(b),i=parsePattern();if(null===i)throw new SyntaxError("Expected attribute value");t[r]=i}return t}();if(null===r&&0===Object.keys(i).length)throw new SyntaxError("Expected message value or attributes");return{id:t,value:r,attributes:i}}function parsePattern(){var i;test(S)&&(i=match1(S));if("{"===t[r]||"}"===t[r])return parsePatternElements(i?[i]:[],1/0);var o=parseIndent();if(o){if(i)return parsePatternElements([i,o],o.length);o.value=trim(o.value,I);return parsePatternElements([o],o.length)}return i?trim(i,T):null}function parsePatternElements(){for(var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;;)if(test(S))i.push(match1(S));else if("{"!==t[r]){if("}"===t[r])throw new SyntaxError("Unbalanced closing brace");var a=parseIndent();if(!a)break;i.push(a);o=Math.min(o,a.length)}else i.push(parsePlaceable());var u=i.length-1,c=i[u];"string"==typeof c&&(i[u]=trim(c,T));var l,h=[],d=function resource_createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=resource_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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)throw u}}}}(i);try{for(d.s();!(l=d.n()).done;){var p=l.value;p instanceof U&&(p=p.value.slice(0,p.value.length-o));p&&h.push(p)}}catch(t){d.e(t)}finally{d.f()}return h}function parsePlaceable(){consumeToken(M,SyntaxError);var t=parseInlineExpression();if(consumeToken(B))return t;if(consumeToken(N)){var r=function parseVariants(){var t,r=[],i=0;for(;test(w);){consumeChar("*")&&(t=i);var o=parseVariantKey(),a=parsePattern();if(null===a)throw new SyntaxError("Expected variant value");r[i++]={key:o,value:a}}if(0===i)return null;if(void 0===t)throw new SyntaxError("Expected default variant");return{variants:r,star:t}}();consumeToken(B,SyntaxError);return function resource_objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?resource_ownKeys(Object(i),!0).forEach((function(r){resource_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):resource_ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}({type:"select",selector:t},r)}throw new SyntaxError("Unclosed placeable")}function parseInlineExpression(){if("{"===t[r])return parsePlaceable();if(test(E)){var i=resource_slicedToArray(match(E),4),o=i[1],a=i[2],u=i[3],c=void 0===u?null:u;if("$"===o)return{type:"var",name:a};if(consumeToken(j)){var l=function parseArguments(){var i=[];for(;;){switch(t[r]){case")":r++;return i;case void 0:throw new SyntaxError("Unclosed argument list")}i.push(parseArgument());consumeToken(W)}}();if("-"===o)return{type:"term",name:a,attr:c,args:l};if(x.test(a))return{type:"func",name:a,args:l};throw new SyntaxError("Function names must be all upper-case")}return"-"===o?{type:"term",name:a,attr:c,args:[]}:{type:"mesg",name:a,attr:c}}return parseLiteral()}function parseArgument(){var t=parseInlineExpression();return"mesg"!==t.type?t:consumeToken(V)?{type:"narg",name:t.name,value:parseLiteral()}:t}function parseVariantKey(){consumeToken(G,SyntaxError);var t;t=test(P)?parseNumberLiteral():{type:"str",value:match1(D)};consumeToken(R,SyntaxError);return t}function parseLiteral(){if(test(P))return parseNumberLiteral();if('"'===t[r])return function parseStringLiteral(){consumeChar('"',SyntaxError);var i="";for(;;){i+=match1(A);if("\\"!==t[r]){if(consumeChar('"'))return{type:"str",value:i};throw new SyntaxError("Unclosed string literal")}i+=parseEscapeSequence()}}();throw new SyntaxError("Invalid expression")}function parseNumberLiteral(){var t=resource_slicedToArray(match(P),3),r=t[1],i=t[2],o=(void 0===i?"":i).length;return{type:"num",value:parseFloat(r),precision:o}}function parseEscapeSequence(){if(test(C))return match1(C);if(test(k)){var t=resource_slicedToArray(match(k),3),r=t[1],i=t[2],o=parseInt(r||i,16);return o<=55295||57344<=o?String.fromCodePoint(o):"�"}throw new SyntaxError("Unknown escape sequence")}function parseIndent(){var i=r;consumeToken(z);switch(t[r]){case".":case"[":case"*":case"}":case void 0:return!1;case"{":return makeIndent(t.slice(i,r))}return" "===t[r-1]&&makeIndent(t.slice(i,r))}function trim(t,r){return t.replace(r,"")}function makeIndent(t){var r=t.replace(L,"\n"),i=O.exec(t)[1].length;return new U(r,i)}})),U=resource_createClass((function Indent(t,r){resource_classCallCheck(this,Indent);this.value=t;this.length=r}))},8275:(t,r,i)=>{i.d(r,{DOMLocalization:()=>y});i(6180),i(895),i(2048),i(1747),i(5561),i(8587),i(3247),i(3302),i(9490),i(5438),i(7914),i(2374),i(7254),i(4668),i(2808),i(3352),i(9593),i(5666),i(5136),i(7944),i(4226),i(13),i(9175),i(6128),i(9718),i(7262),i(5598),i(8806),i(9366),i(6678),i(5897),i(171),i(924),i(7942),i(5776),i(2926),i(1133),i(2173),i(2630),i(1024),i(7121),i(6770),i(1378),i(8341),i(2796),i(2613);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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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}var o=/<|&#?\w+;/,a={"http://www.w3.org/1999/xhtml":["em","strong","small","s","cite","q","dfn","abbr","data","time","code","var","samp","kbd","sub","sup","i","b","u","mark","bdi","bdo","span","br","wbr"]},u={"http://www.w3.org/1999/xhtml":{global:["title","aria-label","aria-valuetext"],a:["download"],area:["download","alt"],input:["alt","placeholder"],menuitem:["label"],menu:["label"],optgroup:["label"],option:["label"],track:["label"],img:["alt"],textarea:["placeholder"],th:["abbr"]},"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul":{global:["accesskey","aria-label","aria-valuetext","label","title","tooltiptext"],description:["value"],key:["key","keycode"],label:["value"],textbox:["placeholder","value"]}};function translateElement(t,r){var i=r.value;if("string"==typeof i)if("title"===t.localName&&"http://www.w3.org/1999/xhtml"===t.namespaceURI)t.textContent=i;else if(o.test(i)){var a=t.ownerDocument.createElementNS("http://www.w3.org/1999/xhtml","template");a.innerHTML=i;!function overlayChildNodes(t,r){var i,o=_createForOfIteratorHelper(t.childNodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(a.nodeType!==a.TEXT_NODE)if(a.hasAttribute("data-l10n-name")){var u=getNodeForNamedElement(r,a);t.replaceChild(u,a)}else if(isElementAllowed(a)){var c=createSanitizedElement(a);t.replaceChild(c,a)}else{console.warn('An element of forbidden type "'.concat(a.localName,'" was found in ')+"the translation. Only safe text-level elements and elements with data-l10n-name are allowed.");t.replaceChild(createTextNodeFromTextContent(a),a)}}}catch(t){o.e(t)}finally{o.f()}r.textContent="";r.appendChild(t)}(a.content,t)}else t.textContent=i;overlayAttributes(r,t)}function hasAttribute(t,r){if(!t)return!1;var i,o=_createForOfIteratorHelper(t);try{for(o.s();!(i=o.n()).done;){if(i.value.name===r)return!0}}catch(t){o.e(t)}finally{o.f()}return!1}function overlayAttributes(t,r){for(var i=r.hasAttribute("data-l10n-attrs")?r.getAttribute("data-l10n-attrs").split(",").map((function(t){return t.trim()})):null,o=0,a=Array.from(r.attributes);o<a.length;o++){var u=a[o];isAttrNameLocalizable(u.name,r,i)&&!hasAttribute(t.attributes,u.name)&&r.removeAttribute(u.name)}if(t.attributes)for(var c=0,l=Array.from(t.attributes);c<l.length;c++){var h=l[c];isAttrNameLocalizable(h.name,r,i)&&r.getAttribute(h.name)!==h.value&&r.setAttribute(h.name,h.value)}}function getNodeForNamedElement(t,r){var i=r.getAttribute("data-l10n-name"),o=t.querySelector('[data-l10n-name="'.concat(i,'"]'));if(!o){console.warn('An element named "'.concat(i,"\" wasn't found in the source."));return createTextNodeFromTextContent(r)}if(o.localName!==r.localName){console.warn('An element named "'.concat(i,'" was found in the translation ')+"but its type ".concat(r.localName," didn't match the ")+"element found in the source (".concat(o.localName,")."));return createTextNodeFromTextContent(r)}t.removeChild(o);return shallowPopulateUsing(r,o.cloneNode(!1))}function createSanitizedElement(t){var r=t.ownerDocument.createElement(t.localName);return shallowPopulateUsing(t,r)}function createTextNodeFromTextContent(t){return t.ownerDocument.createTextNode(t.textContent)}function isElementAllowed(t){var r=a[t.namespaceURI];return r&&r.includes(t.localName)}function isAttrNameLocalizable(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(i&&i.includes(t))return!0;var o=u[r.namespaceURI];if(!o)return!1;var a=t.toLowerCase(),c=r.localName;if(o.global.includes(a))return!0;if(!o[c])return!1;if(o[c].includes(a))return!0;if("http://www.w3.org/1999/xhtml"===r.namespaceURI&&"input"===c&&"value"===a){var l=r.type.toLowerCase();if("submit"===l||"button"===l||"reset"===l)return!0}return!1}function shallowPopulateUsing(t,r){r.textContent=t.textContent;overlayAttributes(t,r);return r}i(1585),i(2993),i(7874),i(8649),i(5548);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)||!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 _createSuper(t){var r=_isNativeReflectConstruct();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 _wrapNativeSuper(t){var r="function"==typeof Map?new Map:void 0;_wrapNativeSuper=function _wrapNativeSuper(t){if(null===t||!function _isNativeFunction(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(r){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,Wrapper)}function Wrapper(){return _construct(t,arguments,_getPrototypeOf(this).constructor)}Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}});return _setPrototypeOf(Wrapper,t)};return _wrapNativeSuper(t)}function _construct(t,r,i){_construct=_isNativeReflectConstruct()?Reflect.construct.bind():function _construct(t,r,i){var o=[null];o.push.apply(o,r);var a=new(Function.bind.apply(t,o));i&&_setPrototypeOf(a,i.prototype);return a};return _construct.apply(null,arguments)}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}}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}var c=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)}(CachedIterable,t);var r=_createSuper(CachedIterable);function CachedIterable(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,CachedIterable);return r.apply(this,arguments)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(CachedIterable,null,[{key:"from",value:function from(t){return t instanceof this?t:new this(t)}}]);return CachedIterable}(_wrapNativeSuper(Array));function cached_sync_iterable_typeof(t){return cached_sync_iterable_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},cached_sync_iterable_typeof(t)}function cached_sync_iterable_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,cached_sync_iterable_toPropertyKey(o.key),o)}}function cached_sync_iterable_toPropertyKey(t){var r=function cached_sync_iterable_toPrimitive(t,r){if("object"!=cached_sync_iterable_typeof(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!=cached_sync_iterable_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==cached_sync_iterable_typeof(r)?r:String(r)}function cached_sync_iterable_setPrototypeOf(t,r){cached_sync_iterable_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return cached_sync_iterable_setPrototypeOf(t,r)}function cached_sync_iterable_createSuper(t){var r=function cached_sync_iterable_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=cached_sync_iterable_getPrototypeOf(t);if(r){var a=cached_sync_iterable_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return function cached_sync_iterable_possibleConstructorReturn(t,r){if(r&&("object"===cached_sync_iterable_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function cached_sync_iterable_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 cached_sync_iterable_getPrototypeOf(t){cached_sync_iterable_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return cached_sync_iterable_getPrototypeOf(t)}Symbol.iterator;function cached_async_iterable_typeof(t){return cached_async_iterable_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},cached_async_iterable_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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==cached_async_iterable_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(cached_async_iterable_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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 cached_async_iterable_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,cached_async_iterable_toPropertyKey(o.key),o)}}function cached_async_iterable_toPropertyKey(t){var r=function cached_async_iterable_toPrimitive(t,r){if("object"!=cached_async_iterable_typeof(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!=cached_async_iterable_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==cached_async_iterable_typeof(r)?r:String(r)}function cached_async_iterable_setPrototypeOf(t,r){cached_async_iterable_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return cached_async_iterable_setPrototypeOf(t,r)}function cached_async_iterable_createSuper(t){var r=function cached_async_iterable_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=cached_async_iterable_getPrototypeOf(t);if(r){var a=cached_async_iterable_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return function cached_async_iterable_possibleConstructorReturn(t,r){if(r&&("object"===cached_async_iterable_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function cached_async_iterable_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 cached_async_iterable_getPrototypeOf(t){cached_async_iterable_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return cached_async_iterable_getPrototypeOf(t)}var l=function(t,r){!function cached_async_iterable_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&&cached_async_iterable_setPrototypeOf(t,r)}(CachedAsyncIterable,t);var i,o=cached_async_iterable_createSuper(CachedAsyncIterable);function CachedAsyncIterable(t){var r;!function cached_async_iterable_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,CachedAsyncIterable);r=o.call(this);if(Symbol.asyncIterator in Object(t))r.iterator=t[Symbol.asyncIterator]();else{if(!(Symbol.iterator in Object(t)))throw new TypeError("Argument must implement the iteration protocol.");r.iterator=t[Symbol.iterator]()}return r}!function cached_async_iterable_createClass(t,r,i){r&&cached_async_iterable_defineProperties(t.prototype,r);i&&cached_async_iterable_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(CachedAsyncIterable,[{key:r,value:function value(){var t=this,r=0;return{next:function next(){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee(){return _regeneratorRuntime().wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:t.length<=r&&t.push(t.iterator.next());return i.abrupt("return",t[r++]);case 2:case"end":return i.stop()}}),_callee)})))()}}}},{key:"touchNext",value:(i=_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]:1;r=0;case 2:if(!(r++<t)){a.next=14;break}i=this[this.length-1];a.t0=i;if(!a.t0){a.next=9;break}a.next=8;return i;case 8:a.t0=a.sent.done;case 9:if(!a.t0){a.next=11;break}return a.abrupt("break",14);case 11:this.push(this.iterator.next());a.next=2;break;case 14:return a.abrupt("return",this[this.length-1]);case 15:case"end":return a.stop()}}),_callee2,this)}))),function touchNext(){return i.apply(this,arguments)})}]);return CachedAsyncIterable}(c,Symbol.asyncIterator);function localization_typeof(t){return localization_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},localization_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,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}(t,r)||localization_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 localization_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */localization_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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==localization_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(localization_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function localization_asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.done?r(h):Promise.resolve(h).then(o,a)}function localization_asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){localization_asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){localization_asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return localization_arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||localization_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 localization_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return localization_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)?localization_arrayLikeToArray(t,r):void 0}}function localization_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 localization_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,localization_toPropertyKey(o.key),o)}}function localization_toPropertyKey(t){var r=function localization_toPrimitive(t,r){if("object"!=localization_typeof(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!=localization_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==localization_typeof(r)?r:String(r)}function _asyncIterator(t){var r,i,o,a=2;for("undefined"!=typeof Symbol&&(i=Symbol.asyncIterator,o=Symbol.iterator);a--;){if(i&&null!=(r=t[i]))return r.call(t);if(o&&null!=(r=t[o]))return new AsyncFromSyncIterator(r.call(t));i="@@asyncIterator",o="@@iterator"}throw new TypeError("Object is not async iterable")}function AsyncFromSyncIterator(t){function AsyncFromSyncIteratorContinuation(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var r=t.done;return Promise.resolve(t.value).then((function(t){return{value:t,done:r}}))}return AsyncFromSyncIterator=function AsyncFromSyncIterator(t){this.s=t,this.n=t.next},AsyncFromSyncIterator.prototype={s:null,n:null,next:function next(){return AsyncFromSyncIteratorContinuation(this.n.apply(this.s,arguments))},return:function _return(t){var r=this.s.return;return void 0===r?Promise.resolve({value:t,done:!0}):AsyncFromSyncIteratorContinuation(r.apply(this.s,arguments))},throw:function _throw(t){var r=this.s.return;return void 0===r?Promise.reject(t):AsyncFromSyncIteratorContinuation(r.apply(this.s,arguments))}},new AsyncFromSyncIterator(t)}var h=function(){function Localization(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;!function localization_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Localization);this.resourceIds=t;this.generateBundles=r;this.onChange(!0)}!function localization_createClass(t,r,i){r&&localization_defineProperties(t.prototype,r);i&&localization_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(Localization,[{key:"addResourceIds",value:function addResourceIds(t){var r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(r=this.resourceIds).push.apply(r,_toConsumableArray(t));this.onChange(i);return this.resourceIds.length}},{key:"removeResourceIds",value:function removeResourceIds(t){this.resourceIds=this.resourceIds.filter((function(r){return!t.includes(r)}));this.onChange();return this.resourceIds.length}},{key:"formatWithFallback",value:(r=localization_asyncToGenerator(localization_regeneratorRuntime().mark((function _callee(t,r){var i,o,a,u,c,l,h,d,p,v,y;return localization_regeneratorRuntime().wrap((function _callee$(g){for(;;)switch(g.prev=g.next){case 0:i=[];o=!1;a=!1;u=!1;g.prev=4;l=_asyncIterator(this.bundles);case 6:g.next=8;return l.next();case 8:if(!(a=!(h=g.sent).done)){g.next=18;break}d=h.value;o=!0;if(0!==(p=keysFromBundle(r,d,t,i)).size){g.next=14;break}return g.abrupt("break",18);case 14:if("undefined"!=typeof console){v=d.locales[0];y=Array.from(p).join(", ");console.warn("[fluent] Missing translations in ".concat(v,": ").concat(y))}case 15:a=!1;g.next=6;break;case 18:g.next=24;break;case 20:g.prev=20;g.t0=g.catch(4);u=!0;c=g.t0;case 24:g.prev=24;g.prev=25;if(!a||null==l.return){g.next=29;break}g.next=29;return l.return();case 29:g.prev=29;if(!u){g.next=32;break}throw c;case 32:return g.finish(29);case 33:return g.finish(24);case 34:o||"undefined"==typeof console||console.warn("[fluent] Request for keys failed because no resource bundles got generated.\n  keys: ".concat(JSON.stringify(t),".\n  resourceIds: ").concat(JSON.stringify(this.resourceIds),"."));return g.abrupt("return",i);case 36:case"end":return g.stop()}}),_callee,this,[[4,20,24,34],[25,,29,33]])}))),function formatWithFallback(t,i){return r.apply(this,arguments)})},{key:"formatMessages",value:function formatMessages(t){return this.formatWithFallback(t,messageFromBundle)}},{key:"formatValues",value:function formatValues(t){return this.formatWithFallback(t,valueFromBundle)}},{key:"formatValue",value:(t=localization_asyncToGenerator(localization_regeneratorRuntime().mark((function _callee2(t,r){var i,o,a;return localization_regeneratorRuntime().wrap((function _callee2$(u){for(;;)switch(u.prev=u.next){case 0:u.next=2;return this.formatValues([{id:t,args:r}]);case 2:i=u.sent;o=_slicedToArray(i,1);a=o[0];return u.abrupt("return",a);case 6:case"end":return u.stop()}}),_callee2,this)}))),function formatValue(r,i){return t.apply(this,arguments)})},{key:"handleEvent",value:function handleEvent(){this.onChange()}},{key:"onChange",value:function onChange(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.bundles=l.from(this.generateBundles(this.resourceIds));t&&this.bundles.touchNext(2)}}]);var t,r;return Localization}();function valueFromBundle(t,r,i,o){return i.value?t.formatPattern(i.value,o,r):null}function messageFromBundle(t,r,i,o){var a={value:null,attributes:null};i.value&&(a.value=t.formatPattern(i.value,o,r));var u=Object.keys(i.attributes);if(u.length>0){a.attributes=new Array(u.length);var c,l=function localization_createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=localization_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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)throw u}}}}(u.entries());try{for(l.s();!(c=l.n()).done;){var h=_slicedToArray(c.value,2),d=h[0],p=h[1],v=t.formatPattern(i.attributes[p],o,r);a.attributes[d]={name:p,value:v}}}catch(t){l.e(t)}finally{l.f()}}return a}function keysFromBundle(t,r,i,o){var a=[],u=new Set;i.forEach((function(i,c){var l=i.id,h=i.args;if(void 0===o[c]){var d=r.getMessage(l);if(d){a.length=0;o[c]=t(r,a,d,h);if(a.length>0&&"undefined"!=typeof console){var p=r.locales[0],v=a.join(", ");console.warn("[fluent][resolver] errors in ".concat(p,"/").concat(l,": ").concat(v,"."))}}else u.add(l)}}));return u}function dom_localization_typeof(t){return dom_localization_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},dom_localization_typeof(t)}function dom_localization_regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */dom_localization_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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==dom_localization_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(dom_localization_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function dom_localization_asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.done?r(h):Promise.resolve(h).then(o,a)}function dom_localization_createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function dom_localization_unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return dom_localization_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 dom_localization_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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)throw u}}}}function dom_localization_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 dom_localization_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,dom_localization_toPropertyKey(o.key),o)}}function dom_localization_toPropertyKey(t){var r=function dom_localization_toPrimitive(t,r){if("object"!=dom_localization_typeof(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,r||"default");if("object"!=dom_localization_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==dom_localization_typeof(r)?r:String(r)}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=dom_localization_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 dom_localization_setPrototypeOf(t,r){dom_localization_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return dom_localization_setPrototypeOf(t,r)}function dom_localization_createSuper(t){var r=function dom_localization_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=dom_localization_getPrototypeOf(t);if(r){var a=dom_localization_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return function dom_localization_possibleConstructorReturn(t,r){if(r&&("object"===dom_localization_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function dom_localization_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 dom_localization_getPrototypeOf(t){dom_localization_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return dom_localization_getPrototypeOf(t)}var d="data-l10n-id",p="data-l10n-args",v="[".concat(d,"]"),y=function(t){!function dom_localization_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&&dom_localization_setPrototypeOf(t,r)}(DOMLocalization,t);var r,i=dom_localization_createSuper(DOMLocalization);function DOMLocalization(t,r){var o;!function dom_localization_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,DOMLocalization);(o=i.call(this,t,r)).roots=new Set;o.pendingrAF=null;o.pendingElements=new Set;o.windowElement=null;o.mutationObserver=null;o.observerConfig={attributes:!0,characterData:!1,childList:!0,subtree:!0,attributeFilter:[d,p]};return o}!function dom_localization_createClass(t,r,i){r&&dom_localization_defineProperties(t.prototype,r);i&&dom_localization_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(DOMLocalization,[{key:"onChange",value:function onChange(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_get(dom_localization_getPrototypeOf(DOMLocalization.prototype),"onChange",this).call(this,t);this.roots&&this.translateRoots()}},{key:"setAttributes",value:function setAttributes(t,r,i){t.setAttribute(d,r);i?t.setAttribute(p,JSON.stringify(i)):t.removeAttribute(p);return t}},{key:"getAttributes",value:function getAttributes(t){return{id:t.getAttribute(d),args:JSON.parse(t.getAttribute(p)||null)}}},{key:"connectRoot",value:function connectRoot(t){var r,i=this,o=dom_localization_createForOfIteratorHelper(this.roots);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a===t||a.contains(t)||t.contains(a))throw new Error("Cannot add a root that overlaps with existing root.")}}catch(t){o.e(t)}finally{o.f()}if(this.windowElement){if(this.windowElement!==t.ownerDocument.defaultView)throw new Error("Cannot connect a root:\n          DOMLocalization already has a root from a different window.")}else{this.windowElement=t.ownerDocument.defaultView;this.mutationObserver=new this.windowElement.MutationObserver((function(t){return i.translateMutations(t)}))}this.roots.add(t);this.mutationObserver.observe(t,this.observerConfig)}},{key:"disconnectRoot",value:function disconnectRoot(t){this.roots.delete(t);this.pauseObserving();if(0===this.roots.size){this.mutationObserver=null;this.windowElement=null;this.pendingrAF=null;this.pendingElements.clear();return!0}this.resumeObserving();return!1}},{key:"translateRoots",value:function translateRoots(){var t=this,r=Array.from(this.roots);return Promise.all(r.map((function(r){return t.translateFragment(r)})))}},{key:"pauseObserving",value:function pauseObserving(){if(this.mutationObserver){this.translateMutations(this.mutationObserver.takeRecords());this.mutationObserver.disconnect()}}},{key:"resumeObserving",value:function resumeObserving(){if(this.mutationObserver){var t,r=dom_localization_createForOfIteratorHelper(this.roots);try{for(r.s();!(t=r.n()).done;){var i=t.value;this.mutationObserver.observe(i,this.observerConfig)}}catch(t){r.e(t)}finally{r.f()}}}},{key:"translateMutations",value:function translateMutations(t){var r,i=this,o=dom_localization_createForOfIteratorHelper(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;switch(a.type){case"attributes":a.target.hasAttribute("data-l10n-id")&&this.pendingElements.add(a.target);break;case"childList":var u,c=dom_localization_createForOfIteratorHelper(a.addedNodes);try{for(c.s();!(u=c.n()).done;){var l=u.value;if(l.nodeType===l.ELEMENT_NODE)if(l.childElementCount){var h,p=dom_localization_createForOfIteratorHelper(this.getTranslatables(l));try{for(p.s();!(h=p.n()).done;){var v=h.value;this.pendingElements.add(v)}}catch(t){p.e(t)}finally{p.f()}}else l.hasAttribute(d)&&this.pendingElements.add(l)}}catch(t){c.e(t)}finally{c.f()}}}}catch(t){o.e(t)}finally{o.f()}this.pendingElements.size>0&&null===this.pendingrAF&&(this.pendingrAF=this.windowElement.requestAnimationFrame((function(){i.translateElements(Array.from(i.pendingElements));i.pendingElements.clear();i.pendingrAF=null})))}},{key:"translateFragment",value:function translateFragment(t){return this.translateElements(this.getTranslatables(t))}},{key:"translateElements",value:(r=function dom_localization_asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){dom_localization_asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){dom_localization_asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}(dom_localization_regeneratorRuntime().mark((function _callee(t){var r,i;return dom_localization_regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(t.length){o.next=2;break}return o.abrupt("return",void 0);case 2:r=t.map(this.getKeysForElement);o.next=5;return this.formatMessages(r);case 5:i=o.sent;return o.abrupt("return",this.applyTranslations(t,i));case 7:case"end":return o.stop()}}),_callee,this)}))),function translateElements(t){return r.apply(this,arguments)})},{key:"applyTranslations",value:function applyTranslations(t,r){this.pauseObserving();for(var i=0;i<t.length;i++)void 0!==r[i]&&translateElement(t[i],r[i]);this.resumeObserving()}},{key:"getTranslatables",value:function getTranslatables(t){var r=Array.from(t.querySelectorAll(v));"function"==typeof t.hasAttribute&&t.hasAttribute(d)&&r.push(t);return r}},{key:"getKeysForElement",value:function getKeysForElement(t){return{id:t.getAttribute(d),args:JSON.parse(t.getAttribute(p)||null)}}}]);return DOMLocalization}(h)},3266:(t,r,i)=>{i.d(r,{warn:()=>warn});i(5897),i(5057),i(1210),i(3352),i(6421),i(7942),i(469),i(6180),i(895),i(1747),i(2374),i(7529),i(3757),i(3655),i(2555),i(2202),i(4226),i(4699),i(739),i(4816),i(6923),i(6775),i(6474),i(6450),i(1665),i(8837),i(9803),i(1293),i(1051),i(8260),i(5746),i(202),i(2138),i(368),i(9782),i(917),i(3650),i(8347),i(7192),i(354),i(9080),i(7238),i(7995),i(62),i(6635),i(4602),i(344),i(4305),i(7583),i(4668),i(4624),i(2796),i(2613),i(5136),i(7944),i(7230),i(924),i(7874),i(171),i(4711),i(7600),i(5666),i(5548),i(9366),i(6678),i(2926),i(7484),i(13),i(9175),i(6128),i(5598),i(8806),i(9593),i(5776);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 _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"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type;var o={ERRORS:0,WARNINGS:1,INFOS:5},a=o.WARNINGS;function warn(t){a>=o.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 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}();_toConsumableArray(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")}))},631:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{AltTextManager:()=>R});i(8341),i(3352),i(6180),i(895),i(1747),i(7484),i(2374),i(394),i(5598),i(8806),i(9366),i(6678),i(5897),i(5666),i(171),i(924),i(9593),i(7942),i(5776),i(2926),i(1133),i(2173),i(2630),i(1024),i(13),i(4226),i(7121),i(6770),i(1378);var a=i(1869),u=t([a]);a=(u.then?(await u)():u)[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 _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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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 asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.done?r(h):Promise.resolve(h).then(o,a)}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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classApplyDescriptorGet(t,_classExtractFieldDescriptor(t,r,"get"))}function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}function _classPrivateFieldSet(t,r,i){_classApplyDescriptorSet(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 _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}}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var c=new WeakMap,l=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,g=new WeakMap,m=new WeakMap,_=new WeakMap,b=new WeakMap,w=new WeakMap,P=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakMap,k=new WeakSet,I=new WeakSet,T=new WeakSet,L=new WeakSet,O=new WeakSet,M=new WeakSet,B=new WeakSet,G=new WeakSet,R=function(){function AltTextManager(t,r,i,o){var a=this,u=t.dialog,R=t.optionDescription,j=t.optionDecorative,N=t.textarea,V=t.cancelButton,W=t.saveButton;_classCallCheck(this,AltTextManager);_classPrivateMethodInitSpec(this,G);_classPrivateMethodInitSpec(this,B);_classPrivateMethodInitSpec(this,M);_classPrivateMethodInitSpec(this,O);_classPrivateMethodInitSpec(this,L);_classPrivateMethodInitSpec(this,T);_classPrivateMethodInitSpec(this,I);_classPrivateMethodInitSpec(this,k);_classPrivateFieldInitSpec(this,c,{writable:!0,value:_classPrivateMethodGet(this,O,_updateUIState2).bind(this)});_classPrivateFieldInitSpec(this,l,{writable:!0,value:_classPrivateMethodGet(this,I,_setPosition2).bind(this)});_classPrivateFieldInitSpec(this,h,{writable:!0,value:_classPrivateMethodGet(this,B,_onClick2).bind(this)});_classPrivateFieldInitSpec(this,d,{writable:!0,value:null});_classPrivateFieldInitSpec(this,p,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,v,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,y,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,g,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,m,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,_,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,b,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,w,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,P,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,D,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,E,{writable:!0,value:null});_classPrivateFieldInitSpec(this,x,{writable:!0,value:null});_classPrivateFieldInitSpec(this,S,{writable:!0,value:null});_classPrivateFieldInitSpec(this,A,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,C,{writable:!0,value:null});_classPrivateFieldSet(this,v,u);_classPrivateFieldSet(this,m,R);_classPrivateFieldSet(this,_,j);_classPrivateFieldSet(this,P,N);_classPrivateFieldSet(this,p,V);_classPrivateFieldSet(this,w,W);_classPrivateFieldSet(this,b,i);_classPrivateFieldSet(this,y,o);_classPrivateFieldSet(this,A,r);u.addEventListener("close",_classPrivateMethodGet(this,L,_close2).bind(this));u.addEventListener("contextmenu",(function(t){t.target!==_classPrivateFieldGet(a,P)&&t.preventDefault()}));V.addEventListener("click",_classPrivateMethodGet(this,T,_finish2).bind(this));W.addEventListener("click",_classPrivateMethodGet(this,M,_save2).bind(this));R.addEventListener("change",_classPrivateFieldGet(this,c));j.addEventListener("change",_classPrivateFieldGet(this,c));_classPrivateFieldGet(this,b).register(u)}_createClass(AltTextManager,[{key:"_elements",get:function get(){return(0,a.shadow)(this,"_elements",[_classPrivateFieldGet(this,m),_classPrivateFieldGet(this,_),_classPrivateFieldGet(this,P),_classPrivateFieldGet(this,w),_classPrivateFieldGet(this,p)])}},{key:"editAltText",value:(r=(t=_regeneratorRuntime().mark((function _callee(t,r){var i,o,a,u;return _regeneratorRuntime().wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:if(!_classPrivateFieldGet(this,d)&&r){c.next=2;break}return c.abrupt("return");case 2:_classPrivateMethodGet(this,k,_createSVGElement2).call(this);_classPrivateFieldSet(this,g,!1);i=_createForOfIteratorHelper(this._elements);try{for(i.s();!(o=i.n()).done;)o.value.addEventListener("click",_classPrivateFieldGet(this,h))}catch(t){i.e(t)}finally{i.f()}a=r.altTextData,u=a.altText;if(!0===a.decorative){_classPrivateFieldGet(this,_).checked=!0;_classPrivateFieldGet(this,m).checked=!1}else{_classPrivateFieldGet(this,_).checked=!1;_classPrivateFieldGet(this,m).checked=!0}_classPrivateFieldSet(this,E,_classPrivateFieldGet(this,P).value=(null==u?void 0:u.trim())||"");_classPrivateMethodGet(this,O,_updateUIState2).call(this);_classPrivateFieldSet(this,d,r);_classPrivateFieldSet(this,D,t);_classPrivateFieldGet(this,D).removeEditListeners();_classPrivateFieldGet(this,y)._on("resize",_classPrivateFieldGet(this,l));c.prev=14;c.next=17;return _classPrivateFieldGet(this,b).open(_classPrivateFieldGet(this,v));case 17:_classPrivateMethodGet(this,I,_setPosition2).call(this);c.next=24;break;case 20:c.prev=20;c.t0=c.catch(14);_classPrivateMethodGet(this,L,_close2).call(this);throw c.t0;case 24:case"end":return c.stop()}}),_callee,this,[[14,20]])})),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 editAltText(t,i){return r.apply(this,arguments)})},{key:"destroy",value:function destroy(){var t;_classPrivateFieldSet(this,D,null);_classPrivateMethodGet(this,T,_finish2).call(this);null===(t=_classPrivateFieldGet(this,x))||void 0===t||t.remove();_classPrivateFieldSet(this,x,_classPrivateFieldSet(this,S,null))}}]);var t,r;return AltTextManager}();function _createSVGElement2(){if(!_classPrivateFieldGet(this,x)){var t=new a.DOMSVGFactory,r=_classPrivateFieldSet(this,x,t.createElement("svg"));r.setAttribute("width","0");r.setAttribute("height","0");var i=t.createElement("defs");r.append(i);var o=t.createElement("mask");i.append(o);o.setAttribute("id","alttext-manager-mask");o.setAttribute("maskContentUnits","objectBoundingBox");var u=t.createElement("rect");o.append(u);u.setAttribute("fill","white");u.setAttribute("width","1");u.setAttribute("height","1");u.setAttribute("x","0");u.setAttribute("y","0");u=_classPrivateFieldSet(this,S,t.createElement("rect"));o.append(u);u.setAttribute("fill","black");_classPrivateFieldGet(this,v).append(r)}}function _setPosition2(){if(_classPrivateFieldGet(this,d)){var t=_classPrivateFieldGet(this,v),r=t.style,i=_classPrivateFieldGet(this,A).getBoundingClientRect(),o=i.x,a=i.y,u=i.width,c=i.height,l=window,h=l.innerWidth,p=l.innerHeight,y=t.getBoundingClientRect(),g=y.width,m=y.height,_=_classPrivateFieldGet(this,d).getClientDimensions(),b=_.x,w=_.y,P=_.width,E=_.height,x=10,C="ltr"===_classPrivateFieldGet(this,D).direction,k=Math.max(b,o),I=Math.min(b+P,o+u),T=Math.max(w,a),L=Math.min(w+E,a+c);_classPrivateFieldGet(this,S).setAttribute("width","".concat((I-k)/h));_classPrivateFieldGet(this,S).setAttribute("height","".concat((L-T)/p));_classPrivateFieldGet(this,S).setAttribute("x","".concat(k/h));_classPrivateFieldGet(this,S).setAttribute("y","".concat(T/p));var O=null,M=Math.max(w,0);M+=Math.min(p-(M+m),0);C?b+P+x+g<h?O=b+P+x:b>g+x&&(O=b-g-x):b>g+x?O=b-g-x:b+P+x+g<h&&(O=b+P+x);if(null===O){M=null;O=Math.max(b,0);O+=Math.min(h-(O+g),0);w>m+x?M=w-m-x:w+E+x+m<p&&(M=w+E+x)}if(null!==M){t.classList.add("positioned");C?r.left="".concat(O,"px"):r.right="".concat(h-O-g,"px");r.top="".concat(M,"px")}else{t.classList.remove("positioned");r.left="";r.top=""}}}function _finish2(){_classPrivateFieldGet(this,b).active===_classPrivateFieldGet(this,v)&&_classPrivateFieldGet(this,b).close(_classPrivateFieldGet(this,v))}function _close2(){var t;_classPrivateFieldGet(this,y).dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:_classPrivateFieldGet(this,d).editorType,data:_classPrivateFieldGet(this,C)||{action:"alt_text_cancel",alt_text_keyboard:!_classPrivateFieldGet(this,g)}}});_classPrivateFieldSet(this,C,null);_classPrivateMethodGet(this,G,_removeOnClickListeners2).call(this);null===(t=_classPrivateFieldGet(this,D))||void 0===t||t.addEditListeners();_classPrivateFieldGet(this,y)._off("resize",_classPrivateFieldGet(this,l));_classPrivateFieldGet(this,d).altTextFinish();_classPrivateFieldSet(this,d,null);_classPrivateFieldSet(this,D,null)}function _updateUIState2(){_classPrivateFieldGet(this,P).disabled=_classPrivateFieldGet(this,_).checked}function _save2(){var t=_classPrivateFieldGet(this,P).value.trim(),r=_classPrivateFieldGet(this,_).checked;_classPrivateFieldGet(this,d).altTextData={altText:t,decorative:r};_classPrivateFieldSet(this,C,{action:"alt_text_save",alt_text_description:!!t,alt_text_edit:!!_classPrivateFieldGet(this,E)&&_classPrivateFieldGet(this,E)!==t,alt_text_decorative:r,alt_text_keyboard:!_classPrivateFieldGet(this,g)});_classPrivateMethodGet(this,T,_finish2).call(this)}function _onClick2(t){if(0!==t.detail){_classPrivateFieldSet(this,g,!0);_classPrivateMethodGet(this,G,_removeOnClickListeners2).call(this)}}function _removeOnClickListeners2(){var t,r=_createForOfIteratorHelper(this._elements);try{for(r.s();!(t=r.n()).done;){t.value.removeEventListener("click",_classPrivateFieldGet(this,h))}}catch(t){r.e(t)}finally{r.f()}}o()}catch(j){o(j)}}))},2640:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{AnnotationEditorLayerBuilder:()=>d});i(3352),i(6180),i(895),i(1747),i(7484),i(2374),i(5598),i(8806),i(9366),i(6678),i(5897),i(5666),i(2926),i(1133),i(2173),i(2630),i(1024),i(13),i(4226),i(7121),i(6770),i(1378),i(171);var a=i(1869),u=i(7910),c=t([a,u]);[a,u]=c.then?(await c)():c;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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.done?r(h):Promise.resolve(h).then(o,a)}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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classApplyDescriptorGet(t,_classExtractFieldDescriptor(t,r,"get"))}function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}function _classPrivateFieldSet(t,r,i){_classApplyDescriptorSet(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 _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}}var l=new WeakMap,h=new WeakMap,d=function(){function AnnotationEditorLayerBuilder(t){_classCallCheck(this,AnnotationEditorLayerBuilder);_classPrivateFieldInitSpec(this,l,{writable:!0,value:null});_classPrivateFieldInitSpec(this,h,{writable:!0,value:void 0});this.pageDiv=t.pageDiv;this.pdfPage=t.pdfPage;this.accessibilityManager=t.accessibilityManager;this.l10n=t.l10n||u.NullL10n;this.annotationEditorLayer=null;this.div=null;this._cancelled=!1;_classPrivateFieldSet(this,h,t.uiManager);_classPrivateFieldSet(this,l,t.annotationLayer||null)}_createClass(AnnotationEditorLayerBuilder,[{key:"render",value:(r=(t=_regeneratorRuntime().mark((function _callee(t){var r,i,o,u,c=arguments;return _regeneratorRuntime().wrap((function _callee$(d){for(;;)switch(d.prev=d.next){case 0:if("display"===(r=c.length>1&&void 0!==c[1]?c[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:(o=this.div=document.createElement("div")).className="annotationEditorLayer";o.tabIndex=0;o.hidden=!0;o.dir=_classPrivateFieldGet(this,h).direction;this.pageDiv.append(o);this.annotationEditorLayer=new a.AnnotationEditorLayer({uiManager:_classPrivateFieldGet(this,h),div:o,accessibilityManager:this.accessibilityManager,pageIndex:this.pdfPage.pageNumber-1,l10n:this.l10n,viewport:i,annotationLayer:_classPrivateFieldGet(this,l)});u={viewport:i,div:o,annotations:null,intent:r};this.annotationEditorLayer.render(u);this.show();case 20:case"end":return d.stop()}}),_callee,this)})),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 render(t){return r.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,r;return AnnotationEditorLayerBuilder}();o()}catch(p){o(p)}}))},1296:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{AnnotationEditorParams:()=>l});i(3352),i(6180),i(895),i(1747),i(394),i(2374),i(5598),i(8806),i(9366),i(6678),i(5897),i(171),i(924),i(9593),i(7942),i(5776),i(2926),i(4226);var a=i(1869),u=t([a]);a=(u.then?(await u)():u)[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 _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 _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}function _arrayWithHoles(t){if(Array.isArray(t))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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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,_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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}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 _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var c=new WeakSet,l=_createClass((function AnnotationEditorParams(t,r){_classCallCheck(this,AnnotationEditorParams);_classPrivateMethodInitSpec(this,c);this.eventBus=r;_classPrivateMethodGet(this,c,_bindListeners2).call(this,t)}));function _bindListeners2(t){var r=this,i=t.editorFreeTextFontSize,o=t.editorFreeTextColor,u=t.editorInkColor,c=t.editorInkThickness,l=t.editorInkOpacity,h=t.editorStampAddImage,d=function dispatchEvent(t,i){r.eventBus.dispatch("switchannotationeditorparams",{source:r,type:a.AnnotationEditorParamsType[t],value:i})};i.addEventListener("input",(function(){d("FREETEXT_SIZE",this.valueAsNumber)}));o.addEventListener("input",(function(){d("FREETEXT_COLOR",this.value)}));u.addEventListener("input",(function(){d("INK_COLOR",this.value)}));c.addEventListener("input",(function(){d("INK_THICKNESS",this.valueAsNumber)}));l.addEventListener("input",(function(){d("INK_OPACITY",this.valueAsNumber)}));h.addEventListener("click",(function(){d("CREATE")}));this.eventBus._on("annotationeditorparamschanged",(function(t){var r,h,d,p=_createForOfIteratorHelper(t.details);try{for(p.s();!(r=p.n()).done;){var v=(h=r.value,d=2,_arrayWithHoles(h)||_iterableToArrayLimit(h,d)||_unsupportedIterableToArray(h,d)||_nonIterableRest()),y=v[0],g=v[1];switch(y){case a.AnnotationEditorParamsType.FREETEXT_SIZE:i.value=g;break;case a.AnnotationEditorParamsType.FREETEXT_COLOR:o.value=g;break;case a.AnnotationEditorParamsType.INK_COLOR:u.value=g;break;case a.AnnotationEditorParamsType.INK_THICKNESS:c.value=g;break;case a.AnnotationEditorParamsType.INK_OPACITY:l.value=g}}}catch(t){p.e(t)}finally{p.f()}}))}o()}catch(h){o(h)}}))},6735:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{AnnotationLayerBuilder:()=>d});i(895),i(5666),i(6180),i(1747),i(2374),i(3352),i(7484),i(394),i(5598),i(8806),i(9366),i(6678),i(5897),i(2926),i(4226),i(171),i(924),i(9593),i(7942),i(5776),i(1133),i(2173),i(2630),i(1024),i(13),i(7121),i(6770),i(1378);var a=i(1869),u=i(4927),c=t([a]);a=(c.then?(await c)():c)[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 _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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},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 _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.done?r(h):Promise.resolve(h).then(o,a)}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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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){_classApplyDescriptorSet(t,_classExtractFieldDescriptor(t,r,"set"),i);return 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}}function _classPrivateFieldGet(t,r){return _classApplyDescriptorGet(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 _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}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,h=new WeakSet,d=function(){function AnnotationLayerBuilder(t){var r=t.pageDiv,i=t.pdfPage,o=t.linkService,a=t.downloadManager,u=t.annotationStorage,c=void 0===u?null:u,d=t.imageResourcesPath,p=void 0===d?"":d,v=t.renderForms,y=void 0===v||v,g=t.enableScripting,m=void 0!==g&&g,_=t.hasJSActionsPromise,b=void 0===_?null:_,w=t.fieldObjectsPromise,P=void 0===w?null:w,D=t.annotationCanvasMap,E=void 0===D?null:D,x=t.accessibilityManager,S=void 0===x?null:x;_classCallCheck(this,AnnotationLayerBuilder);_classPrivateMethodInitSpec(this,h);_classPrivateFieldInitSpec(this,l,{writable:!0,value:null});this.pageDiv=r;this.pdfPage=i;this.linkService=o;this.downloadManager=a;this.imageResourcesPath=p;this.renderForms=y;this.annotationStorage=c;this.enableScripting=m;this._hasJSActionsPromise=b||Promise.resolve(!1);this._fieldObjectsPromise=P||Promise.resolve(null);this._annotationCanvasMap=E;this._accessibilityManager=S;this.annotationLayer=null;this.div=null;this._cancelled=!1;this._eventBus=o.eventBus}_createClass(AnnotationLayerBuilder,[{key:"render",value:(r=(t=_regeneratorRuntime().mark((function _callee(t){var r,i,o,c,d,p,v,y,g=this,m=arguments;return _regeneratorRuntime().wrap((function _callee$(_){for(;;)switch(_.prev=_.next){case 0:r=m.length>1&&void 0!==m[1]?m[1]:"display";if(!this.div){_.next=6;break}if(!this._cancelled&&this.annotationLayer){_.next=4;break}return _.abrupt("return");case 4:this.annotationLayer.update({viewport:t.clone({dontFlip:!0})});return _.abrupt("return");case 6:_.next=8;return Promise.all([this.pdfPage.getAnnotations({intent:r}),this._hasJSActionsPromise,this._fieldObjectsPromise]);case 8:i=_.sent;o=(w=3,_arrayWithHoles(b=i)||_iterableToArrayLimit(b,w)||_unsupportedIterableToArray(b,w)||_nonIterableRest());c=o[0];d=o[1];p=o[2];if(!this._cancelled){_.next=15;break}return _.abrupt("return");case 15:(v=this.div=document.createElement("div")).className="annotationLayer";this.pageDiv.append(v);if(0!==c.length){_.next=21;break}this.hide();return _.abrupt("return");case 21:this.annotationLayer=new a.AnnotationLayer({div:v,accessibilityManager:this._accessibilityManager,annotationCanvasMap:this._annotationCanvasMap,page:this.pdfPage,viewport:t.clone({dontFlip:!0})});_.next=24;return this.annotationLayer.render({annotations:c,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,h,_updatePresentationModeState2).call(this,u.PresentationModeState.FULLSCREEN);if(!_classPrivateFieldGet(this,l)){_classPrivateFieldSet(this,l,(function(t){_classPrivateMethodGet(g,h,_updatePresentationModeState2).call(g,t.state)}));null===(y=this._eventBus)||void 0===y||y._on("presentationmodechanged",_classPrivateFieldGet(this,l))}case 26:case"end":return _.stop()}var b,w}),_callee,this)})),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 render(t){return r.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,r;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=_createForOfIteratorHelper(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()}}}o()}catch(p){o(p)}}))},39:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{DefaultExternalServices:()=>j,PDFPrintServiceFactory:()=>K,PDFViewerApplication:()=>N});i(3352),i(895),i(5666),i(5598),i(8806),i(9366),i(6678),i(5897),i(7942),i(5459),i(7874),i(4226),i(6180),i(1747),i(2374),i(9142),i(1210),i(7121),i(8518),i(5776),i(8341),i(924),i(7254),i(3143),i(7529),i(3757),i(3655),i(2555),i(2202),i(2796),i(4165),i(3821),i(2926),i(1133),i(2173),i(2630),i(1024),i(13),i(6770),i(1378),i(171),i(9593),i(4668),i(1585),i(2993),i(7262),i(7335);var a=i(4927),u=i(1869),c=i(5318),l=i(8961),h=i(6554),d=i(3234),p=i(631),v=i(1296),y=i(1996),g=i(6329),m=i(716),_=i(3611),b=i(6312),w=i(1795),P=i(3557),D=i(6418),E=i(3706),x=i(1141),S=i(323),A=i(5119),C=i(2599),k=i(4487),I=i(3510),T=i(9290),L=i(1544),O=i(276),M=i(2033),B=t([u,p,v,g,m,_,b,w,P,x,S,A,C,I,T,L,O]);[u,p,v,g,m,_,b,w,P,x,S,A,C,I,T,L,O]=B.then?(await B)():B;function _slicedToArray(t,r){return _arrayWithHoles(t)||_iterableToArrayLimit(t,r)||_unsupportedIterableToArray(t,r)||_nonIterableRest()}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 _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}function _arrayWithHoles(t){if(Array.isArray(t))return 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 _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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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 _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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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,_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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}var G=1e3,R={UNKNOWN:-1,PREVIOUS:0,INITIAL:1},j=function(){function DefaultExternalServices(){_classCallCheck(this,DefaultExternalServices);throw new Error("Cannot initialize DefaultExternalServices.")}_createClass(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:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){return _regeneratorRuntime().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("Not implemented: createL10n");case 1:case"end":return t.stop()}}),_callee)}))),function createL10n(){return t.apply(this,arguments)})},{key:"createScripting",value:function createScripting(t){throw new Error("Not implemented: createScripting")}},{key:"updateEditorStates",value:function updateEditorStates(t){throw new Error("Not implemented: updateEditorStates")}},{key:"getNimbusExperimentData",value:function getNimbusExperimentData(){return(0,u.shadow)(this,"getNimbusExperimentData",Promise.resolve(null))}}]);var t;return DefaultExternalServices}(),N={initialBookmark:document.location.hash.substring(1),_initializedCapability:new u.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:j,_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 _callee2(){var i,o;return _regeneratorRuntime().wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:r.appConfig=t;a.prev=1;a.next=4;return r.preferences.initializedPromise;case 4:a.next=9;break;case 6:a.prev=6;a.t0=a.catch(1);console.error('initialize: "'.concat(a.t0.message,'".'));case 9:if(!l.AppOptions.get("pdfBugEnabled")){a.next=12;break}a.next=12;return r._parseHashParams();case 12:a.t1=l.AppOptions.get("viewerCssTheme");a.next=1===a.t1?15:2===a.t1?17:19;break;case 15:o="is-light";return a.abrupt("break",19);case 17:o="is-dark";return a.abrupt("break",19);case 19:o&&document.documentElement.classList.add(o);i=r.externalServices.createL10n();a.next=23;return i;case 23:r.l10n=a.sent;document.getElementsByTagName("html")[0].dir=r.l10n.getDirection();r.l10n.translate(t.appContainer||document.documentElement);r.isViewerEmbedded&&l.AppOptions.get("externalLinkTarget")===d.LinkTarget.NONE&&l.AppOptions.set("externalLinkTarget",d.LinkTarget.TOP);a.next=29;return r._initializeViewerComponents();case 29:r.bindEvents();r.bindWindowEvents();r._initializedCapability.resolve();r.initializeLoadingBar();case 33:case"end":return a.stop()}}),_callee2,null,[[1,6]])})))()},_parseHashParams:function _parseHashParams(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var r,i,o,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,o=i.mainContainer,u=i.viewerContainer;if("true"!==(c=(0,a.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",a.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(o,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]])})))()},_initializeViewerComponents:function _initializeViewerComponents(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){var r,i,o,c,M,B,G,R,j,N,V,W,z,H,U,K,$,Y,q,X,Z,Q,J,ee,te,re,ne,ie,oe;return _regeneratorRuntime().wrap((function _callee4$(ae){for(;;)switch(ae.prev=ae.next){case 0:R=t.appConfig,j=t.externalServices,N=t.l10n;V=l.AppOptions.get("isInAutomation")?new h.AutomationEventBus:new h.EventBus;t.eventBus=V;t.overlayManager=new y.OverlayManager;(W=new A.PDFRenderingQueue).onIdle=t._cleanup.bind(t);t.pdfRenderingQueue=W;z=new d.PDFLinkService({eventBus:V,externalLinkTarget:l.AppOptions.get("externalLinkTarget"),externalLinkRel:l.AppOptions.get("externalLinkRel"),ignoreDestinationZoom:l.AppOptions.get("ignoreDestinationZoom")});t.pdfLinkService=z;H=j.createDownloadManager();t.downloadManager=H;U=new P.PDFFindController({linkService:z,eventBus:V,pageViewMode:l.AppOptions.get("pageViewMode"),updateMatchesCountOnProgress:!0});t.findController=U;K=new C.PDFScriptingManager({eventBus:V,sandboxBundleSrc:l.AppOptions.get("sandboxBundleSrc"),externalServices:j,docProperties:t._scriptingDocProperties.bind(t)});t.pdfScriptingManager=K;$=R.mainContainer,Y=R.viewerContainer;q=l.AppOptions.get("annotationEditorMode");X=l.AppOptions.get("isOffscreenCanvasSupported")&&u.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=R.altTextDialog?new p.AltTextManager(R.altTextDialog,$,t.overlayManager,V):null;J=new T.PDFViewer({container:$,viewer:Y,eventBus:V,renderingQueue:W,linkService:z,downloadManager:H,altTextManager:Q,findController:U,scriptingManager:l.AppOptions.get("enableScripting")&&K,l10n:N,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=J;W.setViewer(J);z.setViewer(J);K.setViewer(J);if(null!==(r=R.sidebar)&&void 0!==r&&r.thumbnailView){t.pdfThumbnailViewer=new I.PDFThumbnailViewer({container:R.sidebar.thumbnailView,eventBus:V,renderingQueue:W,linkService:z,pageColors:Z});W.setThumbnailViewer(t.pdfThumbnailViewer)}if(!t.isViewerEmbedded&&!l.AppOptions.get("disableHistory")){t.pdfHistory=new D.PDFHistory({linkService:z,eventBus:V});z.setHistory(t.pdfHistory)}!t.supportsIntegratedFind&&R.findBar&&(t.findBar=new w.PDFFindBar(R.findBar,V));if(R.annotationEditorParams)if(q!==u.AnnotationEditorType.DISABLE){X||null===(ee=R.toolbar)||void 0===ee||null===(ee=ee.editorStampButton)||void 0===ee||ee.classList.add("hidden");t.annotationEditorParams=new v.AnnotationEditorParams(R.annotationEditorParams,V)}else for(te=0,re=["editorModeButtons","editorModeSeparator"];te<re.length;te++){ie=re[te];null===(ne=document.getElementById(ie))||void 0===ne||ne.classList.add("hidden")}R.documentProperties&&(t.pdfDocumentProperties=new b.PDFDocumentProperties(R.documentProperties,t.overlayManager,V,N,(function(){return t._docFilename})));null!==(i=R.secondaryToolbar)&&void 0!==i&&i.cursorHandToolButton&&(t.pdfCursorTools=new _.PDFCursorTools({container:$,eventBus:V,cursorToolOnLoad:l.AppOptions.get("cursorToolOnLoad")}));R.toolbar&&(t.toolbar=new O.Toolbar(R.toolbar,V));R.secondaryToolbar&&(t.secondaryToolbar=new L.SecondaryToolbar(R.secondaryToolbar,V));t.supportsFullscreen&&(null!==(o=R.toolbar)&&void 0!==o&&o.presentationModeButton||null!==(c=R.secondaryToolbar)&&void 0!==c&&c.presentationModeButton)&&(t.pdfPresentationMode=new S.PDFPresentationMode({container:$,pdfViewer:J,eventBus:V}));(oe=l.AppOptions.get("passwordPrompt"))?t.passwordPrompt=oe:R.passwordOverlay&&(t.passwordPrompt=new g.PasswordPrompt(R.passwordOverlay,t.overlayManager,t.isViewerEmbedded));null!==(M=R.sidebar)&&void 0!==M&&M.outlineView&&(t.pdfOutlineViewer=new x.PDFOutlineViewer({container:R.sidebar.outlineView,eventBus:V,l10n:N,linkService:z,downloadManager:H}));null!==(B=R.sidebar)&&void 0!==B&&B.attachmentsView&&(t.pdfAttachmentViewer=new m.PDFAttachmentViewer({container:R.sidebar.attachmentsView,eventBus:V,l10n:N,downloadManager:H}));null!==(G=R.sidebar)&&void 0!==G&&G.layersView&&(t.pdfLayerViewer=new E.PDFLayerViewer({container:R.sidebar.layersView,eventBus:V,l10n:N}));if(R.sidebar){t.pdfSidebar=new k.PDFSidebar({elements:R.sidebar,eventBus:V,l10n:N});t.pdfSidebar.onToggled=t.forceRendering.bind(t);t.pdfSidebar.onUpdateThumbnails=function(){var r,i=_createForOfIteratorHelper(J.getCachedPageViews());try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.renderingState===a.RenderingStates.FINISHED){var u;null===(u=t.pdfThumbnailViewer.getThumbnail(o.id-1))||void 0===u||u.setImage(o)}}}catch(t){i.e(t)}finally{i.f()}t.pdfThumbnailViewer.scrollThumbnailIntoView(J.currentPageNumber)}}case 40:case"end":return ae.stop()}}),_callee4)})))()},run:function run(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee5(){var i,o,u,c,h,d,p,v,y,g,m;return _regeneratorRuntime().wrap((function _callee5$(_){for(;;)switch(_.prev=_.next){case 0:r.preferences=r.externalServices.createPreferences();_.next=3;return r.initialize(t);case 3:o=r.appConfig,u=r.eventBus;h=document.location.search.substring(1);d=(0,a.parseQueryString)(h);c=null!==(i=d.get("file"))&&void 0!==i?i:l.AppOptions.get("defaultUrl");W(c);(p=o.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})}));o.mainContainer.addEventListener("dragover",(function(t){if(l.AppOptions.get("enableDragAndDrop")){t.preventDefault();t.dataTransfer.dropEffect="copy"===t.dataTransfer.effectAllowed?"copy":"move"}}));o.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(!l.AppOptions.get("supportsDocumentFonts")){l.AppOptions.set("disableFontFace",!0);r.l10n.get("pdfjs-web-fonts-disabled").then((function(t){console.warn(t)}))}if(!r.supportsPrinting){null===(v=o.toolbar)||void 0===v||null===(v=v.print)||void 0===v||v.classList.add("hidden");null===(y=o.secondaryToolbar)||void 0===y||y.printButton.classList.add("hidden")}if(!r.supportsFullscreen){o.toolbar.presentationModeButton.classList.add("hidden");null===(g=o.secondaryToolbar)||void 0===g||g.presentationModeButton.classList.add("hidden")}r.supportsIntegratedFind&&(null===(m=o.toolbar)||void 0===m||null===(m=m.viewFind)||void 0===m||m.classList.add("hidden"));o.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);N.onError&&N.onError(t)}))}case 19:case"end":return _.stop()}}),_callee5)})))()},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=a.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,u.shadow)(this,"supportsFullscreen",document.fullscreenEnabled)},get supportsPinchToZoom(){return(0,u.shadow)(this,"supportsPinchToZoom",l.AppOptions.get("supportsPinchToZoom"))},get supportsIntegratedFind(){return(0,u.shadow)(this,"supportsIntegratedFind",l.AppOptions.get("supportsIntegratedFind"))},initializeLoadingBar:function initializeLoadingBar(){var t=document.getElementById("loadingBar"),r=t?new a.ProgressBar(t):null;null==r||r.hide();return(0,u.shadow)(this,"loadingBar",r)},get supportsMouseWheelZoomCtrlKey(){return(0,u.shadow)(this,"supportsMouseWheelZoomCtrlKey",l.AppOptions.get("supportsMouseWheelZoomCtrlKey"))},get supportsMouseWheelZoomMetaKey(){return(0,u.shadow)(this,"supportsMouseWheelZoomMetaKey",l.AppOptions.get("supportsMouseWheelZoomMetaKey"))},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,u.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 _callee6(){var r,i,o,a,u,c,l,h,d,p,v,y,g;return _regeneratorRuntime().wrap((function _callee6$(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===(y=t.pdfThumbnailViewer)||void 0===y||y.setDocument(null);t.pdfViewer.setDocument(null);t.pdfLinkService.setDocument(null);null===(g=t.pdfDocumentProperties)||void 0===g||g.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===(c=t.pdfHistory)||void 0===c||c.reset();null===(l=t.findBar)||void 0===l||l.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()}}),_callee6,null,[[5,10]])})))()},open:function open(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee8(){var i;return _regeneratorRuntime().wrap((function _callee8$(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 _callee7(){var i,o,a;return _regeneratorRuntime().wrap((function _callee7$(c){for(;;)switch(c.prev=c.next){case 0:if(!r.pdfLoadingTask){c.next=3;break}c.next=3;return r.close();case 3:i=l.AppOptions.getAll(l.OptionKind.WORKER);Object.assign(u.GlobalWorkerOptions,i);t.url&&r.setTitleUsingUrl(t.originalUrl||t.url,t.url);o=l.AppOptions.getAll(l.OptionKind.API);a=(0,u.getDocument)(_objectSpread(_objectSpread({},o),t));r.pdfLoadingTask=a;a.onPassword=function(t,i){r.isViewerEmbedded&&r._unblockDocumentLoadEvent();r.pdfLinkService.externalLinkEnabled=!1;r.passwordPrompt.setUpdateCallback(t,i);r.passwordPrompt.open()};a.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 c.abrupt("return",a.promise.then((function(t){r.load(t)}),(function(t){if(a===r.pdfLoadingTask){var i="pdfjs-loading-error";t instanceof u.InvalidPDFException?i="pdfjs-invalid-file-error":t instanceof u.MissingPDFException?i="pdfjs-missing-file-error":t instanceof u.UnexpectedResponseException&&(i="pdfjs-unexpected-response-error");N.onError&&N.onError(t);return r.l10n.get(i).then((function(i){r._documentError(i,{message:null==t?void 0:t.message});throw t}))}})));case 12:case"end":return c.stop()}}),_callee7)}))));case 3:case"end":return o.stop()}}),_callee8)})))()},_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 _callee9(){var i,o,a,u,c;return _regeneratorRuntime().wrap((function _callee9$(l){for(;;)switch(l.prev=l.next){case 0:i=t.length>0&&void 0!==t[0]?t[0]:{};o=r._downloadUrl,a=r._docFilename;l.prev=2;r._ensureDownloadComplete();l.next=6;return r.pdfDocument.getData();case 6:u=l.sent;c=new Blob([u],{type:"application/pdf"});l.next=10;return r.downloadManager.download(c,o,a,i);case 10:l.next=16;break;case 12:l.prev=12;l.t0=l.catch(2);l.next=16;return r.downloadManager.downloadUrl(o,a,i);case 16:case"end":return l.stop()}}),_callee9,null,[[2,12]])})))()},save:function save(){var t=arguments,r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee10(){var i,o,a,u,c;return _regeneratorRuntime().wrap((function _callee10$(l){for(;;)switch(l.prev=l.next){case 0:i=t.length>0&&void 0!==t[0]?t[0]:{};if(!r._saveInProgress){l.next=3;break}return l.abrupt("return");case 3:r._saveInProgress=!0;l.next=6;return r.pdfScriptingManager.dispatchWillSave();case 6:o=r._downloadUrl,a=r._docFilename;l.prev=7;r._ensureDownloadComplete();l.next=11;return r.pdfDocument.saveDocument();case 11:u=l.sent;c=new Blob([u],{type:"application/pdf"});l.next=15;return r.downloadManager.download(c,o,a,i);case 15:l.next=22;break;case 17:l.prev=17;l.t0=l.catch(7);globalThis.ngxConsole.error("Error when saving the document: ".concat(l.t0.message));l.next=22;return r.download(i);case 22:l.prev=22;l.next=25;return r.pdfScriptingManager.dispatchDidSave();case 25:r._saveInProgress=!1;return l.finish(22);case 27:r._hasAnnotationEditors&&r.externalServices.reportTelemetry({type:"editing",data:{type:"save"}});case 28:case"end":return l.stop()}}),_callee10,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 _callee11(){var r,i;return _regeneratorRuntime().wrap((function _callee11$(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()}}),_callee11,null,[[5,14,17,22]])})))()},_exportWithoutAnnotations:function _exportWithoutAnnotations(){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: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()}}),_callee12,null,[[0,9]])})))()},export:function _export(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee13(){var r;return _regeneratorRuntime().wrap((function _callee13$(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()}}),_callee13)})))()},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(u.version||"?"," (build: ").concat(u.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,o,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();y.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===(o=this.pdfDocumentProperties)||void 0===o||o.setDocument(t);var v=this.pdfViewer;v.setDocument(t);var y=v.firstPagePromise,g=v.onePageRendered,m=v.pagesPromise;null===(u=this.pdfThumbnailViewer)||void 0===u||u.setDocument(t);var _=(this.store=new M.ViewHistory(t.fingerprints[0])).getMultiple({page:null,zoom:a.DEFAULT_SCALE_VALUE,scrollLeft:"0",scrollTop:"0",rotation:null,sidebarView:a.SidebarView.UNKNOWN,scrollMode:a.ScrollMode.UNKNOWN,spreadMode:a.SpreadMode.UNKNOWN}).catch((function(){}));y.then((function(r){var i;null===(i=c.loadingBar)||void 0===i||i.setWidth(c.appConfig.viewerContainer);c._initializeAnnotationStorageCallbacks(t);Promise.all([a.animationStarted,_,h,d,p]).then(function(){var r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee14(r){var i,o,u,h,d,p,y,g,_,b,w,P,D,E;return _regeneratorRuntime().wrap((function _callee14$(x){for(;;)switch(x.prev=x.next){case 0:i=_slicedToArray(r,5),i[0],o=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});y=c.initialBookmark;g=l.AppOptions.get("defaultZoomValue");_=g?"zoom=".concat(g):null;b=null;w=l.AppOptions.get("sidebarViewOnLoad");P=l.AppOptions.get("scrollModeOnLoad");D=l.AppOptions.get("spreadModeOnLoad");if(null!=o&&o.page&&p!==R.INITIAL){_="page=".concat(o.page,"&zoom=").concat(g||o.zoom,",")+"".concat(o.scrollLeft,",").concat(o.scrollTop);b=parseInt(o.rotation,10);w===a.SidebarView.UNKNOWN&&(w=0|o.sidebarView);P===a.ScrollMode.UNKNOWN&&(P=0|o.scrollMode);D===a.SpreadMode.UNKNOWN&&(D=0|o.spreadMode)}h&&w===a.SidebarView.UNKNOWN&&(w=(0,a.apiPageModeToSidebarView)(h));if(u&&P===a.ScrollMode.UNKNOWN&&D===a.SpreadMode.UNKNOWN){E=(0,a.apiPageLayoutToViewerModes)(u);D=E.spreadMode}c.setInitialView(_,{rotation:b,sidebarView:w,scrollMode:P,spreadMode:D});c.eventBus.dispatch("documentinit",{source:c});c.isViewerEmbedded||v.focus();x.next=18;return Promise.race([m,new Promise((function(t){setTimeout(t,10)}))]);case 18:if(y||_){x.next=20;break}return x.abrupt("return");case 20:if(!v.hasEqualPageSizes){x.next=22;break}return x.abrupt("return");case 22:c.initialBookmark=y;v.currentScaleValue=v.currentScaleValue;c.setInitialView(_);case 25:case"end":return x.stop()}}),_callee14)})));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){N.onError&&N.onError(t);c.l10n.get("pdfjs-loading-error").then((function(r){c._documentError(r,{message:null==t?void 0:t.message})}))}));g.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 _callee15(){var i,o;return _regeneratorRuntime().wrap((function _callee15$(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()}}),_callee15)})))()},_initializeAutoPrint:function _initializeAutoPrint(t,r){var i=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee16(){var o,u,c,l,h,d;return _regeneratorRuntime().wrap((function _callee16$(p){for(;;)switch(p.prev=p.next){case 0:p.next=2;return Promise.all([r,i.pdfViewer.enableScripting?null:t.getJSActions()]);case 2:o=p.sent;u=_slicedToArray(o,2);c=u[0];l=u[1];if(t===i.pdfDocument){p.next=8;break}return p.abrupt("return");case 8:h="Print"===(null==c?void 0:c.action);if(!l){p.next=23;break}globalThis.ngxConsole.warn("Warning: JavaScript support is not enabled");p.t0=_regeneratorRuntime().keys(l);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=l[d].some((function(t){return a.AutoPrintRegExp.test(t)}));p.next=12;break;case 23:h&&i.triggerPrinting();case 24:case"end":return p.stop()}}),_callee16)})))()},_initializeMetadata:function _initializeMetadata(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee17(){var i,o,a,l,h,d,p,v,y,g;return _regeneratorRuntime().wrap((function _callee17$(m){for(;;)switch(m.prev=m.next){case 0:m.next=2;return t.getMetadata();case 2:a=m.sent;l=a.info;h=a.metadata;d=a.contentDispositionFilename;p=a.contentLength;if(t===r.pdfDocument){m.next=9;break}return m.abrupt("return");case 9:r.documentInfo=l;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(l.PDFFormatVersion," ")+"".concat((l.Producer||"-").trim()," / ").concat((l.Creator||"-").trim(),"] ")+"(PDF.js: ".concat(u.version||"?"," [").concat(u.build||"?","])  modified by ngx-extended-pdf-viewer ").concat(c.ngxExtendedPdfViewerVersion));y=l.Title;(g=null==h?void 0:h.get("dc:title"))&&("Untitled"===g||/[\uFFF0-\uFFFF]/g.test(g)||(y=g));y?r.setTitle("".concat(y," - ").concat(r._contentDispositionFilename||r._title)):r._contentDispositionFilename&&r.setTitle(r._contentDispositionFilename);!l.IsXFAPresent||l.IsAcroFormPresent||t.isPureXfa?!l.IsAcroFormPresent&&!l.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");l.IsSignaturesPresent&&console.warn("Warning: Digital signatures validation is not supported");r.eventBus.dispatch("metadataloaded",{source:r});case 22:case"end":return m.stop()}}),_callee17)})))()},_initializePageLabels:function _initializePageLabels(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee18(){var i,o,a,u,c,h,d,p,v;return _regeneratorRuntime().wrap((function _callee18$(y){for(;;)switch(y.prev=y.next){case 0:y.next=2;return t.getPageLabels();case 2:i=y.sent;if(t===r.pdfDocument){y.next=5;break}return y.abrupt("return");case 5:if(i&&!l.AppOptions.get("disablePageLabels")){y.next=7;break}return y.abrupt("return");case 7:o=i.length;a=0,u=0;c=0;case 10:if(!(c<o)){y.next=24;break}if((h=i[c])!==(c+1).toString()){y.next=16;break}a++;y.next=21;break;case 16:if(""!==h){y.next=20;break}u++;y.next=21;break;case 20:return y.abrupt("break",24);case 21:c++;y.next=10;break;case 24:if(!(a>=o||u>=o)){y.next=26;break}return y.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 y.stop()}}),_callee18)})))()},_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===R.INITIAL,updateUrl:l.AppOptions.get("historyUpdateUrl")});if(this.pdfHistory.initialBookmark){this.initialBookmark=this.pdfHistory.initialBookmark;this.initialRotation=this.pdfHistory.initialRotation}if(a&&!this.initialBookmark&&i===R.UNKNOWN){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,o,u=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=c.rotation,h=c.sidebarView,d=c.scrollMode,p=c.spreadMode,v=function setRotation(t){(0,a.isValidRotation)(t)&&(u.pdfViewer.pagesRotation=t)};this.isInitialViewSet=!0;null===(r=this.pdfSidebar)||void 0===r||r.setInitialView(h);!function setViewerModes(t,r){(0,a.isValidScrollMode)(t)&&(u.pdfViewer.scrollMode=t);(0,a.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(l);this.pdfLinkService.setHash(t)}null===(i=this.toolbar)||void 0===i||i.setPageNumber(this.pdfViewer.currentPageNumber,this.pdfViewer.currentPageLabel);null===(o=this.secondaryToolbar)||void 0===o||o.setPageNumber(this.pdfViewer.currentPageNumber);if(!this.pdfViewer.currentScaleValue){var y=PDFViewerApplicationOptions.get("defaultZoomValue");y&&(this.pdfViewer.currentScaleValue=y)}},_cleanup:function _cleanup(){var t;if(this.pdfDocument){this.pdfViewer.cleanup();null===(t=this.pdfThumbnailViewer)||void 0===t||t.cleanup();this.pdfDocument.cleanup(l.AppOptions.get("fontExtraProperties"))}},forceRendering:function forceRendering(){var t;this.pdfRenderingQueue.printing=!!this.printService;this.pdfRenderingQueue.isThumbnailViewEnabled=(null===(t=this.pdfSidebar)||void 0===t?void 0:t.visibleView)===a.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.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("pdfjs-printing-not-ready").then((function(t){window.alert(t)}));else this.l10n.get("pdfjs-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",z);t._on("openfile",H)},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&&webViewerResolutionChange(t);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",z);t._off("openfile",H);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),c=u[0],l=u[1];o.container.scrollLeft+=(r-l)*a;o.container.scrollTop+=(i-c)*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){N.onError&&N.onError(t);N.l10n.get("pdfjs-loading-error").then((function(r){N._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 _callee19(){return _regeneratorRuntime().wrap((function _callee19$(t){for(;;)switch(t.prev=t.next){case 0:u.GlobalWorkerOptions.workerSrc||(u.GlobalWorkerOptions.workerSrc=l.AppOptions.get("workerSrc"));"Function"===u.GlobalWorkerOptions.workerSrc.constructor.name&&(u.GlobalWorkerOptions.workerSrc=u.GlobalWorkerOptions.workerSrc());case 2:case"end":return t.stop()}}),_callee19)})))).apply(this,arguments)}function loadPDFBug(t){return _loadPDFBug.apply(this,arguments)}function _loadPDFBug(){return(_loadPDFBug=_asyncToGenerator(_regeneratorRuntime().mark((function _callee20(t){return _regeneratorRuntime().wrap((function _callee20$(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),_callee20)})))).apply(this,arguments)}function reportPageStatsPDFBug(t){var r,i,o=t.pageNumber;if(null!==(r=globalThis.Stats)&&void 0!==r&&r.enabled){var a=N.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===N.page){var r;null===(r=N.toolbar)||void 0===r||r.updateLoadingIndicatorState(!0)}}function webViewerPageRendered(t){var r,i=t.pageNumber,o=t.error;if(i===N.page){var u;null===(u=N.toolbar)||void 0===u||u.updateLoadingIndicatorState(!1)}if((null===(r=N.pdfSidebar)||void 0===r?void 0:r.visibleView)===a.SidebarView.THUMBS){var c,l=N.pdfViewer.getPageView(i-1),h=null===(c=N.pdfThumbnailViewer)||void 0===c?void 0:c.getThumbnail(i-1);l&&(null==h||h.setImage(l))}o&&N.l10n.get("pdfjs-rendering-error").then((function(t){N._otherError(t,o)}))}function webViewerPageMode(t){var r,i,o=t.mode;switch(o){case"thumbs":i=a.SidebarView.THUMBS;break;case"bookmarks":case"outline":i=a.SidebarView.OUTLINE;break;case"attachments":i=a.SidebarView.ATTACHMENTS;break;case"layers":i=a.SidebarView.LAYERS;break;case"none":i=a.SidebarView.NONE;break;default:globalThis.ngxConsole.error('Invalid "pagemode" hash parameter: '+o);return}null===(r=N.pdfSidebar)||void 0===r||r.switchView(i,!0)}function webViewerNamedAction(t){var r;switch(t.action){case"GoToPage":null===(r=N.appConfig.toolbar)||void 0===r||r.pageNumber.select();break;case"Find":N.supportsIntegratedFind||null==N||N.findBar.toggle();break;case"Print":N.triggerPrinting();break;case"SaveAs":N.downloadOrSave()}}function webViewerPresentationModeChanged(t){N.pdfViewer.presentationModeState=t.state}function webViewerSidebarViewChanged(t){var r=t.view;N.pdfRenderingQueue.isThumbnailViewEnabled=r===a.SidebarView.THUMBS;if(N.isInitialViewSet){var i;null===(i=N.store)||void 0===i||i.set("sidebarView",r).catch((function(){}))}}function webViewerUpdateViewarea(t){var r=t.location;if(N.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=N.store)||void 0===i||i.setMultiple(o).catch((function(){}))}if(N.appConfig.secondaryToolbar){var a=N.pdfLinkService.getAnchorUrl(r.pdfOpenParams);N.appConfig.secondaryToolbar.viewBookmarkButton.href=a}}function webViewerScrollModeChanged(t){if(N.isInitialViewSet&&!N.pdfViewer.isInPresentationMode){var r;null===(r=N.store)||void 0===r||r.set("scrollMode",t.mode).catch((function(){}))}}function webViewerSpreadModeChanged(t){if(N.isInitialViewSet&&!N.pdfViewer.isInPresentationMode){var r;null===(r=N.store)||void 0===r||r.set("spreadMode",t.mode).catch((function(){}))}}function webViewerResize(){var t=N.pdfDocument,r=N.pdfViewer;if((!N.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&&(N.isInitialViewSet?null!==(r=N.pdfHistory)&&void 0!==r&&r.popStateInProgress||N.pdfLinkService.setHash(i):N.initialBookmark=i)}var z=function webViewerFileInputChange(t){var r;if(null===(r=N.pdfViewer)||void 0===r||!r.isInPresentationMode){var i=t.fileInput.files[0];N.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))}}},H=function webViewerOpenFile(t){N.appConfig.openFileInput.click()};function webViewerPresentationMode(){N.requestPresentationMode()}function webViewerSwitchAnnotationEditorMode(t){N.pdfViewer.annotationEditorMode=t}function webViewerSwitchAnnotationEditorParams(t){N.pdfViewer.annotationEditorParams=t}function webViewerPrint(){N.triggerPrinting()}function webViewerDownload(){N.downloadOrSave()}function webViewerOpenInExternalApp(){N.openInExternalApp()}function webViewerFirstPage(){N.page=1}function webViewerLastPage(){N.page=N.pagesCount}function webViewerNextPage(){N.pdfViewer.nextPage()}function webViewerPreviousPage(){N.pdfViewer.previousPage()}function webViewerZoomIn(){N.zoomIn()}function webViewerZoomOut(){N.zoomOut()}function webViewerZoomReset(){N.zoomReset()}function webViewerPageNumberChanged(t){var r=N.pdfViewer;""!==t.value&&N.pdfLinkService.goToPage(t.value);if(t.value!==r.currentPageNumber.toString()&&t.value!==r.currentPageLabel){var i;null===(i=N.toolbar)||void 0===i||i.setPageNumber(r.currentPageNumber,r.currentPageLabel)}}function webViewerScaleChanged(t){N.pdfViewer.currentScaleValue=t.value}function webViewerRotateCw(){N.rotatePages(90)}function webViewerRotateCcw(){N.rotatePages(-90)}function webViewerOptionalContentConfig(t){N.pdfViewer.optionalContentConfigPromise=t.promise}function webViewerSwitchScrollMode(t){N.pdfViewer.scrollMode=t.mode}function webViewerSwitchSpreadMode(t){N.pdfViewer.spreadMode=t.mode}function webViewerDocumentProperties(){var t;null===(t=N.pdfDocumentProperties)||void 0===t||t.open()}function webViewerFindFromUrlHash(t){N.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;N.supportsIntegratedFind?N.externalServices.updateFindMatchesCount(r):N.findBar.updateResultsCount(r)}function webViewerUpdateFindControlState(t){var r=t.state,i=t.previous,o=t.matchesCount,a=t.rawQuery;if(N.supportsIntegratedFind)N.externalServices.updateFindControlState({result:r,findPrevious:i,matchesCount:o,rawQuery:a});else{var u;null===(u=N.findBar)||void 0===u||u.updateUIState(r,i,o)}}function webViewerScaleChanging(t){var r;null===(r=N.toolbar)||void 0===r||r.setPageScale(t.presetValue,t.scale);N.pdfViewer.update()}function webViewerRotationChanging(t){N.pdfThumbnailViewer&&(N.pdfThumbnailViewer.pagesRotation=t.pagesRotation);N.forceRendering();N.pdfViewer.currentPageNumber=t.pageNumber}function webViewerPageChanging(t){var r,i,o,u,c=t.pageNumber,l=t.pageLabel;null===(r=N.toolbar)||void 0===r||r.setPageNumber(c,l);null===(i=N.secondaryToolbar)||void 0===i||i.setPageNumber(c);if((null===(o=N.pdfSidebar)||void 0===o?void 0:o.visibleView)===a.SidebarView.THUMBS){var h;null===(h=N.pdfThumbnailViewer)||void 0===h||h.scrollThumbnailIntoView(c)}var d=N.pdfViewer.getPageView(c-1);null===(u=N.toolbar)||void 0===u||u.updateLoadingIndicatorState((null==d?void 0:d.renderingState)===a.RenderingStates.RUNNING);var p=document.getElementById("pageNumber");if(p){var v=new CustomEvent("page-change");p.dispatchEvent(v)}}function webViewerResolutionChange(t){N.pdfViewer.refresh()}function webViewerVisibilityChange(t){"visible"===document.visibilityState&&setZoomDisabledTimeout()}var U=null;function setZoomDisabledTimeout(){U&&clearTimeout(U);U=setTimeout((function(){U=null}),G)}function webViewerWheel(t){var r=document.getElementById("viewerContainer");if(r.parentNode.querySelector(":hover")===r){var i=N.pdfViewer,o=N.supportsMouseWheelZoomCtrlKey,u=N.supportsMouseWheelZoomMetaKey,c=N.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 h=t.deltaMode,d=Math.exp(-t.deltaY/100),p=t.ctrlKey&&!N._isCtrlKeyDown&&h===WheelEvent.DOM_DELTA_PIXEL&&0===t.deltaX&&(Math.abs(d-1)<.05||!1)&&0===t.deltaZ;if(p||t.ctrlKey&&o||t.metaKey&&u){t.preventDefault();if(U||"hidden"===document.visibilityState||N.overlayManager.active)return;var v=i.currentScale;if(p&&c)if((d=N._accumulateFactor(v,d,"_wheelUnusedFactor"))<1)N.zoomOut(null,d);else{if(!(d>1))return;N.zoomIn(null,d)}else{var y=(0,a.normalizeWheelEventDirection)(t),g=0;if(h===WheelEvent.DOM_DELTA_LINE||h===WheelEvent.DOM_DELTA_PAGE)g=Math.abs(y)>=1?Math.sign(y):N._accumulateTicks(y,"_wheelUnusedTicks");else{g=N._accumulateTicks(y/30,"_wheelUnusedTicks")}if(g<0)N.zoomOut(-g);else{if(!(g>0))return;N.zoomIn(g)}}N._centerAtPos(v,t.clientX,t.clientY)}else setZoomDisabledTimeout()}}}}function webViewerTouchStart(t){if(!(N.pdfViewer.isInPresentationMode||t.touches.length<2)){t.preventDefault();if(2!==t.touches.length||N.overlayManager.active)N._touchInfo=null;else{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]}N._touchInfo={touch0X:i.pageX,touch0Y:i.pageY,touch1X:o.pageX,touch1Y:o.pageY}}}}function webViewerTouchMove(t){if(N._touchInfo&&2===t.touches.length){var r=N.pdfViewer,i=N._touchInfo,o=N.supportsPinchToZoom,a=_slicedToArray(t.touches,2),u=a[0],c=a[1];if(u.identifier>c.identifier){var l=[c,u];u=l[0];c=l[1]}var h=u,d=h.pageX,p=h.pageY,v=c,y=v.pageX,g=v.pageY,m=i.touch0X,_=i.touch0Y,b=i.touch1X,w=i.touch1Y;if(!(Math.abs(m-d)<=1&&Math.abs(_-p)<=1&&Math.abs(b-y)<=1&&Math.abs(w-g)<=1)){i.touch0X=d;i.touch0Y=p;i.touch1X=y;i.touch1Y=g;if(m===d&&_===p){var P=b-d,D=w-p,E=y-d,x=g-p,S=P*x-D*E;if(Math.abs(S)>.02*Math.hypot(P,D)*Math.hypot(E,x))return}else if(b===y&&w===g){var A=m-y,C=_-g,k=d-y,I=p-g,T=A*I-C*k;if(Math.abs(T)>.02*Math.hypot(A,C)*Math.hypot(k,I))return}else{if((d-m)*(y-b)+(p-_)*(g-w)>=0)return}t.preventDefault();var L=Math.hypot(d-y,p-g)||1,O=Math.hypot(m-b,_-w)||1,M=r.currentScale;if(o){var B=N._accumulateFactor(M,L/O,"_touchUnusedFactor");if(B<1)N.zoomOut(null,B);else{if(!(B>1))return;N.zoomIn(null,B)}}else{var G=N._accumulateTicks((L-O)/30,"_touchUnusedTicks");if(G<0)N.zoomOut(-G);else{if(!(G>0))return;N.zoomIn(G)}}N._centerAtPos(M,(d+y)/2,(p+g)/2)}}}function webViewerTouchEnd(t){if(N._touchInfo){t.preventDefault();N._touchInfo=null;N._touchUnusedTicks=0;N._touchUnusedFactor=1}}function webViewerClick(t){var r,i,o;if(null!==(r=N.secondaryToolbar)&&void 0!==r&&r.isOpen){var a=N.appConfig;if(N.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;N.secondaryToolbar.close()}}}function webViewerKeyUp(t){"Control"===t.key&&(N._isCtrlKeyDown=!1)}function webViewerKeyDown(t){var r,i,o,u,c;N._isCtrlKeyDown="Control"===t.key;if(!N.overlayManager.active){var l=N.eventBus,h=N.pdfViewer,d=h.isInPresentationMode,p=!1,v=!1,y=(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0);if(!window.isKeyIgnored||!window.isKeyIgnored(y,t.keyCode)){if(1===y||8===y||5===y||12===y)switch(t.keyCode){case 70:if(!N.supportsIntegratedFind&&!t.shiftKey){var g;null===(g=N.findBar)||void 0===g||g.open();p=!0}break;case 71:if(!N.supportsIntegratedFind){var m=N.findController.state;if(m){var _={source:window,type:"again",findPrevious:5===y||12===y};l.dispatch("find",_objectSpread(_objectSpread({},m),_))}p=!0}break;case 61:case 107:case 187:case 171:N.zoomIn();p=!0;break;case 173:case 109:case 189:N.zoomOut();p=!0;break;case 48:case 96:if(!d){setTimeout((function(){N.zoomReset()}));p=!1}break;case 38:if(d||N.page>1){N.page=1;p=!0;v=!0}break;case 40:if(d||N.page<N.pagesCount){N.page=N.pagesCount;p=!0;v=!0}}if(1===y||8===y)switch(t.keyCode){case 83:l.dispatch("download",{source:window});p=!0;break;case 79:l.dispatch("openfile",{source:window});p=!0}if(3===y||10===y)switch(t.keyCode){case 80:N.requestPresentationMode();p=!0;N.externalServices.reportTelemetry({type:"buttons",data:{id:"presentationModeKeyboard"}});break;case 71:if(N.appConfig.toolbar){N.appConfig.toolbar.pageNumber.select();p=!0}}if(p){v&&!d&&h.focus();t.preventDefault()}else{var b=(0,a.getActiveOrFocusedElement)(),w=null==b?void 0:b.tagName.toUpperCase();if(!("INPUT"===w||"TEXTAREA"===w||"SELECT"===w||"BUTTON"===w&&(13===t.keyCode||32===t.keyCode)||null!=b&&b.isContentEditable)||27===t.keyCode){if(0===y){var P=0,D=!1;switch(t.keyCode){case 38:case 33:h.isVerticalScrollbarEnabled&&(D=!0);P=-1;break;case 8:d||(D=!0);P=-1;break;case 37:h.isHorizontalScrollbarEnabled&&(D=!0);case 75:case 80:P=-1;break;case 27:if(null!==(r=N.secondaryToolbar)&&void 0!==r&&r.isOpen){N.secondaryToolbar.close();p=!0}if(!N.supportsIntegratedFind&&null!==(i=N.findBar)&&void 0!==i&&i.opened){N.findBar.close();p=!0}break;case 40:case 34:h.isVerticalScrollbarEnabled&&(D=!0);P=1;break;case 13:case 32:d||(D=!0);P=1;break;case 39:h.isHorizontalScrollbarEnabled&&(D=!0);case 74:case 78:P=1;break;case 36:if(d||N.page>1){N.page=1;p=!0;v=!0}break;case 35:if(d||N.page<N.pagesCount){N.page=N.pagesCount;p=!0;v=!0}break;case 83:null===(o=N.pdfCursorTools)||void 0===o||o.switchTool(a.CursorTool.SELECT);break;case 72:null===(u=N.pdfCursorTools)||void 0===u||u.switchTool(a.CursorTool.HAND);break;case 82:N.rotatePages(90);break;case 115:null===(c=N.pdfSidebar)||void 0===c||c.toggle()}if(0!==P&&(!D||"page-fit"===h.currentScaleValue)){P>0?h.nextPage():h.previousPage();p=!0}}if(4===y)switch(t.keyCode){case 13:case 32:if(!d&&"page-fit"!==h.currentScaleValue)break;h.previousPage();p=!0;break;case 82:N.rotatePages(-90)}v&&!h.containsElement(b)&&h.focus();p&&t.preventDefault()}}}}}function beforeUnload(t){t.preventDefault();t.returnValue="";return!1}var K={instance:{supportsPrinting:!1,createPrintService:function createPrintService(){throw new Error("Not implemented: createPrintService")}}};o()}catch($){o($)}}))},8961:(t,r,i)=>{i.d(r,{AppOptions:()=>g,OptionKind:()=>d,compatibilityParams:()=>o});i(7942),i(5776),i(1210),i(3352),i(4668),i(5598),i(8806),i(9366),i(6678),i(895),i(5897),i(2926),i(6180),i(1747),i(2374);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)||!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=Object.create(null),a=navigator.userAgent||"",u=navigator.platform||"",c=navigator.maxTouchPoints||1,l=/Android/.test(a),h=/\b(iPad|iPhone|iPod)(?=;)/.test(a)||"MacIntel"===u&&c>1;!function checkCanvasSizeLimitation(){(h||l)&&(o.maxCanvasPixels=5242880)}();var d={BROWSER:1,VIEWER:2,API:4,WORKER:8,PREFERENCE:128},p={canvasMaxAreaInBytes:{value:-1,kind:d.BROWSER+d.API},isInAutomation:{value:!1,kind:d.BROWSER},supportsDocumentFonts:{value:!0,kind:d.BROWSER},supportsIntegratedFind:{value:!1,kind:d.BROWSER},supportsMouseWheelZoomCtrlKey:{value:!0,kind:d.BROWSER},supportsMouseWheelZoomMetaKey:{value:!0,kind:d.BROWSER},supportsPinchToZoom:{value:!0,kind:d.BROWSER},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},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},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.mjs",kind:d.WORKER}};p.viewerCssTheme={value:0,kind:d.VIEWER+d.PREFERENCE};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.mjs",kind:d.VIEWER};var v=Object.create(null);if(globalThis.pdfDefaultOptions)for(var y in globalThis.pdfDefaultOptions)v[y]=globalThis.pdfDefaultOptions[y];var g=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||t&u.kind){var c=v[i];r[i]=void 0!==c?c: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){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){if(this.get("disablePreferences"))return;Object.keys(v).length&&console.warn('setAll: The Preferences may override manually set AppOptions; please use the "disablePreferences"-option in order to prevent that.')}for(var r in t)v[r]=t[r]}},{key:"remove",value:function remove(t){delete v[t]}}]);return AppOptions}()},9415:(t,r,i)=>{i.d(r,{BaseTreeViewer:()=>u});i(3352),i(5598),i(8806),i(9366),i(6678),i(895),i(5897),i(171),i(924),i(9593),i(1747),i(7942),i(5776),i(2926),i(6180),i(2374);var o=i(4927);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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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)||!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 a="selected",u=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._l10n=t.l10n;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._l10n.pause();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()}this._l10n.resume()}},{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._l10n.pause();this.container.append(t);this._l10n.resume();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){this._l10n.pause();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._l10n.resume();this._updateCurrentTreeItem(t);this.container.scrollTo(t.offsetLeft,t.offsetTop+-100)}}}]);return BaseTreeViewer}()},4397:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{DownloadManager:()=>l});i(3352),i(6180),i(895),i(1747),i(7484),i(2374),i(1210),i(7529),i(3757),i(3655),i(2555),i(2202),i(5598),i(8806),i(9366),i(6678),i(5897),i(2926);var a=i(1869),u=t([a]);a=(u.then?(await u)():u)[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 _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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classApplyDescriptorGet(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 _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}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 c=new WeakMap,l=function(){function DownloadManager(){_classCallCheck(this,DownloadManager);_classPrivateFieldInitSpec(this,c,{writable:!0,value:new WeakMap})}_createClass(DownloadManager,[{key:"downloadUrl",value:function downloadUrl(t,r,i){(0,a.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){var i=(0,a.isPdfFile)(r),o=i?"application/pdf":"";if(i){var u=_classPrivateFieldGet(this,c).get(t);if(!u){u=URL.createObjectURL(new Blob([t],{type:o}));_classPrivateFieldGet(this,c).set(t,u)}try{window.open(u);return!0}catch(r){globalThis.ngxConsole.error("openOrDownloadData: ".concat(r));URL.revokeObjectURL(u);_classPrivateFieldGet(this,c).delete(t)}}this.downloadData(t,r,o);return!1}},{key:"download",value:function download(t,r,i,o){_download(URL.createObjectURL(t),i)}}]);return DownloadManager}();o()}catch(h){o(h)}}))},6554:(t,r,i)=>{i.d(r,{AutomationEventBus:()=>c,EventBus:()=>u,waitOnEventOrTimeout:()=>waitOnEventOrTimeout});i(895),i(5666),i(5897),i(3352),i(171),i(4226),i(6302),i(6180),i(1747),i(7484),i(2374),i(9366),i(6678),i(2926),i(5598),i(8806),i(924),i(9593),i(7942),i(5776),i(13),i(9175),i(6128);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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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,_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)||!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 _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={EVENT:"event",TIMEOUT:"timeout"};function waitOnEventOrTimeout(t){var r=t.target,i=t.name,a=t.delay,c=void 0===a?0:a;return new Promise((function(t,a){if("object"!==_typeof(r)||!i||"string"!=typeof i||!(Number.isInteger(c)&&c>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function handler(o){r instanceof u?r._off(i,l):r.removeEventListener(i,l);d&&clearTimeout(d);t(o)}var l=handler.bind(null,o.EVENT);r instanceof u?r._on(i,l):r.addEventListener(i,l);var h=handler.bind(null,o.TIMEOUT),d=setTimeout(h,c)}))}var a=new WeakMap,u=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,c=_createForOfIteratorHelper(i.slice(0));try{for(c.s();!(u=c.n()).done;){var l=u.value,h=l.listener,d=l.external;l.once&&this._off(t,h);d?(o||(o=[])).push(h):h(r)}}catch(t){c.e(t)}finally{c.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}(),c=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)},9170:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{GenericScripting:()=>c});i(895),i(5666),i(5598),i(8806),i(9366),i(6678),i(3352),i(5897),i(2926),i(6180),i(1747),i(2374),i(1133),i(2173),i(2630),i(1024),i(13),i(4226),i(7121),i(6770),i(1378),i(171),i(4668),i(1585),i(2993),i(7262),i(7335);var a=i(1869),u=t([a]);a=(u.then?(await u)():u)[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 _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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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 c=function(){function GenericScripting(t){var r;_classCallCheck(this,GenericScripting);"Function"===(null===(r=t)||void 0===r||null===(r=r.constructor)||void 0===r?void 0:r.name)&&(t=t());this._ready=new Promise((function(r,i){import(t).then((function(t){r(t.QuickJSSandbox())})).catch(i)}))}_createClass(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}();o()}catch(l){o(l)}}))},1546:(t,r,i)=>{i.a(t,(async(t,r)=>{try{i(7254),i(4668),i(2808),i(13),i(895),i(9175),i(6128),i(3352),i(5598),i(8806),i(9366),i(6678),i(5897),i(5666),i(2926),i(6180),i(1747),i(2374),i(1133),i(2173),i(2630),i(1024),i(4226),i(7121),i(6770),i(1378),i(171);var o=i(39),a=i(8961),u=i(216),c=i(4397),l=i(450),h=i(9170),d=t([o,c,l,h]);[o,c,l,h]=d.then?(await d)():d;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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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,_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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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=_isNativeReflectConstruct();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 _possibleConstructorReturn(this,i)}}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)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}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}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}var p=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",{prefs: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}(u.BasePreferences),v=function(t){_inherits(GenericExternalServices,t);var r,i=_createSuper(GenericExternalServices);function GenericExternalServices(){_classCallCheck(this,GenericExternalServices);return i.apply(this,arguments)}_createClass(GenericExternalServices,null,[{key:"createDownloadManager",value:function createDownloadManager(){return new c.DownloadManager}},{key:"createPreferences",value:function createPreferences(){return new p}},{key:"createL10n",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){return _regeneratorRuntime().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new l.GenericL10n(a.AppOptions.get("locale")));case 1:case"end":return t.stop()}}),_callee3)}))),function createL10n(){return r.apply(this,arguments)})},{key:"createScripting",value:function createScripting(t){var r=t.sandboxBundleSrc;return new h.GenericScripting(r)}}]);return GenericExternalServices}(o.DefaultExternalServices);o.PDFViewerApplication.externalServices=v;r()}catch(y){r(y)}}))},450:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{GenericL10n:()=>p});i(3352),i(13),i(9175),i(6128),i(5598),i(8806),i(5897),i(2926),i(2173),i(2630),i(1024),i(7121),i(6770),i(1378),i(171),i(895),i(5666),i(9366),i(6678),i(1133),i(4226),i(6180),i(1747),i(2374),i(7529),i(3757),i(3655),i(2555),i(2202),i(7942),i(4711);var a,u=i(8759),c=i(8275),l=i(1869),h=i(4065),d=t([l]);l=(d.then?(await d)():d)[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 asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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 _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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},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 _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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _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)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}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}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classStaticPrivateMethodGet(t,r,i){_classCheckPrivateStaticAccess(t,r);return i}function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}function _awaitAsyncGenerator(t){return new _OverloadYield(t,0)}function _AsyncGenerator(t){var r,i;function resume(r,i){try{var o=t[r](i),a=o.value,u=a instanceof _OverloadYield;Promise.resolve(u?a.v:a).then((function(i){if(u){var c="return"===r?"return":"next";if(!a.k||i.done)return resume(c,i);i=t[c](i).value}settle(o.done?"return":"normal",i)}),(function(t){resume("throw",t)}))}catch(t){settle("throw",t)}}function settle(t,o){switch(t){case"return":r.resolve({value:o,done:!0});break;case"throw":r.reject(o);break;default:r.resolve({value:o,done:!1})}(r=r.next)?resume(r.key,r.arg):i=null}this._invoke=function(t,o){return new Promise((function(a,u){var c={key:t,arg:o,resolve:a,reject:u,next:null};i?i=i.next=c:(r=i=c,resume(t,o))}))},"function"!=typeof t.return&&(this.return=void 0)}_AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},_AsyncGenerator.prototype.next=function(t){return this._invoke("next",t)},_AsyncGenerator.prototype.throw=function(t){return this._invoke("throw",t)},_AsyncGenerator.prototype.return=function(t){return this._invoke("return",t)};function _OverloadYield(t,r){this.v=t,this.k=r}var p=function(t){_inherits(GenericL10n,t);var r,i,o=(r=GenericL10n,i=_isNativeReflectConstruct(),function _createSuperInternal(){var t,o=_getPrototypeOf(r);if(i){var a=_getPrototypeOf(this).constructor;t=Reflect.construct(o,arguments,a)}else t=o.apply(this,arguments);return _possibleConstructorReturn(this,t)});function GenericL10n(t){var r;_classCallCheck(this,GenericL10n);(r=o.call(this,{lang:t}))._setL10n(new c.DOMLocalization([],_classStaticPrivateMethodGet(GenericL10n,GenericL10n,_generateBundles).bind(GenericL10n,"en-us",r.getLanguage())));return r}return _createClass(GenericL10n)}(h.L10n);a=p;function _generateBundles(t,r){var i,o=this;return(i=_regeneratorRuntime().mark((function _callee(){var i,u,c,l,h,d,p,v,y;return _regeneratorRuntime().wrap((function _callee$(g){for(;;)switch(g.prev=g.next){case 0:g.next=2;return _awaitAsyncGenerator(_classStaticPrivateMethodGet(o,a,_getPaths).call(o));case 2:i=g.sent;u=i.baseURL;c=i.paths;l=[r];if(t!==r){(h=r.split("-",1)[0])!==r&&l.push(h);l.push(t)}d=0,p=l;case 8:if(!(d<p.length)){g.next=19;break}v=p[d];g.next=12;return _awaitAsyncGenerator(_classStaticPrivateMethodGet(o,a,_createBundle).call(o,v,u,c));case 12:if(!(y=g.sent)){g.next=16;break}g.next=16;return y;case 16:d++;g.next=8;break;case 19:case"end":return g.stop()}}),_callee)})),function(){return new _AsyncGenerator(i.apply(this,arguments))})()}function _createBundle(t,r,i){return _createBundle3.apply(this,arguments)}function _createBundle3(){return(_createBundle3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t,r,i){var o,a,c,h,d,p;return _regeneratorRuntime().wrap((function _callee2$(v){for(;;)switch(v.prev=v.next){case 0:if(o=i[t]){v.next=3;break}return v.abrupt("return",null);case 3:a=new URL(o,r);v.next=6;return(0,l.fetchData)(a,"text");case 6:c=v.sent;h=new u.FluentResource(c);d=new u.FluentBundle(t);(p=d.addResource(h)).length&&console.error("L10n errors",p);return v.abrupt("return",d);case 12:case"end":return v.stop()}}),_callee2)})))).apply(this,arguments)}function _getPaths(){return _getPaths3.apply(this,arguments)}function _getPaths3(){return(_getPaths3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t,r,i;return _regeneratorRuntime().wrap((function _callee3$(o){for(;;)switch(o.prev=o.next){case 0:t=document.querySelector('link[type="application/l10n"]'),r=t.href;o.next=3;return(0,l.fetchData)(r,"json");case 3:i=o.sent;return o.abrupt("return",{baseURL:r.replace(/[^/]*$/,"")||"./",paths:i});case 5:case"end":return o.stop()}}),_callee3)})))).apply(this,arguments)}o()}catch(v){o(v)}}))},6143:(t,r,i)=>{i.d(r,{GrabToPan:()=>l});i(3352),i(6180),i(895),i(1747),i(394),i(2374),i(5598),i(8806),i(9366),i(6678),i(5897),i(2926);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)||!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 o="grab-to-pan-grab",a=new WeakSet,u=new WeakSet,c=new WeakSet,l=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,c);_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,c,_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,c=a.right,l=a.bottom,h=a.left;if(r>=u&&r<=l&&t<=c&&t>=h)return!0}return!1}},4065:(t,r,i)=>{i.d(r,{L10n:()=>c});i(5136),i(7944),i(3352),i(6180),i(895),i(1747),i(7484),i(2374),i(2796),i(5598),i(8806),i(9366),i(6678),i(5897),i(5666),i(2926),i(1133),i(2173),i(2630),i(1024),i(13),i(4226),i(7121),i(6770),i(1378),i(171);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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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)||!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 _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 _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 _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,c=function(){function L10n(t){var r=t.lang,i=t.isRTL,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,L10n);_classPrivateFieldInitSpec(this,o,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,a,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,u,{writable:!0,value:void 0});_classPrivateFieldSet(this,a,_classStaticPrivateMethodGet(L10n,L10n,_fixupLangCode).call(L10n,r));_classPrivateFieldSet(this,u,c);_classPrivateFieldSet(this,o,(null!=i?i:_classStaticPrivateMethodGet(L10n,L10n,_isRTL).call(L10n,_classPrivateFieldGet(this,a)))?"rtl":"ltr")}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(L10n,[{key:"_setL10n",value:function _setL10n(t){_classPrivateFieldSet(this,u,t)}},{key:"getLanguage",value:function getLanguage(){return _classPrivateFieldGet(this,a)}},{key:"getDirection",value:function getDirection(){return _classPrivateFieldGet(this,o)}},{key:"get",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,i,o,a,c=arguments;return _regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:r=c.length>1&&void 0!==c[1]?c[1]:null;i=c.length>2?c[2]:void 0;if(!Array.isArray(t)){l.next=8;break}t=t.map((function(t){return{id:t}}));l.next=6;return _classPrivateFieldGet(this,u).formatMessages(t);case 6:o=l.sent;return l.abrupt("return",o.map((function(t){return t.value})));case 8:l.next=10;return _classPrivateFieldGet(this,u).formatMessages([{id:t,args:r}]);case 10:a=l.sent;return l.abrupt("return",(null==a?void 0:a[0].value)||i);case 12:case"end":return l.stop()}}),_callee,this)}))),function get(t){return r.apply(this,arguments)})},{key:"translate",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){return _regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:r.prev=0;_classPrivateFieldGet(this,u).connectRoot(t);r.next=4;return _classPrivateFieldGet(this,u).translateRoots();case 4:r.next=8;break;case 6:r.prev=6;r.t0=r.catch(0);case 8:case"end":return r.stop()}}),_callee2,this,[[0,6]])}))),function translate(r){return t.apply(this,arguments)})},{key:"pause",value:function pause(){_classPrivateFieldGet(this,u).pauseObserving()}},{key:"resume",value:function resume(){_classPrivateFieldGet(this,u).resumeObserving()}}]);var t,r;return L10n}();function _fixupLangCode(t){var r;return{en:"en-us",es:"es-es",fy:"fy-nl",ga:"ga-ie",gu:"gu-in",hi:"hi-in",hy:"hy-am",nb:"nb-no",ne:"ne-np",nn:"nn-no",pa:"pa-in",pt:"pt-pt",sv:"sv-se",zh:"zh-cn"}[t=(null===(r=t)||void 0===r?void 0:r.toLowerCase())||"en-us"]||t}function _isRTL(t){var r=t.split("-",1)[0];return["ar","he","fa","ps","ur"].includes(r)}},7910:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{NullL10n:()=>p});i(895),i(5666),i(9366),i(6678),i(1133),i(3352),i(13),i(9175),i(6128),i(5598),i(8806),i(5897),i(2926),i(6180),i(1747),i(2374),i(2173),i(2630),i(1024),i(4226),i(7121),i(6770),i(1378),i(171);var a=i(1869),u=i(8759),c=i(8275),l=i(4065),h=t([a]);a=(h.then?(await h)():h)[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 _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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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,_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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _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)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}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}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classStaticPrivateMethodGet(t,r,i){_classCheckPrivateStaticAccess(t,r);return i}function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}function _AsyncGenerator(t){var r,i;function resume(r,i){try{var o=t[r](i),a=o.value,u=a instanceof _OverloadYield;Promise.resolve(u?a.v:a).then((function(i){if(u){var c="return"===r?"return":"next";if(!a.k||i.done)return resume(c,i);i=t[c](i).value}settle(o.done?"return":"normal",i)}),(function(t){resume("throw",t)}))}catch(t){settle("throw",t)}}function settle(t,o){switch(t){case"return":r.resolve({value:o,done:!0});break;case"throw":r.reject(o);break;default:r.resolve({value:o,done:!1})}(r=r.next)?resume(r.key,r.arg):i=null}this._invoke=function(t,o){return new Promise((function(a,u){var c={key:t,arg:o,resolve:a,reject:u,next:null};i?i=i.next=c:(r=i=c,resume(t,o))}))},"function"!=typeof t.return&&(this.return=void 0)}_AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},_AsyncGenerator.prototype.next=function(t){return this._invoke("next",t)},_AsyncGenerator.prototype.throw=function(t){return this._invoke("throw",t)},_AsyncGenerator.prototype.return=function(t){return this._invoke("return",t)};function _OverloadYield(t,r){this.v=t,this.k=r}var d=function(t){_inherits(ConstL10n,t);var r,i,o=(r=ConstL10n,i=_isNativeReflectConstruct(),function _createSuperInternal(){var t,o=_getPrototypeOf(r);if(i){var a=_getPrototypeOf(this).constructor;t=Reflect.construct(o,arguments,a)}else t=o.apply(this,arguments);return _possibleConstructorReturn(this,t)});function ConstL10n(t){var r;_classCallCheck(this,ConstL10n);(r=o.call(this,{lang:t}))._setL10n(new c.DOMLocalization([],_classStaticPrivateMethodGet(ConstL10n,ConstL10n,_generateBundles).bind(ConstL10n,t)));return r}_createClass(ConstL10n,null,[{key:"instance",get:function get(){return(0,a.shadow)(this,"instance",new ConstL10n("en-us"))}}]);return ConstL10n}(l.L10n);function _generateBundles(t){return(r=_regeneratorRuntime().mark((function _callee3(){var r,i,o;return _regeneratorRuntime().wrap((function _callee3$(a){for(;;)switch(a.prev=a.next){case 0:r=new u.FluentResource("pdfjs-previous-button =\n    .title = Previous Page\npdfjs-previous-button-label = Previous\npdfjs-next-button =\n    .title = Next Page\npdfjs-next-button-label = Next\npdfjs-page-input =\n    .title = Page\npdfjs-of-pages = of { $pagesCount }\npdfjs-page-of-pages = ({ $pageNumber } of { $pagesCount })\npdfjs-zoom-out-button =\n    .title = Zoom Out\npdfjs-zoom-out-button-label = Zoom Out\npdfjs-zoom-in-button =\n    .title = Zoom In\npdfjs-zoom-in-button-label = Zoom In\npdfjs-zoom-select =\n    .title = Zoom\npdfjs-presentation-mode-button =\n    .title = Switch to Presentation Mode\npdfjs-presentation-mode-button-label = Presentation Mode\npdfjs-open-file-button =\n    .title = Open File\npdfjs-open-file-button-label = Open\npdfjs-print-button =\n    .title = Print\npdfjs-print-button-label = Print\npdfjs-save-button =\n    .title = Save\npdfjs-save-button-label = Save\npdfjs-download-button =\n    .title = Download\npdfjs-download-button-label = Download\npdfjs-bookmark-button =\n    .title = Current Page (View URL from Current Page)\npdfjs-bookmark-button-label = Current Page\npdfjs-open-in-app-button =\n    .title = Open in app\npdfjs-open-in-app-button-label = Open in app\npdfjs-tools-button =\n    .title = Tools\npdfjs-tools-button-label = Tools\npdfjs-first-page-button =\n    .title = Go to First Page\npdfjs-first-page-button-label = Go to First Page\npdfjs-last-page-button =\n    .title = Go to Last Page\npdfjs-last-page-button-label = Go to Last Page\npdfjs-page-rotate-cw-button =\n    .title = Rotate Clockwise\npdfjs-page-rotate-cw-button-label = Rotate Clockwise\npdfjs-page-rotate-ccw-button =\n    .title = Rotate Counterclockwise\npdfjs-page-rotate-ccw-button-label = Rotate Counterclockwise\npdfjs-cursor-text-select-tool-button =\n    .title = Enable Text Selection Tool\npdfjs-cursor-text-select-tool-button-label = Text Selection Tool\npdfjs-cursor-hand-tool-button =\n    .title = Enable Hand Tool\npdfjs-cursor-hand-tool-button-label = Hand Tool\npdfjs-scroll-page-button =\n    .title = Use Page Scrolling\npdfjs-scroll-page-button-label = Page Scrolling\npdfjs-scroll-vertical-button =\n    .title = Use Vertical Scrolling\npdfjs-scroll-vertical-button-label = Vertical Scrolling\npdfjs-scroll-horizontal-button =\n    .title = Use Horizontal Scrolling\npdfjs-scroll-horizontal-button-label = Horizontal Scrolling\npdfjs-scroll-wrapped-button =\n    .title = Use Wrapped Scrolling\npdfjs-scroll-wrapped-button-label = Wrapped Scrolling\npdfjs-spread-none-button =\n    .title = Do not join page spreads\npdfjs-spread-none-button-label = No Spreads\npdfjs-spread-odd-button =\n    .title = Join page spreads starting with odd-numbered pages\npdfjs-spread-odd-button-label = Odd Spreads\npdfjs-spread-even-button =\n    .title = Join page spreads starting with even-numbered pages\npdfjs-spread-even-button-label = Even Spreads\npdfjs-document-properties-button =\n    .title = Document Properties…\npdfjs-document-properties-button-label = Document Properties…\npdfjs-document-properties-file-name = File name:\npdfjs-document-properties-file-size = File size:\npdfjs-document-properties-kb = { $size_kb } KB ({ $size_b } bytes)\npdfjs-document-properties-mb = { $size_mb } MB ({ $size_b } bytes)\npdfjs-document-properties-title = Title:\npdfjs-document-properties-author = Author:\npdfjs-document-properties-subject = Subject:\npdfjs-document-properties-keywords = Keywords:\npdfjs-document-properties-creation-date = Creation Date:\npdfjs-document-properties-modification-date = Modification Date:\npdfjs-document-properties-date-string = { $date }, { $time }\npdfjs-document-properties-creator = Creator:\npdfjs-document-properties-producer = PDF Producer:\npdfjs-document-properties-version = PDF Version:\npdfjs-document-properties-page-count = Page Count:\npdfjs-document-properties-page-size = Page Size:\npdfjs-document-properties-page-size-unit-inches = in\npdfjs-document-properties-page-size-unit-millimeters = mm\npdfjs-document-properties-page-size-orientation-portrait = portrait\npdfjs-document-properties-page-size-orientation-landscape = landscape\npdfjs-document-properties-page-size-name-a-three = A3\npdfjs-document-properties-page-size-name-a-four = A4\npdfjs-document-properties-page-size-name-letter = Letter\npdfjs-document-properties-page-size-name-legal = Legal\npdfjs-document-properties-page-size-dimension-string = { $width } × { $height } { $unit } ({ $orientation })\npdfjs-document-properties-page-size-dimension-name-string = { $width } × { $height } { $unit } ({ $name }, { $orientation })\npdfjs-document-properties-linearized = Fast Web View:\npdfjs-document-properties-linearized-yes = Yes\npdfjs-document-properties-linearized-no = No\npdfjs-document-properties-close-button = Close\npdfjs-print-progress-message = Preparing document for printing…\npdfjs-print-progress-percent = { $progress }%\npdfjs-print-progress-close-button = Cancel\npdfjs-printing-not-supported = Warning: Printing is not fully supported by this browser.\npdfjs-printing-not-ready = Warning: The PDF is not fully loaded for printing.\npdfjs-toggle-sidebar-button =\n    .title = Toggle Sidebar\npdfjs-toggle-sidebar-notification-button =\n    .title = Toggle Sidebar (document contains outline/attachments/layers)\npdfjs-toggle-sidebar-button-label = Toggle Sidebar\npdfjs-document-outline-button =\n    .title = Show Document Outline (double-click to expand/collapse all items)\npdfjs-document-outline-button-label = Document Outline\npdfjs-attachments-button =\n    .title = Show Attachments\npdfjs-attachments-button-label = Attachments\npdfjs-layers-button =\n    .title = Show Layers (double-click to reset all layers to the default state)\npdfjs-layers-button-label = Layers\npdfjs-thumbs-button =\n    .title = Show Thumbnails\npdfjs-thumbs-button-label = Thumbnails\npdfjs-current-outline-item-button =\n    .title = Find Current Outline Item\npdfjs-current-outline-item-button-label = Current Outline Item\npdfjs-findbar-button =\n    .title = Find in Document\npdfjs-findbar-button-label = Find\npdfjs-additional-layers = Additional Layers\npdfjs-thumb-page-title =\n    .title = Page { $page }\npdfjs-thumb-page-canvas =\n    .aria-label = Thumbnail of Page { $page }\npdfjs-find-input =\n    .title = Find\n    .placeholder = Find in document…\npdfjs-find-previous-button =\n    .title = Find the previous occurrence of the phrase\npdfjs-find-previous-button-label = Previous\npdfjs-find-next-button =\n    .title = Find the next occurrence of the phrase\npdfjs-find-next-button-label = Next\npdfjs-find-highlight-checkbox = Highlight All\npdfjs-find-match-case-checkbox-label = Match Case\npdfjs-find-match-diacritics-checkbox-label = Match Diacritics\npdfjs-find-entire-word-checkbox-label = Whole Words\npdfjs-find-reached-top = Reached top of document, continued from bottom\npdfjs-find-reached-bottom = Reached end of document, continued from top\npdfjs-find-match-count =\n    { $total ->\n        [one] { $current } of { $total } match\n       *[other] { $current } of { $total } matches\n    }\npdfjs-find-match-count-limit =\n    { $limit ->\n        [one] More than { $limit } match\n       *[other] More than { $limit } matches\n    }\npdfjs-find-not-found = Phrase not found\npdfjs-page-scale-width = Page Width\npdfjs-page-scale-fit = Page Fit\npdfjs-page-scale-auto = Automatic Zoom\npdfjs-page-scale-actual = Actual Size\npdfjs-page-scale-percent = { $scale }%\npdfjs-page-landmark =\n    .aria-label = Page { $page }\npdfjs-loading-error = An error occurred while loading the PDF.\npdfjs-invalid-file-error = Invalid or corrupted PDF file.\npdfjs-missing-file-error = Missing PDF file.\npdfjs-unexpected-response-error = Unexpected server response.\npdfjs-rendering-error = An error occurred while rendering the page.\npdfjs-annotation-date-string = { $date }, { $time }\npdfjs-text-annotation-type =\n    .alt = [{ $type } Annotation]\npdfjs-password-label = Enter the password to open this PDF file.\npdfjs-password-invalid = Invalid password. Please try again.\npdfjs-password-ok-button = OK\npdfjs-password-cancel-button = Cancel\npdfjs-web-fonts-disabled = Web fonts are disabled: unable to use embedded PDF fonts.\npdfjs-editor-free-text-button =\n    .title = Text\npdfjs-editor-free-text-button-label = Text\npdfjs-editor-ink-button =\n    .title = Draw\npdfjs-editor-ink-button-label = Draw\npdfjs-editor-stamp-button =\n    .title = Add or edit images\npdfjs-editor-stamp-button-label = Add or edit images\npdfjs-editor-remove-button =\n    .title = Remove\npdfjs-editor-free-text-color-input = Color\npdfjs-editor-free-text-size-input = Size\npdfjs-editor-ink-color-input = Color\npdfjs-editor-ink-thickness-input = Thickness\npdfjs-editor-ink-opacity-input = Opacity\npdfjs-editor-stamp-add-image-button =\n    .title = Add image\npdfjs-editor-stamp-add-image-button-label = Add image\npdfjs-free-text =\n    .aria-label = Text Editor\npdfjs-free-text-default-content = Start typing…\npdfjs-ink =\n    .aria-label = Draw Editor\npdfjs-ink-canvas =\n    .aria-label = User-created image\npdfjs-editor-alt-text-button-label = Alt text\npdfjs-editor-alt-text-edit-button-label = Edit alt text\npdfjs-editor-alt-text-dialog-label = Choose an option\npdfjs-editor-alt-text-dialog-description = Alt text (alternative text) helps when people can’t see the image or when it doesn’t load.\npdfjs-editor-alt-text-add-description-label = Add a description\npdfjs-editor-alt-text-add-description-description = Aim for 1-2 sentences that describe the subject, setting, or actions.\npdfjs-editor-alt-text-mark-decorative-label = Mark as decorative\npdfjs-editor-alt-text-mark-decorative-description = This is used for ornamental images, like borders or watermarks.\npdfjs-editor-alt-text-cancel-button = Cancel\npdfjs-editor-alt-text-save-button = Save\npdfjs-editor-alt-text-decorative-tooltip = Marked as decorative\npdfjs-editor-alt-text-textarea =\n    .placeholder = For example, “A young man sits down at a table to eat a meal”\npdfjs-editor-resizer-label-top-left = Top left corner — resize\npdfjs-editor-resizer-label-top-middle = Top middle — resize\npdfjs-editor-resizer-label-top-right = Top right corner — resize\npdfjs-editor-resizer-label-middle-right = Middle right — resize\npdfjs-editor-resizer-label-bottom-right = Bottom right corner — resize\npdfjs-editor-resizer-label-bottom-middle = Bottom middle — resize\npdfjs-editor-resizer-label-bottom-left = Bottom left corner — resize\npdfjs-editor-resizer-label-middle-left = Middle left — resize");i=new u.FluentBundle(t);(o=i.addResource(r)).length&&console.error("L10n errors",o);a.next=7;return i;case 7:case"end":return a.stop()}}),_callee3)})),function(){return new _AsyncGenerator(r.apply(this,arguments))})();var r}var p={getLanguage:function getLanguage(){return d.instance.getLanguage()},getDirection:function getDirection(){return d.instance.getDirection()},get:function get(t){var r=arguments;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var i,o;return _regeneratorRuntime().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:i=r.length>1&&void 0!==r[1]?r[1]:null;o=r.length>2?r[2]:void 0;return a.abrupt("return",d.instance.get(t,i,o));case 3:case"end":return a.stop()}}),_callee)})))()},translate:function translate(t){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",d.instance.translate(t));case 1:case"end":return r.stop()}}),_callee2)})))()},pause:function pause(){return d.instance.pause()},resume:function resume(){return d.instance.resume()}};o()}catch(v){o(v)}}))},5318:(t,r,i)=>{i.d(r,{ngxExtendedPdfViewerVersion:()=>o});var o="19.0.0"},1996:(t,r,i)=>{i.d(r,{OverlayManager:()=>u});i(6180),i(895),i(1747),i(7484),i(2374),i(3352),i(5598),i(8806),i(9366),i(6678),i(5897),i(5666),i(2926),i(1133),i(2173),i(2630),i(1024),i(13),i(4226),i(7121),i(6770),i(1378),i(171);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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},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,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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)||!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 _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,u=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$(c){for(;;)switch(c.prev=c.next){case 0:r=u.length>1&&void 0!==u[1]&&u[1];if("object"===_typeof(t)){c.next=5;break}throw new Error("Not enough parameters.");case 5:if(!_classPrivateFieldGet(this,o).has(t)){c.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 c.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}()},658:(t,r,i)=>{i.d(r,{PageFlip:()=>E});i(5598),i(8806),i(9366),i(6678),i(895),i(3352),i(5897),i(6394),i(4226),i(8649),i(7874),i(171),i(924),i(3032),i(5619),i(7942),i(9786),i(2796),i(6180),i(5548),i(1747),i(2374),i(9142),i(2926),i(13),i(9175),i(6128),i(9593),i(5776),i(9718),i(7262);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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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,_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)||!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=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 c,l=_createForOfIteratorHelper(this.state.area);try{for(l.s();!(c=l.n()).done;){var h=c.value;if(null!==h){h=this.render.convertToGlobal(h);i.lineTo(h.x-o.x,h.y-o.y)}}}catch(t){l.e(t)}finally{l.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,c=1===t?r.left+r.pageWidth:r.left,l=r.top;this.isLoad?o.drawImage(this.image,c,l,a,u):this.drawLoader(o,{x:c,y:l},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}(),c=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),l=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,c=i.y,l=Math.sqrt(Math.pow(r,2)*Math.pow(o-u,2)/(Math.pow(o-u,2)+Math.pow(a-c,2)))+o;i.x<0&&(l*=-1);var h=(l-o)*(a-c)/(o-u)+a;o-u+a===0&&(h=r);return{x:l,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,c=t[0].x*t[1].y-t[1].x*t[0].y,l=r[0].x*r[1].y-r[1].x*r[0].y,h=i*l-o*c,d=a*l-u*c,p=-(c*u-l*a)/(i*u-o*a),v=-(i*l-o*c)/(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 c=1;c<=a;c+=1)u.push({x:getCord(t.x,r.x,i,a,c),y:getCord(t.y,r.y,o,a,c)});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 c=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+=(c=l.GetRotatedPoint(c,{x:0,y:0},this.state.angle)).x+"px "+c.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?l.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=l.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=l.GetIntersectBetweenTwoSegment(r,[t,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]);this.sideIntersectPoint=l.GetIntersectBetweenTwoSegment(r,[t,this.rect.bottomLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]);this.bottomIntersectPoint=l.GetIntersectBetweenTwoSegment(r,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}])}else{this.topIntersectPoint=l.GetIntersectBetweenTwoSegment(r,[this.rect.topLeft,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]);this.sideIntersectPoint=l.GetIntersectBetweenTwoSegment(r,[t,this.rect.topLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]);this.bottomIntersectPoint=l.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=l.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)),c=this.rect.bottomRight,h=this.rect.topLeft;if("bottom"===this.corner){c=this.rect.topRight;h=this.rect.bottomLeft}if(c.x<=0){var d=l.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 c=this.app.getPageCollection().prevBy(this.flippingPage);if(null!==c&&this.flippingPage.getDensity()!==c.getDensity()){this.flippingPage.setDrawingDensity("hard");c.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],c=l.GetCordsFromTwoPoint(t,r),h=[],d=_createForOfIteratorHelper(c);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(c.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}(),y=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,c=this.setting.height,l=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);(c=u/a)>this.getBlockHeight()&&(u=(c=this.getBlockHeight())*a);l="portrait"===t?i-u/2-u:i-u}else if(r<2*u&&this.app.getSettings().usePortrait){t="portrait";l=i-u/2-u}this.boundsRect={left:l,top:o-c/2,width:2*u,height:c,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}(),g=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}(y),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,c=Math.abs(i.y-o.touchPoint.point.y);if(Math.abs(u)>o.swipeDistance&&c<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}(),_=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 c,l=_createForOfIteratorHelper(a);try{for(l.s();!(c=l.n()).done;){var h=c.value;u.distElement.appendChild(h)}}catch(t){l.e(t)}finally{l.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),w=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,c="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};c+=(v=l.GetRotatedPoint(v,{x:i,y:100},u)).x+"px "+v.y+"px, "}c=c.slice(0,-2);c+=")";var y="\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(c,";\n            -webkit-clip-path: ").concat(c,";\n        ");this.innerShadow.style.cssText=y}},{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( ",c=0,h=[{x:0,y:0},{x:t.pageWidth,y:0},{x:t.pageWidth,y:t.height},{x:0,y:t.height}];c<h.length;c++){var d=h[c];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=l.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}(y),D=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}");var E=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 D).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 g(this,this.setting,i);this.flipController=new v(this.render,this);this.pages=new c(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 _(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 c(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&&l.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}(w)},6329:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PasswordPrompt:()=>y});i(3352),i(6180),i(895),i(1747),i(7484),i(2374),i(394),i(5598),i(8806),i(9366),i(6678),i(5897),i(5666),i(2926),i(1133),i(2173),i(2630),i(1024),i(13),i(4226),i(7121),i(6770),i(1378),i(171);var a=i(1869),u=t([a]);a=(u.then?(await u)():u)[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 _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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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,_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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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){_classApplyDescriptorSet(t,_classExtractFieldDescriptor(t,r,"set"),i);return 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}}function _classPrivateFieldGet(t,r){return _classApplyDescriptorGet(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 _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var c=new WeakMap,l=new WeakMap,h=new WeakMap,d=new WeakSet,p=new WeakSet,v=new WeakSet,y=function(){function PasswordPrompt(t,r){var i=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,PasswordPrompt);_classPrivateMethodInitSpec(this,v);_classPrivateMethodInitSpec(this,p);_classPrivateMethodInitSpec(this,d);_classPrivateFieldInitSpec(this,c,{writable:!0,value:null});_classPrivateFieldInitSpec(this,l,{writable:!0,value:null});_classPrivateFieldInitSpec(this,h,{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._isViewerEmbedded=o;this.submitButton.addEventListener("click",_classPrivateMethodGet(this,d,_verify2).bind(this));this.cancelButton.addEventListener("click",this.close.bind(this));this.input.addEventListener("keydown",(function(t){13===t.keyCode&&_classPrivateMethodGet(i,d,_verify2).call(i)}));this.overlayManager.register(this.dialog,!0);this.dialog.addEventListener("close",_classPrivateMethodGet(this,p,_cancel2).bind(this))}_createClass(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,c)){r.next=3;break}r.next=3;return _classPrivateFieldGet(this,c).promise;case 3:_classPrivateFieldSet(this,c,new a.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,c).resolve();throw r.t0;case 15:t=_classPrivateFieldGet(this,h)===a.PasswordResponses.INCORRECT_PASSWORD;this._isViewerEmbedded&&!t||this.input.focus();this.label.setAttribute("data-l10n-id","pdfjs-password-".concat(t?"invalid":"label"));case 18: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,c)){i.next=3;break}i.next=3;return _classPrivateFieldGet(this,c).promise;case 3:_classPrivateFieldSet(this,l,t);_classPrivateFieldSet(this,h,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,v,_invokeCallback2).call(this,t)}function _cancel2(){_classPrivateMethodGet(this,v,_invokeCallback2).call(this,new Error("PasswordPrompt cancelled."));_classPrivateFieldGet(this,c).resolve()}function _invokeCallback2(t){if(_classPrivateFieldGet(this,l)){this.close();this.input.value="";_classPrivateFieldGet(this,l).call(this,t);_classPrivateFieldSet(this,l,null)}}o()}catch(g){o(g)}}))},716:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFAttachmentViewer:()=>d});i(3352),i(6180),i(895),i(1747),i(394),i(2374),i(13),i(9175),i(6128),i(9718),i(7262),i(5598),i(8806),i(9366),i(6678),i(5897),i(5666),i(2926),i(1133),i(2173),i(2630),i(1024),i(4226),i(7121),i(6770),i(1378),i(171);var a=i(1869),u=i(9415),c=i(6554),l=t([a]);a=(l.then?(await l)():l)[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 _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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.done?r(h):Promise.resolve(h).then(o,a)}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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var o=_superPropBase(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 _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););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 _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)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}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}}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){_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 _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var h=new WeakSet,d=function(t){_inherits(PDFAttachmentViewer,t);var r,i,o,u,l=(r=PDFAttachmentViewer,i=_isNativeReflectConstruct(),function _createSuperInternal(){var t,o=_getPrototypeOf(r);if(i){var a=_getPrototypeOf(this).constructor;t=Reflect.construct(o,arguments,a)}else t=o.apply(this,arguments);return _possibleConstructorReturn(this,t)});function PDFAttachmentViewer(t){var r;_classCallCheck(this,PDFAttachmentViewer);_classPrivateMethodInitSpec(_assertThisInitialized(r=l.call(this,t)),h);r.downloadManager=t.downloadManager;r.eventBus._on("fileattachmentannotation",_classPrivateMethodGet(_assertThisInitialized(r),h,_appendAttachment2).bind(_assertThisInitialized(r)));return r}_createClass(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 a.PromiseCapability);this._pendingDispatchEvent=!1}},{key:"_dispatchEvent",value:(u=(o=_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,c.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(){var t=this,r=arguments;return new Promise((function(i,a){var u=o.apply(t,r);function _next(t){asyncGeneratorStep(u,i,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,i,a,_next,_throw,"throw",t)}_next(void 0)}))}),function _dispatchEvent(t){return u.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(o,a);return!1}}},{key:"render",value:function render(t){var r=t.attachments,i=t.keepRenderedCapability,o=void 0!==i&&i;this._attachments&&this.reset(o);this._attachments=r||null;if(r){var u=document.createDocumentFragment(),c=0;for(var l in r){var h=r[l],d=h.content,p=(0,a.getFilenameFromUrl)(h.filename,!0),v=document.createElement("div");v.className="treeItem";var y=document.createElement("a");this._bindLink(y,{content:d,filename:p});y.textContent=this._normalizeTextContent(p);v.append(y);u.append(v);c++}this._finishRendering(u,c)}else this._dispatchEvent(0)}}]);return PDFAttachmentViewer}(u.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})}}))}o()}catch(p){o(p)}}))},3611:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFCursorTools:()=>v});i(895),i(5666),i(1210),i(3352),i(6180),i(1747),i(7484),i(2374),i(394),i(5598),i(8806),i(9366),i(6678),i(5897),i(2926);var a=i(1869),u=i(4927),c=i(6143),l=t([a]);a=(l.then?(await l)():l)[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 _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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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){_classApplyDescriptorSet(t,_classExtractFieldDescriptor(t,r,"set"),i);return 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}}function _classPrivateFieldGet(t,r){return _classApplyDescriptorGet(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 _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var h=new WeakMap,d=new WeakMap,p=new WeakSet,v=function(){function PDFCursorTools(t){var r=this,i=t.container,o=t.eventBus,a=t.cursorToolOnLoad,c=void 0===a?u.CursorTool.SELECT:a;_classCallCheck(this,PDFCursorTools);_classPrivateMethodInitSpec(this,p);_classPrivateFieldInitSpec(this,h,{writable:!0,value:u.CursorTool.SELECT});_classPrivateFieldInitSpec(this,d,{writable:!0,value:null});this.container=i;this.eventBus=o;_classPrivateMethodGet(this,p,_addEventListeners2).call(this);Promise.resolve().then((function(){r.switchTool(c)}))}_createClass(PDFCursorTools,[{key:"activeTool",get:function get(){return _classPrivateFieldGet(this,h)}},{key:"switchTool",value:function switchTool(t){var r=this;if(null===_classPrivateFieldGet(this,d)&&t!==_classPrivateFieldGet(this,h)){var i=function disableActiveTool(){switch(_classPrivateFieldGet(r,h)){case u.CursorTool.SELECT:break;case u.CursorTool.HAND:r._handTool.deactivate();case u.CursorTool.ZOOM:}};switch(t){case u.CursorTool.SELECT:i();break;case u.CursorTool.HAND:i();this._handTool.activate();break;case u.CursorTool.ZOOM:default:globalThis.ngxConsole.error('switchTool: "'.concat(t,'" is an unsupported value.'));return}_classPrivateFieldSet(this,h,t);this.eventBus.dispatch("cursortoolchanged",{source:this,tool:t})}}},{key:"_handTool",get:function get(){return(0,a.shadow)(this,"_handTool",new c.GrabToPan({element:this.container}))}}]);return PDFCursorTools}();function _addEventListeners2(){var t=this;this.eventBus._on("switchcursortool",(function(r){t.switchTool(r.tool)}));var r=a.AnnotationEditorType.NONE,i=u.PresentationModeState.NORMAL,o=function disableActive(){var r,i=_classPrivateFieldGet(t,h);t.switchTool(u.CursorTool.SELECT);null!==(r=_classPrivateFieldGet(t,d))&&void 0!==r||_classPrivateFieldSet(t,d,i)},c=function enableActive(){var o=_classPrivateFieldGet(t,d);if(null!==o&&r===a.AnnotationEditorType.NONE&&i===u.PresentationModeState.NORMAL){_classPrivateFieldSet(t,d,null);t.switchTool(o)}};this.eventBus._on("secondarytoolbarreset",(function(o){if(null!==_classPrivateFieldGet(t,d)){r=a.AnnotationEditorType.NONE;i=u.PresentationModeState.NORMAL;c()}}));this.eventBus._on("annotationeditormodechanged",(function(t){var i=t.mode;r=i;i===a.AnnotationEditorType.NONE?c():o()}));this.eventBus._on("presentationmodechanged",(function(t){var r=t.state;i=r;r===u.PresentationModeState.NORMAL?c():r===u.PresentationModeState.FULLSCREEN&&o()}))}o()}catch(y){o(y)}}))},6312:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFDocumentProperties:()=>w});i(7874),i(2796),i(6180),i(895),i(5666),i(1747),i(2374),i(4441),i(9142),i(7484),i(394),i(5897),i(3352),i(5598),i(8806),i(9366),i(6678),i(2926),i(4226),i(171),i(924),i(9593),i(7942),i(5776),i(1133),i(2173),i(2630),i(1024),i(13),i(7121),i(6770),i(1378);var a=i(4927),u=i(1869),c=t([u]);u=(c.then?(await c)():c)[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 _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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function _slicedToArray(t,r){return _arrayWithHoles(t)||_iterableToArrayLimit(t,r)||_unsupportedIterableToArray(t,r)||_nonIterableRest()}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 _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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,_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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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){_classApplyDescriptorSet(t,_classExtractFieldDescriptor(t,r,"set"),i);return 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}}function _classPrivateFieldGet(t,r){return _classApplyDescriptorGet(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 _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var l=["en-us","en-lr","my"],h={"8.5x11":"letter","8.5x14":"legal"},d={"297x420":"a-three","210x297":"a-four"};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 p=new WeakMap,v=new WeakSet,y=new WeakSet,g=new WeakSet,m=new WeakSet,_=new WeakSet,b=new WeakSet,w=function(){function PDFDocumentProperties(t,r,i,o,a){var u=this,c=t.dialog,h=t.fields,d=t.closeButton;_classCallCheck(this,PDFDocumentProperties);_classPrivateMethodInitSpec(this,b);_classPrivateMethodInitSpec(this,_);_classPrivateMethodInitSpec(this,m);_classPrivateMethodInitSpec(this,g);_classPrivateMethodInitSpec(this,y);_classPrivateMethodInitSpec(this,v);_classPrivateFieldInitSpec(this,p,{writable:!0,value:null});this.dialog=c;this.fields=h;this.overlayManager=r;this.l10n=o;this._fileNameLookup=a;this.eventBus=i;_classPrivateMethodGet(this,v,_reset2).call(this);d.addEventListener("click",this.close.bind(this));this.overlayManager.register(this.dialog);i._on("pagechanging",(function(t){u._currentPageNumber=t.pageNumber}));i._on("rotationchanging",(function(t){u._pagesRotation=t.pagesRotation}));this._isNonMetricLocale=l.includes(o.getLanguage())}_createClass(PDFDocumentProperties,[{key:"open",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,i,o,u,c,l,h,d,v,w,P,D,E,x,S,A=this;return _regeneratorRuntime().wrap((function _callee$(C){for(;;)switch(C.prev=C.next){case 0:C.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,p)||t!==_classPrivateFieldGet(this,p)._currentPageNumber||r!==_classPrivateFieldGet(this,p)._pagesRotation){C.next=8;break}_classPrivateMethodGet(this,y,_updateUI2).call(this);return C.abrupt("return");case 8:C.next=10;return this.pdfDocument.getMetadata();case 10:i=C.sent;o=i.info;u=i.contentLength;C.next=15;return Promise.all([this._fileNameLookup(),_classPrivateMethodGet(this,g,_parseFileSize2).call(this,u),_classPrivateMethodGet(this,_,_parseDate2).call(this,o.CreationDate),_classPrivateMethodGet(this,_,_parseDate2).call(this,o.ModDate),this.pdfDocument.getPage(t).then((function(t){return _classPrivateMethodGet(A,m,_parsePageSize2).call(A,(0,a.getPageSizeInches)(t),r)})),_classPrivateMethodGet(this,b,_parseLinearization2).call(this,o.IsLinearized)]);case 15:c=C.sent;l=_slicedToArray(c,6);h=l[0];d=l[1];v=l[2];w=l[3];P=l[4];D=l[5];_classPrivateFieldSet(this,p,Object.freeze({fileName:h,fileSize:d,title:o.Title,author:o.Author,subject:o.Subject,keywords:o.Keywords,creationDate:v,modificationDate:w,creator:o.Creator,producer:o.Producer,version:o.PDFFormatVersion,pageCount:this.pdfDocument.numPages,pageSize:P,linearized:D,_currentPageNumber:t,_pagesRotation:r}));_classPrivateMethodGet(this,y,_updateUI2).call(this);C.next=27;return this.pdfDocument.getDownloadInfo();case 27:E=C.sent;x=E.length;if(u!==x){C.next=31;break}return C.abrupt("return");case 31:S=Object.assign(Object.create(null),_classPrivateFieldGet(this,p));C.next=34;return _classPrivateMethodGet(this,g,_parseFileSize2).call(this,x);case 34:S.fileSize=C.sent;_classPrivateFieldSet(this,p,Object.freeze(S));_classPrivateMethodGet(this,y,_updateUI2).call(this);case 37:case"end":return C.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,v,_reset2).call(this);_classPrivateMethodGet(this,y,_updateUI2).call(this,!0)}if(t){this.pdfDocument=t;this._dataAvailableCapability.resolve()}}}]);var t,r;return PDFDocumentProperties}();function _reset2(){this.pdfDocument=null;_classPrivateFieldSet(this,p,null);this._dataAvailableCapability=new u.PromiseCapability;this._currentPageNumber=1;this._pagesRotation=0}function _updateUI2(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&_classPrivateFieldGet(this,p)){if(this.overlayManager.active===this.dialog)for(var t in this.fields){var r=_classPrivateFieldGet(this,p)[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("pdfjs-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,o,u,c,l,p,v,y,g,m,_,b,w,P;return _regeneratorRuntime().wrap((function _callee4$(D){for(;;)switch(D.prev=D.next){case 0:if(t){D.next=2;break}return D.abrupt("return",void 0);case 2:r%180!=0&&(t={width:t.height,height:t.width});i=(0,a.isPortraitOrientation)(t);o={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(!((c=getPageName(o,i,h)||getPageName(u,i,d))||Number.isInteger(u.width)&&Number.isInteger(u.height))){l={width:25.4*t.width,height:25.4*t.height};p={width:Math.round(u.width),height:Math.round(u.height)};if(Math.abs(l.width-p.width)<.1&&Math.abs(l.height-p.height)<.1&&(c=getPageName(p,i,d))){o={width:Math.round(p.width/25.4*100)/100,height:Math.round(p.height/25.4*100)/100};u=p}}D.next=10;return Promise.all([this._isNonMetricLocale?o:u,this.l10n.get("pdfjs-document-properties-page-size-unit-".concat(this._isNonMetricLocale?"inches":"millimeters")),c&&this.l10n.get("pdfjs-document-properties-page-size-name-".concat(c)),this.l10n.get("pdfjs-document-properties-page-size-orientation-".concat(i?"portrait":"landscape"))]);case 10:v=D.sent;y=_slicedToArray(v,4);g=y[0];m=g.width;_=g.height;b=y[1];w=y[2];P=y[3];return D.abrupt("return",this.l10n.get("pdfjs-document-properties-page-size-dimension-".concat(w?"name-":"","string"),{width:m.toLocaleString(),height:_.toLocaleString(),unit:b,name:w,orientation:P}));case 19:case"end":return D.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=u.PDFDateString.toDateObject(t)){i.next=3;break}return i.abrupt("return",void 0);case 3:return i.abrupt("return",this.l10n.get("pdfjs-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("pdfjs-document-properties-linearized-".concat(t?"yes":"no"))}o()}catch(P){o(P)}}))},1795:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFFindBar:()=>d});i(7254),i(3352),i(6180),i(895),i(1747),i(7484),i(2374),i(394),i(5598),i(8806),i(9366),i(6678),i(5897),i(2926);var a=i(3557),u=i(4927),c=t([a]);a=(c.then?(await c)():c)[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 _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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classApplyDescriptorGet(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 _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}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,h=new WeakSet,d=function(){function PDFFindBar(t,r){var i,o=this;_classCallCheck(this,PDFFindBar);_classPrivateMethodInitSpec(this,h);_classPrivateFieldInitSpec(this,l,{writable:!0,value:new ResizeObserver(_classPrivateMethodGet(this,h,_resizeObserverCallback2).bind(this))});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.toggleButton.addEventListener("click",(function(){o.toggle()}));this.findField.addEventListener("input",(function(){o.dispatchEvent("")}));this.bar.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:t.target===o.findField&&o.dispatchEvent("again",t.shiftKey);break;case 27:o.close()}}));this.findPreviousButton.addEventListener("click",(function(){o.dispatchEvent("again",!0)}));this.findNextButton.addEventListener("click",(function(){o.dispatchEvent("again",!1)}));this.highlightAll.addEventListener("click",(function(){o.dispatchEvent("highlightallchange")}));this.caseSensitive.addEventListener("click",(function(){o.dispatchEvent("casesensitivitychange")}));this.entireWord.addEventListener("click",(function(){o.dispatchEvent("entirewordchange")}));null===(i=this.matchDiacritics)||void 0===i||i.addEventListener("click",(function(){o.dispatchEvent("diacriticmatchingchange")}))}_createClass(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 o=this.findField,u=this.findMsg,c="",l="";switch(t){case a.FindState.FOUND:break;case a.FindState.PENDING:l="pending";break;case a.FindState.NOT_FOUND:c="pdfjs-find-not-found";l="notFound";break;case a.FindState.WRAPPED:c="pdfjs-find-reached-".concat(r?"top":"bottom")}o.setAttribute("data-status",l);o.setAttribute("aria-invalid",t===a.FindState.NOT_FOUND);u.setAttribute("data-status",l);if(c)u.setAttribute("data-l10n-id",c);else{u.removeAttribute("data-l10n-id");u.textContent=""}this.updateResultsCount(i)}},{key:"updateResultsCount",value:function updateResultsCount(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.current,i=void 0===r?0:r,o=t.total,a=void 0===o?0:o,u=this.findResultsCount;if(a>0){u.setAttribute("data-l10n-id","pdfjs-find-match-count".concat(a>1e3?"-limit":""));u.setAttribute("data-l10n-args",JSON.stringify({limit:1e3,current:i,total:a}))}else{u.removeAttribute("data-l10n-id");u.textContent=""}}},{key:"open",value:function open(){if(!this.opened){_classPrivateFieldGet(this,l).observe(this.bar.parentNode);_classPrivateFieldGet(this,l).observe(this.bar);this.opened=!0;(0,u.toggleExpandedBtn)(this.toggleButton,!0,this.bar)}this.findField.select();this.findField.focus();this.dispatchEvent("");this.eventBus.dispatch("findbaropen",{source:this})}},{key:"close",value:function close(){if(this.opened){_classPrivateFieldGet(this,l).disconnect();this.opened=!1;(0,u.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 _resizeObserverCallback2(t){var r=this.bar;r.classList.remove("wrapContainers");r.clientHeight>r.firstElementChild.clientHeight&&r.classList.add("wrapContainers")}o()}catch(p){o(p)}}))},3557:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{FindState:()=>d,PDFFindController:()=>X});i(6180),i(895),i(2048),i(1747),i(5561),i(8587),i(3247),i(3302),i(9490),i(5438),i(7914),i(2374),i(5548),i(7942),i(4226),i(4668),i(7874),i(3032),i(5619),i(9786),i(924),i(4711),i(6133),i(171),i(7484),i(394),i(7121),i(8518),i(5136),i(7944),i(1585),i(2993),i(7254),i(469),i(7600),i(8301),i(5666),i(9593),i(5776),i(9366),i(6678),i(2926),i(3352),i(5598),i(8806),i(5897);var a=i(4927),u=i(6839),c=i(1869),l=t([c]);c=(l.then?(await l)():l)[0];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 _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(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 _slicedToArray(t,r){return _arrayWithHoles(t)||_iterableToArrayLimit(t,r)||_unsupportedIterableToArray(t,r)||_nonIterableRest()}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 _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}function _arrayWithHoles(t){if(Array.isArray(t))return 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,_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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classApplyDescriptorGet(t,_classExtractFieldDescriptor(t,r,"get"))}function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}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){_classApplyDescriptorSet(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 _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}}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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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 h,d={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3},p={"‐":"-","‘":"'","’":"'","‚":"'","‛":"'","“":'"',"”":'"',"„":'"',"‟":'"',"¼":"1/4","½":"1/2","¾":"3/4"},v=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]),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])+/g,g=/([\$\(-\+\.\?\[-\^\{-\}])|((?:[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]))/g,m=/((?:[\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])*$/,_=/^(?:[\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]))/,b=/[\uAC00-\uD7AF\uFA6C\uFACF-\uFAD1\uFAD5-\uFAD7]+/g,w=new Map,P="[\\u1100-\\u1112\\ud7a4-\\ud7af\\ud84a\\ud84c\\ud850\\ud854\\ud857\\ud85f]",D=new Map,E=null,x=null;function normalize(t){for(var r,i,o=[];null!==(r=b.exec(t));){var a,c=r.index,l=_createForOfIteratorHelper(r[0]);try{for(l.s();!(a=l.n()).done;){var h=a.value,d=w.get(h);if(!d){d=h.normalize("NFD").length;w.set(h,d)}o.push([d,c++])}}catch(t){l.e(t)}finally{l.f()}}if(0===o.length&&E)i=E;else if(o.length>0&&x)i=x;else{var v=Object.keys(p).join(""),g=(0,u.getNormalizeWithNFKC)(),m="([".concat(v,"])|([").concat(g,"])|(").concat("(?:゙|゚)","\\n)|(\\p{M}+(?:-\\n)?)|(\\S-\\n)|(").concat("(?:\\p{Ideographic}|[぀-ヿ])","\\n)|(\\n)");i=0===o.length?E=new RegExp(m+"|(\\u0000)","gum"):x=new RegExp(m+"|(".concat(P,")"),"gum")}for(var _=[];null!==(r=y.exec(t));)_.push([r[0].length,r.index]);var S=t.normalize("NFD"),A=[[0,0]],C=0,k=0,I=0,T=0,L=0,O=!1;S=S.replace(i,(function(t,r,i,a,u,c,l,h,d,v){var y;v-=T;if(r){for(var g=p[r],m=g.length,b=1;b<m;b++)A.push([v-I+b,I-b]);I-=m-1;return g}if(i){var w=D.get(i);if(!w){w=i.normalize("NFKC");D.set(i,w)}for(var P=w.length,E=1;E<P;E++)A.push([v-I+E,I-E]);I-=P-1;return w}if(a){var x;O=!0;if(v+L===(null===(x=_[C])||void 0===x?void 0:x[1]))++C;else{A.push([v-1-I+1,I-1]);I-=1;T+=1}A.push([v-I+1,I]);T+=1;L+=1;return a.charAt(0)}if(u){var S,M=u.endsWith("\n"),B=M?u.length-2:u.length;O=!0;var G=B;if(v+L===(null===(S=_[C])||void 0===S?void 0:S[1])){G-=_[C][0];++C}for(var R=1;R<=G;R++)A.push([v-1-I+R,I-R]);I-=G;T+=G;if(M){v+=B-1;A.push([v-I+1,1+I]);I+=1;T+=1;L+=1;return u.slice(0,B)}return u}if(c){var j=c.length-2;A.push([v-I+j,1+I]);I+=1;T+=1;L+=1;return c.slice(0,-2)}if(l){var N=l.length-1;A.push([v-I+N,I]);T+=1;L+=1;return l.slice(0,-1)}if(h){A.push([v-I+1,I-1]);I-=1;T+=1;L+=1;return" "}if(v+L===(null===(y=o[k])||void 0===y?void 0:y[1])){var V=o[k][0]-1;++k;for(var W=1;W<=V;W++)A.push([v-(I-W),I-W]);I-=V;T+=V}return d}));A.push([S.length,I]);return[S,A,O]}function getOriginalIndex(t,r,i){if(!t)return[r,i];var o=r,u=r+i-1,c=(0,a.binarySearchFirstItem)(t,(function(t){return t[0]>=o}));t[c][0]>o&&--c;var l=(0,a.binarySearchFirstItem)(t,(function(t){return t[0]>=u}),c);t[l][0]>u&&--l;var h=o+t[c][1];return[h,u+t[l][1]+1-h]}var S=new WeakMap,A=new WeakMap,C=new WeakMap,k=new WeakSet,I=new WeakSet,T=new WeakMap,L=new WeakSet,O=new WeakSet,M=new WeakSet,B=new WeakSet,G=new WeakSet,R=new WeakSet,j=new WeakSet,N=new WeakSet,V=new WeakSet,W=new WeakSet,z=new WeakSet,H=new WeakSet,U=new WeakSet,K=new WeakSet,$=new WeakSet,Y=new WeakSet,q=new WeakSet,X=function(){function PDFFindController(t){var r=t.linkService,i=t.eventBus,o=t.updateMatchesCountOnProgress,a=void 0===o||o,u=t.pageViewMode;_classCallCheck(this,PDFFindController);_classPrivateMethodInitSpec(this,q);_classPrivateMethodInitSpec(this,Y);_classPrivateMethodInitSpec(this,$);_classPrivateMethodInitSpec(this,K);_classPrivateMethodInitSpec(this,U);_classPrivateMethodInitSpec(this,H);_classPrivateMethodInitSpec(this,z);_classPrivateMethodInitSpec(this,W);_classPrivateMethodInitSpec(this,V);_classPrivateMethodInitSpec(this,N);_classPrivateMethodInitSpec(this,j);_classPrivateMethodInitSpec(this,R);_classPrivateMethodInitSpec(this,G);_classPrivateMethodInitSpec(this,B);_classPrivateMethodInitSpec(this,M);_classPrivateMethodInitSpec(this,O);_classPrivateMethodInitSpec(this,L);_classPrivateFieldInitSpec(this,T,{get:_get_query,set:void 0});_classPrivateMethodInitSpec(this,I);_classPrivateMethodInitSpec(this,k);_classPrivateFieldInitSpec(this,S,{writable:!0,value:null});_classPrivateFieldInitSpec(this,A,{writable:!0,value:!0});_classPrivateFieldInitSpec(this,C,{writable:!0,value:0});this._linkService=r;this._eventBus=i;_classPrivateFieldSet(this,A,a);this._pageViewMode=u;this.onIsPageVisible=null;_classPrivateMethodGet(this,I,_reset2).call(this);i._on("find",_classPrivateMethodGet(this,k,_onFind2).bind(this));i._on("findbarclose",_classPrivateMethodGet(this,K,_onFindBarClose2).bind(this))}_createClass(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,S)}},{key:"setDocument",value:function setDocument(t){this._pdfDocument&&_classPrivateMethodGet(this,I,_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,o=t.selectedLeft,u=void 0===o?0:o,c=t.pageIndex,l=void 0===c?-1:c,h=t.matchIndex,d=void 0===h?-1:h;if(this._scrollMatches&&i&&-1!==d&&d===this._selected.matchIdx&&-1!==l&&l===this._selected.pageIdx){this._scrollMatches=!1;var p={top:-50,left:u+-400};(0,a.scrollIntoView)(i,p,!0,"infinite-scroll"===this._pageViewMode)}}}]);return PDFFindController}();function _onFind2(t){var r=this;if(t){var i=this._pdfDocument,o=t.type;(null===_classPrivateFieldGet(this,S)||_classPrivateMethodGet(this,L,_shouldDirtyMatch2).call(this,t))&&(this._dirtyMatch=!0);_classPrivateFieldSet(this,S,t);if("highlightallchange"!==o)_classPrivateMethodGet(this,q,_updateUIState2).call(this,d.PENDING);else{var a,u=this._pageMatches.some((function(t){return t.length>0})),c=!(null!==(a=this.state)&&void 0!==a&&a.query)||u;_classPrivateMethodGet(this,q,_updateUIState2).call(this,c?d.FOUND:d.NOT_FOUND)}this._firstPageCapability.promise.then((function(){if(r._pdfDocument&&(!i||r._pdfDocument===i)){_classPrivateMethodGet(r,R,_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,V,_nextMatch2).call(r);else if("again"===o){_classPrivateMethodGet(r,V,_nextMatch2).call(r);t&&_classPrivateFieldGet(r,S).highlightAll&&_classPrivateMethodGet(r,N,_updateAllPages2).call(r)}else if("highlightallchange"===o){a?_classPrivateMethodGet(r,V,_nextMatch2).call(r):r._highlightMatches=!0;_classPrivateMethodGet(r,N,_updateAllPages2).call(r)}else _classPrivateMethodGet(r,V,_nextMatch2).call(r);else r._findTimeout=setTimeout((function(){_classPrivateMethodGet(r,V,_nextMatch2).call(r);r._findTimeout=null}),250)}}))}}function _reset2(){this._highlightMatches=!1;this._scrollMatches=!1;this._pdfDocument=null;this._pageMatches=[];this._pageMatchesLength=[];_classPrivateFieldSet(this,C,0);_classPrivateFieldSet(this,S,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 c.PromiseCapability}function _get_query(){var t=_classPrivateFieldGet(this,S).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,S).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 c=this._selected.pageIdx+1,l=this._linkService;return c>=1&&c<=l.pagesCount&&c!==l.page&&!(null===(r=null===(i=this.onIsPageVisible)||void 0===i?void 0:i.call(this,c))||void 0===r||r);case"highlightallchange":return!1}return!0}function _isEntireWord2(t,r,i){var o=t.slice(0,r).match(m);if(o){var a=t.charCodeAt(r),c=o[1].charCodeAt(0);if((0,u.getCharacterType)(a)===(0,u.getCharacterType)(c))return!1}if(o=t.slice(r+i).match(_)){var l=t.charCodeAt(r+i-1),h=o[1].charCodeAt(0);if((0,u.getCharacterType)(l)===(0,u.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 c,l=this._pageDiffs[i];null!==(c=t.exec(o));)if(!r||_classPrivateMethodGet(this,O,_isEntireWord2).call(this,o,c.index,c[0].length)){var h=_slicedToArray(getOriginalIndex(l,c.index,c[0].length),2),d=h[0],p=h[1];if(p){a.push(d);u.push(p)}}}function _convertToRegExpString2(t,r){var i,o=_classPrivateFieldGet(this,S).matchDiacritics,a=!1,u="[ ]*";(t=t.replaceAll(g,(function(t,i,u,c,l,h){if(i)return"[ ]*\\".concat(i,"[ ]*");if(u)return"[ ]*".concat(u,"[ ]*");if(c)return"[ ]+";if(o)return l||h;if(l)return v.has(l.charCodeAt(0))?l:"";if(r){a=!0;return"".concat(h,"\\p{M}*")}return h}))).endsWith(u)&&(t=t.slice(0,t.length-4));if(o&&r){h||(h=String.fromCharCode.apply(String,_arrayWithoutHoles(i=v)||_iterableToArray(i)||_unsupportedIterableToArray(i)||_nonIterableSpread()));a=!0;t="".concat(t,"(?=[").concat(h,"]|[^\\p{M}]|$)")}return[a,t]}function _calculateMatch2(t){var r,i=this,o=_classPrivateFieldGet(this,T);if(0!==o.length){var a=_classPrivateFieldGet(this,S),u=a.caseSensitive,c=a.entireWord,l=this._pageContents[t],h=this._hasDiacritics[t],d=!1;if("string"==typeof o){var p=_slicedToArray(_classPrivateMethodGet(this,B,_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,B,_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,M,_calculateRegExpMatch2).call(this,o,c,t,l);_classPrivateFieldGet(this,S).highlightAll&&_classPrivateMethodGet(this,j,_updatePage2).call(this,t);if(this._resumePageIdx===t){this._resumePageIdx=null;_classPrivateMethodGet(this,z,_nextPageMatch2).call(this)}var y=this._pageMatches[t].length;this._matchesCountTotal+=y;_classPrivateFieldGet(this,A)?y>0&&_classPrivateMethodGet(this,Y,_updateUIResultsCount2).call(this):_classPrivateFieldSet(this,C,(r=_classPrivateFieldGet(this,C),++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 c.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=[],c=_createForOfIteratorHelper(r.items);try{for(c.s();!(i=c.n()).done;){var l=i.value;u.push(l.str);l.hasEOL&&u.push("\n")}}catch(t){c.e(t)}finally{c.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,u=this._linkService.pagesCount;a<u;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,S).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,C,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,G,_calculateMatch2).call(t,r)}))},u=0;u<o;u++)a(u)}if(0!==_classPrivateFieldGet(this,T).length){if(!this._resumePageIdx){var c=this._offset;this._pagesToSearch=o;if(null!==c.matchIdx){var l=this._pageMatches[c.pageIdx].length;if(!r&&c.matchIdx+1<l||r&&c.matchIdx>0){c.matchIdx=r?c.matchIdx-1:c.matchIdx+1;_classPrivateMethodGet(this,U,_updateMatch2).call(this,!0);return}_classPrivateMethodGet(this,H,_advanceOffsetPage2).call(this,r)}_classPrivateMethodGet(this,z,_nextPageMatch2).call(this)}}else _classPrivateMethodGet(this,q,_updateUIState2).call(this,d.FOUND)}function _matchesReady2(t){var r=this._offset,i=t.length,o=_classPrivateFieldGet(this,S).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,W,_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=d.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?d.WRAPPED:d.FOUND;-1!==o&&o!==this._selected.pageIdx&&_classPrivateMethodGet(this,j,_updatePage2).call(this,o)}_classPrivateMethodGet(this,q,_updateUIState2).call(this,r,_classPrivateFieldGet(this,S).findPrevious);if(-1!==this._selected.pageIdx){this._scrollMatches=!0;_classPrivateMethodGet(this,j,_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,q,_updateUIState2).call(r,d.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 c;o+=(null===(c=this._pageMatches[u])||void 0===c?void 0:c.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,$,_requestMatchesCount2).call(this)})}function _updateUIState2(t){var r,i,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(_classPrivateFieldGet(this,A)||_classPrivateFieldGet(this,C)===this._linkService.pagesCount&&t!==d.PENDING)&&this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:t,previous:o,matchesCount:_classPrivateMethodGet(this,$,_requestMatchesCount2).call(this),rawQuery:null!==(r=null===(i=_classPrivateFieldGet(this,S))||void 0===i?void 0:i.query)&&void 0!==r?r:null})}o()}catch(Z){o(Z)}}))},6839:(t,r,i)=>{i.d(r,{getCharacterType:()=>getCharacterType,getNormalizeWithNFKC:()=>getNormalizeWithNFKC});var o,a={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};function getCharacterType(t){return function isAlphabeticalScript(t){return t<11904}(t)?function isAscii(t){return 0==(65408&t)}(t)?function isAsciiSpace(t){return 32===t||9===t||13===t||10===t}(t)?a.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?a.ALPHA_LETTER:a.PUNCT:function isThai(t){return 3584==(65408&t)}(t)?a.THAI_LETTER:160===t?a.SPACE:a.ALPHA_LETTER:function isHan(t){return t>=13312&&t<=40959||t>=63744&&t<=64255}(t)?a.HAN_LETTER:function isKatakana(t){return t>=12448&&t<=12543}(t)?a.KATAKANA_LETTER:function isHiragana(t){return t>=12352&&t<=12447}(t)?a.HIRAGANA_LETTER:function isHalfwidthKatakana(t){return t>=65376&&t<=65439}(t)?a.HALFWIDTH_KATAKANA_LETTER:a.ALPHA_LETTER}function getNormalizeWithNFKC(){o||(o=" ¨ª¯²-µ¸-º¼-¾IJ-ijĿ-ŀʼnſDŽ-njDZ-dzʰ-ʸ˘-˝ˠ-ˤʹͺ;΄-΅·ϐ-ϖϰ-ϲϴ-ϵϹևٵ-ٸक़-य़ড়-ঢ়য়ਲ਼ਸ਼ਖ਼-ਜ਼ਫ਼ଡ଼-ଢ଼ำຳໜ-ໝ༌གྷཌྷདྷབྷཛྷཀྵჼᴬ-ᴮᴰ-ᴺᴼ-ᵍᵏ-ᵪᵸᶛ-ᶿẚ-ẛάέήίόύώΆ᾽-῁ΈΉ῍-῏ΐΊ῝-῟ΰΎ῭-`ΌΏ´-῾ - ‑‗․-… ″-‴‶-‷‼‾⁇-⁉⁗ ⁰-ⁱ⁴-₎ₐ-ₜ₨℀-℃℅-ℇ℉-ℓℕ-№ℙ-ℝ℠-™ℤΩℨK-ℭℯ-ℱℳ-ℹ℻-⅀ⅅ-ⅉ⅐-ⅿ↉∬-∭∯-∰〈-〉①-⓪⨌⩴-⩶⫝̸ⱼ-ⱽⵯ⺟⻳⼀-⿕ 〶〸-〺゛-゜ゟヿㄱ-ㆎ㆒-㆟㈀-㈞㈠-㉇㉐-㉾㊀-㏿ꚜ-ꚝꝰꟲ-ꟴꟸ-ꟹꭜ-ꭟꭩ豈-嗀塚晴凞-羽蘒諸逸-都飯-舘並-龎ff-stﬓ-ﬗיִײַ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-﷼︐-︙︰-﹄﹇-﹒﹔-﹦﹨-﹫ﹰ-ﹲﹴﹶ-ﻼ!-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ¢-₩");return o}},6418:(t,r,i)=>{i.d(r,{PDFHistory:()=>u});i(1210),i(7254),i(895),i(5666),i(6421),i(7874),i(9142),i(5897),i(5598),i(8806),i(9366),i(6678),i(3352),i(4668),i(2926),i(6180),i(1747),i(2374),i(4226),i(171),i(924),i(9593),i(7942),i(5776);var o=i(4927),a=i(6554);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,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}(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,_toPropertyKey(o.key),o)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!=_typeof(t)||!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 getCurrentHash(){return document.location.hash}var u=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 c=""!==this._fingerprint&&this._fingerprint!==r;this._fingerprint=r;this._updateUrl=!0===u;this._initialized=!0;this._bindEvents();var l=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(l,!0)&&!o){var h=l.destination;this._updateInternalState(h,l.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,y=d.rotation;if(!p||c||o){this._pushOrReplaceState(null,!0);return}this._pushOrReplaceState({hash:p,page:v,rotation:y},!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,a=void 0===i?null:i,u=t.explicitDest,c=t.pageNumber;if(this._initialized)if(a&&"string"!=typeof a)globalThis.ngxConsole.error("PDFHistory.push: "+'"'.concat(a,'" is not a valid namedDest parameter.'));else if(Array.isArray(u))if(this._isValidPage(c)||null===c&&!this._destination){var l=a||JSON.stringify(u);if(l){var h=!1;if(this._destination&&(function isDestHashesEqual(t,r){if("string"!=typeof t||"string"!=typeof r)return!1;if(t===r)return!0;if((0,o.parseQueryString)(t).get("nameddest")===r)return!0;return!1}(this._destination.hash,l)||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}(this._destination.dest,u))){if(this._destination.page)return;h=!0}if(!this._popStateInProgress||h){this._pushOrReplaceState({dest:u,hash:l,page:c,rotation:this.linkService.rotation},h);if(!this._popStateInProgress){this._popStateInProgress=!0;Promise.resolve().then((function(){r._popStateInProgress=!1}))}}}}else globalThis.ngxConsole.error("PDFHistory.push: "+'"'.concat(c,'" is not a valid pageNumber parameter.'));else globalThis.ngxConsole.error("PDFHistory.push: "+'"'.concat(u,'" 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(),c=this._currentHash!==u;this._currentHash=u;if(i){if(this._isValidState(i)){this._popStateInProgress=!0;if(c){this._blockHashChange++;(0,a.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:1e3}).then((function(){r._blockHashChange--}))}var l=i.destination;this._updateInternalState(l,i.uid,!0);(0,o.isValidRotation)(l.rotation)&&(this.linkService.rotation=l.rotation);l.dest?this.linkService.goToDestination(l.dest):l.hash?this.linkService.setHash(l.hash):l.page&&(this.linkService.page=l.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}()},3706:(t,r,i)=>{i.d(r,{PDFLayerViewer:()=>u});i(895),i(5666),i(4226),i(3352),i(6180),i(1747),i(394),i(2374),i(13),i(9175),i(6128),i(9718),i(7262),i(5598),i(8806),i(9366),i(6678),i(5897),i(2926),i(1133),i(2173),i(2630),i(1024),i(7121),i(6770),i(1378),i(171),i(924),i(9593),i(7942),i(5776);var o=i(9415);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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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)||!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 _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,u=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.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("pdfjs-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}],c=0,l=!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,y=document.createElement("div");y.className="treeItem";var g=document.createElement("a");y.append(g);if("object"===_typeof(v)){l=!0;this._addToggleButton(y,v);this._setNestedName(g,v);var m=document.createElement("div");m.className="treeItems";y.append(m);u.push({parent:m,groups:v.order})}else{var _=r.getGroup(v),b=document.createElement("input");this._bindLink(g,{groupId:v,input:b});b.type="checkbox";b.checked=_.visible;var w=document.createElement("label");w.textContent=this._normalizeTextContent(_.name);w.append(b);g.append(w);c++}d.parent.append(y)}}catch(t){p.e(t)}finally{p.f()}}this._finishRendering(a,c,l)}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)}},3234:(t,r,i)=>{i.d(r,{LinkTarget:()=>a,PDFLinkService:()=>l,SimpleLinkService:()=>h});i(3352),i(6180),i(5548),i(895),i(1747),i(2374),i(1210),i(5897),i(7254),i(2796),i(2613),i(7942),i(4711),i(7600),i(469),i(4668),i(2808),i(924),i(5666),i(7874),i(7484),i(394),i(4226),i(5598),i(8806),i(9366),i(6678),i(2926),i(1133),i(2173),i(2630),i(1024),i(13),i(7121),i(6770),i(1378),i(171),i(9593),i(5776);var o=i(4927);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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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,_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)||!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 _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={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,o=r.target,u=r.rel,c=r.enabled,l=void 0===c||c;if(!i||"string"!=typeof i)throw new Error('A valid "url" parameter must provided.');if(l)t.href=t.title=i;else{t.href="";t.title="Disabled: ".concat(i);t.onclick=function(){return!1}}var h="";switch(o){case a.NONE:break;case a.SELF:h="_self";break;case a.BLANK:h="_blank";break;case a.PARENT:h="_parent";break;case a.TOP:h="_top"}t.target=h;t.rel="string"==typeof u?u:"noopener noreferrer nofollow"}var u=new WeakMap,c=new WeakSet,l=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,l=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,c);!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=l;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,c,_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.ensureAdjacentPagesAreLoaded();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('"',""),c="true"===a.get("phrase");this.eventBus.dispatch("findfromurlhash",{source:this,query:c?u:u.match(/\S+/g)})}a.has("page")&&(r=0|a.get("page")||1);if(a.has("zoom")){var l=a.get("zoom").split(","),h=l[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},l.length>1?0|l[1]:null]:"FitR"===h?5!==l.length?globalThis.ngxConsole.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):i=[null,{name:h},0|l[1],0|l[2],0|l[3],0|l[4]]:globalThis.ngxConsole.error('PDFLinkService.setHash: "'.concat(h,'" is not a valid zoom value.')):i=[null,{name:"XYZ"},l.length>1?0|l[1]:null,l.length>2?0|l[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,c,l;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}c=u.value;h.t0=c;h.next="ON"===h.t0||"OFF"===h.t0||"Toggle"===h.t0?14:16;break;case 14:o=c;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(c,!0);return h.abrupt("break",26);case 21:i.setVisibility(c,!1);return h.abrupt("break",26);case 23:(l=i.getGroup(c))&&i.setVisibility(c,!l.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,c,_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 c=t[u];if(!("number"==typeof c||a&&null===c))return!1}return!0}var h=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}()},1141:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFOutlineViewer:()=>h});i(4226),i(3352),i(6180),i(5548),i(895),i(1747),i(2374),i(5897),i(13),i(9175),i(6128),i(9718),i(7262),i(5598),i(8806),i(9366),i(6678),i(2926),i(9593),i(171),i(924),i(7942),i(5776),i(5666),i(1133),i(2173),i(2630),i(1024),i(7121),i(6770),i(1378);var a=i(9415),u=i(1869),c=i(4927),l=t([u]);u=(l.then?(await l)():l)[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 _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 _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}function _arrayWithHoles(t){if(Array.isArray(t))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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)throw u}}}}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}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 _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var o=_superPropBase(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 _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););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 _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)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}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}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}var h=function(t){_inherits(PDFOutlineViewer,t);var r,i,o,a,l=(r=PDFOutlineViewer,i=_isNativeReflectConstruct(),function _createSuperInternal(){var t,o=_getPrototypeOf(r);if(i){var a=_getPrototypeOf(this).constructor;t=Reflect.construct(o,arguments,a)}else t=o.apply(this,arguments);return _possibleConstructorReturn(this,t)});function PDFOutlineViewer(t){var r;_classCallCheck(this,PDFOutlineViewer);(r=l.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}_createClass(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 u.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,c=r.attachment,l=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(c){t.href=d.getAnchorUrl("");t.onclick=function(){i.downloadManager.openOrDownloadData(c.content,c.filename);return!1}}else if(h){t.href=d.getAnchorUrl("");t.onclick=function(){d.executeSetOCGState(h);return!1}}else{t.href=d.getDestinationHash(l);t.onclick=function(t){i._updateCurrentTreeItem(t.target.parentNode);l&&d.goToDestination(l);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 c=_toConsumableArray(o);c.length>0;){var l=c.shift(),h=l.count,d=l.items;if(h>0&&d.length>0){u+=d.length;c.push.apply(c,_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,c=!1;a.length>0;){var l,h=a.shift(),d=_createForOfIteratorHelper(h.items);try{for(d.s();!(l=d.n()).done;){var p=l.value,v=document.createElement("div");v.className="treeItem";var y=document.createElement("a");this._bindLink(y,p);this._setStyles(y,p);y.textContent=this._normalizeTextContent(p.title);v.append(y);if(p.items.length>0){c=!0;this._addToggleButton(v,p);var g=document.createElement("div");g.className="treeItems";v.append(g);a.push({parent:g,items:p.items})}h.parent.append(v);u++}}catch(t){d.e(t)}finally{d.f()}}this._finishRendering(o,u,c)}else this._dispatchEvent(0)}},{key:"_currentOutlineItem",value:(a=_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===c.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 a.apply(this,arguments)})},{key:"_getPageNumberToDestHash",value:(o=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,i,o,a,c,l,h,d,p,v,y,g,m,_,b;return _regeneratorRuntime().wrap((function _callee2$(w){for(;;)switch(w.prev=w.next){case 0:if(!this._pageNumberToDestHashCapability){w.next=2;break}return w.abrupt("return",this._pageNumberToDestHashCapability.promise);case 2:this._pageNumberToDestHashCapability=new u.PromiseCapability;r=new Map,i=new Map;o=[{nesting:0,items:this._outline}];case 5:if(!(o.length>0)){w.next=56;break}a=o.shift(),c=a.nesting;l=_createForOfIteratorHelper(a.items);w.prev=8;l.s();case 10:if((h=l.n()).done){w.next=46;break}d=h.value,p=d.dest,v=d.items;y=void 0,g=void 0;if("string"!=typeof p){w.next=21;break}w.next=16;return t.getDestination(p);case 16:y=w.sent;if(t===this._pdfDocument){w.next=19;break}return w.abrupt("return",null);case 19:w.next=22;break;case 21:y=p;case 22:if(!Array.isArray(y)){w.next=43;break}m=(D=1,_arrayWithHoles(P=y)||_iterableToArrayLimit(P,D)||_unsupportedIterableToArray(P,D)||_nonIterableRest());if("object"!==_typeof(_=m[0])||null===_){w.next=41;break}if(g=this.linkService._cachedPageNumber(_)){w.next=39;break}w.prev=27;w.next=30;return t.getPageIndex(_);case 30:w.t0=w.sent;g=w.t0+1;if(t===this._pdfDocument){w.next=34;break}return w.abrupt("return",null);case 34:this.linkService.cachePageRef(g,_);w.next=39;break;case 37:w.prev=37;w.t1=w.catch(27);case 39:w.next=42;break;case 41:Number.isInteger(_)&&(g=_+1);case 42:if(Number.isInteger(g)&&(!r.has(g)||c>i.get(g))){b=this.linkService.getDestinationHash(p);r.set(g,b);i.set(g,c)}case 43:v.length>0&&o.push({nesting:c+1,items:v});case 44:w.next=10;break;case 46:w.next=51;break;case 48:w.prev=48;w.t2=w.catch(8);l.e(w.t2);case 51:w.prev=51;l.f();return w.finish(51);case 54:w.next=5;break;case 56:this._pageNumberToDestHashCapability.resolve(r.size>0?r:null);return w.abrupt("return",this._pageNumberToDestHashCapability.promise);case 58:case"end":return w.stop()}var P,D}),_callee2,this,[[8,48,51,54],[27,37]])}))),function _getPageNumberToDestHash(t){return o.apply(this,arguments)})}]);return PDFOutlineViewer}(a.BaseTreeViewer);o()}catch(d){o(d)}}))},6732:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFPageView:()=>W});i(6180),i(895),i(1747),i(7484),i(2374),i(7254),i(5666),i(7874),i(1210),i(3352),i(5548),i(7942),i(5776),i(394),i(4226),i(5598),i(8806),i(9366),i(6678),i(5897),i(2926),i(1133),i(2173),i(2630),i(1024),i(13),i(7121),i(6770),i(1378),i(171),i(924),i(9593);var a=i(1869),u=i(4927),c=i(2640),l=i(6735),h=i(8961),d=i(7910),p=(i(3234),i(7498)),v=i(4630),y=i(1483),g=i(3266),m=i(4274),_=i(1013),b=i(8012),w=t([a,c,l,d,_,b]);[a,c,l,d,_,b]=w.then?(await w)():w;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=_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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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,_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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classApplyDescriptorGet(t,_classExtractFieldDescriptor(t,r,"get"))}function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}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){_classApplyDescriptorSet(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 _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}}var P=h.compatibilityParams.maxCanvasPixels||16777216,D=new WeakMap,E=new WeakMap,x=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakMap,k=new WeakMap,I=new WeakMap,T=new WeakMap,L=new WeakMap,O=new WeakSet,M=new WeakSet,B=new WeakSet,G=new WeakSet,R=new WeakSet,j=new WeakSet,N=new WeakSet,V=new WeakSet,W=function(){function PDFPageView(t){var r,i,o,c,l,h=this;_classCallCheck(this,PDFPageView);_classPrivateMethodInitSpec(this,V);_classPrivateMethodInitSpec(this,N);_classPrivateMethodInitSpec(this,j);_classPrivateMethodInitSpec(this,R);_classPrivateMethodInitSpec(this,G);_classPrivateMethodInitSpec(this,B);_classPrivateMethodInitSpec(this,M);_classPrivateMethodInitSpec(this,O);_classPrivateFieldInitSpec(this,D,{writable:!0,value:a.AnnotationMode.ENABLE_FORMS});_classPrivateFieldInitSpec(this,E,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,x,{writable:!0,value:null});_classPrivateFieldInitSpec(this,S,{writable:!0,value:null});_classPrivateFieldInitSpec(this,A,{writable:!0,value:null});_classPrivateFieldInitSpec(this,C,{writable:!0,value:null});_classPrivateFieldInitSpec(this,k,{writable:!0,value:u.RenderingStates.INITIAL});_classPrivateFieldInitSpec(this,I,{writable:!0,value:u.TextLayerMode.ENABLE});_classPrivateFieldInitSpec(this,T,{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,x,t.layerProperties||null);this.pdfPage=null;this.pageLabel=null;this.rotation=0;this.scale=t.scale||u.DEFAULT_SCALE;this.viewport=v;this.pdfPageRotate=v.rotation;this._optionalContentConfigPromise=t.optionalContentConfigPromise||null;_classPrivateFieldSet(this,I,null!==(r=t.textLayerMode)&&void 0!==r?r:u.TextLayerMode.ENABLE);_classPrivateFieldSet(this,D,null!==(i=t.annotationMode)&&void 0!==i?i:a.AnnotationMode.ENABLE_FORMS);this.imageResourcesPath=t.imageResourcesPath||"";this.isOffscreenCanvasSupported=null===(o=t.isOffscreenCanvasSupported)||void 0===o||o;this.maxCanvasPixels=null!==(c=t.maxCanvasPixels)&&void 0!==c?c:P;this.pageColors=t.pageColors||null;this.eventBus=t.eventBus;this.renderingQueue=t.renderingQueue;this.l10n=t.l10n||d.NullL10n;this.renderTask=null;this.resume=null;this._isStandalone=!(null!==(l=this.renderingQueue)&&void 0!==l&&l.hasViewer());this._container=p;this._annotationCanvasMap=null;this.annotationLayer=null;this.annotationEditorLayer=null;this.textLayer=null;this.zoomLayer=null;this.xfaLayer=null;this.structTreeLayer=null;var y=document.createElement("div");y.className="page";y.setAttribute("data-page-number",this.id);y.setAttribute("role","region");y.setAttribute("data-l10n-id","pdfjs-page-landmark");y.setAttribute("data-l10n-args",JSON.stringify({page:this.id}));this.div=y;_classPrivateMethodGet(this,O,_setDimensions2).call(this);null==p||p.append(y);if(this._isStandalone){null==p||p.style.setProperty("--scale-factor",this.scale*a.PixelsPerInch.PDF_TO_CSS_UNITS);var g=t.optionalContentConfigPromise;g&&g.then((function(t){g===h._optionalContentConfigPromise&&(_classPrivateFieldGet(h,T).initialOptionalContent=t.hasInitialVisibility)}));this.l10n===d.NullL10n&&this.l10n.translate(this.div)}}_createClass(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 u.RenderingStates.PAUSED:this.div.classList.remove("loading");break;case u.RenderingStates.RUNNING:this.div.classList.add("loadingIcon");_classPrivateFieldSet(this,S,setTimeout((function(){r.div.classList.add("loading");_classPrivateFieldSet(r,S,null)}),0));break;case u.RenderingStates.INITIAL:case u.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 o;null===(o=this._container)||void 0===o||o.style.setProperty("--hcm-highlight-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*a.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,a.shadow)(this,"_textHighlighter",new m.TextHighlighter({pageIndex:this.id-1,eventBus:this.eventBus,findController:_classPrivateFieldGet(this,x).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,a,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=c.keepZoomLayer,h=void 0!==l&&l,d=c.keepAnnotationLayer,p=void 0!==d&&d,v=c.keepAnnotationEditorLayer,y=void 0!==v&&v,g=c.keepXfaLayer,m=void 0!==g&&g,_=c.keepTextLayer,b=void 0!==_&&_;this.cancelRendering({keepAnnotationLayer:p,keepAnnotationEditorLayer:y,keepXfaLayer:m,keepTextLayer:b});this.renderingState=u.RenderingStates.INITIAL;for(var w=this.div,P=w.childNodes,D=h&&this.zoomLayer||null,E=p&&(null===(t=this.annotationLayer)||void 0===t?void 0:t.div)||null,x=y&&(null===(r=this.annotationEditorLayer)||void 0===r?void 0:r.div)||null,S=m&&(null===(i=this.xfaLayer)||void 0===i?void 0:i.div)||null,A=b&&(null===(o=this.textLayer)||void 0===o?void 0:o.div)||null,C=P.length-1;C>=0;C--){var k=P[C];switch(k){case D:case E:case x:case S:case A:continue}k.remove()}w.removeAttribute("data-loaded");E&&this.annotationLayer.hide();x&&this.annotationEditorLayer.hide();S&&this.xfaLayer.hide();A&&this.textLayer.hide();null===(a=this.structTreeLayer)||void 0===a||a.hide();if(!D){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,o=void 0===i?0:i,c=t.rotation,l=void 0===c?null:c,h=t.optionalContentConfigPromise,d=void 0===h?null:h,p=t.drawingDelay,v=void 0===p?-1:p;this.scale=o||this.scale;"number"==typeof l&&(this.rotation=l);if(d instanceof Promise){this._optionalContentConfigPromise=d;d.then((function(t){d===r._optionalContentConfigPromise&&(_classPrivateFieldGet(r,T).initialOptionalContent=t.hasInitialVisibility)}))}_classPrivateFieldGet(this,T).directDrawing=!0;var y=(this.rotation+this.pdfPageRotate)%360;this.viewport=this.viewport.clone({scale:this.scale*a.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:y});_classPrivateMethodGet(this,O,_setDimensions2).call(this);if(this._isStandalone){var g;null===(g=this._container)||void 0===g||g.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 _=this.viewport,b=_.width,w=_.height,P=this.outputScale,D=P.sx,x=P.sy;m=(Math.floor(b)*D|0)*(Math.floor(w)*x|0)>this.maxCanvasPixels}var S=!m&&v>=0&&v<1e3;if(S||m){if(S&&this.renderingState!==u.RenderingStates.FINISHED){this.cancelRendering({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0,cancelExtraDelay:v});this.renderingState=u.RenderingStates.FINISHED;_classPrivateFieldGet(this,T).directDrawing=!1}this.cssTransform({target:this.canvas,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0,redrawTextLayer:!S,hideTextLayer:S});if(S)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,c=void 0!==u&&u,l=t.keepTextLayer,h=void 0!==l&&l,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&&(!c||!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,c=t.redrawXfaLayer,l=void 0!==c&&c,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 y=r.style;y.width=y.height=""}var g=_classPrivateFieldGet(this,L).get(r);if(this.viewport!==g){var m=this.viewport.rotation-g.rotation,_=Math.abs(m),b=1,w=1;if(90===_||270===_){var P=this.viewport,D=P.width,E=P.height;b=E/D;w=D/E}r.style.transform="rotate(".concat(m,"deg) scale(").concat(b,", ").concat(w,")")}o&&this.annotationLayer&&_classPrivateMethodGet(this,M,_renderAnnotationLayer2).call(this);u&&this.annotationEditorLayer&&_classPrivateMethodGet(this,B,_renderAnnotationEditorLayer2).call(this);l&&this.xfaLayer&&_classPrivateMethodGet(this,G,_renderXfaLayer2).call(this);if(this.textLayer)if(v){var x;this.textLayer.hide();null===(x=this.structTreeLayer)||void 0===x||x.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,o,h,d,p,m,w,P,S,A,C,k,T,O,j,N,W,z,H,U,K,$,Y,q,X,Z,Q,J,ee,te,re,ne,ie,oe,ae,se,ue=this;return _regeneratorRuntime().wrap((function _callee2$(ce){for(;;)switch(ce.prev=ce.next){case 0:if(this.renderingState!==u.RenderingStates.INITIAL){globalThis.ngxConsole.error("Must be in new state before drawing");this.reset()}t=this.div,r=this.l10n,i=this.pageColors,o=this.pdfPage,h=this.viewport;if(o){ce.next=5;break}this.renderingState=u.RenderingStates.FINISHED;throw new Error("pdfPage is not loaded");case 5:this.renderingState=u.RenderingStates.RUNNING;(d=document.createElement("div")).classList.add("canvasWrapper");t.append(d);if(!this.textLayer&&_classPrivateFieldGet(this,I)!==u.TextLayerMode.DISABLE&&!o.isPureXfa){this._accessibilityManager||(this._accessibilityManager=new v.TextAccessibilityManager);this.textLayer=new _.TextLayerBuilder({highlighter:this._textHighlighter,accessibilityManager:this._accessibilityManager,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,enablePermissions:_classPrivateFieldGet(this,I)===u.TextLayerMode.ENABLE_PERMISSIONS});this.textLayer.onAppend=function(t){ue.l10n.pause();ue.div.append(t);ue.l10n.resume()}}if(!this.annotationLayer&&_classPrivateFieldGet(this,D)!==a.AnnotationMode.DISABLE){p=_classPrivateFieldGet(this,x),m=p.annotationStorage,w=p.downloadManager,P=p.enableScripting,S=p.fieldObjectsPromise,A=p.hasJSActionsPromise,C=p.linkService;this._annotationCanvasMap||(this._annotationCanvasMap=new Map);this.annotationLayer=new l.AnnotationLayerBuilder({pageDiv:t,pdfPage:o,annotationStorage:m,imageResourcesPath:this.imageResourcesPath,renderForms:_classPrivateFieldGet(this,D)===a.AnnotationMode.ENABLE_FORMS,linkService:C,downloadManager:w,enableScripting:P,hasJSActionsPromise:A,fieldObjectsPromise:S,annotationCanvasMap:this._annotationCanvasMap,accessibilityManager:this._accessibilityManager})}k=function renderContinueCallback(t){var r;null===(r=W)||void 0===r||r(!1);if(!ue.renderingQueue||ue.renderingQueue.isHighestPriority(ue))t();else{ue.renderingState=u.RenderingStates.PAUSED;ue.resume=function(){ue.renderingState=u.RenderingStates.RUNNING;t()}}};T=h.width,O=h.height;(j=document.createElement("canvas")).setAttribute("role","presentation");j.hidden=!0;N=!(null==i||!i.background||null==i||!i.foreground);W=function showCanvas(t){if(!N||t){j.hidden=!1;W=null}};d.append(j);this.canvas=j;z=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0,alpha:!1}:{alpha:!1};H=j.getContext("2d",z);U=this.outputScale=new u.OutputScale;if(0===this.maxCanvasPixels){K=1/this.scale;U.sx*=K;U.sy*=K;_classPrivateFieldSet(this,E,!0)}else if(this.maxCanvasPixels>0){$=T*O;Y=Math.sqrt(this.maxCanvasPixels/$);if(U.sx>Y||U.sy>Y){U.sx=Y;U.sy=Y;_classPrivateFieldSet(this,E,!0)}else _classPrivateFieldSet(this,E,!1)}q=(0,u.approximateFraction)(U.sx);X=(0,u.approximateFraction)(U.sy);T=(0,u.roundToDivide)(T*U.sx,q[0]);O=(0,u.roundToDivide)(O*U.sy,X[0]);Z=1;if((T>=4096||O>=4096)&&(this.maxWidth||!y.default.test({width:T,height:O}))){Q=this.determineMaxDimensions();if((Z=Math.max(T/Q,O/Q))>1){J=Math.floor(100*this.scale/Z)/100;Z=this.scale/J;h.width/=Z;h.height/=Z;(0,g.warn)("Page ".concat(this.id,": Reduced the maximum zoom to ").concat(J," because the browser can't render larger canvases."))}else Z=1}j.width=(0,u.roundToDivide)(h.width*U.sx,q[0]);j.height=(0,u.roundToDivide)(h.height*U.sy,X[0]);(ee=j.style).width=(0,u.roundToDivide)(h.width,q[1])+"px";ee.height=(0,u.roundToDivide)(h.height,X[1])+"px";_classPrivateFieldGet(this,L).set(j,h);te=U.scaled?[U.sx,0,0,U.sy,0,0]:null;re={canvasContext:H,transform:te,viewport:h,annotationMode:_classPrivateFieldGet(this,D),optionalContentConfigPromise:this._optionalContentConfigPromise,annotationCanvasMap:this._annotationCanvasMap,pageColors:i};(ne=this.renderTask=this.pdfPage.render(re)).onContinue=k;ie=ne.promise.then(_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var i,a,u,l;return _regeneratorRuntime().wrap((function _callee$(h){for(;;)switch(h.prev=h.next){case 0:null===(i=W)||void 0===i||i(!0);h.next=3;return _classPrivateMethodGet(ue,V,_finishRenderTask2).call(ue,ne);case 3:_classPrivateMethodGet(ue,R,_renderTextLayer2).call(ue);if(!ue.annotationLayer){h.next=7;break}h.next=7;return _classPrivateMethodGet(ue,M,_renderAnnotationLayer2).call(ue);case 7:if(ue.annotationEditorLayer){h.next=12;break}u=_classPrivateFieldGet(ue,x);if(l=u.annotationEditorUIManager){h.next=11;break}return h.abrupt("return");case 11:ue.annotationEditorLayer=new c.AnnotationEditorLayerBuilder({uiManager:l,pageDiv:t,pdfPage:o,l10n:r,accessibilityManager:ue._accessibilityManager,annotationLayer:null===(a=ue.annotationLayer)||void 0===a?void 0:a.annotationLayer});case 12:_classPrivateMethodGet(ue,B,_renderAnnotationEditorLayer2).call(ue);case 13:case"end":return h.stop()}}),_callee)}))),(function(t){if(!(t instanceof a.RenderingCancelledException)){var r;null===(r=W)||void 0===r||r(!0)}return _classPrivateMethodGet(ue,V,_finishRenderTask2).call(ue,ne,t)}));if(o.isPureXfa){if(!this.xfaLayer){oe=_classPrivateFieldGet(this,x),ae=oe.annotationStorage,se=oe.linkService;this.xfaLayer=new b.XfaLayerBuilder({pdfPage:o,annotationStorage:ae,linkService:se})}_classPrivateMethodGet(this,G,_renderXfaLayer2).call(this)}t.setAttribute("data-loaded",!0);this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id});return ce.abrupt("return",ie);case 45:case"end":return ce.stop()}}),_callee2,this)}))),function draw(){return t.apply(this,arguments)})},{key:"setPageLabel",value:function setPageLabel(t){var r;this.pageLabel="string"==typeof t?t:null;this.div.setAttribute("data-l10n-args",JSON.stringify({page:null!==(r=this.pageLabel)&&void 0!==r?r:this.id}));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(!y.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,T),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,A)===t.rotation)return;_classPrivateFieldSet(this,A,t.rotation)}(0,a.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,i;return _regeneratorRuntime().wrap((function _callee5$(o){for(;;)switch(o.prev=o.next){case 0:t=null;o.prev=1;o.next=4;return this.xfaLayer.render(this.viewport,"display");case 4:null!=(r=o.sent)&&r.textDivs&&this._textHighlighter&&_classPrivateMethodGet(this,N,_buildXfaTextContentItems2).call(this,r.textDivs);o.next=12;break;case 8:o.prev=8;o.t0=o.catch(1);console.error('#renderXfaLayer: "'.concat(o.t0,'".'));t=o.t0;case 12:o.prev=12;if(null!==(i=this.xfaLayer)&&void 0!==i&&i.div){this.l10n.pause();this.div.append(this.xfaLayer.div);this.l10n.resume()}this.eventBus.dispatch("xfalayerrendered",{source:this,pageNumber:this.id,error:t});return o.finish(12);case 16:case"end":return o.stop()}}),_callee5,this,[[1,8,12,16]])})))).apply(this,arguments)}function _renderTextLayer2(){return _renderTextLayer3.apply(this,arguments)}function _renderTextLayer3(){return(_renderTextLayer3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(){var t,r,i,o,u;return _regeneratorRuntime().wrap((function _callee6$(c){for(;;)switch(c.prev=c.next){case 0:t=this.pdfPage,r=this.textLayer,i=this.viewport;if(r){c.next=3;break}return c.abrupt("return");case 3:o=null;c.prev=4;if(!r.renderingDone){u=t.streamTextContent({includeMarkedContent:!0,disableNormalization:!0});r.setTextContentSource(u)}c.next=8;return r.render(i);case 8:c.next=16;break;case 10:c.prev=10;c.t0=c.catch(4);if(!(c.t0 instanceof a.AbortException)){c.next=14;break}return c.abrupt("return");case 14:console.error('#renderTextLayer: "'.concat(c.t0,'".'));o=c.t0;case 16:this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.id,numTextDivs:r.numTextDivs,error:o});_classPrivateMethodGet(this,j,_renderStructTreeLayer2).call(this);case 18:case"end":return c.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 p.StructTreeLayerBuilder);u.next=5;return this.structTreeLayer.renderingDone?null:this.pdfPage.getStructTree();case 5:i=u.sent;if(o=null===(t=this.structTreeLayer)||void 0===t?void 0:t.render(i)){this.l10n.pause();null===(a=this.canvas)||void 0===a||a.append(o);this.l10n.resume()}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$(c){for(;;)switch(c.prev=c.next){case 0:c.next=2;return this.pdfPage.getTextContent();case 2:r=c.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 c.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$(o){for(;;)switch(o.prev=o.next){case 0:r=i.length>1&&void 0!==i[1]?i[1]:null;t===this.renderTask&&(this.renderTask=null);if(!(r instanceof a.RenderingCancelledException)){o.next=5;break}_classPrivateFieldSet(this,C,null);return o.abrupt("return");case 5:_classPrivateFieldSet(this,C,r);this.renderingState=u.RenderingStates.FINISHED;this._resetZoomLayer(!0);_classPrivateFieldGet(this,T).regularAnnotations=!t.separateAnnots;this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now(),error:_classPrivateFieldGet(this,C)});if(!r){o.next=12;break}throw r;case 12:case"end":return o.stop()}}),_callee9,this)})));return _finishRenderTask3.apply(this,arguments)}o()}catch(z){o(z)}}))},323:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFPresentationMode:()=>B});i(3352),i(6180),i(895),i(1747),i(7484),i(2374),i(394),i(5598),i(8806),i(9366),i(6678),i(5897),i(5666),i(2926),i(1133),i(2173),i(2630),i(1024),i(13),i(4226),i(7121),i(6770),i(1378),i(171);var a=i(4927),u=i(1869),c=t([u]);u=(c.then?(await c)():c)[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 _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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.done?r(h):Promise.resolve(h).then(o,a)}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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classApplyDescriptorGet(t,_classExtractFieldDescriptor(t,r,"get"))}function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}function _classPrivateFieldSet(t,r,i){_classApplyDescriptorSet(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 _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}}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var l=3e3,h="pdfPresentationMode",d="pdfPresentationModeControls",p=50,v=.1,y=50,g=Math.PI/6,m=new WeakMap,_=new WeakMap,b=new WeakSet,w=new WeakSet,P=new WeakSet,D=new WeakSet,E=new WeakSet,x=new WeakSet,S=new WeakSet,A=new WeakSet,C=new WeakSet,k=new WeakSet,I=new WeakSet,T=new WeakSet,L=new WeakSet,O=new WeakSet,M=new WeakSet,B=function(){function PDFPresentationMode(t){var r=t.container,i=t.pdfViewer,o=t.eventBus;_classCallCheck(this,PDFPresentationMode);_classPrivateMethodInitSpec(this,M);_classPrivateMethodInitSpec(this,O);_classPrivateMethodInitSpec(this,L);_classPrivateMethodInitSpec(this,T);_classPrivateMethodInitSpec(this,I);_classPrivateMethodInitSpec(this,k);_classPrivateMethodInitSpec(this,C);_classPrivateMethodInitSpec(this,A);_classPrivateMethodInitSpec(this,S);_classPrivateMethodInitSpec(this,x);_classPrivateMethodInitSpec(this,E);_classPrivateMethodInitSpec(this,D);_classPrivateMethodInitSpec(this,P);_classPrivateMethodInitSpec(this,w);_classPrivateMethodInitSpec(this,b);_classPrivateFieldInitSpec(this,m,{writable:!0,value:a.PresentationModeState.UNKNOWN});_classPrivateFieldInitSpec(this,_,{writable:!0,value:null});this.container=r;this.pdfViewer=i;this.eventBus=o;this.contextMenuOpen=!1;this.mouseScrollTimeStamp=0;this.mouseScrollDelta=0;this.touchSwipeState=null}_createClass(PDFPresentationMode,[{key:"request",value:(r=(t=_regeneratorRuntime().mark((function _callee(){var t,r,i;return _regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:t=this.container,r=this.pdfViewer;if(!this.active&&r.pagesCount&&t.requestFullscreen){o.next=3;break}return o.abrupt("return",!1);case 3:_classPrivateMethodGet(this,O,_addFullscreenChangeListeners2).call(this);_classPrivateMethodGet(this,w,_notifyStateChange2).call(this,a.PresentationModeState.CHANGING);i=t.requestFullscreen();_classPrivateFieldSet(this,_,{pageNumber:r.currentPageNumber,scaleValue:r.currentScaleValue,scrollMode:r.scrollMode,spreadMode:null,annotationEditorMode:null});if(!(r.spreadMode===a.SpreadMode.NONE||r.pageViewsReady&&r.hasEqualPageSizes)){console.warn("Ignoring Spread modes when entering PresentationMode, since the document may contain varying page sizes.");_classPrivateFieldGet(this,_).spreadMode=r.spreadMode}r.annotationEditorMode!==u.AnnotationEditorType.DISABLE&&(_classPrivateFieldGet(this,_).annotationEditorMode=r.annotationEditorMode);o.prev=9;o.next=12;return i;case 12:r.focus();return o.abrupt("return",!0);case 16:o.prev=16;o.t0=o.catch(9);_classPrivateMethodGet(this,M,_removeFullscreenChangeListeners2).call(this);_classPrivateMethodGet(this,w,_notifyStateChange2).call(this,a.PresentationModeState.NORMAL);case 20:return o.abrupt("return",!1);case 21:case"end":return o.stop()}}),_callee,this,[[9,16]])})),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 request(){return r.apply(this,arguments)})},{key:"active",get:function get(){return _classPrivateFieldGet(this,m)===a.PresentationModeState.CHANGING||_classPrivateFieldGet(this,m)===a.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,r;return PDFPresentationMode}();function _mouseWheel2(t){if(this.active){t.preventDefault();var r=(0,a.normalizeWheelEventDelta)(t),i=Date.now(),o=this.mouseScrollTimeStamp;if(!(i>o&&i-o<p)){(this.mouseScrollDelta>0&&r<0||this.mouseScrollDelta<0&&r>0)&&_classPrivateMethodGet(this,C,_resetMouseScrollState2).call(this);this.mouseScrollDelta+=r;if(Math.abs(this.mouseScrollDelta)>=v){var u=this.mouseScrollDelta;_classPrivateMethodGet(this,C,_resetMouseScrollState2).call(this);(u>0?this.pdfViewer.previousPage():this.pdfViewer.nextPage())&&(this.mouseScrollTimeStamp=i)}}}}function _notifyStateChange2(t){_classPrivateFieldSet(this,m,t);this.eventBus.dispatch("presentationmodechanged",{source:this,state:t})}function _enter2(){var t=this;_classPrivateMethodGet(this,w,_notifyStateChange2).call(this,a.PresentationModeState.FULLSCREEN);this.container.classList.add(h);setTimeout((function(){t.pdfViewer.scrollMode=a.ScrollMode.PAGE;null!==_classPrivateFieldGet(t,_).spreadMode&&(t.pdfViewer.spreadMode=a.SpreadMode.NONE);t.pdfViewer.currentPageNumber=_classPrivateFieldGet(t,_).pageNumber;t.pdfViewer.currentScaleValue="page-fit";null!==_classPrivateFieldGet(t,_).annotationEditorMode&&(t.pdfViewer.annotationEditorMode={mode:u.AnnotationEditorType.NONE})}),0);_classPrivateMethodGet(this,I,_addWindowListeners2).call(this);_classPrivateMethodGet(this,S,_showControls2).call(this);this.contextMenuOpen=!1;window.getSelection().removeAllRanges()}function _exit2(){var t=this,r=this.pdfViewer.currentPageNumber;this.container.classList.remove(h);setTimeout((function(){_classPrivateMethodGet(t,M,_removeFullscreenChangeListeners2).call(t);_classPrivateMethodGet(t,w,_notifyStateChange2).call(t,a.PresentationModeState.NORMAL);t.pdfViewer.scrollMode=_classPrivateFieldGet(t,_).scrollMode;null!==_classPrivateFieldGet(t,_).spreadMode&&(t.pdfViewer.spreadMode=_classPrivateFieldGet(t,_).spreadMode);t.pdfViewer.currentScaleValue=_classPrivateFieldGet(t,_).scaleValue;t.pdfViewer.currentPageNumber=r;null!==_classPrivateFieldGet(t,_).annotationEditorMode&&(t.pdfViewer.annotationEditorMode={mode:_classPrivateFieldGet(t,_).annotationEditorMode});_classPrivateFieldSet(t,_,null)}),0);_classPrivateMethodGet(this,T,_removeWindowListeners2).call(this);_classPrivateMethodGet(this,A,_hideControls2).call(this);_classPrivateMethodGet(this,C,_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(d);this.controlsTimeout=setTimeout((function(){t.container.classList.remove(d);delete t.controlsTimeout}),l)}function _hideControls2(){if(this.controlsTimeout){clearTimeout(this.controlsTimeout);this.container.classList.remove(d);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)>y&&(a<=g||a>=Math.PI-g)?r=i:Math.abs(o)>y&&Math.abs(a-Math.PI/2)<=g&&(r=o);r>0?this.pdfViewer.previousPage():r<0&&this.pdfViewer.nextPage()}}function _addWindowListeners2(){this.showControlsBind=_classPrivateMethodGet(this,S,_showControls2).bind(this);this.mouseDownBind=_classPrivateMethodGet(this,E,_mouseDown2).bind(this);this.mouseWheelBind=_classPrivateMethodGet(this,b,_mouseWheel2).bind(this);this.resetMouseScrollStateBind=_classPrivateMethodGet(this,C,_resetMouseScrollState2).bind(this);this.contextMenuBind=_classPrivateMethodGet(this,x,_contextMenu2).bind(this);this.touchSwipeBind=_classPrivateMethodGet(this,k,_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,P,_enter2).call(this):_classPrivateMethodGet(this,D,_exit2).call(this)}function _addFullscreenChangeListeners2(){this.fullscreenChangeBind=_classPrivateMethodGet(this,L,_fullscreenChange2).bind(this);window.addEventListener("fullscreenchange",this.fullscreenChangeBind)}function _removeFullscreenChangeListeners2(){window.removeEventListener("fullscreenchange",this.fullscreenChangeBind);delete this.fullscreenChangeBind}o()}catch(G){o(G)}}))},1834:(t,r,i)=>{i.a(t,(async(t,r)=>{try{i(7942),i(5776),i(6180),i(895),i(5666),i(1747),i(2374),i(7121),i(385),i(1210),i(7874),i(7529),i(3757),i(3655),i(2555),i(2202),i(2796),i(2613),i(3352),i(7254),i(9366),i(6678),i(2926),i(4226),i(171),i(924),i(9593),i(5598),i(8806),i(5897);var o=i(1869),a=i(39),u=i(1483),c=i(4552),l=i(3266),h=t([o,a,c]);[o,a,c]=h.then?(await h)():h;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,_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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}function _arrayWithHoles(t){if(Array.isArray(t))return t}var d=null,p=null,v=null;function renderPage(t,r,i,a,c,h,p){var v=d.scratchCanvas,y=c/o.PixelsPerInch.PDF,g=1,m=Math.floor(a.width*y),_=Math.floor(a.height*y);if(m>=4096||_>=4096){if(!u.default.test({width:m,height:_})){var b=determineMaxDimensions();g=.95*Math.min(b/m,b/_)}(0,l.warn)("Page "+i+": Reduced the [printResolution] to "+Math.floor(c*g)+" because the browser can't render larger canvases. If you see blank page in the print preview, reduce [printResolution] manually to a lower value.")}y*=g;v.width=Math.floor(a.width*y);v.height=Math.floor(a.height*y);var w=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,P=v.getContext("2d",w);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,i,u=(i=2,_arrayWithHoles(r=t)||_iterableToArrayLimit(r,i)||_unsupportedIterableToArray(r,i)||_nonIterableRest()),c=u[0],l=u[1],d={canvasContext:P,transform:[y,0,0,y,0,0],viewport:c.getViewport({scale:1,rotation:a.rotation}),intent:"print",annotationMode:o.AnnotationMode.ENABLE_STORAGE,optionalContentConfigPromise:h,printAnnotationStorage:l};return c.render(d).promise}))}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}var y,g=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,c=arguments.length>6?arguments[6]:void 0;_classCallCheck(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.currentPage=-1;this.scratchCanvas=document.createElement("canvas");this.eventBus=c}_createClass(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(d===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;d=null;ensureOverlay().then((function(){v.active===p&&v.close(p)}))}}},{key:"renderPages",value:function renderPages(){var t=this;if(this.pdfDocument.isPureXfa){(0,c.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.eventBus);i()}else{var a=t.currentPage;renderProgress(a,window.filteredPageCount|r,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){m.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===d}},{key:"throwIfInactive",value:function throwIfInactive(){if(!this.active)throw new Error("This print request was cancelled or completed.")}}]);return PDFPrintService}(),m=window.print;window.printPDF=function printPdf(){if(a.PDFViewerApplication.enablePrint)if(d)globalThis.ngxConsole.warn("Ignored window.printPDF() because of a pending print job.");else{ensureOverlay().then((function(){d&&v.open(p)}));try{dispatchEvent("beforeprint")}finally{if(!d){globalThis.ngxConsole.error("Expected print service to be initialized.");ensureOverlay().then((function(){v.active===p&&v.close(p)}));return}var t=d;d.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(d){d.destroy();dispatchEvent("afterprint")}}function renderProgress(t,r,i){p=document.getElementById("printServiceDialog");var o=Math.round(100*t/r),a=p.querySelector("progress"),u=p.querySelector(".relative-progress");a.value=o;u.setAttribute("data-l10n-args",JSON.stringify({progress:o}));i.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 _=function stopPropagationIfNeeded(t){"custom"!==t.detail&&t.stopImmediatePropagation()};window.addEventListener("beforeprint",_);window.addEventListener("afterprint",_)}function ensureOverlay(){if(!y){if(!(v=a.PDFViewerApplication.overlayManager))throw new Error("The overlay manager has not yet been initialized.");p=document.getElementById("printServiceDialog");y=v.register(p,!0);document.getElementById("printCancel").onclick=abort;p.addEventListener("close",abort)}return y}a.PDFPrintServiceFactory.instance={supportsPrinting:!0,createPrintService:function createPrintService(t,r,i,o,a,u,c){if(d)throw new Error("The print service is created and active.");return d=new g(t,r,i,o,a,u,c)}};r()}catch(b){r(b)}}))},5119:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFRenderingQueue:()=>l});i(895),i(5666),i(4750),i(1210),i(5598),i(8806),i(9366),i(6678),i(3352),i(5897),i(2926),i(6180),i(1747),i(2374);var a=i(1869),u=i(4927),c=t([a]);a=(c.then?(await c)():c)[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 _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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}var l=function(){function PDFRenderingQueue(){var t=this;_classCallCheck(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}})}_createClass(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 c=0;c<u;c++){var l=a[c].view;if(!this.isViewFinished(l))return l}var h=t.first.id,d=t.last.id;if(d-h+1>u)for(var p=t.ids,v=1,y=d-h;v<y;v++){var g=i?h+v:d-v;if(!p.has(g)){var m=r[g-1];if(!this.isViewFinished(m))return m}}var _=i?d:h-2,b=r[_];return b&&!this.isViewFinished(b)||o&&(b=r[_+=i?1:-1])&&!this.isViewFinished(b)?b:null}},{key:"isViewFinished",value:function isViewFinished(t){return t.renderingState===u.RenderingStates.FINISHED}},{key:"renderView",value:function renderView(t){var r=this;switch(t.renderingState){case u.RenderingStates.FINISHED:return!1;case u.RenderingStates.PAUSED:this.highestPriorityPage=t.renderingId;t.resume();break;case u.RenderingStates.RUNNING:this.highestPriorityPage=t.renderingId;break;case u.RenderingStates.INITIAL:this.highestPriorityPage=t.renderingId;t.draw().finally((function(){r.renderHighestPriority()})).catch((function(t){t instanceof a.RenderingCancelledException||globalThis.ngxConsole.error('renderView: "'.concat(t,'"'))}))}return!0}}]);return PDFRenderingQueue}();o()}catch(h){o(h)}}))},2599:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFScriptingManager:()=>A});i(6180),i(895),i(5666),i(1747),i(2374),i(1210),i(5548),i(2048),i(5561),i(8587),i(3247),i(3302),i(9490),i(5438),i(7914),i(3352),i(7484),i(394),i(7874),i(5598),i(8806),i(9366),i(6678),i(5897),i(2926),i(4226),i(171),i(924),i(9593),i(7942),i(5776),i(1133),i(2173),i(2630),i(1024),i(13),i(7121),i(6770),i(1378),i(4668),i(1585),i(2993),i(7262),i(7335);var a=i(4927),u=i(1869),c=t([u]);u=(c.then?(await c)():c)[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 _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 _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(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 _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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function _slicedToArray(t,r){return _arrayWithHoles(t)||_iterableToArrayLimit(t,r)||_unsupportedIterableToArray(t,r)||_nonIterableRest()}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 _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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,_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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classApplyDescriptorGet(t,_classExtractFieldDescriptor(t,r,"get"))}function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}function _classPrivateFieldSet(t,r,i){_classApplyDescriptorSet(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 _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}}var l=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,g=new WeakMap,m=new WeakMap,_=new WeakMap,b=new WeakMap,w=new WeakMap,P=new WeakSet,D=new WeakSet,E=new WeakSet,x=new WeakSet,S=new WeakSet,A=function(){function PDFScriptingManager(t){var r=t.eventBus,i=t.sandboxBundleSrc,o=void 0===i?null:i,a=t.externalServices,u=void 0===a?null:a,c=t.docProperties,A=void 0===c?null:c;_classCallCheck(this,PDFScriptingManager);_classPrivateMethodInitSpec(this,S);_classPrivateMethodInitSpec(this,x);_classPrivateMethodInitSpec(this,E);_classPrivateMethodInitSpec(this,D);_classPrivateMethodInitSpec(this,P);_classPrivateFieldInitSpec(this,l,{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,y,{writable:!0,value:null});_classPrivateFieldInitSpec(this,g,{writable:!0,value:null});_classPrivateFieldInitSpec(this,m,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,_,{writable:!0,value:null});_classPrivateFieldInitSpec(this,b,{writable:!0,value:null});_classPrivateFieldInitSpec(this,w,{writable:!0,value:null});_classPrivateFieldSet(this,p,r);_classPrivateFieldSet(this,_,o);_classPrivateFieldSet(this,v,u);_classPrivateFieldSet(this,d,A)}_createClass(PDFScriptingManager,[{key:"setViewer",value:function setViewer(t){_classPrivateFieldSet(this,g,t)}},{key:"setDocument",value:(a=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,i,o,a,u,c,h,v,_,w,A,C,k=this;return _regeneratorRuntime().wrap((function _callee2$(I){for(;;)switch(I.prev=I.next){case 0:if(!_classPrivateFieldGet(this,y)){I.next=3;break}I.next=3;return _classPrivateMethodGet(this,S,_destroyScripting2).call(this);case 3:_classPrivateFieldSet(this,y,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];u=o[1];c=o[2];if(a||c){I.next=17;break}I.next=16;return _classPrivateMethodGet(this,S,_destroyScripting2).call(this);case 16:return I.abrupt("return");case 17:if(t===_classPrivateFieldGet(this,y)){I.next=19;break}return I.abrupt("return");case 19:I.prev=19;_classPrivateFieldSet(this,b,_classPrivateMethodGet(this,x,_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,S,_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(k,P,_updateFromSandbox2).call(k,t.detail)}));this._internalEvents.set("dispatcheventinsandbox",(function(t){var r;null===(r=_classPrivateFieldGet(k,b))||void 0===r||r.dispatchEventInSandbox(t.detail)}));this._internalEvents.set("pagechanging",(function(t){var r=t.pageNumber,i=t.previous;if(r!==i){_classPrivateMethodGet(k,E,_dispatchPageClose2).call(k,i);_classPrivateMethodGet(k,D,_dispatchPageOpen2).call(k,r)}}));this._internalEvents.set("pagerendered",(function(t){var r=t.pageNumber;k._pageOpenPending.has(r)&&r===_classPrivateFieldGet(k,g).currentPageNumber&&_classPrivateMethodGet(k,D,_dispatchPageOpen2).call(k,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(k,E,_dispatchPageClose2).call(k,_classPrivateFieldGet(k,g).currentPageNumber);case 2:i.next=4;return null===(t=_classPrivateFieldGet(k,b))||void 0===t?void 0:t.dispatchEventInSandbox({id:"doc",name:"WillClose"});case 4:null===(r=_classPrivateFieldGet(k,l))||void 0===r||r.resolve();case 5:case"end":return i.stop()}}),_callee)}))));h=_createForOfIteratorHelper(this._internalEvents);try{for(h.s();!(v=h.n()).done;){_=_slicedToArray(v.value,2),w=_[0],A=_[1];_classPrivateFieldGet(this,p)._on(w,A)}}catch(t){h.e(t)}finally{h.f()}I.prev=36;I.next=39;return _classPrivateFieldGet(this,d).call(this,t);case 39:C=I.sent;if(t===_classPrivateFieldGet(this,y)){I.next=42;break}return I.abrupt("return");case 42:I.next=44;return _classPrivateFieldGet(this,b).createSandbox({objects:a,calculationOrder:u,appInfo:{platform:navigator.platform,language:navigator.language},docInfo:_objectSpread(_objectSpread({},C),{},{actions:c})});case 44:_classPrivateFieldGet(this,p).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,S,_destroyScripting2).call(this);case 52:return I.abrupt("return");case 53:I.next=55;return null===(r=_classPrivateFieldGet(this,b))||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,g).currentPageNumber,!0);case 57:Promise.resolve().then((function(){t===_classPrivateFieldGet(k,y)&&_classPrivateFieldSet(k,m,!0)}));case 58:case"end":return I.stop()}}),_callee2,this,[[19,23],[36,47]])}))),function setDocument(t){return a.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,b))||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,b))||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,b)){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 u.PromiseCapability);r.prev=5;r.next=8;return _classPrivateFieldGet(this,b).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,b))||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,h))||void 0===t?void 0:t.promise)||null}},{key:"ready",get:function get(){return _classPrivateFieldGet(this,m)}},{key:"_internalEvents",get:function get(){return(0,u.shadow)(this,"_internalEvents",new Map)}},{key:"_pageOpenPending",get:function get(){return(0,u.shadow)(this,"_pageOpenPending",new Set)}},{key:"_visitedPages",get:function get(){return(0,u.shadow)(this,"_visitedPages",new Map)}}]);var t,r,i,o,a;return PDFScriptingManager}();function _updateFromSandbox2(t){return _updateFromSandbox3.apply(this,arguments)}function _updateFromSandbox3(){return(_updateFromSandbox3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee7(t){var r,i,o,u,c,l,h,d,v,m,_,b,P,D;return _regeneratorRuntime().wrap((function _callee7$(E){for(;;)switch(E.prev=E.next){case 0:i=_classPrivateFieldGet(this,g);o=i.isInPresentationMode||i.isChangingPresentationMode;u=t.id,c=t.siblings,l=t.command,h=t.value;if(u){E.next=41;break}E.t0=l;E.next="clear"===E.t0?7:"error"===E.t0?9:"layout"===E.t0?11:"page-num"===E.t0?13:"print"===E.t0?15:"println"===E.t0?19:"zoom"===E.t0?21:"SaveAs"===E.t0?23:"FirstPage"===E.t0?25:"LastPage"===E.t0?27:"NextPage"===E.t0?29:"PrevPage"===E.t0?31:"ZoomViewIn"===E.t0?33:"ZoomViewOut"===E.t0?35:"WillPrintFinished"===E.t0?37:40;break;case 7:globalThis.ngxConsole.clear();return E.abrupt("break",40);case 9:globalThis.ngxConsole.error(h);return E.abrupt("break",40);case 11:if(!o){d=(0,a.apiPageLayoutToViewerModes)(h);i.spreadMode=d.spreadMode}return E.abrupt("break",40);case 13:i.currentPageNumber=h+1;return E.abrupt("break",40);case 15:E.next=17;return i.pagesPromise;case 17:_classPrivateFieldGet(this,p).dispatch("print",{source:this});return E.abrupt("break",40);case 19:globalThis.ngxConsole.log(h);return E.abrupt("break",40);case 21:o||(i.currentScaleValue=h);return E.abrupt("break",40);case 23:_classPrivateFieldGet(this,p).dispatch("download",{source:this});return E.abrupt("break",40);case 25:i.currentPageNumber=1;return E.abrupt("break",40);case 27:i.currentPageNumber=i.pagesCount;return E.abrupt("break",40);case 29:i.nextPage();return E.abrupt("break",40);case 31:i.previousPage();return E.abrupt("break",40);case 33:o||i.increaseScale();return E.abrupt("break",40);case 35:o||i.decreaseScale();return E.abrupt("break",40);case 37:null===(r=_classPrivateFieldGet(this,w))||void 0===r||r.resolve();_classPrivateFieldSet(this,w,null);return E.abrupt("break",40);case 40:return E.abrupt("return");case 41:if(!o||!t.focus){E.next=43;break}return E.abrupt("return");case 43:delete t.id;delete t.siblings;v=c?[u].concat(_arrayWithoutHoles(x=c)||_iterableToArray(x)||_unsupportedIterableToArray(x)||_nonIterableSpread()):[u];m=_createForOfIteratorHelper(v);try{for(m.s();!(_=m.n()).done;){b=_.value;(P=document.querySelector('[data-element-id="'.concat(b,'"]')))?P.dispatchEvent(new CustomEvent("updatefromsandbox",{detail:t})):null===(D=_classPrivateFieldGet(this,y))||void 0===D||D.annotationStorage.setValue(b,t)}}catch(t){m.e(t)}finally{m.f()}case 48:case"end":return E.stop()}var x}),_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,o,c,h,d=this,p=arguments;return _regeneratorRuntime().wrap((function _callee9$(v){for(;;)switch(v.prev=v.next){case 0:r=p.length>1&&void 0!==p[1]&&p[1];i=_classPrivateFieldGet(this,y),o=this._visitedPages;r&&_classPrivateFieldSet(this,l,new u.PromiseCapability);if(_classPrivateFieldGet(this,l)){v.next=5;break}return v.abrupt("return");case 5:if((null==(c=_classPrivateFieldGet(this,g).getPageView(t-1))?void 0:c.renderingState)===a.RenderingStates.FINISHED){v.next=9;break}this._pageOpenPending.add(t);return v.abrupt("return");case 9:this._pageOpenPending.delete(t);h=_asyncToGenerator(_regeneratorRuntime().mark((function _callee8(){var r,a,u;return _regeneratorRuntime().wrap((function _callee8$(l){for(;;)switch(l.prev=l.next){case 0:l.next=2;return o.has(t)?null:null===(r=c.pdfPage)||void 0===r?void 0:r.getJSActions();case 2:u=l.sent;if(i===_classPrivateFieldGet(d,y)){l.next=5;break}return l.abrupt("return");case 5:l.next=7;return null===(a=_classPrivateFieldGet(d,b))||void 0===a?void 0:a.dispatchEventInSandbox({id:"page",name:"PageOpen",pageNumber:t,actions:u});case 7:case"end":return l.stop()}}),_callee8)})))();o.set(t,h);case 12:case"end":return v.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$(u){for(;;)switch(u.prev=u.next){case 0:i=_classPrivateFieldGet(this,y),o=this._visitedPages;if(_classPrivateFieldGet(this,l)){u.next=3;break}return u.abrupt("return");case 3:if(!this._pageOpenPending.has(t)){u.next=5;break}return u.abrupt("return");case 5:if(a=o.get(t)){u.next=8;break}return u.abrupt("return");case 8:o.set(t,null);u.next=11;return a;case 11:if(i===_classPrivateFieldGet(this,y)){u.next=13;break}return u.abrupt("return");case 13:u.next=15;return null===(r=_classPrivateFieldGet(this,b))||void 0===r?void 0:r.dispatchEventInSandbox({id:"page",name:"PageClose",pageNumber:t});case 15:case"end":return u.stop()}}),_callee10,this)})))).apply(this,arguments)}function _initScripting2(){_classPrivateFieldSet(this,h,new u.PromiseCapability);if(_classPrivateFieldGet(this,b))throw new Error("#initScripting: Scripting already exists.");return _classPrivateFieldGet(this,v).createScripting({sandboxBundleSrc:_classPrivateFieldGet(this,_)})}function _destroyScripting2(){return _destroyScripting3.apply(this,arguments)}function _destroyScripting3(){return(_destroyScripting3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee11(){var t,r,i,o,a,u,c,d;return _regeneratorRuntime().wrap((function _callee11$(v){for(;;)switch(v.prev=v.next){case 0:if(_classPrivateFieldGet(this,b)){v.next=4;break}_classPrivateFieldSet(this,y,null);null===(i=_classPrivateFieldGet(this,h))||void 0===i||i.resolve();return v.abrupt("return");case 4:if(!_classPrivateFieldGet(this,l)){v.next=8;break}v.next=7;return Promise.race([_classPrivateFieldGet(this,l).promise,new Promise((function(t){setTimeout(t,1e3)}))]).catch((function(){}));case 7:_classPrivateFieldSet(this,l,null);case 8:_classPrivateFieldSet(this,y,null);v.prev=9;v.next=12;return _classPrivateFieldGet(this,b).destroySandbox();case 12:v.next=16;break;case 14:v.prev=14;v.t0=v.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;){u=_slicedToArray(a.value,2),c=u[0],d=u[1];_classPrivateFieldGet(this,p)._off(c,d)}}catch(t){o.e(t)}finally{o.f()}this._internalEvents.clear();this._pageOpenPending.clear();this._visitedPages.clear();_classPrivateFieldSet(this,b,null);_classPrivateFieldSet(this,m,!1);null===(r=_classPrivateFieldGet(this,h))||void 0===r||r.resolve();case 26:case"end":return v.stop()}}),_callee11,this,[[9,14]])})))).apply(this,arguments)}o()}catch(C){o(C)}}))},4487:(t,r,i)=>{i.d(r,{PDFSidebar:()=>E});i(1210),i(3352),i(6180),i(895),i(1747),i(7484),i(2374),i(394),i(5666),i(5598),i(8806),i(9366),i(6678),i(5897),i(2926);var o=i(4927);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)||!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 _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,c="sidebarResizing",l="pdfSidebarNotification",h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,g=new WeakSet,m=new WeakSet,_=new WeakSet,b=new WeakSet,w=new WeakSet,P=new WeakSet,D=new WeakSet,E=function(){function PDFSidebar(t){var r=t.elements,i=t.eventBus,a=t.l10n;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFSidebar);_classPrivateMethodInitSpec(this,D);_classPrivateMethodInitSpec(this,P);_classPrivateMethodInitSpec(this,w);_classPrivateMethodInitSpec(this,b);_classPrivateMethodInitSpec(this,_);_classPrivateMethodInitSpec(this,m);_classPrivateMethodInitSpec(this,g);_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,D,_mouseUp2).bind(this)});_classPrivateFieldInitSpec(this,v,{writable:!0,value:null});_classPrivateFieldInitSpec(this,y,{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=r.outerContainer;this.sidebarContainer=r.sidebarContainer;this.toggleButton=r.toggleButton;this.resizer=r.resizer;this.thumbnailButton=r.thumbnailButton;this.outlineButton=r.outlineButton;this.attachmentsButton=r.attachmentsButton;this.layersButton=r.layersButton;this.thumbnailView=r.thumbnailView;this.outlineView=r.outlineView;this.attachmentsView=r.attachmentsView;this.layersView=r.layersView;this._outlineOptionsContainer=r.outlineOptionsContainer;this._currentOutlineItemButton=r.currentOutlineItemButton;this.eventBus=i;_classPrivateFieldSet(this,h,"rtl"===a.getDirection());_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,_,_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,g,_dispatchEvent2).call(this)}else _classPrivateMethodGet(this,g,_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,g,_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,g,_dispatchEvent2).call(this);_classPrivateMethodGet(this,_,_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,g,_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","pdfjs-toggle-sidebar-notification-button");this.isOpen||this.toggleButton.classList.add(l)}function _hideUINotification2(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(this.isOpen||t)&&this.toggleButton.classList.remove(l);t&&this.toggleButton.setAttribute("data-l10n-id","pdfjs-toggle-sidebar-button")}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(c);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,y))if(t.isOpen){t.outerContainer.classList.add(c);var i=_classPrivateMethodGet(t,w,_updateWidth2).call(t,_classPrivateFieldGet(t,y));Promise.resolve().then((function(){t.outerContainer.classList.remove(c);i&&t.eventBus.dispatch("resize",{source:t})}))}else _classPrivateMethodGet(t,w,_updateWidth2).call(t,_classPrivateFieldGet(t,y))}}))}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,y))return!1;_classPrivateFieldSet(this,y,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,w,_updateWidth2).call(this,r)}function _mouseUp2(t){this.outerContainer.classList.remove(c);this.eventBus.dispatch("resize",{source:this});window.removeEventListener("mousemove",_classPrivateFieldGet(this,d));window.removeEventListener("mouseup",_classPrivateFieldGet(this,p))}},3346:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFThumbnailView:()=>y,TempImageFactory:()=>l});i(3352),i(1210),i(895),i(5666),i(4750),i(6180),i(1747),i(394),i(2374),i(7484),i(7254),i(5598),i(8806),i(9366),i(6678),i(5897),i(2926),i(1133),i(2173),i(2630),i(1024),i(13),i(4226),i(7121),i(6770),i(1378),i(171),i(924),i(9593),i(7942),i(5776);var a=i(4927),u=i(1869),c=t([u]);u=(c.then?(await c)():c)[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 _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 _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}function _arrayWithHoles(t){if(Array.isArray(t))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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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 _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}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 _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 _classApplyDescriptorGet(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 _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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}function _classStaticPrivateFieldSpecSet(t,r,i,o){_classCheckPrivateStaticAccess(t,r);_classCheckPrivateStaticFieldDescriptor(i,"set");_classApplyDescriptorSet(t,i,o);return o}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}}function _classStaticPrivateFieldSpecGet(t,r,i){_classCheckPrivateStaticAccess(t,r);_classCheckPrivateStaticFieldDescriptor(i,"get");return _classApplyDescriptorGet(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")}function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}var l=function(){function TempImageFactory(){_classCallCheck(this,TempImageFactory)}_createClass(TempImageFactory,null,[{key:"getCanvas",value:function getCanvas(t,r){var i=_classStaticPrivateFieldSpecGet(this,TempImageFactory,h)||_classStaticPrivateFieldSpecSet(this,TempImageFactory,h,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,h);if(t){t.width=0;t.height=0}_classStaticPrivateFieldSpecSet(this,TempImageFactory,h,null)}}]);return TempImageFactory}(),h={writable:!0,value:null},d=new WeakSet,p=new WeakSet,v=new WeakMap,y=function(){function PDFThumbnailView(t){var r=t.container,i=t.eventBus,o=t.id,u=t.defaultViewport,c=t.optionalContentConfigPromise,l=t.linkService,h=t.renderingQueue,y=t.pageColors;_classCallCheck(this,PDFThumbnailView);_classPrivateFieldInitSpec(this,v,{get:_get_pageL10nArgs,set:void 0});_classPrivateMethodInitSpec(this,p);_classPrivateMethodInitSpec(this,d);this.id=o;this.renderingId="thumbnail"+o;this.pageLabel=null;this.pdfPage=null;this.rotation=0;this.viewport=u;this.pdfPageRotate=u.rotation;this._optionalContentConfigPromise=c||null;this.pageColors=y||null;this.eventBus=i;this.linkService=l;this.renderingQueue=h;this.eventBus=i;this.renderTask=null;this.renderingState=a.RenderingStates.INITIAL;this.resume=null;window.pdfThumbnailGenerator?this._placeholderImg=window.pdfThumbnailGenerator(this,l,o,r,_classPrivateFieldGet(this,v)):this.createThumbnail(this,l,o,r,_classPrivateFieldGet(this,v))}_createClass(PDFThumbnailView,[{key:"createThumbnail",value:function createThumbnail(t,r,i,o,a){var u=document.createElement("a");u.href=r.getAnchorUrl("#page="+i);u.setAttribute("data-l10n-id","pdfjs-thumb-page-title");u.setAttribute("data-l10n-args",_classPrivateFieldGet(this,v));u.onclick=function(){r.goToPage(i);return!1};this.anchor=u;var c=document.createElement("div");c.className="thumbnail";c.setAttribute("data-page-number",this.id);this.div=c;_classPrivateMethodGet(this,d,_updateDims2).call(this);var l=document.createElement("div");l.className="thumbnailImage";this._placeholderImg=l;c.append(l);u.append(c);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=a.RenderingStates.INITIAL;this.div.removeAttribute("data-loaded");null===(t=this.image)||void 0===t||t.replaceWith(this._placeholderImg);_classPrivateMethodGet(this,d,_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},o=r.getContext("2d",i),u=new a.OutputScale;r.width=t*this.canvasWidth*u.sx|0;r.height=t*this.canvasHeight*u.sy|0;return{ctx:o,canvas:r,transform:u.scaled?[u.sx,0,0,u.sy,0,0]:null}}},{key:"_convertCanvasToImage",value:function _convertCanvasToImage(t){if(this.renderingState!==a.RenderingStates.FINISHED)throw new Error("_convertCanvasToImage: Rendering has not finished.");var r=this._reduceImage(t),i=document.createElement("img");i.className="thumbnailImage";i.setAttribute("data-l10n-id","pdfjs-thumb-page-canvas");i.setAttribute("data-l10n-args",_classPrivateFieldGet(this,v));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,o,u,c,l,h,d,v,y=this;return _regeneratorRuntime().wrap((function _callee$(g){for(;;)switch(g.prev=g.next){case 0:if(this.renderingState===a.RenderingStates.INITIAL){g.next=3;break}globalThis.ngxConsole.error("Must be in new state before drawing");return g.abrupt("return",void 0);case 3:if(t=this.pdfPage){g.next=7;break}this.renderingState=a.RenderingStates.FINISHED;throw new Error("pdfPage is not loaded");case 7:this.renderingState=a.RenderingStates.RUNNING;r=this._getPageDrawContext(2),i=r.ctx,o=r.canvas,u=r.transform;c=this.viewport.clone({scale:2*this.scale});l=function renderContinueCallback(t){if(y.renderingQueue.isHighestPriority(y))t();else{y.renderingState=a.RenderingStates.PAUSED;y.resume=function(){y.renderingState=a.RenderingStates.RUNNING;t()}}};h={canvasContext:i,transform:u,viewport:c,optionalContentConfigPromise:this._optionalContentConfigPromise,pageColors:this.pageColors};(d=this.renderTask=t.render(h)).onContinue=l;(v=d.promise.then((function(){return _classPrivateMethodGet(y,p,_finishRenderTask2).call(y,d,o)}),(function(t){return _classPrivateMethodGet(y,p,_finishRenderTask2).call(y,d,o,t)}))).finally((function(){o.width=0;o.height=0;y.eventBus.dispatch("thumbnailrendered",{source:y,pageNumber:y.id,pdfPage:y.pdfPage})}));return g.abrupt("return",v);case 17:case"end":return g.stop()}}),_callee,this)}))),function draw(){return t.apply(this,arguments)})},{key:"setImage",value:function setImage(t){if(this.renderingState===a.RenderingStates.INITIAL){var r=t.thumbnailCanvas,i=t.pdfPage,o=t.scale;if(r){this.pdfPage||this.setPdfPage(i);if(!(o<this.scale)){this.renderingState=a.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,u,c=o.width<<3,h=o.height<<3,d=l.getCanvas(c,h),p=(u=2,_arrayWithHoles(a=d)||_iterableToArrayLimit(a,u)||_unsupportedIterableToArray(a,u)||_nonIterableRest()),v=p[0],y=p[1];c>t.width||h>t.height;){c>>=1;h>>=1}y.drawImage(t,0,0,t.width,t.height,0,0,c,h);for(;c>2*o.width;){y.drawImage(v,0,0,c,h,0,0,c>>1,h>>1);c>>=1;h>>=1}i.drawImage(v,0,0,c,h,0,0,o.width,o.height);return o}},{key:"setPageLabel",value:function setPageLabel(t){var r;this.pageLabel="string"==typeof t?t:null;this.anchor.setAttribute("data-l10n-args",_classPrivateFieldGet(this,v));this.renderingState===a.RenderingStates.FINISHED&&(null===(r=this.image)||void 0===r||r.setAttribute("data-l10n-args",_classPrivateFieldGet(this,v)))}}]);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,o=arguments;return _regeneratorRuntime().wrap((function _callee2$(c){for(;;)switch(c.prev=c.next){case 0:i=o.length>2&&void 0!==o[2]?o[2]:null;t===this.renderTask&&(this.renderTask=null);if(!(i instanceof u.RenderingCancelledException)){c.next=4;break}return c.abrupt("return");case 4:this.renderingState=a.RenderingStates.FINISHED;this._convertCanvasToImage(r);if(!i){c.next=8;break}throw i;case 8:this.eventBus.dispatch("thumbnailRendered",this.id);case 9:case"end":return c.stop()}}),_callee2,this)})));return _finishRenderTask3.apply(this,arguments)}function _get_pageL10nArgs(){var t;return JSON.stringify({page:null!==(t=this.pageLabel)&&void 0!==t?t:this.id})}o()}catch(g){o(g)}}))},3510:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFThumbnailViewer:()=>p});i(1210),i(3352),i(4226),i(6180),i(895),i(1747),i(394),i(2374),i(5598),i(8806),i(9366),i(6678),i(5897),i(171),i(924),i(9593),i(7942),i(5776),i(2926),i(5666),i(1133),i(2173),i(2630),i(1024),i(13),i(7121),i(6770),i(1378);var a=i(4927),u=i(3346),c=t([u]);u=(c.then?(await c)():c)[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 _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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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=_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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var l="selected",h=new WeakSet,d=new WeakSet,p=function(){function PDFThumbnailViewer(t){var r=t.container,i=t.eventBus,o=t.linkService,u=t.renderingQueue,c=t.pageColors;_classCallCheck(this,PDFThumbnailViewer);_classPrivateMethodInitSpec(this,d);_classPrivateMethodInitSpec(this,h);this.container=r;this.eventBus=i;this.linkService=o;this.renderingQueue=u;this.pageColors=c||null;this.scroll=(0,a.watchScroll)(this.container,this._scrollUpdated.bind(this));this._resetView()}_createClass(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,a.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(l);r.div.classList.add(l)}var i=this._getVisibleThumbs(),o=i.first,u=i.last,c=i.views;if(c.length>0){var h=!1;if(t<=o.id||t>=u.id)h=!0;else{var d,p=_createForOfIteratorHelper(c);try{for(p.s();!(d=p.n()).done;){var v=d.value,y=v.id,g=v.percent;if(y===t){h=g<100;break}}}catch(t){p.e(t)}finally{p.f()}}h&&(0,a.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,a.isValidRotation)(t))throw new Error("Invalid thumbnails rotation angle.");if(this.pdfDocument&&this._pagesRotation!==t){this._pagesRotation=t;var r,i={rotation:t},o=_createForOfIteratorHelper(this._thumbnails);try{for(o.s();!(r=o.n()).done;){r.value.update(i)}}catch(t){o.e(t)}finally{o.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!==a.RenderingStates.FINISHED&&i.reset()}}catch(t){r.e(t)}finally{r.f()}u.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 a,c=t.numPages,h=i.getViewport({scale:1}),d=1;d<=c;++d){var p=new u.PDFThumbnailView(_defineProperty({container:r.container,eventBus:r.eventBus,id:d,defaultViewport:h.clone(),optionalContentConfigPromise:o,linkService:r.linkService,renderingQueue:r.renderingQueue,pageColors:r.pageColors},"eventBus",r.eventBus));r._thumbnails.push(p)}null===(a=r._thumbnails[0])||void 0===a||a.setPdfPage(i);r._thumbnails[r._currentPageNumber-1].div.classList.add(l)})).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,d,_getScrollAhead2).call(this,r),o=this.renderingQueue.getHighestPriority(r,this._thumbnails,i);if(o){_classPrivateMethodGet(this,h,_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=(t=_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]])})),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 t;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}o()}catch(v){o(v)}}))},9290:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFViewer:()=>ne,PagesCountLimit:()=>g});i(2796),i(2613),i(9099),i(6180),i(895),i(2048),i(1747),i(5561),i(8587),i(3247),i(3302),i(9490),i(5438),i(7914),i(2374),i(3352),i(7874),i(7121),i(385),i(5897),i(1210),i(6770),i(1378),i(8518),i(275),i(5252),i(8649),i(4226),i(5666),i(6133),i(7942),i(4711),i(5136),i(7944),i(5548),i(7484),i(394),i(2926),i(9366),i(6678),i(4750),i(924),i(5598),i(8806),i(171),i(9593),i(5776),i(1133),i(2173),i(2630),i(1024),i(13),i(4668),i(1585),i(2993),i(7262),i(7335);var a,u=i(1869),c=i(4927),l=i(7910),h=i(658),d=i(6732),p=i(5119),v=i(3234),y=t([u,l,d,p]);[u,l,d,p]=y.then?(await y)():y;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 _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 _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 _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,a,u,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}function _arrayWithHoles(t){if(Array.isArray(t))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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classApplyDescriptorGet(t,_classExtractFieldDescriptor(t,r,"get"))}function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}function _classPrivateFieldSet(t,r,i){_classApplyDescriptorSet(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 _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}}var g={FORCE_SCROLL_MODE_PAGE:15e3,FORCE_LAZY_PAGE_INIT:7500,PAUSE_EAGER_PAGE_INIT:250};function isValidAnnotationEditorMode(t){return Object.values(u.AnnotationEditorType).includes(t)&&t!==u.AnnotationEditorType.DISABLE}var m=new WeakMap,_=new WeakMap,b=new WeakSet;a=Symbol.iterator;var w=function(){function PDFPageViewBuffer(t){_classCallCheck(this,PDFPageViewBuffer);_classPrivateMethodInitSpec(this,b);_classPrivateFieldInitSpec(this,m,{writable:!0,value:new Set});_classPrivateFieldInitSpec(this,_,{writable:!0,value:0});_classPrivateFieldSet(this,_,t)}_createClass(PDFPageViewBuffer,[{key:"push",value:function push(t){var r=_classPrivateFieldGet(this,m);r.has(t)&&r.delete(t);r.add(t);r.size>_classPrivateFieldGet(this,_)&&_classPrivateMethodGet(this,b,_destroyFirstView2).call(this)}},{key:"resize",value:function resize(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;_classPrivateFieldSet(this,_,t);var i=_classPrivateFieldGet(this,m);if(r){var o,a=i.size,u=1,c=_createForOfIteratorHelper(i);try{for(c.s();!(o=c.n()).done;){var l=o.value;if(r.has(l.id)){i.delete(l);i.add(l)}if(++u>a)break}}catch(t){c.e(t)}finally{c.f()}}for(;i.size>_classPrivateFieldGet(this,_);)_classPrivateMethodGet(this,b,_destroyFirstView2).call(this)}},{key:"has",value:function has(t){return _classPrivateFieldGet(this,m).has(t)}},{key:a,value:function value(){return _classPrivateFieldGet(this,m).keys()}}]);return PDFPageViewBuffer}();function _destroyFirstView2(){var t=_classPrivateFieldGet(this,m).keys().next().value;null==t||t.destroy();_classPrivateFieldGet(this,m).delete(t)}var P=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakMap,k=new WeakMap,I=new WeakMap,T=new WeakMap,L=new WeakMap,O=new WeakMap,M=new WeakMap,B=new WeakMap,G=new WeakMap,R=new WeakMap,j=new WeakMap,N=new WeakMap,V=new WeakMap,W=new WeakSet,z=new WeakSet,H=new WeakSet,U=new WeakSet,K=new WeakSet,$=new WeakSet,Y=new WeakSet,q=new WeakSet,X=new WeakMap,Z=new WeakSet,Q=new WeakSet,J=new WeakSet,ee=new WeakSet,te=new WeakSet,re=new WeakSet,ne=function(){function PDFViewer(t){var r,i,o,a,h,d,y=this;_classCallCheck(this,PDFViewer);_classPrivateMethodInitSpec(this,re);_classPrivateMethodInitSpec(this,te);_classPrivateMethodInitSpec(this,ee);_classPrivateMethodInitSpec(this,J);_classPrivateMethodInitSpec(this,Q);_classPrivateMethodInitSpec(this,Z);_classPrivateFieldInitSpec(this,X,{get:_get_pageWidthScaleFactor,set:void 0});_classPrivateMethodInitSpec(this,q);_classPrivateMethodInitSpec(this,Y);_classPrivateMethodInitSpec(this,$);_classPrivateMethodInitSpec(this,K);_classPrivateMethodInitSpec(this,U);_classPrivateMethodInitSpec(this,H);_classPrivateMethodInitSpec(this,z);_classPrivateMethodInitSpec(this,W);_classPrivateFieldInitSpec(this,P,{writable:!0,value:null});_classPrivateFieldInitSpec(this,D,{writable:!0,value:null});_classPrivateFieldInitSpec(this,E,{writable:!0,value:u.AnnotationEditorType.NONE});_classPrivateFieldInitSpec(this,x,{writable:!0,value:null});_classPrivateFieldInitSpec(this,S,{writable:!0,value:u.AnnotationMode.ENABLE_FORMS});_classPrivateFieldInitSpec(this,A,{writable:!0,value:null});_classPrivateFieldInitSpec(this,C,{writable:!0,value:null});_classPrivateFieldInitSpec(this,k,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,I,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,T,{writable:!0,value:null});_classPrivateFieldInitSpec(this,L,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,O,{writable:!0,value:0});_classPrivateFieldInitSpec(this,M,{writable:!0,value:new ResizeObserver(_classPrivateMethodGet(this,re,_resizeObserverCallback2).bind(this))});_classPrivateFieldInitSpec(this,B,{writable:!0,value:null});_classPrivateFieldInitSpec(this,G,{writable:!0,value:null});_classPrivateFieldInitSpec(this,R,{writable:!0,value:null});_classPrivateFieldInitSpec(this,j,{writable:!0,value:c.TextLayerMode.ENABLE});_classPrivateFieldInitSpec(this,N,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,V,{writable:!0,value:"multiple"});var g="4.0.727";if(u.version!==g)throw new Error('The API version "'.concat(u.version,'" does not match the Viewer version "').concat(g,'".'));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,M).observe(this.container);this.eventBus=t.eventBus;this.linkService=t.linkService||new v.SimpleLinkService;this.downloadManager=t.downloadManager||null;this.findController=t.findController||null;_classPrivateFieldSet(this,D,t.altTextManager||null);this.findController&&(this.findController.onIsPageVisible=function(t){return y._getVisiblePages().ids.has(t)});this._scriptingManager=t.scriptingManager||null;_classPrivateFieldSet(this,j,null!==(o=t.textLayerMode)&&void 0!==o?o:c.TextLayerMode.ENABLE);_classPrivateFieldSet(this,S,null!==(a=t.annotationMode)&&void 0!==a?a:u.AnnotationMode.ENABLE_FORMS);_classPrivateFieldSet(this,E,null!==(h=t.annotationEditorMode)&&void 0!==h?h:u.AnnotationEditorType.NONE);this.imageResourcesPath=t.imageResourcesPath||"";this.enablePrintAutoRotate=t.enablePrintAutoRotate||!1;this.removePageBorders=t.removePageBorders||!1;this.isOffscreenCanvasSupported=null===(d=t.isOffscreenCanvasSupported)||void 0===d||d;this.maxCanvasPixels=t.maxCanvasPixels;this.l10n=t.l10n||l.NullL10n;_classPrivateFieldSet(this,k,t.enablePermissions||!1);this.pageColors=t.pageColors||null;this.defaultRenderingQueue=!t.renderingQueue;if(this.defaultRenderingQueue){this.renderingQueue=new p.PDFRenderingQueue;this.renderingQueue.setViewer(this)}else this.renderingQueue=t.renderingQueue;this.scroll=(0,c.watchScroll)(this.container,this._scrollUpdate.bind(this));this.presentationModeState=c.PresentationModeState.UNKNOWN;this._onBeforeDraw=this._onAfterDraw=null;this._resetView();this.removePageBorders&&this.viewer.classList.add("removePageBorders");_classPrivateMethodGet(this,te,_updateContainerHeightCss2).call(this);this.eventBus._on("thumbnailrendered",(function(t){var r=t.pageNumber,i=t.pdfPage,o=y._pages[r-1];_classPrivateFieldGet(y,P).has(o)||null==i||i.cleanup()}));this.l10n===l.NullL10n&&this.l10n.translate(this.container)}_createClass(PDFViewer,[{key:"pageViewMode",get:function get(){return _classPrivateFieldGet(this,V)},set:function set(t){if(_classPrivateFieldGet(this,V)!==t){_classPrivateFieldSet(this,V,t);if(!_classPrivateFieldGet(this,N)&&"infinite-scroll"===t){_classPrivateFieldSet(this,N,_classPrivateMethodGet(this,W,_findParentWithScrollbar2).call(this,this.container.offsetParent));_classPrivateFieldGet(this,N)&&(0,c.watchScroll)(_classPrivateFieldGet(this,N),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,P))}},{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,S)===u.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.'));if(this.pageFlip){r?this.pageFlip.flip(t-1):this.pageFlip.turnToPage(t-1);this.ensureAdjacentPagesAreLoaded()}}}},{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 h.PageFlip(i,{width:r.clientWidth,height:r.clientHeight,showCover:!0,size:"fixed"});t.pageFlip.loadFromHTML(document.querySelectorAll(".page"));t.pageFlip.on("flip",(function(r){t._currentPageNumber!==r.data+1&&t._setCurrentPageNumber(r.data+1,!1)}))}}),100))}},{key:"_setCurrentPageNumber",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,i,o,a,u,c=this,l=arguments;return _regeneratorRuntime().wrap((function _callee2$(h){for(;;)switch(h.prev=h.next){case 0:o=l.length>1&&void 0!==l[1]&&l[1];if(this._currentPageNumber!==t){h.next=4;break}o&&_classPrivateMethodGet(this,Q,_resetCurrentPageView2).call(this);return h.abrupt("return",!0);case 4:if(0<t&&t<=this.pagesCount){h.next=6;break}return h.abrupt("return",!1);case 6:a=this._currentPageNumber;this._currentPageNumber=t;this.hidePagesDependingOnpageViewMode();if("book"!==this.pageViewMode&&"infinite-scroll"!==this.pageViewMode){h.next=19;break}if(!(u=this._pages[this.currentPageNumber-1]).div.parentElement.classList.contains("spread")){h.next=15;break}u.div.parentElement.childNodes.forEach(function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,i;return _regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:r=Number(t.getAttribute("data-page-number"));i=c._pages[r-1];o.next=4;return _classPrivateMethodGet(c,J,_ensurePdfPageLoaded2).call(c,i);case 4:c.renderingQueue.renderView(i);t.style.display="inline-block";case 6:case"end":return o.stop()}}),_callee)})));return function(r){return t.apply(this,arguments)}}());h.next=19;break;case 15:h.next=17;return _classPrivateMethodGet(this,J,_ensurePdfPageLoaded2).call(this,u);case 17:this.renderingQueue.renderView(u);"book"===_classPrivateFieldGet(this,V)&&this.ensureAdjacentPagesAreLoaded();case 19: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:a});o&&_classPrivateMethodGet(this,Q,_resetCurrentPageView2).call(this);return h.abrupt("return",!0);case 22:case"end":return h.stop()}}),_callee2,this)}))),function _setCurrentPageNumber(t){return i.apply(this,arguments)})},{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===c.RenderingStates.INITIAL){_classPrivateMethodGet(this,J,_ensurePdfPageLoaded2).call(this,i).then((function(){t.renderingQueue.renderView(i)}));return!0}}return!1}},{key:"ensureAdjacentPagesAreLoaded",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t,r,i,o,a,u,l=this;return _regeneratorRuntime().wrap((function _callee3$(h){for(;;)switch(h.prev=h.next){case 0:t=[0,1,-1,2,-2,-3];r=0;this.currentPageNumber%2==1&&(r=-1);i=!1;o=_regeneratorRuntime().mark((function _loop(){var t,o,h,d;return _regeneratorRuntime().wrap((function _loop$(p){for(;;)switch(p.prev=p.next){case 0:t=u[a];if(!((o=l.currentPageNumber+t+r)>=0&&o<l._pages.length)){p.next=14;break}p.prev=3;h=l._pages[o];p.next=7;return _classPrivateMethodGet(l,J,_ensurePdfPageLoaded2).call(l,h);case 7:if(l._pages.some((function(t){return t.renderingState===c.RenderingStates.RUNNING||t.renderingState===c.RenderingStates.PAUSED}))||i){d=function loader(){return l.adjacentPagesRenderer(loader,o)};l.eventBus._on("pagerendered",d);l.eventBus._on("thumbnailRendered",d)}else i=l.adjacentPagesRenderer(null,o);p.next=14;break;case 11:p.prev=11;p.t0=p.catch(3);console.log("Exception during pre-rendering page "+o,p.t0);case 14:case"end":return p.stop()}}),_loop,null,[[3,11]])}));a=0,u=t;case 6:if(!(a<u.length)){h.next=11;break}return h.delegateYield(o(),"t0",8);case 8:a++;h.next=6;break;case 11:case"end":return h.stop()}}),_callee3,this)}))),function ensureAdjacentPagesAreLoaded(){return r.apply(this,arguments)})},{key:"adjacentPagesRenderer",value:function adjacentPagesRenderer(t,r){var i=this._pages.find((function(t){return t.renderingState===c.RenderingStates.RUNNING}));if(i)return!0;var o=this._pages.find((function(t){return t.renderingState===c.RenderingStates.PAUSED}));if(o){console.log("Delaying because "+o.id+" is already in pause mode, so let's trigger this one first");this.renderingQueue.renderView(o);return!0}if(t){this.eventBus._off("pagerendered",t);this.eventBus._off("thumbnailRendered",t)}if(r>=0&&r<this._pages.length){var a=this._pages[r];if(a.renderingState===c.RenderingStates.INITIAL){this.renderingQueue.renderView(a);return!0}}return!1}},{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!==c.UNKNOWN_SCALE?this._currentScale:c.DEFAULT_SCALE},set:function set(t){if(isNaN(t))throw new Error("Invalid numeric scale.");this.pdfDocument&&_classPrivateMethodGet(this,Z,_setScale2).call(this,t,{noScroll:!1})}},{key:"currentScaleValue",get:function get(){return this._currentScaleValue},set:function set(t){this.pdfDocument&&_classPrivateMethodGet(this,Z,_setScale2).call(this,t,{noScroll:!1})}},{key:"pagesRotation",get:function get(){return this._pagesRotation},set:function set(t){if(!(0,c.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,Z,_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:"_layerProperties",get:function get(){var t=this;return(0,u.shadow)(this,"_layerProperties",{get annotationEditorUIManager(){return _classPrivateFieldGet(t,x)},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}})}},{key:"getAllText",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){var t,r,i,o,a,u,l,h,d,p;return _regeneratorRuntime().wrap((function _callee4$(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,L)){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:u=v.sent;l=u.items;h=_createForOfIteratorHelper(l);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,c.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()}}),_callee4,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,x)){_classPrivateFieldGet(this,x).destroy();_classPrivateFieldSet(this,x,null)}}this.pdfDocument=t;if(t){var a=t.numPages,l=t.getPage(1),h=t.getOptionalContentConfig(),p=_classPrivateFieldGet(this,k)?t.getPermissions():Promise.resolve();if(a>g.FORCE_SCROLL_MODE_PAGE){console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document.");var v=this._scrollMode=c.ScrollMode.PAGE;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:v})}this._pagesCapability.promise.then((function(){r.eventBus.dispatch("pagesloaded",{source:r,pagesCount:a})}),(function(){}));this._onBeforeDraw=function(t){var i=r._pages[t.pageNumber-1];i&&_classPrivateFieldGet(r,P).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,G)){document.removeEventListener("visibilitychange",_classPrivateFieldGet(r,G));_classPrivateFieldSet(r,G,null)}}};this.eventBus._on("pagerendered",this._onAfterDraw);Promise.all([l,p]).then((function(i){var o,l,p,v,y=(v=2,_arrayWithHoles(p=i)||_iterableToArrayLimit(p,v)||_unsupportedIterableToArray(p,v)||_nonIterableRest()),m=y[0],_=y[1];if(t===r.pdfDocument){r._firstPageCapability.resolve(m);r._optionalContentConfigPromise=h;var b=_classPrivateMethodGet(r,z,_initializePermissions2).call(r,_),w=b.annotationEditorMode,P=b.annotationMode,S=b.textLayerMode;if(S!==c.TextLayerMode.DISABLE){var A=_classPrivateFieldSet(r,T,document.createElement("div"));A.id="hiddenCopyElement";r.viewer.before(A)}if(w!==u.AnnotationEditorType.DISABLE){var k=w;if(t.isPureXfa)console.warn("Warning: XFA-editing is not implemented.");else if(isValidAnnotationEditorMode(k)){_classPrivateFieldSet(r,x,new u.AnnotationEditorUIManager(r.container,r.viewer,_classPrivateFieldGet(r,D),r.eventBus,t,r.pageColors));k!==u.AnnotationEditorType.NONE&&_classPrivateFieldGet(r,x).updateMode(k)}else console.error("Invalid AnnotationEditor mode: ".concat(k))}var I=r._scrollMode===c.ScrollMode.PAGE?null:r.viewer,L=r.currentScale,O=m.getViewport({scale:L*u.PixelsPerInch.PDF_TO_CSS_UNITS});r.viewer.style.setProperty("--scale-factor",O.scale);"CanvasText"!==(null===(o=r.pageColors)||void 0===o?void 0:o.foreground)&&"Canvas"!==(null===(l=r.pageColors)||void 0===l?void 0:l.background)||r.viewer.style.setProperty("--hcm-highlight-filter",t.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"));for(var M=1;M<=a;++M){var B=new d.PDFPageView({container:I,eventBus:r.eventBus,id:M,scale:L,defaultViewport:O.clone(),optionalContentConfigPromise:h,renderingQueue:r.renderingQueue,textLayerMode:S,annotationMode:P,imageResourcesPath:r.imageResourcesPath,removePageBorders:r.removePageBorders,useOnlyCssZoom:r.useOnlyCssZoom,isOffscreenCanvasSupported:r.isOffscreenCanvasSupported,maxCanvasPixels:r.maxCanvasPixels,pageColors:r.pageColors,l10n:r.l10n,layerProperties:r._layerProperties});r._pages.push(B)}var G=r._pages[0];if(G){G.setPdfPage(m);r.linkService.cachePageRef(1,m.ref)}r._scrollMode===c.ScrollMode.PAGE?_classPrivateMethodGet(r,K,_ensurePageViewVisible2).call(r):r._spreadMode!==c.SpreadMode.NONE&&r._updateSpreadMode();_classPrivateMethodGet(r,H,_onePageRenderedOrForceFetch2).call(r).then(_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(){var i,o,u,c,l;return _regeneratorRuntime().wrap((function _callee5$(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,T)){_classPrivateFieldSet(r,C,_classPrivateMethodGet(r,U,_copyCallback2).bind(r,S));document.addEventListener("copy",_classPrivateFieldGet(r,C))}_classPrivateFieldGet(r,x)&&r.eventBus.dispatch("annotationeditormodechanged",{source:r,mode:_classPrivateFieldGet(r,E)});if(!(t.loadingParams.disableAutoFetch||a>g.FORCE_LAZY_PAGE_INIT)){h.next=7;break}r._pagesCapability.resolve();return h.abrupt("return");case 7:if(!((u=a-1)<=0)){h.next=11;break}r._pagesCapability.resolve();return h.abrupt("return");case 11:if("book"!==_classPrivateFieldGet(r,V)){h.next=14;break}h.next=14;return r.ensureAdjacentPagesAreLoaded();case 14:c=_regeneratorRuntime().mark((function _loop2(i){var o;return _regeneratorRuntime().wrap((function _loop2$(a){for(;;)switch(a.prev=a.next){case 0:if(!r._pages[i-1]){a.next=2;break}return a.abrupt("return",1);case 2: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==--u&&r._pagesCapability.resolve()}),(function(t){console.error("Unable to get page ".concat(i," to initialize viewer"),t);0==--u&&r._pagesCapability.resolve()}));if(i%g.PAUSE_EAGER_PAGE_INIT!=0){a.next=6;break}a.next=6;return o;case 6:case"end":return a.stop()}}),_loop2)}));l=2;case 16:if(!(l<=a)){h.next=23;break}return h.delegateYield(c(l),"t0",18);case 18:if(!h.t0){h.next=20;break}return h.abrupt("continue",20);case 20:++l;h.next=16;break;case 23:case"end":return h.stop()}}),_callee5)}))));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=c.UNKNOWN_SCALE;this._currentScaleValue=null;this._pageLabels=null;var t=Number(PDFViewerApplicationOptions.get("defaultCacheSize"))||10;_classPrivateFieldSet(this,P,new w(t));this._location=null;this._pagesRotation=0;this._optionalContentConfigPromise=null;this._firstPageCapability=new u.PromiseCapability;this._onePageRenderedCapability=new u.PromiseCapability;this._pagesCapability=new u.PromiseCapability;this._scrollMode=c.ScrollMode.VERTICAL;this._previousScrollMode=c.ScrollMode.UNKNOWN;this._spreadMode=c.SpreadMode.NONE;_classPrivateFieldSet(this,B,{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,G)){document.removeEventListener("visibilitychange",_classPrivateFieldGet(this,G));_classPrivateFieldSet(this,G,null)}this.viewer.textContent="";this._updateScrollMode();this.viewer.removeAttribute("lang");if(_classPrivateFieldGet(this,T)){document.removeEventListener("copy",_classPrivateFieldGet(this,C));_classPrivateFieldSet(this,C,null);_classPrivateFieldGet(this,T).remove();_classPrivateFieldSet(this,T,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=_objectSpread({},r);if("string"==typeof o.top&&o.top.endsWith("%")){var a,u=Number(o.top.replace("%","")),c=null===(a=this.viewer.querySelector(".page"))||void 0===a?void 0:a.clientHeight,l=i.clientHeight?i.clientHeight:c,h=this.viewer.parentElement.clientHeight;l=Math.max(0,l-h);o.top=u*l/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,y=i.clientWidth?i.clientWidth:v;o.left=p*y/100}_classPrivateMethodGet(this,$,_scrollIntoView2).call(this,{div:i,id:t},o)}else _classPrivateMethodGet(this,$,_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,a=void 0===o?null:o,l=t.allowNegativeOffset,h=void 0!==l&&l,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&&a){var y,g,m=0,_=0,b=0,w=0,P=v.rotation%180!=0,D=(P?v.height:v.width)/v.scale/u.PixelsPerInch.PDF_TO_CSS_UNITS,E=(P?v.width:v.height)/v.scale/u.PixelsPerInch.PDF_TO_CSS_UNITS,x=0;switch(a[1].name){case"XYZ":m=a[2];_=a[3];x=a[4];m=null!==m?m:0;_=null!==_?_:E;break;case"Fit":case"FitB":x="page-fit";break;case"FitH":case"FitBH":x="page-width";if(null===(_=a[2])&&this._location){m=this._location.left;_=this._location.top}else("number"!=typeof _||_<0)&&(_=E);break;case"FitV":case"FitBV":m=a[2];b=D;w=E;x="page-height";break;case"FitR":m=a[2];_=a[3];b=a[4]-m;w=a[5]-_;var S=c.SCROLLBAR_PADDING,A=c.VERTICAL_PADDING;this.removePageBorders&&(S=A=0);y=(this.container.clientWidth-S)/b/u.PixelsPerInch.PDF_TO_CSS_UNITS;g=(this.container.clientHeight-A)/w/u.PixelsPerInch.PDF_TO_CSS_UNITS;x=Math.min(Math.abs(y),Math.abs(g));break;default:console.error('scrollPageIntoView: "'.concat(a[1].name,'" is not a valid destination type.'));return}p||(x&&x!==this._currentScale?this.currentScaleValue=x:this._currentScale===c.UNKNOWN_SCALE&&(this.currentScaleValue=c.DEFAULT_SCALE_VALUE));_classPrivateMethodGet(this,J,_ensurePdfPageLoaded2).call(this,v).then((function(){r.renderingQueue.renderView(v);"single"===r.pageViewMode&&r.currentPageNumber!==i&&(r.currentPageNumber=i)}));if("page-fit"!==x||a[4]){var C=[v.viewport.convertToViewportPoint(m,_),v.viewport.convertToViewportPoint(m+b,_+w)],k=Math.min(C[0][0],C[1][0]),I=Math.min(C[0][1],C[1][1]);if(!h){k=Math.max(k,0);I=Math.max(I,0)}_classPrivateMethodGet(this,$,_scrollIntoView2).call(this,v,{left:k,top:I})}else _classPrivateMethodGet(this,$,_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],c=this.container,l=u.getPagePoint(c.scrollLeft-t.x,c.scrollTop-t.y),h=Math.round(l[0]),d=Math.round(l[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===c.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,P).resize(a,t.ids);this.renderingQueue.renderHighestPriority(t);var u,l=this._spreadMode===c.SpreadMode.NONE&&(this._scrollMode===c.ScrollMode.PAGE||this._scrollMode===c.ScrollMode.VERTICAL),h=this._currentPageNumber,d=!1,p=_createForOfIteratorHelper(r);try{for(p.s();!(u=p.n()).done;){var v=u.value;if(v.percent<100)break;if(v.id===h&&l){d=!0;break}}}catch(t){p.e(t)}finally{p.f()}if(this.scrollMode!==c.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===c.PresentationModeState.FULLSCREEN}},{key:"isChangingPresentationMode",get:function get(){return this.presentationModeState===c.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===c.ScrollMode.PAGE?_classPrivateFieldGet(this,B).pages:this._pages,r=this._scrollMode===c.ScrollMode.HORIZONTAL,i=r&&this._isContainerRtl;return(0,c.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!==c.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,ee,_getScrollAhead2).call(this,i),a=this._spreadMode!==c.SpreadMode.NONE&&this._scrollMode!==c.ScrollMode.HORIZONTAL,u=this.renderingQueue.getHighestPriority(i,this._pages,o,a);if(u){_classPrivateMethodGet(this,J,_ensurePdfPageLoaded2).call(this,u).then((function(){r.renderingQueue.renderView(u)}));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,c.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,c.isValidScrollMode)(t))throw new Error("Invalid scroll mode: ".concat(t));if(!(this.pagesCount>g.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===c.ScrollMode.HORIZONTAL);i.classList.toggle("scrollWrapped",r===c.ScrollMode.WRAPPED);if(this.pdfDocument&&t){r===c.ScrollMode.PAGE?_classPrivateMethodGet(this,K,_ensurePageViewVisible2).call(this):this._previousScrollMode===c.ScrollMode.PAGE&&this._updateSpreadMode();this._currentScaleValue&&isNaN(this._currentScaleValue)&&_classPrivateMethodGet(this,Z,_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,c.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===c.ScrollMode.PAGE)_classPrivateMethodGet(this,K,_ensurePageViewVisible2).call(this);else{r.textContent="";if(this._spreadMode===c.SpreadMode.NONE){var o,a=_createForOfIteratorHelper(this._pages);try{for(a.s();!(o=a.n()).done;){var u=o.value;r.append(u.div)}}catch(t){a.e(t)}finally{a.f()}}else for(var l=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===l){h=h.cloneNode(!1);r.append(h)}h.append(i[d].div)}}this.hidePagesDependingOnpageViewMode();if(t){this._currentScaleValue&&isNaN(this._currentScaleValue)&&_classPrivateMethodGet(this,Z,_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 c.ScrollMode.WRAPPED:var i,o=this._getVisiblePages().views,a=new Map,u=_createForOfIteratorHelper(o);try{for(u.s();!(i=u.n()).done;){var l=i.value,h=l.id,d=l.y,p=l.percent,v=l.widthPercent;if(!(0===p||v<100)){var y=a.get(d);y||a.set(d,y||(y=[]));y.push(h)}}}catch(t){u.e(t)}finally{u.f()}var g,m=_createForOfIteratorHelper(a.values());try{for(m.s();!(g=m.n()).done;){var _=g.value,b=_.indexOf(t);if(-1!==b){var w=_.length;if(1===w)break;if(r)for(var P=b-1;P>=0;P--){var D=_[P],E=_[P+1]-1;if(D<E)return t-E}else for(var x=b+1,S=w;x<S;x++){var A=_[x],C=_[x-1]+1;if(A>C)return C-t}if(r){var k=_[0];if(k<t)return t-k+1}else{var I=_[w-1];if(I>t)return I-t+1}break}}}catch(t){m.e(t)}finally{m.f()}break;case c.ScrollMode.HORIZONTAL:break;case c.ScrollMode.PAGE:case c.ScrollMode.VERTICAL:if(this._spreadMode===c.SpreadMode.NONE)break;var T=this._spreadMode-1;if(r&&t%2!==T)break;if(!r&&t%2===T)break;var L,O=r?t-1:t+1,M=_createForOfIteratorHelper(this._getVisiblePages().views);try{for(M.s();!(L=M.n()).done;){var B=L.value,G=B.id,R=B.percent,j=B.widthPercent;if(G===O){if(R>0&&100===j)return 2;break}}}catch(t){M.e(t)}finally{M.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 u;null!==(u=o)&&void 0!==u||(o=1);do{a=Math.ceil(10*(a*c.DEFAULT_SCALE_DELTA).toFixed(2))/10}while(--o>0&&a<c.MAX_SCALE)}var l=Number(PDFViewerApplicationOptions.get("maxZoom"));l||(l=c.MAX_SCALE);_classPrivateMethodGet(this,Z,_setScale2).call(this,Math.min(l,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 u;null!==(u=o)&&void 0!==u||(o=1);do{a=Math.floor(10*(a/c.DEFAULT_SCALE_DELTA).toFixed(2))/10}while(--o>0&&a>c.MIN_SCALE)}var l=Number(PDFViewerApplicationOptions.get("minZoom"));l||(l=c.MIN_SCALE);_classPrivateMethodGet(this,Z,_setScale2).call(this,Math.max(l,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,x)?_classPrivateFieldGet(this,E):u.AnnotationEditorType.DISABLE},set:function set(t){var r=t.mode,i=t.editId,o=void 0===i?null:i,a=t.isFromKeyboard,u=void 0!==a&&a;if(!_classPrivateFieldGet(this,x))throw new Error("The AnnotationEditor is not enabled.");if(_classPrivateFieldGet(this,E)!==r){if(!isValidAnnotationEditorMode(r))throw new Error("Invalid AnnotationEditor mode: ".concat(r));if(this.pdfDocument){_classPrivateFieldSet(this,E,r);this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:r});_classPrivateFieldGet(this,x).updateMode(r,o,u)}}}},{key:"annotationEditorParams",set:function set(t){var r=t.type,i=t.value;if(!_classPrivateFieldGet(this,x))throw new Error("The AnnotationEditor is not enabled.");_classPrivateFieldGet(this,x).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,R)){clearTimeout(_classPrivateFieldGet(this,R));_classPrivateFieldSet(this,R,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,x).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,x).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,i;return PDFViewer}();function _findParentWithScrollbar2(t){for(;t;){if(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.parentElement}return null}function _initializePermissions2(t){var r={annotationEditorMode:_classPrivateFieldGet(this,E),annotationMode:_classPrivateFieldGet(this,S),textLayerMode:_classPrivateFieldGet(this,j)};if(!t)return r;t.includes(u.PermissionFlag.COPY)||_classPrivateFieldGet(this,j)!==c.TextLayerMode.ENABLE||(r.textLayerMode=c.TextLayerMode.ENABLE_PERMISSIONS);t.includes(u.PermissionFlag.MODIFY_CONTENTS)||(r.annotationEditorMode=u.AnnotationEditorType.DISABLE);t.includes(u.PermissionFlag.MODIFY_ANNOTATIONS)||t.includes(u.PermissionFlag.FILL_INTERACTIVE_FORMS)||_classPrivateFieldGet(this,S)!==u.AnnotationMode.ENABLE_FORMS||(r.annotationMode=u.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,G,(function(){if("hidden"===document.visibilityState){r();document.removeEventListener("visibilitychange",_classPrivateFieldGet(t,G));_classPrivateFieldSet(t,G,null)}}));document.addEventListener("visibilitychange",_classPrivateFieldGet(t,G))}));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,T))){if(_classPrivateFieldGet(this,I)||t===c.TextLayerMode.ENABLE_PERMISSIONS){r.preventDefault();r.stopPropagation();return}_classPrivateFieldSet(this,I,!0);var u=this.container.style.cursor;this.container.style.cursor="wait";var l=function interruptCopy(t){return _classPrivateFieldSet(i,L,"Escape"===t.key)};window.addEventListener("keydown",l);this.getAllText().then(function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(t){return _regeneratorRuntime().wrap((function _callee6$(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()}}),_callee6)})));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,I,!1);_classPrivateFieldSet(i,L,!1);window.removeEventListener("keydown",l);i.container.style.cursor=u}));r.preventDefault();r.stopPropagation()}}function _ensurePageViewVisible2(){if(this._scrollMode!==c.ScrollMode.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");var t=this._currentPageNumber,r=_classPrivateFieldGet(this,B),i=this.viewer;i.textContent="";r.pages.length=0;if(this._spreadMode!==c.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 u=document.createElement("div");u.className="spread";if(this.isInPresentationMode){var l=document.createElement("div");l.className="dummyPage";u.append(l)}var h,d=_createForOfIteratorHelper(o);try{for(d.s();!(h=d.n()).done;){var p=h.value,v=this._pages[p];if(v){u.append(v.div);r.pages.push(v)}}}catch(t){d.e(t)}finally{d.f()}i.append(u)}else{var y=this._pages[t-1];i.append(y.div);r.pages.push(y)}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===c.ScrollMode.PAGE){_classPrivateMethodGet(this,K,_ensurePageViewVisible2).call(this);this.update()}if(!r&&!this.isInPresentationMode){var a=i.offsetLeft+i.clientLeft,u=a+i.clientWidth,l=this.container,h=l.scrollLeft,d=l.clientWidth;(this._scrollMode===c.ScrollMode.HORIZONTAL||a<h||u>h+d)&&(r={left:0,top:0})}(0,c.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,a=i.noScroll,c=void 0!==a&&a,l=i.preset,h=void 0!==l&&l,d=i.drawingDelay,p=void 0===d?-1:d,v=isNaN(Number(this.currentScale))?void 0:Number(this.currentScale),y=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:y});else{this.viewer.style.setProperty("--scale-factor",t*u.PixelsPerInch.PDF_TO_CSS_UNITS);var g=p>=0&&p<1e3;this.refresh(!0,{scale:t,drawingDelay:g?p:-1});g&&_classPrivateFieldSet(this,R,setTimeout((function(){_classPrivateFieldSet(o,R,null);o.refresh()}),p));this._currentScale=t;if(!c){var m,_=this._currentPageNumber;if(this._location&&!this.isInPresentationMode&&!this.isChangingPresentationMode){_=this._location.pageNumber;m=[null,{name:"XYZ"},this._location.left,this._location.top,null]}this.scrollPageIntoView({pageNumber:_,destArray:m,allowNegativeOffset:!0})}this.eventBus.dispatch("scalechanging",{source:this,scale:t,presetValue:h?r:void 0,previousScale:v,previousPresetValue:y});this.defaultRenderingQueue&&this.update()}}function _get_pageWidthScaleFactor(){return this._spreadMode!==c.SpreadMode.NONE&&this._scrollMode!==c.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,q,_setScaleUpdatePages2).call(this,i,t,r)}else{var o=this._pages[this._currentPageNumber-1];if(!o)return;var a=c.SCROLLBAR_PADDING,u=c.VERTICAL_PADDING;if(this.isInPresentationMode){a=u=4;this._spreadMode!==c.SpreadMode.NONE&&(a*=2)}else if(this.removePageBorders)a=u=0;else if(this._scrollMode===c.ScrollMode.HORIZONTAL){var l=[u,a];a=l[0];u=l[1]}var h=(this.container.clientWidth-a)/o.width*o.scale/_classPrivateFieldGet(this,X),d=(this.container.clientHeight-u)/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,c.isPortraitOrientation)(o)?h:Math.min(d,h);i=Math.min(c.MAX_AUTO_SCALE,p);break;default:globalThis.ngxConsole.error('#setScale: "'.concat(t,'" is an unknown zoom value.'));return}r.preset=!0;_classPrivateMethodGet(this,q,_setScaleUpdatePages2).call(this,i,t,r)}}function _resetCurrentPageView2(){var t=this._pages[this._currentPageNumber-1];this.isInPresentationMode&&_classPrivateMethodGet(this,Z,_setScale2).call(this,this._currentScaleValue,{noScroll:!0});_classPrivateMethodGet(this,$,_scrollIntoView2).call(this,t)}function _ensurePdfPageLoaded2(t){return _ensurePdfPageLoaded3.apply(this,arguments)}function _ensurePdfPageLoaded3(){return(_ensurePdfPageLoaded3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee7(t){var r,i,o;return _regeneratorRuntime().wrap((function _callee7$(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()}}),_callee7,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 c.ScrollMode.PAGE:return _classPrivateFieldGet(this,B).scrollDown;case c.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,O)){_classPrivateFieldSet(this,O,t);c.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,te,_updateContainerHeightCss2).call(this,Math.floor(o.borderBoxSize[0].blockSize));_classPrivateFieldSet(this,A,null);break}}}catch(t){i.e(t)}finally{i.f()}}o()}catch(ie){o(ie)}}))},1869:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{AbortException:()=>u,AnnotationEditorLayer:()=>c,AnnotationEditorParamsType:()=>l,AnnotationEditorType:()=>h,AnnotationEditorUIManager:()=>d,AnnotationLayer:()=>p,AnnotationMode:()=>v,DOMSVGFactory:()=>m,FeatureTest:()=>_,GlobalWorkerOptions:()=>x,InvalidPDFException:()=>S,MissingPDFException:()=>C,PDFDateString:()=>L,PasswordResponses:()=>T,PermissionFlag:()=>O,PixelsPerInch:()=>M,PromiseCapability:()=>B,RenderingCancelledException:()=>G,UnexpectedResponseException:()=>V,XfaLayer:()=>H,build:()=>y,createValidAbsoluteUrl:()=>g,fetchData:()=>b,getDocument:()=>w,getFilenameFromUrl:()=>P,getPdfFilenameFromUrl:()=>D,getXfaPageViewport:()=>E,isPdfFile:()=>A,noContextMenu:()=>k,normalizeUnicode:()=>I,renderTextLayer:()=>R,setLayerDimensions:()=>j,shadow:()=>N,updateTextLayer:()=>W,version:()=>z});i(1210);globalThis.pdfjsLib||await globalThis.pdfjsLibPromise;var a=globalThis.pdfjsLib,u=a.AbortException,c=a.AnnotationEditorLayer,l=a.AnnotationEditorParamsType,h=a.AnnotationEditorType,d=a.AnnotationEditorUIManager,p=a.AnnotationLayer,v=a.AnnotationMode,y=a.build,g=(a.CMapCompressionType,a.createValidAbsoluteUrl),m=a.DOMSVGFactory,_=(a.DrawLayer,a.FeatureTest),b=a.fetchData,w=a.getDocument,P=a.getFilenameFromUrl,D=a.getPdfFilenameFromUrl,E=a.getXfaPageViewport,x=a.GlobalWorkerOptions,S=(a.ImageKind,a.InvalidPDFException),A=(a.isDataScheme,a.isPdfFile),C=a.MissingPDFException,k=a.noContextMenu,I=a.normalizeUnicode,T=(a.OPS,a.Outliner,a.PasswordResponses),L=(a.PDFDataRangeTransport,a.PDFDateString),O=(a.PDFWorker,a.PermissionFlag),M=a.PixelsPerInch,B=a.PromiseCapability,G=a.RenderingCancelledException,R=a.renderTextLayer,j=a.setLayerDimensions,N=a.shadow,V=a.UnexpectedResponseException,W=a.updateTextLayer,z=(a.Util,a.VerbosityLevel,a.version),H=a.XfaLayer;o()}catch(t){o(t)}}),1)},216:(t,r,i)=>{i.d(r,{BasePreferences:()=>l});i(4441),i(3352),i(2586),i(895),i(924),i(7874),i(5897),i(6180),i(1747),i(7484),i(2374),i(5598),i(8806),i(9366),i(6678),i(2926),i(4226),i(171),i(9593),i(7942),i(5776),i(5666),i(1133),i(2173),i(2630),i(1024),i(13),i(7121),i(6770),i(1378);var o=i(8961);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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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 _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,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}(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,_toPropertyKey(o.key),o)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!=_typeof(t)||!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 _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 a=new WeakMap,u=new WeakMap,c=new WeakMap,l=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,a,{writable:!0,value:Object.freeze({annotationEditorMode:0,annotationMode:2,cursorToolOnLoad:0,defaultZoomDelay:400,defaultZoomValue:"",disablePageLabels:!1,enablePermissions:!1,enablePrintAutoRotate:!0,enableScripting:!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,viewOnLoad:0,disableAutoFetch:!1,disableFontFace:!1,disableRange:!1,disableStream:!1,enableXfa:!0,viewerCssTheme:0})});_classPrivateFieldInitSpec(this,u,{writable:!0,value:Object.create(null)});_classPrivateFieldInitSpec(this,c,{writable:!0,value:null});if(this.constructor===BasePreferences)throw new Error("Cannot initialize BasePreferences.");_classPrivateFieldSet(this,c,this._readFromStorage(_classPrivateFieldGet(this,a)).then((function(r){for(var i=r.browserPrefs,c=r.prefs,l=Object.create(null),h=0,d=Object.entries({canvasMaxAreaInBytes:-1,isInAutomation:!1,supportsDocumentFonts:!0,supportsIntegratedFind:!1,supportsMouseWheelZoomCtrlKey:!0,supportsMouseWheelZoomMetaKey:!0,supportsPinchToZoom:!0});h<d.length;h++){var p=_slicedToArray(d[h],2),v=p[0],y=p[1],g=null==i?void 0:i[v];l[v]=_typeof(g)===_typeof(y)?g:y}for(var m=0,_=Object.entries(_classPrivateFieldGet(t,a));m<_.length;m++){var b=_slicedToArray(_[m],2),w=b[0],P=b[1],D=null==c?void 0:c[w];l[w]=_classPrivateFieldGet(t,u)[w]=_typeof(D)===_typeof(P)?D:P}o.AppOptions.setAll(l,!0)})))}!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:(l=_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 l.apply(this,arguments)})},{key:"reset",value:(i=_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,c);case 2:t=_classPrivateFieldGet(this,u);_classPrivateFieldSet(this,u,Object.create(null));return i.abrupt("return",this._writeToStorage(_classPrivateFieldGet(this,a)).catch((function(i){_classPrivateFieldSet(r,u,t);throw i})));case 5:case"end":return i.stop()}}),_callee3,this)}))),function reset(){return i.apply(this,arguments)})},{key:"set",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t,r){var i,o,l,h,d=this;return _regeneratorRuntime().wrap((function _callee4$(p){for(;;)switch(p.prev=p.next){case 0:p.next=2;return _classPrivateFieldGet(this,c);case 2:i=_classPrivateFieldGet(this,a)[t],o=_classPrivateFieldGet(this,u);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:l=_typeof(r),h=_typeof(i);if(l===h){p.next=18;break}if("number"!==l||"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(l,", expected a ").concat(h,"."));case 16:p.next=20;break;case 18:if("number"!==l||Number.isInteger(r)){p.next=20;break}throw new Error('Set preference: "'.concat(r,'" must be an integer.'));case 20:_classPrivateFieldGet(this,u)[t]=r;return p.abrupt("return",this._writeToStorage(_classPrivateFieldGet(this,u)).catch((function(t){_classPrivateFieldSet(d,u,o);throw t})));case 22:case"end":return p.stop()}}),_callee4,this)}))),function set(t,i){return r.apply(this,arguments)})},{key:"get",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(t){var r,i;return _regeneratorRuntime().wrap((function _callee5$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return _classPrivateFieldGet(this,c);case 2:if(void 0!==(i=_classPrivateFieldGet(this,a)[t])){o.next=5;break}throw new Error('Get preference: "'.concat(t,'" is undefined.'));case 5:return o.abrupt("return",null!==(r=_classPrivateFieldGet(this,u)[t])&&void 0!==r?r:i);case 6:case"end":return o.stop()}}),_callee5,this)}))),function get(r){return t.apply(this,arguments)})},{key:"initializedPromise",get:function get(){return _classPrivateFieldGet(this,c)}}]);var t,r,i,l,h;return BasePreferences}()},4552:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{getXfaHtmlForPrinting:()=>getXfaHtmlForPrinting});i(171),i(895),i(924),i(9593),i(1747),i(7942),i(5776),i(9366),i(6678),i(2926),i(6180),i(2374),i(3352);var a=i(1869),u=i(3234),c=i(8012),l=t([a,c]);[a,c]=l.then?(await l)():l;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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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 getXfaHtmlForPrinting(t,r){var i,o=r.allXfaHtml,l=new u.SimpleLinkService,h=Math.round(100*a.PixelsPerInch.PDF_TO_CSS_UNITS)/100,d=_createForOfIteratorHelper(o.children);try{for(d.s();!(i=d.n()).done;){var p=i.value,v=document.createElement("div");v.className="xfaPrintedPage";t.append(v);var y=new c.XfaLayerBuilder({pdfPage:null,annotationStorage:r.annotationStorage,linkService:l,xfaHtml:p}),g=(0,a.getXfaPageViewport)(p,{scale:h});y.render(g,"print");v.append(y.div)}}catch(t){d.e(t)}finally{d.f()}}o()}catch(h){o(h)}}))},1544:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{SecondaryToolbar:()=>y});i(4226),i(3352),i(6180),i(895),i(1747),i(394),i(2374),i(5598),i(8806),i(9366),i(6678),i(5897),i(171),i(924),i(9593),i(7942),i(5776),i(2926),i(4668),i(1585),i(7121),i(2993),i(7262),i(6770),i(1378),i(7335);var a=i(4927),u=i(9290),c=t([u]);u=(c.then?(await c)():c)[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 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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var l=new WeakSet,h=new WeakSet,d=new WeakSet,p=new WeakSet,v=new WeakSet,y=function(){function SecondaryToolbar(t,r){_classCallCheck(this,SecondaryToolbar);_classPrivateMethodInitSpec(this,v);_classPrivateMethodInitSpec(this,p);_classPrivateMethodInitSpec(this,d);_classPrivateMethodInitSpec(this,h);_classPrivateMethodInitSpec(this,l);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:a.CursorTool.SELECT},close:!0},{element:t.cursorHandToolButton,eventName:"switchcursortool",eventDetails:{tool:a.CursorTool.HAND},close:!0},{element:t.scrollPageButton,eventName:"switchscrollmode",eventDetails:{mode:a.ScrollMode.PAGE},close:!0},{element:t.scrollVerticalButton,eventName:"switchscrollmode",eventDetails:{mode:a.ScrollMode.VERTICAL},close:!0},{element:t.scrollHorizontalButton,eventName:"switchscrollmode",eventDetails:{mode:a.ScrollMode.HORIZONTAL},close:!0},{element:t.scrollWrappedButton,eventName:"switchscrollmode",eventDetails:{mode:a.ScrollMode.WRAPPED},close:!0},{element:t.spreadNoneButton,eventName:"switchspreadmode",eventDetails:{mode:a.SpreadMode.NONE},close:!0},{element:t.spreadOddButton,eventName:"switchspreadmode",eventDetails:{mode:a.SpreadMode.ODD},close:!0},{element:t.spreadEvenButton,eventName:"switchspreadmode",eventDetails:{mode:a.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.opened=!1;_classPrivateMethodGet(this,h,_bindClickListeners2).call(this);_classPrivateMethodGet(this,d,_bindCursorToolsListener2).call(this,t);_classPrivateMethodGet(this,p,_bindScrollModeListener2).call(this,t);_classPrivateMethodGet(this,v,_bindSpreadModeListener2).call(this,t);this.reset()}_createClass(SecondaryToolbar,[{key:"isOpen",get:function get(){return this.opened}},{key:"setPageNumber",value:function setPageNumber(t){this.pageNumber=t;_classPrivateMethodGet(this,l,_updateUIState2).call(this)}},{key:"setPagesCount",value:function setPagesCount(t){this.pagesCount=t;_classPrivateMethodGet(this,l,_updateUIState2).call(this)}},{key:"reset",value:function reset(){this.pageNumber=0;this.pagesCount=0;_classPrivateMethodGet(this,l,_updateUIState2).call(this);this.eventBus.dispatch("secondarytoolbarreset",{source:this})}},{key:"open",value:function open(){if(!this.opened){this.opened=!0;(0,a.toggleExpandedBtn)(this.toggleButton,!0,this.toolbar)}}},{key:"close",value:function close(){if(this.opened){this.opened=!1;(0,a.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,c=i.eventDetails;null==o||o.addEventListener("click",(function(r){null!==a&&t.eventBus.dispatch(a,_objectSpread({source:t},c));u&&t.close();t.eventBus.dispatch("reporttelemetry",{source:t,details:{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 o=t.tool;(0,a.toggleCheckedBtn)(r,o===a.CursorTool.SELECT);(0,a.toggleCheckedBtn)(i,o===a.CursorTool.HAND)}))}function _bindScrollModeListener2(t){var r=this,i=t.scrollPageButton,o=t.scrollVerticalButton,c=t.scrollHorizontalButton,l=t.scrollWrappedButton,h=t.spreadNoneButton,d=t.spreadOddButton,p=t.spreadEvenButton,v=function scrollModeChanged(t){var v=t.mode;(0,a.toggleCheckedBtn)(i,v===a.ScrollMode.PAGE);(0,a.toggleCheckedBtn)(o,v===a.ScrollMode.VERTICAL);(0,a.toggleCheckedBtn)(c,v===a.ScrollMode.HORIZONTAL);(0,a.toggleCheckedBtn)(l,v===a.ScrollMode.WRAPPED);var y=r.pagesCount>u.PagesCountLimit.FORCE_SCROLL_MODE_PAGE;i.disabled=y;o.disabled=y;c.disabled=y;l.disabled=y;var g=v===a.ScrollMode.HORIZONTAL;h.disabled=g;d.disabled=g;p.disabled=g};this.eventBus._on("scrollmodechanged",v);this.eventBus._on("secondarytoolbarreset",(function(t){t.source===r&&v({mode:a.ScrollMode.VERTICAL})}))}function _bindSpreadModeListener2(t){var r=this,i=t.spreadNoneButton,o=t.spreadOddButton,u=t.spreadEvenButton,c=function spreadModeChanged(t){var r=t.mode;(0,a.toggleCheckedBtn)(i,r===a.SpreadMode.NONE);(0,a.toggleCheckedBtn)(o,r===a.SpreadMode.ODD);(0,a.toggleCheckedBtn)(u,r===a.SpreadMode.EVEN)};this.eventBus._on("spreadmodechanged",c);this.eventBus._on("secondarytoolbarreset",(function(t){t.source===r&&c({mode:a.SpreadMode.NONE})}))}o()}catch(g){o(g)}}))},7498:(t,r,i)=>{i.d(r,{StructTreeLayerBuilder:()=>d});i(6180),i(895),i(1747),i(7484),i(2374),i(394),i(7942),i(469),i(3352),i(5598),i(8806),i(9366),i(6678),i(5897),i(171),i(924),i(9593),i(5776),i(2926);var o=i(4927);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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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)||!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 _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 a={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},u=/^H(\d+)$/,c=new WeakMap,l=new WeakSet,h=new WeakSet,d=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,h);_classPrivateMethodInitSpec(this,l);!function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}(this,c,{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,c)}},{key:"render",value:function render(t){if(void 0!==_classPrivateFieldGet(this,c))return _classPrivateFieldGet(this,c);var r=_classPrivateMethodGet(this,h,_walk2).call(this,t);null==r||r.classList.add("structTree");return _classPrivateFieldSet(this,c,r)}},{key:"hide",value:function hide(){_classPrivateFieldGet(this,c)&&!_classPrivateFieldGet(this,c).hidden&&(_classPrivateFieldGet(this,c).hidden=!0)}},{key:"show",value:function show(){var t;null!==(t=_classPrivateFieldGet(this,c))&&void 0!==t&&t.hidden&&(_classPrivateFieldGet(this,c).hidden=!1)}}]);return StructTreeLayerBuilder}();function _setAttributes2(t,r){var i=t.alt,a=t.id,u=t.lang;void 0!==i&&r.setAttribute("aria-label",(0,o.removeNullCharacters)(i));void 0!==a&&r.setAttribute("aria-owns",a);void 0!==u&&r.setAttribute("lang",(0,o.removeNullCharacters)(u,!0))}function _walk2(t){if(!t)return null;var r=document.createElement("span");if("role"in t){var i=t.role,o=i.match(u);if(o){r.setAttribute("role","heading");r.setAttribute("aria-level",o[1])}else a[i]&&r.setAttribute("role",a[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 c,d=_createForOfIteratorHelper(t.children);try{for(d.s();!(c=d.n()).done;){var p=c.value;r.append(_classPrivateMethodGet(this,h,_walk2).call(this,p))}}catch(t){d.e(t)}finally{d.f()}}return r}},4630:(t,r,i)=>{i.d(r,{TextAccessibilityManager:()=>d});i(6180),i(5548),i(895),i(1747),i(2374),i(3352),i(171),i(8301),i(2796),i(2613),i(1585),i(7121),i(2993),i(9593),i(7484),i(394),i(7874),i(5598),i(8806),i(9366),i(6678),i(5897),i(924),i(7942),i(5776),i(2926),i(4226);var o=i(4927);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,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}(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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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,_toPropertyKey(o.key),o)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!=_typeof(t)||!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 _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,c=new WeakMap,l=new WeakMap,h=new WeakSet,d=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,c,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,l,{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,c).size>0){var t,r=_classPrivateFieldGet(this,u),i=_createForOfIteratorHelper(_classPrivateFieldGet(this,c));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,c).delete(d)}}catch(t){i.e(t)}finally{i.f()}}var v,y=_createForOfIteratorHelper(_classPrivateFieldGet(this,l));try{for(y.s();!(v=y.n()).done;){var g=_slicedToArray(v.value,2),m=g[0],_=g[1];this.addPointerInTextLayer(m,_)}}catch(t){y.e(t)}finally{y.f()}_classPrivateFieldGet(this,l).clear()}},{key:"disable",value:function disable(){if(_classPrivateFieldGet(this,a)){_classPrivateFieldGet(this,l).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,c).get(o);if(void 0!==h){var d=i[h];_classPrivateFieldGet(this,c).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,l).delete(t)}},{key:"addPointerInTextLayer",value:function addPointerInTextLayer(t,r){var i=t.id;if(!i)return null;if(!_classPrivateFieldGet(this,a)){_classPrivateFieldGet(this,l).set(t,r);return null}r&&this.removePointerInTextLayer(t);var d=_classPrivateFieldGet(this,u);if(!d||0===d.length)return null;var p=(0,o.binarySearchFirstItem)(d,(function(r){return _classStaticPrivateMethodGet(TextAccessibilityManager,TextAccessibilityManager,_compareElementPositions).call(TextAccessibilityManager,t,r)<0})),v=Math.max(0,p-1),y=d[v];_classPrivateMethodGet(this,h,_addIdToAriaOwns2).call(this,i,y);_classPrivateFieldGet(this,c).set(i,v);var g=y.parentNode;return null!=g&&g.classList.contains("markedContent")?g.id:null}},{key:"moveElementInDOM",value:function moveElementInDOM(t,r,i,a){var u=this.addPointerInTextLayer(i,a);if(!t.hasChildNodes()){t.append(r);return u}var c=Array.from(t.childNodes).filter((function(t){return t!==r}));if(0===c.length)return u;var l=i||r,h=(0,o.binarySearchFirstItem)(c,(function(t){return _classStaticPrivateMethodGet(TextAccessibilityManager,TextAccessibilityManager,_compareElementPositions).call(TextAccessibilityManager,l,t)<0}));0===h?c[0].before(r):c[h-1].after(r);return u}}]);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,c=i.y+i.height/2,l=o.y,h=o.y+o.height,d=o.y+o.height/2;return c<=l&&d>=u?-1:d<=a&&c>=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")}},4274:(t,r,i)=>{i.d(r,{TextHighlighter:()=>o});i(3352),i(1210),i(4226),i(2796),i(2613),i(5598),i(8806),i(9366),i(6678),i(895),i(5897),i(171),i(924),i(9593),i(1747),i(7942),i(5776),i(2926),i(6180),i(2374);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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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)||!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=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,c=[],l=0,h=t.length;l<h;l++){for(var d=t[l];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[l];for(;o!==u&&d>a+i[o].length;){a+=i[o].length;o++}p.end={divIdx:o,offset:d-a};c.push(p)}return c}},{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,c=r.selected.matchIdx,l=null,h={divIdx:-1,offset:void 0},d=c,p=d+1;if(r.state.highlightAll){d=0;p=t.length}else if(!u)return;for(var v=-1,y=-1,g=d;g<p;g++){var m=t[g],_=m.begin;if(_.divIdx!==v||_.offset!==y){v=_.divIdx;y=_.offset;var b=m.end,w=u&&g===c,P=w?" selected":"",D=0;if(l&&_.divIdx===l.divIdx)appendTextToDiv(l.divIdx,l.offset,_.offset);else{null!==l&&appendTextToDiv(l.divIdx,l.offset,h.offset);beginText(_)}if(_.divIdx===b.divIdx)D=appendTextToDiv(_.divIdx,_.offset,b.offset,"highlight"+P);else{D=appendTextToDiv(_.divIdx,_.offset,h.offset,"highlight begin"+P);for(var E=_.divIdx+1,x=b.divIdx;E<x;E++)a[E].className="highlight middle"+P;beginText(b,"highlight end"+P)}l=b;w&&r.scrollMatchIntoView({element:a[_.divIdx],selectedLeft:D,pageIndex:i,matchIndex:c})}}l&&appendTextToDiv(l.divIdx,l.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 c=a[t];if(c.nodeType===Node.TEXT_NODE){var l=document.createElement("span");c.before(l);l.append(c);a[t]=l;c=l}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);c.append(p);return u.includes("selected")?p.offsetLeft:0}c.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,c=this.textDivs,l=-1,h=_createForOfIteratorHelper(o);try{for(h.s();!(r=h.n()).done;){for(var d=r.value,p=Math.max(l,d.begin.divIdx),v=d.end.divIdx;p<=v;p++){var y=c[p];y.textContent=u[p];y.className=""}l=d.end.divIdx+1}}catch(t){h.e(t)}finally{h.f()}if(null!=i&&i.highlightMatches&&!t){var g=i.pageMatches[a]||null,m=i.pageMatchesLength[a]||null;this.matches=this._convertMatches(g,m);this._renderMatches(this.matches)}}}}]);return TextHighlighter}()},1013:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{TextLayerBuilder:()=>g});i(6180),i(895),i(1747),i(7484),i(2374),i(3352),i(1210),i(394),i(924),i(5598),i(8806),i(9366),i(6678),i(5897),i(5666),i(2926),i(1133),i(2173),i(2630),i(1024),i(13),i(4226),i(7121),i(6770),i(1378),i(171);var a=i(1869),u=i(4927),c=t([a]);a=(c.then?(await c)():c)[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 _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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.done?r(h):Promise.resolve(h).then(o,a)}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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classApplyDescriptorGet(t,_classExtractFieldDescriptor(t,r,"get"))}function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}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){_classApplyDescriptorSet(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 _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}}var l=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakSet,y=new WeakSet,g=function(){function TextLayerBuilder(t){var r=t.highlighter,i=void 0===r?null:r,o=t.accessibilityManager,a=void 0===o?null:o,u=t.isOffscreenCanvasSupported,c=void 0===u||u,g=t.enablePermissions,m=void 0!==g&&g;_classCallCheck(this,TextLayerBuilder);_classPrivateMethodInitSpec(this,y);_classPrivateMethodInitSpec(this,v);_classPrivateFieldInitSpec(this,l,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,h,{writable:!0,value:0});_classPrivateFieldInitSpec(this,d,{writable:!0,value:0});_classPrivateFieldInitSpec(this,p,{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=c;_classPrivateFieldSet(this,l,!0===m);this.onAppend=null;this.div=document.createElement("div");this.div.className="textLayer"}_createClass(TextLayerBuilder,[{key:"numTextDivs",get:function get(){return this.textDivs.length}},{key:"render",value:(r=(t=_regeneratorRuntime().mark((function _callee(t){var r,i,o,u,c,l,y,g;return _regeneratorRuntime().wrap((function _callee$(m){for(;;)switch(m.prev=m.next){case 0:if(_classPrivateFieldGet(this,p)){m.next=2;break}throw new Error('No "textContentSource" parameter specified.');case 2:c=t.scale*(globalThis.devicePixelRatio||1);l=t.rotation;if(!this.renderingDone){m.next=10;break}y=l!==_classPrivateFieldGet(this,h);g=c!==_classPrivateFieldGet(this,d);if(y||g){this.hide();(0,a.updateTextLayer)({container:this.div,viewport:t,textDivs:this.textDivs,textDivProperties:this.textDivProperties,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,mustRescale:g,mustRotate:y});_classPrivateFieldSet(this,d,c);_classPrivateFieldSet(this,h,l)}this.show();return m.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,a.renderTextLayer)({textContentSource:_classPrivateFieldGet(this,p),container:this.div,viewport:t,textDivs:this.textDivs,textDivProperties:this.textDivProperties,textContentItemsStr:this.textContentItemsStr,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported});m.next=16;return this.textLayerRenderTask.promise;case 16:_classPrivateMethodGet(this,v,_finishRendering2).call(this);_classPrivateFieldSet(this,d,c);_classPrivateFieldSet(this,h,l);this.onAppend(this.div);null===(o=this.highlighter)||void 0===o||o.enable();null===(u=this.accessibilityManager)||void 0===u||u.enable();case 22:case"end":return m.stop()}}),_callee,this)})),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 render(t){return r.apply(this,arguments)})},{key:"hide",value:function hide(){if(!this.div.hidden&&this.renderingDone){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,p,t)}}]);var t,r;return TextLayerBuilder}();function _finishRendering2(){this.renderingDone=!0;var t=document.createElement("div");t.className="endOfContent";this.div.append(t);_classPrivateMethodGet(this,y,_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,l)){var i=document.getSelection();r.clipboardData.setData("text/plain",(0,u.removeNullCharacters)((0,a.normalizeUnicode)(i.toString())))}r.preventDefault();r.stopPropagation()}))}o()}catch(m){o(m)}}))},276:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{Toolbar:()=>p});i(895),i(924),i(5897),i(3352),i(6180),i(1747),i(394),i(2374),i(7254),i(5598),i(8806),i(9366),i(6678),i(171),i(9593),i(7942),i(5776),i(2926),i(4668),i(1585),i(7121),i(2993),i(7262),i(4226),i(6770),i(1378),i(7335);var a=i(1869),u=i(4927),c=t([a]);a=(c.then?(await c)():c)[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 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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}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 _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var l=new WeakSet,h=new WeakSet,d=new WeakSet,p=function(){function Toolbar(t,r){_classCallCheck(this,Toolbar);_classPrivateMethodInitSpec(this,d);_classPrivateMethodInitSpec(this,h);_classPrivateMethodInitSpec(this,l);this.toolbar=t.container;this.eventBus=r;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.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()}_createClass(Toolbar,[{key:"setPageNumber",value:function setPageNumber(t,r){this.pageNumber=t;this.pageLabel=r;_classPrivateMethodGet(this,d,_updateUIState2).call(this,!1)}},{key:"setPagesCount",value:function setPagesCount(t,r){this.pagesCount=t;this.hasPageLabels=r;_classPrivateMethodGet(this,d,_updateUIState2).call(this,!0)}},{key:"setPageScale",value:function setPageScale(t,r){this.pageScaleValue=(t||r).toString();this.pageScale=r;_classPrivateMethodGet(this,d,_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=u.DEFAULT_SCALE_VALUE;this.pageScale=u.DEFAULT_SCALE}_classPrivateMethodGet(this,d,_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("loading",t)}}]);return Toolbar}();function _bindListeners2(t){var r,i=this,o=this.items,u=o.pageNumber,c=o.scaleSelect,l=this,d=_createForOfIteratorHelper(this.buttons);try{var p=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,_objectSpread(_objectSpread({source:i},u),{},{isFromKeyboard:0===t.detail}))}))};for(d.s();!(r=d.n()).done;)p()}catch(t){d.e(t)}finally{d.f()}u.addEventListener("click",(function(){this.select()}));u.addEventListener("change",(function(){l.eventBus.dispatch("pagenumberchanged",{source:l,value:this.value})}));c.addEventListener("change",(function(){"custom"!==this.value&&l.eventBus.dispatch("scalechanged",{source:l,value:this.value})}));c.addEventListener("click",(function(t){var r=t.target;this.value===l.pageScaleValue&&"OPTION"===r.tagName.toUpperCase()&&this.blur()}));c.oncontextmenu=a.noContextMenu;_classPrivateMethodGet(this,h,_bindEditorToolsListener2).call(this,t)}function _bindEditorToolsListener2(t){var r=this,i=t.editorFreeTextButton,o=t.editorFreeTextParamsToolbar,c=t.editorInkButton,l=t.editorInkParamsToolbar,h=t.editorStampButton,d=t.editorStampParamsToolbar,p=function editorModeChanged(t){var r=t.mode;(0,u.toggleCheckedBtn)(i,r===a.AnnotationEditorType.FREETEXT,o);(0,u.toggleCheckedBtn)(c,r===a.AnnotationEditorType.INK,l);(0,u.toggleCheckedBtn)(h,r===a.AnnotationEditorType.STAMP,d);var p=r===a.AnnotationEditorType.DISABLE;i.disabled=p;c.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],r=this.pageNumber,i=this.pagesCount,o=this.pageScaleValue,a=this.pageScale,c=this.items;if(t){if(this.hasPageLabels){c.pageNumber.type="text";c.numPages.setAttribute("data-l10n-id","pdfjs-page-of-pages")}else{c.pageNumber.type="number";c.numPages.setAttribute("data-l10n-id","pdfjs-of-pages");c.numPages.setAttribute("data-l10n-args",JSON.stringify({pagesCount:i}))}c.pageNumber.max=i}if(this.hasPageLabels){c.pageNumber.value=this.pageLabel;c.numPages.setAttribute("data-l10n-args",JSON.stringify({pageNumber:r,pagesCount:i}))}else c.pageNumber.value=r;c.previous.disabled=r<=1;c.next.disabled=r>=i;c.zoomOut.disabled=a<=u.MIN_SCALE;c.zoomIn.disabled=a>=u.MAX_SCALE;var l=!1;if(c.scaleSelect.options){var h,d=_createForOfIteratorHelper(c.scaleSelect.options);try{for(d.s();!(h=d.n()).done;){var p=h.value;if(p.value===o){p.selected=!0;l=!0}else p.selected=!1}}catch(t){d.e(t)}finally{d.f()}}if(!l){c.customScaleOption.selected=!0;c.customScaleOption.setAttribute("data-l10n-args",JSON.stringify({scale:Math.round(1e4*a)/100}))}this.eventBus.dispatch("updateuistate",{source:this,widget:"Toolbar",pageNumber:r,pagesCount:i,pageScaleValue:o,pageScale:a})}o()}catch(v){o(v)}}))},4927:(t,r,i)=>{i.d(r,{AutoPrintRegExp:()=>D,CursorTool:()=>P,DEFAULT_SCALE:()=>a,DEFAULT_SCALE_DELTA:()=>u,DEFAULT_SCALE_VALUE:()=>o,MAX_AUTO_SCALE:()=>d,MAX_SCALE:()=>l,MIN_SCALE:()=>c,OutputScale:()=>E,PresentationModeState:()=>g,ProgressBar:()=>O,RenderingStates:()=>y,SCROLLBAR_PADDING:()=>p,ScrollMode:()=>b,SidebarView:()=>m,SpreadMode:()=>w,TextLayerMode:()=>_,UNKNOWN_SCALE:()=>h,VERTICAL_PADDING:()=>v,animationStarted:()=>S,apiPageLayoutToViewerModes:()=>apiPageLayoutToViewerModes,apiPageModeToSidebarView:()=>apiPageModeToSidebarView,approximateFraction:()=>approximateFraction,binarySearchFirstItem:()=>binarySearchFirstItem,docStyle:()=>A,getActiveOrFocusedElement:()=>getActiveOrFocusedElement,getPageSizeInches:()=>getPageSizeInches,getVisibleElements:()=>getVisibleElements,isPortraitOrientation:()=>isPortraitOrientation,isValidRotation:()=>isValidRotation,isValidScrollMode:()=>isValidScrollMode,isValidSpreadMode:()=>isValidSpreadMode,normalizeWheelEventDelta:()=>normalizeWheelEventDelta,normalizeWheelEventDirection:()=>normalizeWheelEventDirection,parseQueryString:()=>parseQueryString,removeNullCharacters:()=>removeNullCharacters,roundToDivide:()=>roundToDivide,scrollIntoView:()=>scrollIntoView,toggleCheckedBtn:()=>toggleCheckedBtn,toggleExpandedBtn:()=>toggleExpandedBtn,watchScroll:()=>watchScroll});i(5598),i(8806),i(9366),i(6678),i(895),i(3352),i(5897),i(1210),i(6180),i(5548),i(1747),i(2374),i(3757),i(3655),i(2555),i(2202),i(7942),i(5776),i(4711),i(7600),i(2048),i(5561),i(8587),i(3247),i(3302),i(9490),i(5438),i(7914),i(4226),i(6820),i(8301),i(3821),i(2796),i(2613),i(9099),i(5666),i(7484),i(2926),i(171),i(924),i(9593);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,c,l=[],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)&&(l.push(o.value),l.length!==r);h=!0);}catch(t){d=!0,a=t}finally{try{if(!h&&null!=i.return&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}(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,_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)||!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="auto",a=1,u=1.1,c=.1,l=10,h=0,d=1.25,p=40,v=5,y={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},g={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3},m={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4},_={DISABLE:0,ENABLE:1,ENABLE_PERMISSIONS:2},b={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3},w={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2},P={SELECT:0,HAND:1,ZOOM:2},D=/\bprint\s*\(/,E=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}();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"))){var c=t.offsetParent;if(c){for(var l=t.offsetTop+t.clientTop,h=t.offsetLeft+t.clientLeft;c.clientHeight===c.scrollHeight&&c.clientWidth===c.scrollWidth||a&&(c.classList.contains("markedContent")||"hidden"===getComputedStyle(c).overflow);){l+=c.offsetTop;h+=c.offsetLeft;if(!(c=c.offsetParent)){if(u&&document.body.clientHeight>l){l-=32;window.scrollTo(window.scrollX,l)}return}}if(r){void 0!==r.top&&(l+=r.top);if(void 0!==r.left){h+=r.left;c.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;c.scrollTop=l}else globalThis.ngxConsole.error("offsetParent is not set -- cannot scroll")}}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 c=t.scrollTop,l=o.lastY;c!==l&&(o.down=c>l);o.lastY=c;r(o)})))},o={right:!0,down:!0,lastX:t.scrollLeft,lastY:t.scrollTop,_eventHandler:i},a=null;t.addEventListener("scroll",i,!0);return o}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,c=!0,l=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=!0;u=t},f:function f(){try{c||null==i.return||i.return()}finally{if(l)throw u}}}}(new URLSearchParams(t));try{for(o.s();!(r=o.n()).done;){var a=_slicedToArray(r.value,2),u=a[0],c=a[1];i.set(u.toLowerCase(),c)}}catch(t){o.e(t)}finally{o.f()}return i}var x=/[\x00-\x1F]/g;function removeNullCharacters(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return x.test(t)?r?t.replaceAll(x,(function(t){return"\0"===t?"":" "})):t.replaceAll("\0",""):t}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 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];for(var i=t>1?r:t,o=0,a=1,u=1,c=1;;){var l=o+u,h=a+c;if(h>8)break;if(i<=l/h){u=l;c=h}else{o=l;a=h}}return i-o/a<u/c-i?i===t?[o,a]:[a,o]:i===t?[u,c]:[c,u]}function roundToDivide(t,r){var i=t%r;return 0===i?t:Math.round(t-i+r)}function getPageSizeInches(t){var r=t.view,i=t.userUnit,o=t.rotate,a=_slicedToArray(r,4),u=a[0],c=a[1],l=o%180!=0,h=(a[2]-u)/72*i,d=(a[3]-c)/72*i;return{width:l?d:h,height:l?h:d}}function getVisibleElements(t){var r=t.scrollEl,i=t.views,o=t.sortByVisibility,a=void 0!==o&&o,u=t.horizontal,c=void 0!==u&&u,l=t.rtl,h=void 0!==l&&l,d=r.scrollTop,p=d+r.clientHeight,v=r.scrollLeft,y=v+r.clientWidth;var g=[],m=new Set,_=i.length,b=binarySearchFirstItem(i,c?function isElementNextAfterViewHorizontally(t){var r=t.div,i=r.offsetLeft+r.clientLeft,o=i+r.clientWidth;return h?i<y:o>v}:function isElementBottomAfterViewTop(t){var r=t.div;return r.offsetTop+r.clientTop+r.clientHeight>d});b>0&&b<_&&!c&&(b=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}(b,i,d));for(var w=c?y:-1,P=b;P<_;P++){var D=i[P],E=D.div,x=E.offsetLeft+E.clientLeft,S=E.offsetTop+E.clientTop,A=E.clientWidth,C=E.clientHeight,k=x+A,I=S+C;if(-1===w)I>=p&&(w=I);else if((c?x:S)>w)break;if(!(I<=d||S>=p||k<=v||x>=y)){var T=Math.max(0,d-S)+Math.max(0,I-p),L=(A-(Math.max(0,v-x)+Math.max(0,k-y)))/A,O=(C-T)/C*L*100|0;g.push({id:D.id,x:x,y:S,view:D,percent:O,widthPercent:100*L|0});m.add(D.id)}}var M=g[0],B=g.at(-1);a&&g.sort((function(t,r){var i=t.percent-r.percent;return Math.abs(i)>.001?-i:t.id-r.id}));return{first:M,last:B,views:g,ids:m}}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}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}function isValidRotation(t){return Number.isInteger(t)&&t%90==0}function isValidScrollMode(t){return Number.isInteger(t)&&Object.values(b).includes(t)&&t!==b.UNKNOWN}function isValidSpreadMode(t){return Number.isInteger(t)&&Object.values(w).includes(t)&&t!==w.UNKNOWN}function isPortraitOrientation(t){return t.width<=t.height}var S=new Promise((function(t){window.ngxZone.runOutsideAngular((function(){window.requestAnimationFrame(t)}))})),A=document.documentElement.style;var C=new WeakMap,k=new WeakMap,I=new WeakMap,T=new WeakMap,L=new WeakMap,O=function(){function ProgressBar(t){_classCallCheck(this,ProgressBar);_classPrivateFieldInitSpec(this,C,{writable:!0,value:null});_classPrivateFieldInitSpec(this,k,{writable:!0,value:null});_classPrivateFieldInitSpec(this,I,{writable:!0,value:0});_classPrivateFieldInitSpec(this,T,{writable:!0,value:null});_classPrivateFieldInitSpec(this,L,{writable:!0,value:!0});_classPrivateFieldSet(this,C,t.classList);_classPrivateFieldSet(this,T,t.style)}_createClass(ProgressBar,[{key:"percent",get:function get(){return _classPrivateFieldGet(this,I)},set:function set(t){_classPrivateFieldSet(this,I,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,T).setProperty("--progressBar-percent","".concat(_classPrivateFieldGet(this,I),"%"))}}},{key:"setWidth",value:function setWidth(t){if(t){var r=t.parentNode.offsetWidth-t.offsetWidth;r>0&&_classPrivateFieldGet(this,T).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,I))){_classPrivateFieldGet(this,k)&&clearTimeout(_classPrivateFieldGet(this,k));this.show();_classPrivateFieldSet(this,k,setTimeout((function(){_classPrivateFieldSet(t,k,null);t.hide()}),r))}}},{key:"hide",value:function hide(){if(_classPrivateFieldGet(this,L)){_classPrivateFieldSet(this,L,!1);_classPrivateFieldGet(this,C).add("hidden")}}},{key:"show",value:function show(){if(!_classPrivateFieldGet(this,L)){_classPrivateFieldSet(this,L,!0);_classPrivateFieldGet(this,C).remove("hidden")}}}]);return ProgressBar}();function getActiveOrFocusedElement(){for(var t=document,r=t.activeElement||t.querySelector(":focus");null!==(i=r)&&void 0!==i&&i.shadowRoot;){var i;r=(t=r.shadowRoot).activeElement||t.querySelector(":focus")}return r}function apiPageLayoutToViewerModes(t){var r=b.VERTICAL,i=w.NONE;switch(t){case"SinglePage":r=b.PAGE;break;case"OneColumn":break;case"TwoPageLeft":r=b.PAGE;case"TwoColumnLeft":i=w.ODD;break;case"TwoPageRight":r=b.PAGE;case"TwoColumnRight":i=w.EVEN}return{scrollMode:r,spreadMode:i}}function apiPageModeToSidebarView(t){switch(t){case"UseNone":return m.NONE;case"UseThumbs":return m.THUMBS;case"UseOutlines":return m.OUTLINE;case"UseAttachments":return m.ATTACHMENTS;case"UseOC":return m.LAYERS}return m.NONE}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)}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)}},2033:(t,r,i)=>{i.d(r,{ViewHistory:()=>a});i(4668),i(2808),i(4226),i(7254),i(5598),i(8806),i(9366),i(6678),i(895),i(3352),i(5897),i(5666),i(2926),i(6180),i(1747),i(2374),i(1133),i(2173),i(2630),i(1024),i(13),i(7121),i(6770),i(1378),i(171);var o=i(8961);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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.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)||!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 a=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:(c=_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 c.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,c;return ViewHistory}()},6400:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{PDFViewerApplication:()=>v.PDFViewerApplication,PDFViewerApplicationConstants:()=>g,PDFViewerApplicationOptions:()=>d.AppOptions});i(2926),i(6180),i(895),i(1747),i(2374),i(9366),i(6678);var a,u,c=i(1546),l=i(1834),h=i(4927),d=i(8961),p=i(3234),v=i(39),y=t([c,l,v]);[c,l,v]=y.then?(await y)():y;var g={LinkTarget:p.LinkTarget,RenderingStates:h.RenderingStates,ScrollMode:h.ScrollMode,SpreadMode:h.SpreadMode};window.PDFViewerApplication=v.PDFViewerApplication;window.PDFViewerApplicationConstants=g;window.PDFViewerApplicationOptions=d.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});function webViewerLoad(){var t={appContainer:document.body,mainContainer:document.getElementById("viewerContainer"),viewerContainer:document.getElementById("viewer"),toolbar:{container:document.getElementById("toolbarViewer"),numPages:document.getElementById("numPages"),pageNumber:document.getElementById("pageNumber"),scaleSelect:document.getElementById("scaleSelect"),customScaleOption:document.getElementById("customScaleOption"),previous:document.getElementById("previous"),next:document.getElementById("next"),zoomIn:document.getElementById("zoomIn"),zoomOut:document.getElementById("zoomOut"),viewFind:document.getElementById("viewFind"),print:document.getElementById("print"),editorFreeTextButton:document.getElementById("editorFreeText"),editorFreeTextParamsToolbar:document.getElementById("editorFreeTextParamsToolbar"),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")}},altTextDialog:{dialog:document.getElementById("altTextDialog"),optionDescription:document.getElementById("descriptionButton"),optionDecorative:document.getElementById("decorativeButton"),textarea:document.getElementById("descriptionTextarea"),cancelButton:document.getElementById("altTextCancel"),saveButton:document.getElementById("altTextSave")},annotationEditorParams:{editorFreeTextFontSize:document.getElementById("editorFreeTextFontSize"),editorFreeTextColor:document.getElementById("editorFreeTextColor"),editorInkColor:document.getElementById("editorInkColor"),editorInkThickness:document.getElementById("editorInkThickness"),editorInkOpacity:document.getElementById("editorInkOpacity"),editorStampAddImage:document.getElementById("editorStampAddImage")},printContainer:document.getElementById("printContainer"),openFileInput:document.getElementById("fileInput"),debuggerScriptPath:"./debugger.mjs"},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)}v.PDFViewerApplication.run(t)}null===(a=(u=document).blockUnblockOnload)||void 0===a||a.call(u,!0);window.webViewerLoad=webViewerLoad;o()}catch(m){o(m)}}))},8012:(t,r,i)=>{i.a(t,(async(t,o)=>{try{i.d(r,{XfaLayerBuilder:()=>c});i(5598),i(8806),i(9366),i(6678),i(895),i(3352),i(5897),i(5666),i(2926),i(6180),i(1747),i(2374),i(1133),i(2173),i(2630),i(1024),i(13),i(4226),i(7121),i(6770),i(1378),i(171);var a=i(1869),u=t([a]);a=(u.then?(await u)():u)[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 _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:{},c=u.iterator||"@@iterator",l=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,c=Object.create(u.prototype),l=new Context(o||[]);return a(c,"_invoke",{value:makeInvokeMethod(t,i,l)}),c}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",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(values([])));b&&b!==i&&o.call(b,c)&&(m=b);var w=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,c){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,d=h.value;return d&&"object"==_typeof(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,u,c)}),(function(t){invoke("throw",t,u,c)})):r.resolve(d).then((function(t){h.value=t,u(h)}),(function(t){return invoke("throw",t,u,c)}))}c(l.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,c){if(a===v)throw new Error("Generator is already running");if(a===y){if("throw"===u)throw c;return{value:t,done:!0}}for(o.method=u,o.arg=c;;){var l=o.delegate;if(l){var h=maybeInvokeDelegate(l,o);if(h){if(h===g)continue;return h}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===d)throw a=y,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?y:p,m.arg===g)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(a=y,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")),g;var u=tryCatch(a,r.iterator,i.arg);if("throw"===u.type)return i.method="throw",i.arg=u.arg,i.delegate=null,g;var c=u.arg;return c?c.done?(i[r.resultName]=c.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,g):c:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}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[c];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(w,"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(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,i,o,a,u){void 0===u&&(u=Promise);var c=new AsyncIterator(wrap(t,i,o,a),u);return r.isGeneratorFunction(i)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),define(w,c,(function(){return this})),define(w,"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 c.type="throw",c.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],c=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var l=o.call(u,"catchLoc"),h=o.call(u,"finallyLoc");if(l&&h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(l){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 c=u?u.completion:{};return c.type=t,c.arg=r,u?(this.method="next",this.next=u.finallyLoc,g):this.complete(c)},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),g},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),g}},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),g}},r}function asyncGeneratorStep(t,r,i,o,a,u,c){try{var l=t[u](c),h=l.value}catch(t){i(t);return}l.done?r(h):Promise.resolve(h).then(o,a)}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=_toPrimitive(t,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!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)}var c=function(){function XfaLayerBuilder(t){var r=t.pdfPage,i=t.annotationStorage,o=void 0===i?null:i,a=t.linkService,u=t.xfaHtml,c=void 0===u?null:u;_classCallCheck(this,XfaLayerBuilder);this.pdfPage=r;this.annotationStorage=o;this.linkService=a;this.xfaHtml=c;this.div=null;this._cancelled=!1}_createClass(XfaLayerBuilder,[{key:"render",value:(r=(t=_regeneratorRuntime().mark((function _callee(t){var r,i,o,u,c=arguments;return _regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:if("print"!==(r=c.length>1&&void 0!==c[1]?c[1]:"display")){l.next=6;break}i={viewport:t.clone({dontFlip:!0}),div:this.div,xfaHtml:this.xfaHtml,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:r};this.div=document.createElement("div");i.div=this.div;return l.abrupt("return",a.XfaLayer.render(i));case 6:l.next=8;return this.pdfPage.getXfa();case 8:o=l.sent;if(!this._cancelled&&o){l.next=11;break}return l.abrupt("return",{textDivs:[]});case 11:u={viewport:t.clone({dontFlip:!0}),div:this.div,xfaHtml:o,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:r};if(!this.div){l.next=14;break}return l.abrupt("return",a.XfaLayer.update(u));case 14:this.div=document.createElement("div");u.div=this.div;return l.abrupt("return",a.XfaLayer.render(u));case 17:case"end":return l.stop()}}),_callee,this)})),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 render(t){return r.apply(this,arguments)})},{key:"cancel",value:function cancel(){this._cancelled=!0}},{key:"hide",value:function hide(){this.div&&(this.div.hidden=!0)}}]);var t,r;return XfaLayerBuilder}();o()}catch(l){o(l)}}))}},u={};function __webpack_require__(t){var r=u[t];if(void 0!==r)return r.exports;var i=u[t]={exports:{}};a[t].call(i.exports,i,i.exports,__webpack_require__);return i.exports}t="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",r="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",i="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",o=t=>{if(t&&t.d<1){t.d=1;t.forEach((t=>t.r--));t.forEach((t=>t.r--?t.r++:t()))}},__webpack_require__.a=(a,u,c)=>{var l;c&&((l=[]).d=-1);var h,d,p,v=new Set,y=a.exports,g=new Promise(((t,r)=>{p=r;d=t}));g[r]=y;g[t]=t=>(l&&t(l),v.forEach(t),g.catch((t=>{})));a.exports=g;u((a=>{h=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[t])return a;if(a.then){var u=[];u.d=0;a.then((t=>{c[r]=t;o(u)}),(t=>{c[i]=t;o(u)}));var c={};c[t]=t=>t(u);return c}}var l={};l[t]=t=>{};l[r]=a;return l})))(a);var u,getResult=()=>h.map((t=>{if(t[i])throw t[i];return t[r]})),c=new Promise((r=>{(u=()=>r(getResult)).r=0;var fnQueue=t=>t!==l&&!v.has(t)&&(v.add(t),t&&!t.d&&(u.r++,t.push(u)));h.map((r=>r[t](fnQueue)))}));return u.r?c:getResult()}),(t=>(t?p(g[i]=t):d(y),o(l))));l&&l.d<0&&(l.d=0)};__webpack_require__.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;__webpack_require__.d(r,{a:r});return r};__webpack_require__.d=(t,r)=>{for(var i in r)__webpack_require__.o(r,i)&&!__webpack_require__.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})};__webpack_require__.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r);var c=__webpack_require__(6400),l=(c=await c).PDFViewerApplication,h=c.PDFViewerApplicationConstants,d=c.PDFViewerApplicationOptions;export{l as PDFViewerApplication,h as PDFViewerApplicationConstants,d as PDFViewerApplicationOptions};