@pdftron/webviewer 11.9.0-20251021 → 11.9.0-20251022

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,282 +1,282 @@
1
1
  (function(){/*
2
2
  @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
3
- var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(v){var A=0;return function(){return A<v.length?{done:!1,value:v[A++]}:{done:!0}}};$jscomp.arrayIterator=function(v){return{next:$jscomp.arrayIteratorImpl(v)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
4
- $jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(v,A,u){if(v==Array.prototype||v==Object.prototype)return v;v[A]=u.value;return v};$jscomp.getGlobal=function(v){v=["object"==typeof globalThis&&globalThis,v,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var A=0;A<v.length;++A){var u=v[A];if(u&&u.Math==Math)return u}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
5
- $jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(v,A,u){if(!u||null!=v){u=$jscomp.propertyToPolyfillSymbol[A];if(null==u)return v[A];u=v[u];return void 0!==u?u:v[A]}};
6
- $jscomp.polyfill=function(v,A,u,p){A&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(v,A,u,p):$jscomp.polyfillUnisolated(v,A,u,p))};$jscomp.polyfillUnisolated=function(v,A,u,p){u=$jscomp.global;v=v.split(".");for(p=0;p<v.length-1;p++){var n=v[p];if(!(n in u))return;u=u[n]}v=v[v.length-1];p=u[v];A=A(p);A!=p&&null!=A&&$jscomp.defineProperty(u,v,{configurable:!0,writable:!0,value:A})};
7
- $jscomp.polyfillIsolated=function(v,A,u,p){var n=v.split(".");v=1===n.length;p=n[0];p=!v&&p in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var y=0;y<n.length-1;y++){var l=n[y];if(!(l in p))return;p=p[l]}n=n[n.length-1];u=$jscomp.IS_SYMBOL_NATIVE&&"es6"===u?p[n]:null;A=A(u);null!=A&&(v?$jscomp.defineProperty($jscomp.polyfills,n,{configurable:!0,writable:!0,value:A}):A!==u&&(void 0===$jscomp.propertyToPolyfillSymbol[n]&&(u=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[n]=$jscomp.IS_SYMBOL_NATIVE?
8
- $jscomp.global.Symbol(n):$jscomp.POLYFILL_PREFIX+u+"$"+n),$jscomp.defineProperty(p,$jscomp.propertyToPolyfillSymbol[n],{configurable:!0,writable:!0,value:A})))};$jscomp.initSymbol=function(){};
9
- $jscomp.polyfill("Symbol",function(v){if(v)return v;var A=function(y,l){this.$jscomp$symbol$id_=y;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:l})};A.prototype.toString=function(){return this.$jscomp$symbol$id_};var u="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",p=0,n=function(y){if(this instanceof n)throw new TypeError("Symbol is not a constructor");return new A(u+(y||"")+"_"+p++,y)};return n},"es6","es3");
10
- $jscomp.polyfill("Symbol.iterator",function(v){if(v)return v;v=Symbol("Symbol.iterator");for(var A="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),u=0;u<A.length;u++){var p=$jscomp.global[A[u]];"function"===typeof p&&"function"!=typeof p.prototype[v]&&$jscomp.defineProperty(p.prototype,v,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return v},"es6",
11
- "es3");$jscomp.iteratorPrototype=function(v){v={next:v};v[Symbol.iterator]=function(){return this};return v};$jscomp.makeIterator=function(v){var A="undefined"!=typeof Symbol&&Symbol.iterator&&v[Symbol.iterator];if(A)return A.call(v);if("number"==typeof v.length)return $jscomp.arrayIterator(v);throw Error(String(v)+" is not an iterable or ArrayLike");};$jscomp.arrayFromIterator=function(v){for(var A,u=[];!(A=v.next()).done;)u.push(A.value);return u};
12
- $jscomp.arrayFromIterable=function(v){return v instanceof Array?v:$jscomp.arrayFromIterator($jscomp.makeIterator(v))};$jscomp.checkEs6ConformanceViaProxy=function(){try{var v={},A=Object.create(new $jscomp.global.Proxy(v,{get:function(u,p,n){return u==v&&"q"==p&&n==A}}));return!0===A.q}catch(u){return!1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();
13
- $jscomp.owns=function(v,A){return Object.prototype.hasOwnProperty.call(v,A)};
14
- $jscomp.polyfill("WeakMap",function(v){function A(){if(!v||!Object.seal)return!1;try{var m=Object.seal({}),f=Object.seal({}),k=new v([[m,2],[f,3]]);if(2!=k.get(m)||3!=k.get(f))return!1;k.delete(m);k.set(f,4);return!k.has(m)&&4==k.get(f)}catch(h){return!1}}function u(){}function p(m){var f=typeof m;return"object"===f&&null!==m||"function"===f}function n(m){if(!$jscomp.owns(m,l)){var f=new u;$jscomp.defineProperty(m,l,{value:f})}}function y(m){if(!$jscomp.ISOLATE_POLYFILLS){var f=Object[m];f&&(Object[m]=
15
- function(k){if(k instanceof u)return k;Object.isExtensible(k)&&n(k);return f(k)})}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(v&&$jscomp.ES6_CONFORMANCE)return v}else if(A())return v;var l="$jscomp_hidden_"+Math.random();y("freeze");y("preventExtensions");y("seal");var t=0,c=function(m){this.id_=(t+=Math.random()+1).toString();if(m){m=$jscomp.makeIterator(m);for(var f;!(f=m.next()).done;)f=f.value,this.set(f[0],f[1])}};c.prototype.set=function(m,f){if(!p(m))throw Error("Invalid WeakMap key");
16
- n(m);if(!$jscomp.owns(m,l))throw Error("WeakMap key fail: "+m);m[l][this.id_]=f;return this};c.prototype.get=function(m){return p(m)&&$jscomp.owns(m,l)?m[l][this.id_]:void 0};c.prototype.has=function(m){return p(m)&&$jscomp.owns(m,l)&&$jscomp.owns(m[l],this.id_)};c.prototype.delete=function(m){return p(m)&&$jscomp.owns(m,l)&&$jscomp.owns(m[l],this.id_)?delete m[l][this.id_]:!1};return c},"es6","es3");$jscomp.MapEntry=function(){};
17
- $jscomp.polyfill("Map",function(v){function A(){if($jscomp.ASSUME_NO_NATIVE_MAP||!v||"function"!=typeof v||!v.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),m=new v($jscomp.makeIterator([[c,"s"]]));if("s"!=m.get(c)||1!=m.size||m.get({x:4})||m.set({x:4},"t")!=m||2!=m.size)return!1;var f=m.entries(),k=f.next();if(k.done||k.value[0]!=c||"s"!=k.value[1])return!1;k=f.next();return k.done||4!=k.value[0].x||"t"!=k.value[1]||!f.next().done?!1:!0}catch(h){return!1}}
18
- if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(v&&$jscomp.ES6_CONFORMANCE)return v}else if(A())return v;var u=new WeakMap,p=function(c){this.data_={};this.head_=l();this.size=0;if(c){c=$jscomp.makeIterator(c);for(var m;!(m=c.next()).done;)m=m.value,this.set(m[0],m[1])}};p.prototype.set=function(c,m){c=0===c?0:c;var f=n(this,c);f.list||(f.list=this.data_[f.id]=[]);f.entry?f.entry.value=m:(f.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:c,value:m},f.list.push(f.entry),
19
- this.head_.previous.next=f.entry,this.head_.previous=f.entry,this.size++);return this};p.prototype.delete=function(c){c=n(this,c);return c.entry&&c.list?(c.list.splice(c.index,1),c.list.length||delete this.data_[c.id],c.entry.previous.next=c.entry.next,c.entry.next.previous=c.entry.previous,c.entry.head=null,this.size--,!0):!1};p.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=l();this.size=0};p.prototype.has=function(c){return!!n(this,c).entry};p.prototype.get=function(c){return(c=
20
- n(this,c).entry)&&c.value};p.prototype.entries=function(){return y(this,function(c){return[c.key,c.value]})};p.prototype.keys=function(){return y(this,function(c){return c.key})};p.prototype.values=function(){return y(this,function(c){return c.value})};p.prototype.forEach=function(c,m){for(var f=this.entries(),k;!(k=f.next()).done;)k=k.value,c.call(m,k[1],k[0],this)};p.prototype[Symbol.iterator]=p.prototype.entries;var n=function(c,m){var f=m&&typeof m;"object"==f||"function"==f?u.has(m)?f=u.get(m):
21
- (f=""+ ++t,u.set(m,f)):f="p_"+m;var k=c.data_[f];if(k&&$jscomp.owns(c.data_,f))for(c=0;c<k.length;c++){var h=k[c];if(m!==m&&h.key!==h.key||m===h.key)return{id:f,list:k,index:c,entry:h}}return{id:f,list:k,index:-1,entry:void 0}},y=function(c,m){var f=c.head_;return $jscomp.iteratorPrototype(function(){if(f){for(;f.head!=c.head_;)f=f.previous;for(;f.next!=f.head;)return f=f.next,{done:!1,value:m(f)};f=null}return{done:!0,value:void 0}})},l=function(){var c={};return c.previous=c.next=c.head=c},t=0;
22
- return p},"es6","es3");
23
- $jscomp.polyfill("Promise",function(v){function A(){this.batch_=null}function u(l){return l instanceof n?l:new n(function(t,c){t(l)})}if(v&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return v;A.prototype.asyncExecute=function(l){if(null==this.batch_){this.batch_=[];var t=this;this.asyncExecuteFunction(function(){t.executeBatch_()})}this.batch_.push(l)};
24
- var p=$jscomp.global.setTimeout;A.prototype.asyncExecuteFunction=function(l){p(l,0)};A.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var l=this.batch_;this.batch_=[];for(var t=0;t<l.length;++t){var c=l[t];l[t]=null;try{c()}catch(m){this.asyncThrow_(m)}}}this.batch_=null};A.prototype.asyncThrow_=function(l){this.asyncExecuteFunction(function(){throw l;})};var n=function(l){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=!1;var t=this.createResolveAndReject_();
25
- try{l(t.resolve,t.reject)}catch(c){t.reject(c)}};n.prototype.createResolveAndReject_=function(){function l(m){return function(f){c||(c=!0,m.call(t,f))}}var t=this,c=!1;return{resolve:l(this.resolveTo_),reject:l(this.reject_)}};n.prototype.resolveTo_=function(l){if(l===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(l instanceof n)this.settleSameAsPromise_(l);else{a:switch(typeof l){case "object":var t=null!=l;break a;case "function":t=!0;break a;default:t=!1}t?this.resolveToNonPromiseObj_(l):
3
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(v){var B=0;return function(){return B<v.length?{done:!1,value:v[B++]}:{done:!0}}};$jscomp.arrayIterator=function(v){return{next:$jscomp.arrayIteratorImpl(v)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
4
+ $jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(v,B,u){if(v==Array.prototype||v==Object.prototype)return v;v[B]=u.value;return v};$jscomp.getGlobal=function(v){v=["object"==typeof globalThis&&globalThis,v,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var B=0;B<v.length;++B){var u=v[B];if(u&&u.Math==Math)return u}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
5
+ $jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(v,B,u){if(!u||null!=v){u=$jscomp.propertyToPolyfillSymbol[B];if(null==u)return v[B];u=v[u];return void 0!==u?u:v[B]}};
6
+ $jscomp.polyfill=function(v,B,u,q){B&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(v,B,u,q):$jscomp.polyfillUnisolated(v,B,u,q))};$jscomp.polyfillUnisolated=function(v,B,u,q){u=$jscomp.global;v=v.split(".");for(q=0;q<v.length-1;q++){var n=v[q];if(!(n in u))return;u=u[n]}v=v[v.length-1];q=u[v];B=B(q);B!=q&&null!=B&&$jscomp.defineProperty(u,v,{configurable:!0,writable:!0,value:B})};
7
+ $jscomp.polyfillIsolated=function(v,B,u,q){var n=v.split(".");v=1===n.length;q=n[0];q=!v&&q in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var x=0;x<n.length-1;x++){var l=n[x];if(!(l in q))return;q=q[l]}n=n[n.length-1];u=$jscomp.IS_SYMBOL_NATIVE&&"es6"===u?q[n]:null;B=B(u);null!=B&&(v?$jscomp.defineProperty($jscomp.polyfills,n,{configurable:!0,writable:!0,value:B}):B!==u&&(void 0===$jscomp.propertyToPolyfillSymbol[n]&&(u=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[n]=$jscomp.IS_SYMBOL_NATIVE?
8
+ $jscomp.global.Symbol(n):$jscomp.POLYFILL_PREFIX+u+"$"+n),$jscomp.defineProperty(q,$jscomp.propertyToPolyfillSymbol[n],{configurable:!0,writable:!0,value:B})))};$jscomp.initSymbol=function(){};
9
+ $jscomp.polyfill("Symbol",function(v){if(v)return v;var B=function(x,l){this.$jscomp$symbol$id_=x;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:l})};B.prototype.toString=function(){return this.$jscomp$symbol$id_};var u="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",q=0,n=function(x){if(this instanceof n)throw new TypeError("Symbol is not a constructor");return new B(u+(x||"")+"_"+q++,x)};return n},"es6","es3");
10
+ $jscomp.polyfill("Symbol.iterator",function(v){if(v)return v;v=Symbol("Symbol.iterator");for(var B="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),u=0;u<B.length;u++){var q=$jscomp.global[B[u]];"function"===typeof q&&"function"!=typeof q.prototype[v]&&$jscomp.defineProperty(q.prototype,v,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return v},"es6",
11
+ "es3");$jscomp.iteratorPrototype=function(v){v={next:v};v[Symbol.iterator]=function(){return this};return v};$jscomp.makeIterator=function(v){var B="undefined"!=typeof Symbol&&Symbol.iterator&&v[Symbol.iterator];if(B)return B.call(v);if("number"==typeof v.length)return $jscomp.arrayIterator(v);throw Error(String(v)+" is not an iterable or ArrayLike");};$jscomp.arrayFromIterator=function(v){for(var B,u=[];!(B=v.next()).done;)u.push(B.value);return u};
12
+ $jscomp.arrayFromIterable=function(v){return v instanceof Array?v:$jscomp.arrayFromIterator($jscomp.makeIterator(v))};$jscomp.checkEs6ConformanceViaProxy=function(){try{var v={},B=Object.create(new $jscomp.global.Proxy(v,{get:function(u,q,n){return u==v&&"q"==q&&n==B}}));return!0===B.q}catch(u){return!1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();
13
+ $jscomp.owns=function(v,B){return Object.prototype.hasOwnProperty.call(v,B)};
14
+ $jscomp.polyfill("WeakMap",function(v){function B(){if(!v||!Object.seal)return!1;try{var m=Object.seal({}),k=Object.seal({}),h=new v([[m,2],[k,3]]);if(2!=h.get(m)||3!=h.get(k))return!1;h.delete(m);h.set(k,4);return!h.has(m)&&4==h.get(k)}catch(f){return!1}}function u(){}function q(m){var k=typeof m;return"object"===k&&null!==m||"function"===k}function n(m){if(!$jscomp.owns(m,l)){var k=new u;$jscomp.defineProperty(m,l,{value:k})}}function x(m){if(!$jscomp.ISOLATE_POLYFILLS){var k=Object[m];k&&(Object[m]=
15
+ function(h){if(h instanceof u)return h;Object.isExtensible(h)&&n(h);return k(h)})}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(v&&$jscomp.ES6_CONFORMANCE)return v}else if(B())return v;var l="$jscomp_hidden_"+Math.random();x("freeze");x("preventExtensions");x("seal");var t=0,c=function(m){this.id_=(t+=Math.random()+1).toString();if(m){m=$jscomp.makeIterator(m);for(var k;!(k=m.next()).done;)k=k.value,this.set(k[0],k[1])}};c.prototype.set=function(m,k){if(!q(m))throw Error("Invalid WeakMap key");
16
+ n(m);if(!$jscomp.owns(m,l))throw Error("WeakMap key fail: "+m);m[l][this.id_]=k;return this};c.prototype.get=function(m){return q(m)&&$jscomp.owns(m,l)?m[l][this.id_]:void 0};c.prototype.has=function(m){return q(m)&&$jscomp.owns(m,l)&&$jscomp.owns(m[l],this.id_)};c.prototype.delete=function(m){return q(m)&&$jscomp.owns(m,l)&&$jscomp.owns(m[l],this.id_)?delete m[l][this.id_]:!1};return c},"es6","es3");$jscomp.MapEntry=function(){};
17
+ $jscomp.polyfill("Map",function(v){function B(){if($jscomp.ASSUME_NO_NATIVE_MAP||!v||"function"!=typeof v||!v.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),m=new v($jscomp.makeIterator([[c,"s"]]));if("s"!=m.get(c)||1!=m.size||m.get({x:4})||m.set({x:4},"t")!=m||2!=m.size)return!1;var k=m.entries(),h=k.next();if(h.done||h.value[0]!=c||"s"!=h.value[1])return!1;h=k.next();return h.done||4!=h.value[0].x||"t"!=h.value[1]||!k.next().done?!1:!0}catch(f){return!1}}
18
+ if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(v&&$jscomp.ES6_CONFORMANCE)return v}else if(B())return v;var u=new WeakMap,q=function(c){this.data_={};this.head_=l();this.size=0;if(c){c=$jscomp.makeIterator(c);for(var m;!(m=c.next()).done;)m=m.value,this.set(m[0],m[1])}};q.prototype.set=function(c,m){c=0===c?0:c;var k=n(this,c);k.list||(k.list=this.data_[k.id]=[]);k.entry?k.entry.value=m:(k.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:c,value:m},k.list.push(k.entry),
19
+ this.head_.previous.next=k.entry,this.head_.previous=k.entry,this.size++);return this};q.prototype.delete=function(c){c=n(this,c);return c.entry&&c.list?(c.list.splice(c.index,1),c.list.length||delete this.data_[c.id],c.entry.previous.next=c.entry.next,c.entry.next.previous=c.entry.previous,c.entry.head=null,this.size--,!0):!1};q.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=l();this.size=0};q.prototype.has=function(c){return!!n(this,c).entry};q.prototype.get=function(c){return(c=
20
+ n(this,c).entry)&&c.value};q.prototype.entries=function(){return x(this,function(c){return[c.key,c.value]})};q.prototype.keys=function(){return x(this,function(c){return c.key})};q.prototype.values=function(){return x(this,function(c){return c.value})};q.prototype.forEach=function(c,m){for(var k=this.entries(),h;!(h=k.next()).done;)h=h.value,c.call(m,h[1],h[0],this)};q.prototype[Symbol.iterator]=q.prototype.entries;var n=function(c,m){var k=m&&typeof m;"object"==k||"function"==k?u.has(m)?k=u.get(m):
21
+ (k=""+ ++t,u.set(m,k)):k="p_"+m;var h=c.data_[k];if(h&&$jscomp.owns(c.data_,k))for(c=0;c<h.length;c++){var f=h[c];if(m!==m&&f.key!==f.key||m===f.key)return{id:k,list:h,index:c,entry:f}}return{id:k,list:h,index:-1,entry:void 0}},x=function(c,m){var k=c.head_;return $jscomp.iteratorPrototype(function(){if(k){for(;k.head!=c.head_;)k=k.previous;for(;k.next!=k.head;)return k=k.next,{done:!1,value:m(k)};k=null}return{done:!0,value:void 0}})},l=function(){var c={};return c.previous=c.next=c.head=c},t=0;
22
+ return q},"es6","es3");
23
+ $jscomp.polyfill("Promise",function(v){function B(){this.batch_=null}function u(l){return l instanceof n?l:new n(function(t,c){t(l)})}if(v&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return v;B.prototype.asyncExecute=function(l){if(null==this.batch_){this.batch_=[];var t=this;this.asyncExecuteFunction(function(){t.executeBatch_()})}this.batch_.push(l)};
24
+ var q=$jscomp.global.setTimeout;B.prototype.asyncExecuteFunction=function(l){q(l,0)};B.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var l=this.batch_;this.batch_=[];for(var t=0;t<l.length;++t){var c=l[t];l[t]=null;try{c()}catch(m){this.asyncThrow_(m)}}}this.batch_=null};B.prototype.asyncThrow_=function(l){this.asyncExecuteFunction(function(){throw l;})};var n=function(l){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=!1;var t=this.createResolveAndReject_();
25
+ try{l(t.resolve,t.reject)}catch(c){t.reject(c)}};n.prototype.createResolveAndReject_=function(){function l(m){return function(k){c||(c=!0,m.call(t,k))}}var t=this,c=!1;return{resolve:l(this.resolveTo_),reject:l(this.reject_)}};n.prototype.resolveTo_=function(l){if(l===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(l instanceof n)this.settleSameAsPromise_(l);else{a:switch(typeof l){case "object":var t=null!=l;break a;case "function":t=!0;break a;default:t=!1}t?this.resolveToNonPromiseObj_(l):
26
26
  this.fulfill_(l)}};n.prototype.resolveToNonPromiseObj_=function(l){var t=void 0;try{t=l.then}catch(c){this.reject_(c);return}"function"==typeof t?this.settleSameAsThenable_(t,l):this.fulfill_(l)};n.prototype.reject_=function(l){this.settle_(2,l)};n.prototype.fulfill_=function(l){this.settle_(1,l)};n.prototype.settle_=function(l,t){if(0!=this.state_)throw Error("Cannot settle("+l+", "+t+"): Promise already settled in state"+this.state_);this.state_=l;this.result_=t;2===this.state_&&this.scheduleUnhandledRejectionCheck_();
27
- this.executeOnSettledCallbacks_()};n.prototype.scheduleUnhandledRejectionCheck_=function(){var l=this;p(function(){if(l.notifyUnhandledRejection_()){var t=$jscomp.global.console;"undefined"!==typeof t&&t.error(l.result_)}},1)};n.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var l=$jscomp.global.CustomEvent,t=$jscomp.global.Event,c=$jscomp.global.dispatchEvent;if("undefined"===typeof c)return!0;"function"===typeof l?l=new l("unhandledrejection",{cancelable:!0}):
28
- "function"===typeof t?l=new t("unhandledrejection",{cancelable:!0}):(l=$jscomp.global.document.createEvent("CustomEvent"),l.initCustomEvent("unhandledrejection",!1,!0,l));l.promise=this;l.reason=this.result_;return c(l)};n.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var l=0;l<this.onSettledCallbacks_.length;++l)y.asyncExecute(this.onSettledCallbacks_[l]);this.onSettledCallbacks_=null}};var y=new A;n.prototype.settleSameAsPromise_=function(l){var t=this.createResolveAndReject_();
29
- l.callWhenSettled_(t.resolve,t.reject)};n.prototype.settleSameAsThenable_=function(l,t){var c=this.createResolveAndReject_();try{l.call(t,c.resolve,c.reject)}catch(m){c.reject(m)}};n.prototype.then=function(l,t){function c(h,r){return"function"==typeof h?function(q){try{m(h(q))}catch(g){f(g)}}:r}var m,f,k=new n(function(h,r){m=h;f=r});this.callWhenSettled_(c(l,m),c(t,f));return k};n.prototype.catch=function(l){return this.then(void 0,l)};n.prototype.callWhenSettled_=function(l,t){function c(){switch(m.state_){case 1:l(m.result_);
30
- break;case 2:t(m.result_);break;default:throw Error("Unexpected state: "+m.state_);}}var m=this;null==this.onSettledCallbacks_?y.asyncExecute(c):this.onSettledCallbacks_.push(c);this.isRejectionHandled_=!0};n.resolve=u;n.reject=function(l){return new n(function(t,c){c(l)})};n.race=function(l){return new n(function(t,c){for(var m=$jscomp.makeIterator(l),f=m.next();!f.done;f=m.next())u(f.value).callWhenSettled_(t,c)})};n.all=function(l){var t=$jscomp.makeIterator(l),c=t.next();return c.done?u([]):new n(function(m,
31
- f){function k(q){return function(g){h[q]=g;r--;0==r&&m(h)}}var h=[],r=0;do h.push(void 0),r++,u(c.value).callWhenSettled_(k(h.length-1),f),c=t.next();while(!c.done)})};return n},"es6","es3");
32
- $jscomp.polyfill("Array.from",function(v){return v?v:function(A,u,p){u=null!=u?u:function(t){return t};var n=[],y="undefined"!=typeof Symbol&&Symbol.iterator&&A[Symbol.iterator];if("function"==typeof y){A=y.call(A);for(var l=0;!(y=A.next()).done;)n.push(u.call(p,y.value,l++))}else for(y=A.length,l=0;l<y;l++)n.push(u.call(p,A[l],l));return n}},"es6","es3");
33
- $jscomp.checkStringArgs=function(v,A,u){if(null==v)throw new TypeError("The 'this' value for String.prototype."+u+" must not be null or undefined");if(A instanceof RegExp)throw new TypeError("First argument to String.prototype."+u+" must not be a regular expression");return v+""};
34
- $jscomp.polyfill("String.prototype.endsWith",function(v){return v?v:function(A,u){var p=$jscomp.checkStringArgs(this,A,"endsWith");A+="";void 0===u&&(u=p.length);u=Math.max(0,Math.min(u|0,p.length));for(var n=A.length;0<n&&0<u;)if(p[--u]!=A[--n])return!1;return 0>=n}},"es6","es3");$jscomp.underscoreProtoCanBeSet=function(){var v={a:!0},A={};try{return A.__proto__=v,A.a}catch(u){}return!1};
35
- $jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(v,A){v.__proto__=A;if(v.__proto__!==A)throw new TypeError(v+" is not extensible");return v}:null;$jscomp.polyfill("Object.setPrototypeOf",function(v){return v||$jscomp.setPrototypeOf},"es6","es5");
36
- $jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.assign?Object.assign:function(v,A){for(var u=1;u<arguments.length;u++){var p=arguments[u];if(p)for(var n in p)$jscomp.owns(p,n)&&(v[n]=p[n])}return v};$jscomp.polyfill("Object.assign",function(v){return v||$jscomp.assign},"es6","es3");$jscomp.findInternal=function(v,A,u){v instanceof String&&(v=String(v));for(var p=v.length,n=0;n<p;n++){var y=v[n];if(A.call(u,y,n,v))return{i:n,v:y}}return{i:-1,v:void 0}};
37
- $jscomp.polyfill("Array.prototype.find",function(v){return v?v:function(A,u){return $jscomp.findInternal(this,A,u).v}},"es6","es3");
38
- $jscomp.polyfill("Set",function(v){function A(){if($jscomp.ASSUME_NO_NATIVE_SET||!v||"function"!=typeof v||!v.prototype.entries||"function"!=typeof Object.seal)return!1;try{var p=Object.seal({x:4}),n=new v($jscomp.makeIterator([p]));if(!n.has(p)||1!=n.size||n.add(p)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var y=n.entries(),l=y.next();if(l.done||l.value[0]!=p||l.value[1]!=p)return!1;l=y.next();return l.done||l.value[0]==p||4!=l.value[0].x||l.value[1]!=l.value[0]?!1:y.next().done}catch(t){return!1}}
39
- if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(v&&$jscomp.ES6_CONFORMANCE)return v}else if(A())return v;var u=function(p){this.map_=new Map;if(p){p=$jscomp.makeIterator(p);for(var n;!(n=p.next()).done;)this.add(n.value)}this.size=this.map_.size};u.prototype.add=function(p){p=0===p?0:p;this.map_.set(p,p);this.size=this.map_.size;return this};u.prototype.delete=function(p){p=this.map_.delete(p);this.size=this.map_.size;return p};u.prototype.clear=function(){this.map_.clear();this.size=0};u.prototype.has=
40
- function(p){return this.map_.has(p)};u.prototype.entries=function(){return this.map_.entries()};u.prototype.values=function(){return this.map_.values()};u.prototype.keys=u.prototype.values;u.prototype[Symbol.iterator]=u.prototype.values;u.prototype.forEach=function(p,n){var y=this;this.map_.forEach(function(l){return p.call(n,l,l,y)})};return u},"es6","es3");
41
- $jscomp.iteratorFromArray=function(v,A){v instanceof String&&(v+="");var u=0,p=!1,n={next:function(){if(!p&&u<v.length){var y=u++;return{value:A(y,v[y]),done:!1}}p=!0;return{done:!0,value:void 0}}};n[Symbol.iterator]=function(){return n};return n};$jscomp.polyfill("Array.prototype.keys",function(v){return v?v:function(){return $jscomp.iteratorFromArray(this,function(A){return A})}},"es6","es3");
42
- (function(v){function A(p){if(u[p])return u[p].exports;var n=u[p]={i:p,l:!1,exports:{}};v[p].call(n.exports,n,n.exports,A);n.l=!0;return n.exports}var u={};A.m=v;A.c=u;A.d=function(p,n,y){A.o(p,n)||Object.defineProperty(p,n,{enumerable:!0,get:y})};A.r=function(p){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"});Object.defineProperty(p,"__esModule",{value:!0})};A.t=function(p,n){n&1&&(p=A(p));if(n&8||n&4&&"object"===typeof p&&p&&p.__esModule)return p;
43
- var y=Object.create(null);A.r(y);Object.defineProperty(y,"default",{enumerable:!0,value:p});if(n&2&&"string"!=typeof p)for(var l in p)A.d(y,l,function(t){return p[t]}.bind(null,l));return y};A.n=function(p){var n=p&&p.__esModule?function(){return p["default"]}:function(){return p};A.d(n,"a",n);return n};A.o=function(p,n){return Object.prototype.hasOwnProperty.call(p,n)};A.p="/core/pdf/";return A(A.s=21)})([function(v,A,u){u.d(A,"d",function(){return y});u.d(A,"e",function(){return n});u.d(A,"c",function(){return l});
44
- u.d(A,"a",function(){return t});u.d(A,"b",function(){return c});var p=u(2),n=function(m,f){Object(p.a)("disableLogs")||(f?console.warn("".concat(m,": ").concat(f)):console.warn(m))},y=function(m,f){Object(p.a)("disableLogs")||(f?console.log("".concat(m,": ").concat(f)):console.log(m))},l=function(m){if(!Object(p.a)("disableLogs"))throw console.error(m),Error(m);},t=function(m,f){},c=function(m,f){}},function(v,A,u){u.d(A,"c",function(){return c});u.d(A,"a",function(){return m});u.d(A,"b",function(){return f});
45
- u.d(A,"d",function(){return k});var p=u(16),n=console.log,y=console.warn,l=console.error,t=function(h){void 0===h&&(h=!0);h?(console.log=function(){},console.warn=function(){},console.error=function(){}):(console.log=n,console.warn=y,console.error=l)},c=function(){var h=Object(p.a)(location.search);t("1"===h.disableLogs)},m=function(h){h.on("disableLogs",function(r){t(r.disabled)})},f=function(h,r){return function(){}},k=function(h,r){r?console.warn("".concat(h,": ").concat(r)):console.warn(h)}},
46
- function(v,A,u){u.d(A,"a",function(){return y});u.d(A,"b",function(){return l});var p={},n={flattenedResources:!1,CANVAS_CACHE_SIZE:void 0,maxPagesBefore:void 0,maxPagesAhead:void 0,disableLogs:!1,wvsQueryParameters:{},_trnDebugMode:!1,_logFiltersEnabled:null},y=function(t){return n[t]},l=function(t,c){var m;n[t]=c;null===(m=p[t])||void 0===m?void 0:m.forEach(function(f){f(c)})}},function(v,A,u){u.d(A,"a",function(){return D});u.d(A,"b",function(){return G});var p=u(4),n=u(0),y=u(5),l=u(6),t=u(8),
47
- c="undefined"===typeof window?self:window,m=c.importScripts,f=!1,k=function(a,b){f||(m(Object(t.a)("".concat(c.basePath,"decode.min.js"))),f=!0);a=Object(l.b)(a);a=self.BrotliDecode(a);return b?a:Object(l.a)(a)},h=function(a,b){return Object(p.b)(void 0,void 0,Promise,function(){var d;return Object(p.c)(this,function(e){switch(e.label){case 0:return f?[3,2]:[4,Object(y.a)("".concat(self.Core.getWorkerPath(),"external/decode.min.js"),"Failed to download decode.min.js",window)];case 1:e.sent(),f=!0,
48
- e.label=2;case 2:return d=self.BrotliDecode(Object(l.b)(a)),[2,b?d:Object(l.a)(d)]}})})};(function(){function a(){this.remainingDataArrays=[]}a.prototype.processRaw=function(b){return b};a.prototype.processBrotli=function(b){this.remainingDataArrays.push(b);return null};a.prototype.GetNextChunk=function(b){this.decodeFunction||(this.decodeFunction=0===b[0]&&97===b[1]&&115===b[2]&&109===b[3]?this.processRaw:this.processBrotli);return this.decodeFunction(b)};a.prototype.End=function(){if(this.remainingDataArrays.length){for(var b=
49
- this.arrays,d=0,e=0;e<b.length;++e)d+=b[e].length;d=new Uint8Array(d);var w=0;for(e=0;e<b.length;++e){var C=b[e];d.set(C,w);w+=C.length}return k(d,!0)}return null};return a})();var r=function(a,b,d){void 0===b&&(b=!0);void 0===d&&(d=!1);var e=new XMLHttpRequest;e.open("GET",a,b);a=d&&e.overrideMimeType;e.responseType=a?"text":"arraybuffer";a&&e.overrideMimeType("text/plain; charset=x-user-defined");return e},q=function(a,b,d){return new Promise(function(e,w){var C=r(a,b,d);C.send();C.onload=function(){200===
50
- this.status||0===this.status?e(C.response):w(Error("Download Failed ".concat(a)))};C.onerror=function(){w(Error("Network error occurred ".concat(a)))}})},g=function(a,b){var d=b.decompressFunction,e=b.shouldOutputArray,w=b.compressedMaximum,C="undefined"!==typeof m?Date.now():null;try{var z=e?x(a):a.join("");Object(n.a)("worker","Result length is ".concat(z.length));if(z.length<w){var E=d(z,e);Object(n.e)("There may be some degradation of performance. Your server has not been configured to serve .gz. and .br. files with the expected Content-Encoding. See https://docs.apryse.com/documentation/web/faq/content-encoding/ for instructions on how to resolve this.");
51
- m&&Object(n.a)("worker","Decompressed length is ".concat(E.length));z=E}else e||(z=Object(l.a)(z));if(m){var L=b.paths.join(", ");Object(n.a)("worker","".concat(L," Decompression took ").concat(Date.now()-C," ms"))}return z}catch(N){throw Error("Failed to decompress: ".concat(N));}},x=function(a){a=a.reduce(function(b,d){d=new Uint8Array(d);return b.concat(Array.from(d))},[]);return new Uint8Array(a)},F=function(a){var b=!a.shouldOutputArray,d=a.paths,e=a.isAsync;e?d=Promise.all(d.map(function(w){return q(w,
52
- e,b)})).then(function(w){return g(w,a)}).catch(function(w){throw Error("Failed to fetch or decompress files: ".concat(w.message));}):(d=d.map(function(w){var C=r(w,e,b);C.send();if(200===C.status||0===C.status)return C.response;throw Error("Failed to load ".concat(w));}),d=g(d,a));return d},D=function(a){var b=a.lastIndexOf("/");-1===b&&(b=0);var d=a.slice(b).replace(".",".br.");m||(d.endsWith(".js.mem")?d=d.replace(".js.mem",".mem"):d.endsWith(".js")&&(d=d.concat(".mem")));return a.slice(0,b)+d},
53
- H=function(a){return a.map(function(b){return D(b)})},I=function(a,b){b.decompressFunction=m?k:h;b.paths=H(a);return F(b)},J=function(a,b,d,e){return a.catch(function(w){Object(n.e)(w);return e(b,d)})},G=function(a,b,d,e){a=Array.isArray(a)?a:[a];a:{var w=[I];b={compressedMaximum:b,isAsync:d,shouldOutputArray:e};if(b.isAsync){var C=w[0](a,b);for(d=1;d<w.length;++d)C=J(C,a,b,w[d])}else{for(d=0;d<w.length;d++){e=w[d];try{C=e(a,b);break a}catch(z){Object(n.e)(z.message)}}throw Error("None of the worker files were able to load. ");
54
- }}return C}},function(v,A,u){function p(l,t,c,m){function f(k){return k instanceof c?k:new c(function(h){h(k)})}return new (c||(c=Promise))(function(k,h){function r(x){try{g(m.next(x))}catch(F){h(F)}}function q(x){try{g(m["throw"](x))}catch(F){h(F)}}function g(x){x.done?k(x.value):f(x.value).then(r,q)}g((m=m.apply(l,t||[])).next())})}function n(l,t){function c(g){return function(x){return m([g,x])}}function m(g){if(k)throw new TypeError("Generator is already executing.");for(;q&&(q=0,g[0]&&(f=0)),
55
- f;)try{if(k=1,h&&(r=g[0]&2?h["return"]:g[0]?h["throw"]||((r=h["return"])&&r.call(h),0):h.next)&&!(r=r.call(h,g[1])).done)return r;if(h=0,r)g=[g[0]&2,r.value];switch(g[0]){case 0:case 1:r=g;break;case 4:return f.label++,{value:g[1],done:!1};case 5:f.label++;h=g[1];g=[0];continue;case 7:g=f.ops.pop();f.trys.pop();continue;default:if(!(r=f.trys,r=0<r.length&&r[r.length-1])&&(6===g[0]||2===g[0])){f=0;continue}if(3===g[0]&&(!r||g[1]>r[0]&&g[1]<r[3]))f.label=g[1];else if(6===g[0]&&f.label<r[1])f.label=
56
- r[1],r=g;else if(r&&f.label<r[2])f.label=r[2],f.ops.push(g);else{r[2]&&f.ops.pop();f.trys.pop();continue}}g=t.call(l,f)}catch(x){g=[6,x],h=0}finally{k=r=0}if(g[0]&5)throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}var f={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},k,h,r,q=Object.create(("function"===typeof Iterator?Iterator:Object).prototype);return q.next=c(0),q["throw"]=c(1),q["return"]=c(2),"function"===typeof Symbol&&(q[Symbol.iterator]=function(){return this}),
57
- q}u.d(A,"a",function(){return y});u.d(A,"b",function(){return p});u.d(A,"c",function(){return n});var y=function(){y=Object.assign||function(l){for(var t,c=1,m=arguments.length;c<m;c++){t=arguments[c];for(var f in t)Object.prototype.hasOwnProperty.call(t,f)&&(l[f]=t[f])}return l};return y.apply(this,arguments)}},function(v,A,u){function p(l,t,c){return new Promise(function(m){if(!l)return m();var f=c.document.createElement("script");f.type="text/javascript";f.onload=function(){m()};f.onerror=function(){t&&
58
- Object(y.e)(t);m()};f.src=l;c.document.getElementsByTagName("head")[0].appendChild(f)})}function n(l,t,c,m,f,k,h){h=h||0;var r=t[k],q=f.length;m=l.length>=m&&!r;q!==c||f.buffer.byteLength!==q?(m?(l=l.shift(),r=t[l],r.length<c&&(r=new Int8Array(c)),t[l]=null):r=r?t[k]:new Int8Array(c),r.subarray(h,h+q).set(f),f=r):m&&(l=l.shift(),t[l]=null);t[k]=f}u.d(A,"a",function(){return p});u.d(A,"b",function(){return n});var y=u(0)},function(v,A,u){u.d(A,"b",function(){return p});u.d(A,"a",function(){return n});
59
- var p=function(y){if("string"===typeof y){for(var l=new Uint8Array(y.length),t=y.length,c=0;c<t;c++)l[c]=y.charCodeAt(c);return l}return y},n=function(y){if("string"!==typeof y){for(var l="",t=0,c=y.length,m;t<c;)m=y.subarray(t,t+1024),t+=1024,l+=String.fromCharCode.apply(null,m);return l}return y}},function(v,A,u){u.d(A,"a",function(){return q});var p,n="undefined"===typeof window?self:window;v=function(){var g=navigator.userAgent.toLowerCase();return(g=/(msie) ([\w.]+)/.exec(g)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(g))?
60
- parseInt(g[2],10):g}();var y=function(){var g=n.navigator.userAgent.match(/OPR/),x=n.navigator.userAgent.match(/Maxthon/),F=n.navigator.userAgent.match(/Edge/);return n.navigator.userAgent.match(/Chrome\/(.*?) /)&&!g&&!x&&!F}();(function(){if(!y)return null;var g=n.navigator.userAgent.match(/Chrome\/([0-9]+)\./);return g?parseInt(g[1],10):g})();var l=!!navigator.userAgent.match(/Edge/i)||navigator.userAgent.match(/Edg\/(.*?)/)&&n.navigator.userAgent.match(/Chrome\/(.*?) /);(function(){if(!l)return null;
61
- var g=n.navigator.userAgent.match(/Edg\/([0-9]+)\./);return g?parseInt(g[1],10):g})();A=/iPad|iPhone|iPod/.test(n.navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints||/iPad|iPhone|iPod/.test(n.navigator.userAgent);var t=function(){var g=n.navigator.userAgent.match(/.*\/([0-9\.]+)\s(Safari|Mobile).*/i);return g?parseFloat(g[1]):g}(),c=/^((?!chrome|android).)*safari/i.test(n.navigator.userAgent)||/^((?!chrome|android).)*$/.test(n.navigator.userAgent)&&A;c&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&
62
- parseInt(null===(p=navigator.userAgent.match(/Version\/(\d+)/))||void 0===p?void 0:p[1],10);var m=n.navigator.userAgent.match(/Firefox/);(function(){if(!m)return null;var g=n.navigator.userAgent.match(/Firefox\/([0-9]+)\./);return g?parseInt(g[1],10):g})();v||/Android|webOS|Touch|IEMobile|Silk/i.test(navigator.userAgent);navigator.userAgent.match(/(iPad|iPhone|iPod)/i);n.navigator.userAgent.indexOf("Android");var f=/Mac OS X 10_13_6.*\(KHTML, like Gecko\)$/.test(n.navigator.userAgent),k=n.navigator.userAgent.match(/(iPad|iPhone).+\sOS\s((\d+)(_\d)*)/i)?
63
- 14<=parseInt(n.navigator.userAgent.match(/(iPad|iPhone).+\sOS\s((\d+)(_\d)*)/i)[3],10):!1,h=!(!self.WebAssembly||!self.WebAssembly.validate),r=-1<n.navigator.userAgent.indexOf("Edge/16")||-1<n.navigator.userAgent.indexOf("MSAppHost"),q=function(){var g;if(g=h&&!r)g=c&&null!==t&&14>t,g=!(!k&&(g||f));return g}},function(v,A,u){u.d(A,"a",function(){return f});var p=u(4);v=u(13);var n=u.n(v),y=new Map,l=function(){return("undefined"===typeof window?self:window).trustedTypes},t=function(k,h){return l().createPolicy(k,
64
- {createHTML:function(r){return n.a.sanitize(r,Object(p.a)(Object(p.a)({},h),{RETURN_TRUSTED_TYPE:!1}))},createScript:function(r){return r},createScriptURL:function(r){return r}})},c=function(k){return l().createPolicy(k,{createHTML:function(h){return h},createScript:function(h){return h},createScriptURL:function(h){return h}})},m=function(k,h){var r,q={createHTML:function(g){return n.a.sanitize(g,Object(p.a)({},h))},createScript:function(g){return g},createScriptURL:function(g){return g}};if(null===
65
- (r=l())||void 0===r?0:r.createPolicy)r="".concat(k,"-po"),y.has(k)||(q=c(r),y.set(r,q),q=t(k,h),y.set(k,q)),q=y.get(h.createPolicyOnly?r:k);return q},f=function(k,h){void 0===h&&(h={createPolicyOnly:!0,trustedTypesPolicyName:"webviewer"});return m(h.trustedTypesPolicyName,h).createScriptURL(k.toString())}},function(v,A,u){function p(t){"@babel/helpers - typeof";return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(c){return typeof c}:function(c){return c&&"function"==typeof Symbol&&
66
- c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},p(t)}var n,y,l;!function(t){"object"===p(A)&&"undefined"!==typeof v?v.exports=t():!(y=[],n=t,l="function"===typeof n?n.apply(A,y):n,void 0!==l&&(v.exports=l))}(function(){return function k(c,m,f){function h(g,x){if(!m[g]){if(!c[g]){if(r)return r(g,!0);x=Error("Cannot find module '".concat(g,"'"));throw x.code="MODULE_NOT_FOUND",x;}x=m[g]={exports:{}};c[g][0].call(x.exports,function(F){return h(c[g][1][F]||F)},x,x.exports,k,c,m,f)}return m[g].exports}
67
- for(var r=!1,q=0;q<f.length;q++)h(f[q]);return h}({1:[function(c,m,f){var k={}.hasOwnProperty,h=function(r,q){function g(){this.constructor=r}for(var x in q)k.call(q,x)&&(r[x]=q[x]);g.prototype=q.prototype;r.prototype=new g;r.__super__=q.prototype;return r};f=c("./PriorityQueue/AbstractPriorityQueue");c=c("./PriorityQueue/ArrayStrategy");f=function(r){function q(g){g||(g={});g.strategy||(g.strategy=BinaryHeapStrategy);g.comparator||(g.comparator=function(x,F){return(x||0)-(F||0)});q.__super__.constructor.call(this,
68
- g)}h(q,r);return q}(f);f.ArrayStrategy=c;m.exports=f},{"./PriorityQueue/AbstractPriorityQueue":2,"./PriorityQueue/ArrayStrategy":3}],2:[function(c,m,f){m.exports=function(){function k(h){if(null==(null!=h?h.strategy:void 0))throw"Must pass options.strategy, a strategy";if(null==(null!=h?h.comparator:void 0))throw"Must pass options.comparator, a comparator";this.priv=new h.strategy(h);this.length=0}k.prototype.queue=function(h){this.length++;this.priv.queue(h)};k.prototype.dequeue=function(h){if(!this.length)throw"Empty queue";
69
- this.length--;return this.priv.dequeue()};k.prototype.peek=function(h){if(!this.length)throw"Empty queue";return this.priv.peek()};k.prototype.remove=function(h){this.priv.remove(h)&&--this.length};k.prototype.find=function(h){return 0<=this.priv.find(h)};k.prototype.removeAllMatching=function(h,r){h=this.priv.removeAllMatching(h,r);this.length-=h};return k}()},{}],3:[function(c,m,f){var k=function(h,r,q){var g;var x=0;for(g=h.length;x<g;){var F=x+g>>>1;0<=q(h[F],r)?x=F+1:g=F}return x};m.exports=
70
- function(){function h(r){var q;this.options=r;this.comparator=this.options.comparator;this.data=(null!=(q=this.options.initialValues)?q.slice(0):void 0)||[];this.data.sort(this.comparator).reverse()}h.prototype.queue=function(r){var q=k(this.data,r,this.comparator);this.data.splice(q,0,r)};h.prototype.dequeue=function(){return this.data.pop()};h.prototype.peek=function(){return this.data[this.data.length-1]};h.prototype.find=function(r){var q=k(this.data,r,this.comparator)-1;return 0<=q&&!this.comparator(this.data[q],
71
- r)?q:-1};h.prototype.remove=function(r){r=this.find(r);return 0<=r?(this.data.splice(r,1),!0):!1};h.prototype.removeAllMatching=function(r,q){for(var g=0,x=this.data.length-1;0<=x;--x)if(r(this.data[x])){var F=this.data.splice(x,1)[0];q&&q(F);++g}return g};return h}()},{}]},{},[1])(1)})},function(v,A,u){(function(p){function n(t,c){this._id=t;this._clearFn=c}var y="undefined"!==typeof p&&p||"undefined"!==typeof self&&self||window,l=Function.prototype.apply;A.setTimeout=function(){return new n(l.call(setTimeout,
72
- y,arguments),clearTimeout)};A.setInterval=function(){return new n(l.call(setInterval,y,arguments),clearInterval)};A.clearTimeout=A.clearInterval=function(t){t&&t.close()};n.prototype.unref=n.prototype.ref=function(){};n.prototype.close=function(){this._clearFn.call(y,this._id)};A.enroll=function(t,c){clearTimeout(t._idleTimeoutId);t._idleTimeout=c};A.unenroll=function(t){clearTimeout(t._idleTimeoutId);t._idleTimeout=-1};A._unrefActive=A.active=function(t){clearTimeout(t._idleTimeoutId);var c=t._idleTimeout;
73
- 0<=c&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},c))};u(25);A.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof p&&p.setImmediate||this&&this.setImmediate;A.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof p&&p.clearImmediate||this&&this.clearImmediate}).call(this,u(12))},function(v,A,u){function p(c,m,f,k){return n(c,m,f,k,!!WebAssembly.instantiateStreaming,void 0,void 0).then(function(h){Object(y.a)("load",
74
- "WASM compilation took ".concat(Date.now()-NaN," ms"));return h})}function n(c,m,f,k,h,r,q){r=r||Date.now();if(h&&!k)return Object(y.a)("load","Try instantiateStreaming"),fetch(Object(l.a)(c)).then(function(g){return WebAssembly.instantiateStreaming(g,m)}).catch(function(g){Object(y.a)("load","instantiateStreaming Failed ".concat(c," message ").concat(g.message));return n(c,m,f,k,!1,r,q)});h=k?k.map(function(g,x){return"".concat(g,"PDFNetCWasm-chunk-").concat(x,".wasm")}):c;return Object(l.b)(h,f,
75
- !0,!0).then(function(g){q=Date.now();Object(y.a)("load","Request took ".concat(q-r," ms"));return WebAssembly.instantiate(g,m)})}u.d(A,"a",function(){return p});var y=u(0),l=u(3),t=u(5);u.d(A,"b",function(){return t.a})},function(v,A){A=function(){return this}();try{A=A||(new Function("return this"))()}catch(u){"object"===typeof window&&(A=window)}v.exports=A},function(v,A,u){(function(p,n){v.exports=n()})(this,function(){function p(T){return function(O){O instanceof RegExp&&(O.lastIndex=0);for(var S=
76
- arguments.length,U=Array(1<S?S-1:0),W=1;W<S;W++)U[W-1]=arguments[W];return F(T,O,U)}}function n(T,O){var S=2<arguments.length&&void 0!==arguments[2]?arguments[2]:b;f&&f(T,null);for(var U=O.length;U--;){var W=O[U];if("string"===typeof W){var na=S(W);na!==W&&(k(O)||(O[U]=na),W=na)}T[W]=!0}return T}function y(T){for(var O=x(null),S=$jscomp.makeIterator(m(T)),U=S.next();!U.done;U=S.next()){var W=$jscomp.makeIterator(U.value);U=W.next().value;W=W.next().value;if(E(T,U))if(Array.isArray(W)){for(var na=
77
- 0;na<W.length;na++)E(W,na)||(W[na]=null);O[U]=W}else O[U]=W&&"object"===typeof W&&W.constructor===Object?y(W):W}return O}function l(T,O){for(;null!==T;){var S=r(T,O);if(S){if(S.get)return p(S.get);if("function"===typeof S.value)return p(S.value)}T=h(T)}return function(){return null}}function t(){function T(B,K,M){H(B,function(P){P.call(S,K,M,ua)})}var O=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"undefined"===typeof window?null:window,S=function(B){return t(B)};S.version="3.2.6";S.removed=
27
+ this.executeOnSettledCallbacks_()};n.prototype.scheduleUnhandledRejectionCheck_=function(){var l=this;q(function(){if(l.notifyUnhandledRejection_()){var t=$jscomp.global.console;"undefined"!==typeof t&&t.error(l.result_)}},1)};n.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var l=$jscomp.global.CustomEvent,t=$jscomp.global.Event,c=$jscomp.global.dispatchEvent;if("undefined"===typeof c)return!0;"function"===typeof l?l=new l("unhandledrejection",{cancelable:!0}):
28
+ "function"===typeof t?l=new t("unhandledrejection",{cancelable:!0}):(l=$jscomp.global.document.createEvent("CustomEvent"),l.initCustomEvent("unhandledrejection",!1,!0,l));l.promise=this;l.reason=this.result_;return c(l)};n.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var l=0;l<this.onSettledCallbacks_.length;++l)x.asyncExecute(this.onSettledCallbacks_[l]);this.onSettledCallbacks_=null}};var x=new B;n.prototype.settleSameAsPromise_=function(l){var t=this.createResolveAndReject_();
29
+ l.callWhenSettled_(t.resolve,t.reject)};n.prototype.settleSameAsThenable_=function(l,t){var c=this.createResolveAndReject_();try{l.call(t,c.resolve,c.reject)}catch(m){c.reject(m)}};n.prototype.then=function(l,t){function c(f,r){return"function"==typeof f?function(A){try{m(f(A))}catch(e){k(e)}}:r}var m,k,h=new n(function(f,r){m=f;k=r});this.callWhenSettled_(c(l,m),c(t,k));return h};n.prototype.catch=function(l){return this.then(void 0,l)};n.prototype.callWhenSettled_=function(l,t){function c(){switch(m.state_){case 1:l(m.result_);
30
+ break;case 2:t(m.result_);break;default:throw Error("Unexpected state: "+m.state_);}}var m=this;null==this.onSettledCallbacks_?x.asyncExecute(c):this.onSettledCallbacks_.push(c);this.isRejectionHandled_=!0};n.resolve=u;n.reject=function(l){return new n(function(t,c){c(l)})};n.race=function(l){return new n(function(t,c){for(var m=$jscomp.makeIterator(l),k=m.next();!k.done;k=m.next())u(k.value).callWhenSettled_(t,c)})};n.all=function(l){var t=$jscomp.makeIterator(l),c=t.next();return c.done?u([]):new n(function(m,
31
+ k){function h(A){return function(e){f[A]=e;r--;0==r&&m(f)}}var f=[],r=0;do f.push(void 0),r++,u(c.value).callWhenSettled_(h(f.length-1),k),c=t.next();while(!c.done)})};return n},"es6","es3");
32
+ $jscomp.polyfill("Array.from",function(v){return v?v:function(B,u,q){u=null!=u?u:function(t){return t};var n=[],x="undefined"!=typeof Symbol&&Symbol.iterator&&B[Symbol.iterator];if("function"==typeof x){B=x.call(B);for(var l=0;!(x=B.next()).done;)n.push(u.call(q,x.value,l++))}else for(x=B.length,l=0;l<x;l++)n.push(u.call(q,B[l],l));return n}},"es6","es3");
33
+ $jscomp.checkStringArgs=function(v,B,u){if(null==v)throw new TypeError("The 'this' value for String.prototype."+u+" must not be null or undefined");if(B instanceof RegExp)throw new TypeError("First argument to String.prototype."+u+" must not be a regular expression");return v+""};
34
+ $jscomp.polyfill("String.prototype.endsWith",function(v){return v?v:function(B,u){var q=$jscomp.checkStringArgs(this,B,"endsWith");B+="";void 0===u&&(u=q.length);u=Math.max(0,Math.min(u|0,q.length));for(var n=B.length;0<n&&0<u;)if(q[--u]!=B[--n])return!1;return 0>=n}},"es6","es3");$jscomp.underscoreProtoCanBeSet=function(){var v={a:!0},B={};try{return B.__proto__=v,B.a}catch(u){}return!1};
35
+ $jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(v,B){v.__proto__=B;if(v.__proto__!==B)throw new TypeError(v+" is not extensible");return v}:null;$jscomp.polyfill("Object.setPrototypeOf",function(v){return v||$jscomp.setPrototypeOf},"es6","es5");
36
+ $jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.assign?Object.assign:function(v,B){for(var u=1;u<arguments.length;u++){var q=arguments[u];if(q)for(var n in q)$jscomp.owns(q,n)&&(v[n]=q[n])}return v};$jscomp.polyfill("Object.assign",function(v){return v||$jscomp.assign},"es6","es3");$jscomp.findInternal=function(v,B,u){v instanceof String&&(v=String(v));for(var q=v.length,n=0;n<q;n++){var x=v[n];if(B.call(u,x,n,v))return{i:n,v:x}}return{i:-1,v:void 0}};
37
+ $jscomp.polyfill("Array.prototype.find",function(v){return v?v:function(B,u){return $jscomp.findInternal(this,B,u).v}},"es6","es3");
38
+ $jscomp.polyfill("Set",function(v){function B(){if($jscomp.ASSUME_NO_NATIVE_SET||!v||"function"!=typeof v||!v.prototype.entries||"function"!=typeof Object.seal)return!1;try{var q=Object.seal({x:4}),n=new v($jscomp.makeIterator([q]));if(!n.has(q)||1!=n.size||n.add(q)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var x=n.entries(),l=x.next();if(l.done||l.value[0]!=q||l.value[1]!=q)return!1;l=x.next();return l.done||l.value[0]==q||4!=l.value[0].x||l.value[1]!=l.value[0]?!1:x.next().done}catch(t){return!1}}
39
+ if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(v&&$jscomp.ES6_CONFORMANCE)return v}else if(B())return v;var u=function(q){this.map_=new Map;if(q){q=$jscomp.makeIterator(q);for(var n;!(n=q.next()).done;)this.add(n.value)}this.size=this.map_.size};u.prototype.add=function(q){q=0===q?0:q;this.map_.set(q,q);this.size=this.map_.size;return this};u.prototype.delete=function(q){q=this.map_.delete(q);this.size=this.map_.size;return q};u.prototype.clear=function(){this.map_.clear();this.size=0};u.prototype.has=
40
+ function(q){return this.map_.has(q)};u.prototype.entries=function(){return this.map_.entries()};u.prototype.values=function(){return this.map_.values()};u.prototype.keys=u.prototype.values;u.prototype[Symbol.iterator]=u.prototype.values;u.prototype.forEach=function(q,n){var x=this;this.map_.forEach(function(l){return q.call(n,l,l,x)})};return u},"es6","es3");
41
+ $jscomp.iteratorFromArray=function(v,B){v instanceof String&&(v+="");var u=0,q=!1,n={next:function(){if(!q&&u<v.length){var x=u++;return{value:B(x,v[x]),done:!1}}q=!0;return{done:!0,value:void 0}}};n[Symbol.iterator]=function(){return n};return n};$jscomp.polyfill("Array.prototype.keys",function(v){return v?v:function(){return $jscomp.iteratorFromArray(this,function(B){return B})}},"es6","es3");
42
+ (function(v){function B(q){if(u[q])return u[q].exports;var n=u[q]={i:q,l:!1,exports:{}};v[q].call(n.exports,n,n.exports,B);n.l=!0;return n.exports}var u={};B.m=v;B.c=u;B.d=function(q,n,x){B.o(q,n)||Object.defineProperty(q,n,{enumerable:!0,get:x})};B.r=function(q){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(q,Symbol.toStringTag,{value:"Module"});Object.defineProperty(q,"__esModule",{value:!0})};B.t=function(q,n){n&1&&(q=B(q));if(n&8||n&4&&"object"===typeof q&&q&&q.__esModule)return q;
43
+ var x=Object.create(null);B.r(x);Object.defineProperty(x,"default",{enumerable:!0,value:q});if(n&2&&"string"!=typeof q)for(var l in q)B.d(x,l,function(t){return q[t]}.bind(null,l));return x};B.n=function(q){var n=q&&q.__esModule?function(){return q["default"]}:function(){return q};B.d(n,"a",n);return n};B.o=function(q,n){return Object.prototype.hasOwnProperty.call(q,n)};B.p="/core/pdf/";return B(B.s=21)})([function(v,B,u){u.d(B,"d",function(){return x});u.d(B,"e",function(){return n});u.d(B,"c",function(){return l});
44
+ u.d(B,"a",function(){return t});u.d(B,"b",function(){return c});var q=u(2),n=function(m,k){Object(q.a)("disableLogs")||(k?console.warn("".concat(m,": ").concat(k)):console.warn(m))},x=function(m,k){Object(q.a)("disableLogs")||(k?console.log("".concat(m,": ").concat(k)):console.log(m))},l=function(m){if(!Object(q.a)("disableLogs"))throw console.error(m),Error(m);},t=function(m,k){},c=function(m,k){}},function(v,B,u){u.d(B,"c",function(){return c});u.d(B,"a",function(){return m});u.d(B,"b",function(){return k});
45
+ u.d(B,"d",function(){return h});var q=u(16),n=console.log,x=console.warn,l=console.error,t=function(f){void 0===f&&(f=!0);f?(console.log=function(){},console.warn=function(){},console.error=function(){}):(console.log=n,console.warn=x,console.error=l)},c=function(){var f=Object(q.a)(location.search);t("1"===f.disableLogs)},m=function(f){f.on("disableLogs",function(r){t(r.disabled)})},k=function(f,r){return function(){}},h=function(f,r){r?console.warn("".concat(f,": ").concat(r)):console.warn(f)}},
46
+ function(v,B,u){u.d(B,"a",function(){return x});u.d(B,"b",function(){return l});var q={},n={flattenedResources:!1,CANVAS_CACHE_SIZE:void 0,maxPagesBefore:void 0,maxPagesAhead:void 0,disableLogs:!1,wvsQueryParameters:{},_trnDebugMode:!1,_logFiltersEnabled:null},x=function(t){return n[t]},l=function(t,c){var m;n[t]=c;null===(m=q[t])||void 0===m?void 0:m.forEach(function(k){k(c)})}},function(v,B,u){u.d(B,"a",function(){return D});u.d(B,"b",function(){return H});var q=u(4),n=u(0),x=u(5),l=u(6),t=u(8),
47
+ c="undefined"===typeof window?self:window,m=c.importScripts,k=!1,h=function(a,b){k||(m(Object(t.a)("".concat(c.basePath,"decode.min.js"))),k=!0);a=Object(l.b)(a);a=self.BrotliDecode(a);return b?a:Object(l.a)(a)},f=function(a,b){return Object(q.b)(void 0,void 0,Promise,function(){var d;return Object(q.c)(this,function(p){switch(p.label){case 0:return k?[3,2]:[4,Object(x.a)("".concat(self.Core.getWorkerPath(),"external/decode.min.js"),"Failed to download decode.min.js",window)];case 1:p.sent(),k=!0,
48
+ p.label=2;case 2:return d=self.BrotliDecode(Object(l.b)(a)),[2,b?d:Object(l.a)(d)]}})})};(function(){function a(){this.remainingDataArrays=[]}a.prototype.processRaw=function(b){return b};a.prototype.processBrotli=function(b){this.remainingDataArrays.push(b);return null};a.prototype.GetNextChunk=function(b){this.decodeFunction||(this.decodeFunction=0===b[0]&&97===b[1]&&115===b[2]&&109===b[3]?this.processRaw:this.processBrotli);return this.decodeFunction(b)};a.prototype.End=function(){if(this.remainingDataArrays.length){for(var b=
49
+ this.arrays,d=0,p=0;p<b.length;++p)d+=b[p].length;d=new Uint8Array(d);var g=0;for(p=0;p<b.length;++p){var z=b[p];d.set(z,g);g+=z.length}return h(d,!0)}return null};return a})();var r=function(a,b,d){void 0===b&&(b=!0);void 0===d&&(d=!1);var p=new XMLHttpRequest;p.open("GET",a,b);a=d&&p.overrideMimeType;p.responseType=a?"text":"arraybuffer";a&&p.overrideMimeType("text/plain; charset=x-user-defined");return p},A=function(a,b,d){return new Promise(function(p,g){var z=r(a,b,d);z.send();z.onload=function(){200===
50
+ this.status||0===this.status?p(z.response):g(Error("Download Failed ".concat(a)))};z.onerror=function(){g(Error("Network error occurred ".concat(a)))}})},e=function(a,b){var d=b.decompressFunction,p=b.shouldOutputArray,g=b.compressedMaximum,z="undefined"!==typeof m?Date.now():null;try{var y=p?w(a):a.join("");Object(n.a)("worker","Result length is ".concat(y.length));if(y.length<g){var E=d(y,p);Object(n.e)("There may be some degradation of performance. Your server has not been configured to serve .gz. and .br. files with the expected Content-Encoding. See https://docs.apryse.com/documentation/web/faq/content-encoding/ for instructions on how to resolve this.");
51
+ m&&Object(n.a)("worker","Decompressed length is ".concat(E.length));y=E}else p||(y=Object(l.a)(y));if(m){var K=b.paths.join(", ");Object(n.a)("worker","".concat(K," Decompression took ").concat(Date.now()-z," ms"))}return y}catch(N){throw Error("Failed to decompress: ".concat(N));}},w=function(a){a=a.reduce(function(b,d){d=new Uint8Array(d);return b.concat(Array.from(d))},[]);return new Uint8Array(a)},F=function(a){var b=!a.shouldOutputArray,d=a.paths,p=a.isAsync;p?d=Promise.all(d.map(function(g){return A(g,
52
+ p,b)})).then(function(g){return e(g,a)}).catch(function(g){throw Error("Failed to fetch or decompress files: ".concat(g.message));}):(d=d.map(function(g){var z=r(g,p,b);z.send();if(200===z.status||0===z.status)return z.response;throw Error("Failed to load ".concat(g));}),d=e(d,a));return d},D=function(a){var b=a.lastIndexOf("/");-1===b&&(b=0);var d=a.slice(b).replace(".",".br.");m||(d.endsWith(".js.mem")?d=d.replace(".js.mem",".mem"):d.endsWith(".js")&&(d=d.concat(".mem")));return a.slice(0,b)+d},
53
+ I=function(a){return a.map(function(b){return D(b)})},L=function(a,b){b.decompressFunction=m?h:f;b.paths=I(a);return F(b)},G=function(a,b,d,p){return a.catch(function(g){Object(n.e)(g);return p(b,d)})},H=function(a,b,d,p){a=Array.isArray(a)?a:[a];a:{var g=[L];b={compressedMaximum:b,isAsync:d,shouldOutputArray:p};if(b.isAsync){var z=g[0](a,b);for(d=1;d<g.length;++d)z=G(z,a,b,g[d])}else{for(d=0;d<g.length;d++){p=g[d];try{z=p(a,b);break a}catch(y){Object(n.e)(y.message)}}throw Error("None of the worker files were able to load. ");
54
+ }}return z}},function(v,B,u){function q(l,t,c,m){function k(h){return h instanceof c?h:new c(function(f){f(h)})}return new (c||(c=Promise))(function(h,f){function r(w){try{e(m.next(w))}catch(F){f(F)}}function A(w){try{e(m["throw"](w))}catch(F){f(F)}}function e(w){w.done?h(w.value):k(w.value).then(r,A)}e((m=m.apply(l,t||[])).next())})}function n(l,t){function c(e){return function(w){return m([e,w])}}function m(e){if(h)throw new TypeError("Generator is already executing.");for(;A&&(A=0,e[0]&&(k=0)),
55
+ k;)try{if(h=1,f&&(r=e[0]&2?f["return"]:e[0]?f["throw"]||((r=f["return"])&&r.call(f),0):f.next)&&!(r=r.call(f,e[1])).done)return r;if(f=0,r)e=[e[0]&2,r.value];switch(e[0]){case 0:case 1:r=e;break;case 4:return k.label++,{value:e[1],done:!1};case 5:k.label++;f=e[1];e=[0];continue;case 7:e=k.ops.pop();k.trys.pop();continue;default:if(!(r=k.trys,r=0<r.length&&r[r.length-1])&&(6===e[0]||2===e[0])){k=0;continue}if(3===e[0]&&(!r||e[1]>r[0]&&e[1]<r[3]))k.label=e[1];else if(6===e[0]&&k.label<r[1])k.label=
56
+ r[1],r=e;else if(r&&k.label<r[2])k.label=r[2],k.ops.push(e);else{r[2]&&k.ops.pop();k.trys.pop();continue}}e=t.call(l,k)}catch(w){e=[6,w],f=0}finally{h=r=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var k={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},h,f,r,A=Object.create(("function"===typeof Iterator?Iterator:Object).prototype);return A.next=c(0),A["throw"]=c(1),A["return"]=c(2),"function"===typeof Symbol&&(A[Symbol.iterator]=function(){return this}),
57
+ A}u.d(B,"a",function(){return x});u.d(B,"b",function(){return q});u.d(B,"c",function(){return n});var x=function(){x=Object.assign||function(l){for(var t,c=1,m=arguments.length;c<m;c++){t=arguments[c];for(var k in t)Object.prototype.hasOwnProperty.call(t,k)&&(l[k]=t[k])}return l};return x.apply(this,arguments)}},function(v,B,u){function q(l,t,c){return new Promise(function(m){if(!l)return m();var k=c.document.createElement("script");k.type="text/javascript";k.onload=function(){m()};k.onerror=function(){t&&
58
+ Object(x.e)(t);m()};k.src=l;c.document.getElementsByTagName("head")[0].appendChild(k)})}function n(l,t,c,m,k,h,f){f=f||0;var r=t[h],A=k.length;m=l.length>=m&&!r;A!==c||k.buffer.byteLength!==A?(m?(l=l.shift(),r=t[l],r.length<c&&(r=new Int8Array(c)),t[l]=null):r=r?t[h]:new Int8Array(c),r.subarray(f,f+A).set(k),k=r):m&&(l=l.shift(),t[l]=null);t[h]=k}u.d(B,"a",function(){return q});u.d(B,"b",function(){return n});var x=u(0)},function(v,B,u){u.d(B,"b",function(){return q});u.d(B,"a",function(){return n});
59
+ var q=function(x){if("string"===typeof x){for(var l=new Uint8Array(x.length),t=x.length,c=0;c<t;c++)l[c]=x.charCodeAt(c);return l}return x},n=function(x){if("string"!==typeof x){for(var l="",t=0,c=x.length,m;t<c;)m=x.subarray(t,t+1024),t+=1024,l+=String.fromCharCode.apply(null,m);return l}return x}},function(v,B,u){u.d(B,"a",function(){return A});var q,n="undefined"===typeof window?self:window;v=function(){var e=navigator.userAgent.toLowerCase();return(e=/(msie) ([\w.]+)/.exec(e)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(e))?
60
+ parseInt(e[2],10):e}();var x=function(){var e=n.navigator.userAgent.match(/OPR/),w=n.navigator.userAgent.match(/Maxthon/),F=n.navigator.userAgent.match(/Edge/);return n.navigator.userAgent.match(/Chrome\/(.*?) /)&&!e&&!w&&!F}();(function(){if(!x)return null;var e=n.navigator.userAgent.match(/Chrome\/([0-9]+)\./);return e?parseInt(e[1],10):e})();var l=!!navigator.userAgent.match(/Edge/i)||navigator.userAgent.match(/Edg\/(.*?)/)&&n.navigator.userAgent.match(/Chrome\/(.*?) /);(function(){if(!l)return null;
61
+ var e=n.navigator.userAgent.match(/Edg\/([0-9]+)\./);return e?parseInt(e[1],10):e})();B=/iPad|iPhone|iPod/.test(n.navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints||/iPad|iPhone|iPod/.test(n.navigator.userAgent);var t=function(){var e=n.navigator.userAgent.match(/.*\/([0-9\.]+)\s(Safari|Mobile).*/i);return e?parseFloat(e[1]):e}(),c=/^((?!chrome|android).)*safari/i.test(n.navigator.userAgent)||/^((?!chrome|android).)*$/.test(n.navigator.userAgent)&&B;c&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&
62
+ parseInt(null===(q=navigator.userAgent.match(/Version\/(\d+)/))||void 0===q?void 0:q[1],10);var m=n.navigator.userAgent.match(/Firefox/);(function(){if(!m)return null;var e=n.navigator.userAgent.match(/Firefox\/([0-9]+)\./);return e?parseInt(e[1],10):e})();v||/Android|webOS|Touch|IEMobile|Silk/i.test(navigator.userAgent);navigator.userAgent.match(/(iPad|iPhone|iPod)/i);n.navigator.userAgent.indexOf("Android");var k=/Mac OS X 10_13_6.*\(KHTML, like Gecko\)$/.test(n.navigator.userAgent),h=n.navigator.userAgent.match(/(iPad|iPhone).+\sOS\s((\d+)(_\d)*)/i)?
63
+ 14<=parseInt(n.navigator.userAgent.match(/(iPad|iPhone).+\sOS\s((\d+)(_\d)*)/i)[3],10):!1,f=!(!self.WebAssembly||!self.WebAssembly.validate),r=-1<n.navigator.userAgent.indexOf("Edge/16")||-1<n.navigator.userAgent.indexOf("MSAppHost"),A=function(){var e;if(e=f&&!r)e=c&&null!==t&&14>t,e=!(!h&&(e||k));return e}},function(v,B,u){u.d(B,"a",function(){return k});var q=u(4);v=u(13);var n=u.n(v),x=new Map,l=function(){return("undefined"===typeof window?self:window).trustedTypes},t=function(h,f){return l().createPolicy(h,
64
+ {createHTML:function(r){return n.a.sanitize(r,Object(q.a)(Object(q.a)({},f),{RETURN_TRUSTED_TYPE:!1}))},createScript:function(r){return r},createScriptURL:function(r){return r}})},c=function(h){return l().createPolicy(h,{createHTML:function(f){return f},createScript:function(f){return f},createScriptURL:function(f){return f}})},m=function(h,f){var r,A={createHTML:function(e){return n.a.sanitize(e,Object(q.a)({},f))},createScript:function(e){return e},createScriptURL:function(e){return e}};if(null===
65
+ (r=l())||void 0===r?0:r.createPolicy)r="".concat(h,"-po"),x.has(h)||(A=c(r),x.set(r,A),A=t(h,f),x.set(h,A)),A=x.get(f.createPolicyOnly?r:h);return A},k=function(h,f){void 0===f&&(f={createPolicyOnly:!0,trustedTypesPolicyName:"webviewer"});return m(f.trustedTypesPolicyName,f).createScriptURL(h.toString())}},function(v,B,u){function q(t){"@babel/helpers - typeof";return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(c){return typeof c}:function(c){return c&&"function"==typeof Symbol&&
66
+ c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},q(t)}var n,x,l;!function(t){"object"===q(B)&&"undefined"!==typeof v?v.exports=t():!(x=[],n=t,l="function"===typeof n?n.apply(B,x):n,void 0!==l&&(v.exports=l))}(function(){return function h(c,m,k){function f(e,w){if(!m[e]){if(!c[e]){if(r)return r(e,!0);w=Error("Cannot find module '".concat(e,"'"));throw w.code="MODULE_NOT_FOUND",w;}w=m[e]={exports:{}};c[e][0].call(w.exports,function(F){return f(c[e][1][F]||F)},w,w.exports,h,c,m,k)}return m[e].exports}
67
+ for(var r=!1,A=0;A<k.length;A++)f(k[A]);return f}({1:[function(c,m,k){var h={}.hasOwnProperty,f=function(r,A){function e(){this.constructor=r}for(var w in A)h.call(A,w)&&(r[w]=A[w]);e.prototype=A.prototype;r.prototype=new e;r.__super__=A.prototype;return r};k=c("./PriorityQueue/AbstractPriorityQueue");c=c("./PriorityQueue/ArrayStrategy");k=function(r){function A(e){e||(e={});e.strategy||(e.strategy=BinaryHeapStrategy);e.comparator||(e.comparator=function(w,F){return(w||0)-(F||0)});A.__super__.constructor.call(this,
68
+ e)}f(A,r);return A}(k);k.ArrayStrategy=c;m.exports=k},{"./PriorityQueue/AbstractPriorityQueue":2,"./PriorityQueue/ArrayStrategy":3}],2:[function(c,m,k){m.exports=function(){function h(f){if(null==(null!=f?f.strategy:void 0))throw"Must pass options.strategy, a strategy";if(null==(null!=f?f.comparator:void 0))throw"Must pass options.comparator, a comparator";this.priv=new f.strategy(f);this.length=0}h.prototype.queue=function(f){this.length++;this.priv.queue(f)};h.prototype.dequeue=function(f){if(!this.length)throw"Empty queue";
69
+ this.length--;return this.priv.dequeue()};h.prototype.peek=function(f){if(!this.length)throw"Empty queue";return this.priv.peek()};h.prototype.remove=function(f){this.priv.remove(f)&&--this.length};h.prototype.find=function(f){return 0<=this.priv.find(f)};h.prototype.removeAllMatching=function(f,r){f=this.priv.removeAllMatching(f,r);this.length-=f};return h}()},{}],3:[function(c,m,k){var h=function(f,r,A){var e;var w=0;for(e=f.length;w<e;){var F=w+e>>>1;0<=A(f[F],r)?w=F+1:e=F}return w};m.exports=
70
+ function(){function f(r){var A;this.options=r;this.comparator=this.options.comparator;this.data=(null!=(A=this.options.initialValues)?A.slice(0):void 0)||[];this.data.sort(this.comparator).reverse()}f.prototype.queue=function(r){var A=h(this.data,r,this.comparator);this.data.splice(A,0,r)};f.prototype.dequeue=function(){return this.data.pop()};f.prototype.peek=function(){return this.data[this.data.length-1]};f.prototype.find=function(r){var A=h(this.data,r,this.comparator)-1;return 0<=A&&!this.comparator(this.data[A],
71
+ r)?A:-1};f.prototype.remove=function(r){r=this.find(r);return 0<=r?(this.data.splice(r,1),!0):!1};f.prototype.removeAllMatching=function(r,A){for(var e=0,w=this.data.length-1;0<=w;--w)if(r(this.data[w])){var F=this.data.splice(w,1)[0];A&&A(F);++e}return e};return f}()},{}]},{},[1])(1)})},function(v,B,u){(function(q){function n(t,c){this._id=t;this._clearFn=c}var x="undefined"!==typeof q&&q||"undefined"!==typeof self&&self||window,l=Function.prototype.apply;B.setTimeout=function(){return new n(l.call(setTimeout,
72
+ x,arguments),clearTimeout)};B.setInterval=function(){return new n(l.call(setInterval,x,arguments),clearInterval)};B.clearTimeout=B.clearInterval=function(t){t&&t.close()};n.prototype.unref=n.prototype.ref=function(){};n.prototype.close=function(){this._clearFn.call(x,this._id)};B.enroll=function(t,c){clearTimeout(t._idleTimeoutId);t._idleTimeout=c};B.unenroll=function(t){clearTimeout(t._idleTimeoutId);t._idleTimeout=-1};B._unrefActive=B.active=function(t){clearTimeout(t._idleTimeoutId);var c=t._idleTimeout;
73
+ 0<=c&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},c))};u(25);B.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof q&&q.setImmediate||this&&this.setImmediate;B.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof q&&q.clearImmediate||this&&this.clearImmediate}).call(this,u(12))},function(v,B,u){function q(c,m,k,h){return n(c,m,k,h,!!WebAssembly.instantiateStreaming,void 0,void 0).then(function(f){Object(x.a)("load",
74
+ "WASM compilation took ".concat(Date.now()-NaN," ms"));return f})}function n(c,m,k,h,f,r,A){r=r||Date.now();if(f&&!h)return Object(x.a)("load","Try instantiateStreaming"),fetch(Object(l.a)(c)).then(function(e){return WebAssembly.instantiateStreaming(e,m)}).catch(function(e){Object(x.a)("load","instantiateStreaming Failed ".concat(c," message ").concat(e.message));return n(c,m,k,h,!1,r,A)});f=h?h.map(function(e,w){return"".concat(e,"PDFNetCWasm-chunk-").concat(w,".wasm")}):c;return Object(l.b)(f,k,
75
+ !0,!0).then(function(e){A=Date.now();Object(x.a)("load","Request took ".concat(A-r," ms"));return WebAssembly.instantiate(e,m)})}u.d(B,"a",function(){return q});var x=u(0),l=u(3),t=u(5);u.d(B,"b",function(){return t.a})},function(v,B){B=function(){return this}();try{B=B||(new Function("return this"))()}catch(u){"object"===typeof window&&(B=window)}v.exports=B},function(v,B,u){(function(q,n){v.exports=n()})(this,function(){function q(T){return function(O){O instanceof RegExp&&(O.lastIndex=0);for(var S=
76
+ arguments.length,U=Array(1<S?S-1:0),W=1;W<S;W++)U[W-1]=arguments[W];return F(T,O,U)}}function n(T,O){var S=2<arguments.length&&void 0!==arguments[2]?arguments[2]:b;k&&k(T,null);for(var U=O.length;U--;){var W=O[U];if("string"===typeof W){var na=S(W);na!==W&&(h(O)||(O[U]=na),W=na)}T[W]=!0}return T}function x(T){for(var O=w(null),S=$jscomp.makeIterator(m(T)),U=S.next();!U.done;U=S.next()){var W=$jscomp.makeIterator(U.value);U=W.next().value;W=W.next().value;if(E(T,U))if(Array.isArray(W)){for(var na=
77
+ 0;na<W.length;na++)E(W,na)||(W[na]=null);O[U]=W}else O[U]=W&&"object"===typeof W&&W.constructor===Object?x(W):W}return O}function l(T,O){for(;null!==T;){var S=r(T,O);if(S){if(S.get)return q(S.get);if("function"===typeof S.value)return q(S.value)}T=f(T)}return function(){return null}}function t(){function T(C,J,M){I(C,function(P){P.call(S,J,M,ua)})}var O=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"undefined"===typeof window?null:window,S=function(C){return t(C)};S.version="3.2.6";S.removed=
78
78
  [];if(!O||!O.document||O.document.nodeType!==Ba.document||!O.Element)return S.isSupported=!1,S;var U=O.document,W=U,na=W.currentScript,lb=O.DocumentFragment,aa=O.HTMLTemplateElement,Ua=O.Node,mb=O.Element,Ca=O.NodeFilter,Ob=void 0===O.NamedNodeMap?O.NamedNodeMap||O.MozNamedAttrMap:O.NamedNodeMap,Pb=O.HTMLFormElement,Qb=O.DOMParser,Ja=O.trustedTypes;O=mb.prototype;var Rb=l(O,"cloneNode"),Sb=l(O,"remove"),Tb=l(O,"nextSibling"),Ub=l(O,"childNodes"),Ka=l(O,"parentNode");"function"===typeof aa&&(aa=U.createElement("template"),
79
79
  aa.content&&aa.content.ownerDocument&&(U=aa.content.ownerDocument));var fa,Da="";aa=U;var Va=aa.implementation,Vb=aa.createNodeIterator,Wb=aa.createDocumentFragment,Xb=aa.getElementsByTagName,Yb=W.importNode,ha=nb();S.isSupported="function"===typeof m&&"function"===typeof Ka&&Va&&void 0!==Va.createHTMLDocument;aa=ob;var Wa=aa.MUSTACHE_EXPR,Xa=aa.ERB_EXPR,Ya=aa.TMPLIT_EXPR,Zb=aa.DATA_ATTR,$b=aa.ARIA_ATTR,ac=aa.IS_SCRIPT_OR_DATA,pb=aa.ATTR_WHITESPACE,qb=aa.CUSTOM_ELEMENT,rb=ob.IS_ALLOWED_URI,ca=null,
80
- sb=n({},[].concat($jscomp.arrayFromIterable(Q),$jscomp.arrayFromIterable(V),$jscomp.arrayFromIterable(X),$jscomp.arrayFromIterable(ma),$jscomp.arrayFromIterable(ka))),ea=null,tb=n({},[].concat($jscomp.arrayFromIterable(qa),$jscomp.arrayFromIterable(oa),$jscomp.arrayFromIterable(ra),$jscomp.arrayFromIterable(Y))),Z=Object.seal(x(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,
80
+ sb=n({},[].concat($jscomp.arrayFromIterable(Q),$jscomp.arrayFromIterable(V),$jscomp.arrayFromIterable(X),$jscomp.arrayFromIterable(ma),$jscomp.arrayFromIterable(ka))),ea=null,tb=n({},[].concat($jscomp.arrayFromIterable(qa),$jscomp.arrayFromIterable(oa),$jscomp.arrayFromIterable(ra),$jscomp.arrayFromIterable(Y))),Z=Object.seal(w(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,
81
81
  configurable:!1,enumerable:!0,value:!1}})),Ea=null,Za=null,ub=!0,$a=!0,vb=!1,wb=!0,va=!1,La=!0,sa=!1,ab=!1,bb=!1,wa=!1,Ma=!1,Na=!1,xb=!0,yb=!1,cb=!0,Fa=!1,xa={},ya=null,zb=n({},"annotation-xml audio colgroup desc foreignobject head iframe math mi mn mo ms mtext noembed noframes noscript plaintext script style svg template thead title video xmp".split(" ")),Ab=null,Bb=n({},"audio video img source image track".split(" ")),db=null,Cb=n({},"alt class for id label name pattern placeholder role summary title value style xmlns".split(" ")),
82
- za="http://www.w3.org/1999/xhtml",Db=!1,eb=null,bc=n({},["http://www.w3.org/1998/Math/MathML","http://www.w3.org/2000/svg","http://www.w3.org/1999/xhtml"],d),Oa=n({},["mi","mo","mn","ms","mtext"]),Pa=n({},["annotation-xml"]),cc=n({},["title","style","font","a","script"]),Ga=null,dc=["application/xhtml+xml","text/html"],da=null,ua=null,ec=U.createElement("form"),Eb=function(B){return B instanceof RegExp||B instanceof Function},fb=function(){var B=0<arguments.length&&void 0!==arguments[0]?arguments[0]:
83
- {};if(!ua||ua!==B){B&&"object"===typeof B||(B={});B=y(B);Ga=-1===dc.indexOf(B.PARSER_MEDIA_TYPE)?"text/html":B.PARSER_MEDIA_TYPE;da="application/xhtml+xml"===Ga?d:b;ca=E(B,"ALLOWED_TAGS")?n({},B.ALLOWED_TAGS,da):sb;ea=E(B,"ALLOWED_ATTR")?n({},B.ALLOWED_ATTR,da):tb;eb=E(B,"ALLOWED_NAMESPACES")?n({},B.ALLOWED_NAMESPACES,d):bc;db=E(B,"ADD_URI_SAFE_ATTR")?n(y(Cb),B.ADD_URI_SAFE_ATTR,da):Cb;Ab=E(B,"ADD_DATA_URI_TAGS")?n(y(Bb),B.ADD_DATA_URI_TAGS,da):Bb;ya=E(B,"FORBID_CONTENTS")?n({},B.FORBID_CONTENTS,
84
- da):zb;Ea=E(B,"FORBID_TAGS")?n({},B.FORBID_TAGS,da):y({});Za=E(B,"FORBID_ATTR")?n({},B.FORBID_ATTR,da):y({});xa=E(B,"USE_PROFILES")?B.USE_PROFILES:!1;ub=!1!==B.ALLOW_ARIA_ATTR;$a=!1!==B.ALLOW_DATA_ATTR;vb=B.ALLOW_UNKNOWN_PROTOCOLS||!1;wb=!1!==B.ALLOW_SELF_CLOSE_IN_ATTR;va=B.SAFE_FOR_TEMPLATES||!1;La=!1!==B.SAFE_FOR_XML;sa=B.WHOLE_DOCUMENT||!1;wa=B.RETURN_DOM||!1;Ma=B.RETURN_DOM_FRAGMENT||!1;Na=B.RETURN_TRUSTED_TYPE||!1;bb=B.FORCE_BODY||!1;xb=!1!==B.SANITIZE_DOM;yb=B.SANITIZE_NAMED_PROPS||!1;cb=!1!==
85
- B.KEEP_CONTENT;Fa=B.IN_PLACE||!1;rb=B.ALLOWED_URI_REGEXP||Qa;za=B.NAMESPACE||"http://www.w3.org/1999/xhtml";Oa=B.MATHML_TEXT_INTEGRATION_POINTS||Oa;Pa=B.HTML_INTEGRATION_POINTS||Pa;Z=B.CUSTOM_ELEMENT_HANDLING||{};B.CUSTOM_ELEMENT_HANDLING&&Eb(B.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Z.tagNameCheck=B.CUSTOM_ELEMENT_HANDLING.tagNameCheck);B.CUSTOM_ELEMENT_HANDLING&&Eb(B.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Z.attributeNameCheck=B.CUSTOM_ELEMENT_HANDLING.attributeNameCheck);B.CUSTOM_ELEMENT_HANDLING&&
86
- "boolean"===typeof B.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Z.allowCustomizedBuiltInElements=B.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements);va&&($a=!1);Ma&&(wa=!0);xa&&(ca=n({},ka),ea=[],!0===xa.html&&(n(ca,Q),n(ea,qa)),!0===xa.svg&&(n(ca,V),n(ea,oa),n(ea,Y)),!0===xa.svgFilters&&(n(ca,X),n(ea,oa),n(ea,Y)),!0===xa.mathMl&&(n(ca,ma),n(ea,ra),n(ea,Y)));B.ADD_TAGS&&(ca===sb&&(ca=y(ca)),n(ca,B.ADD_TAGS,da));B.ADD_ATTR&&(ea===tb&&(ea=y(ea)),n(ea,B.ADD_ATTR,da));B.ADD_URI_SAFE_ATTR&&
87
- n(db,B.ADD_URI_SAFE_ATTR,da);B.FORBID_CONTENTS&&(ya===zb&&(ya=y(ya)),n(ya,B.FORBID_CONTENTS,da));cb&&(ca["#text"]=!0);sa&&n(ca,["html","head","body"]);ca.table&&(n(ca,["tbody"]),delete Ea.tbody);if(B.TRUSTED_TYPES_POLICY){if("function"!==typeof B.TRUSTED_TYPES_POLICY.createHTML)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!==typeof B.TRUSTED_TYPES_POLICY.createScriptURL)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
88
- fa=B.TRUSTED_TYPES_POLICY;Da=fa.createHTML("")}else void 0===fa&&(fa=fc(Ja,na)),null!==fa&&"string"===typeof Da&&(Da=fa.createHTML(""));g&&g(B);ua=B}},Fb=n({},[].concat($jscomp.arrayFromIterable(V),$jscomp.arrayFromIterable(X),$jscomp.arrayFromIterable(ia))),Gb=n({},[].concat($jscomp.arrayFromIterable(ma),$jscomp.arrayFromIterable(la))),gc=function(B){var K=Ka(B);K&&K.tagName||(K={namespaceURI:za,tagName:"template"});var M=b(B.tagName),P=b(K.tagName);return eb[B.namespaceURI]?"http://www.w3.org/2000/svg"===
89
- B.namespaceURI?"http://www.w3.org/1999/xhtml"===K.namespaceURI?"svg"===M:"http://www.w3.org/1998/Math/MathML"===K.namespaceURI?"svg"===M&&("annotation-xml"===P||Oa[P]):!!Fb[M]:"http://www.w3.org/1998/Math/MathML"===B.namespaceURI?"http://www.w3.org/1999/xhtml"===K.namespaceURI?"math"===M:"http://www.w3.org/2000/svg"===K.namespaceURI?"math"===M&&Pa[P]:!!Gb[M]:"http://www.w3.org/1999/xhtml"===B.namespaceURI?"http://www.w3.org/2000/svg"===K.namespaceURI&&!Pa[P]||"http://www.w3.org/1998/Math/MathML"===
90
- K.namespaceURI&&!Oa[P]?!1:!Gb[M]&&(cc[M]||!Fb[M]):"application/xhtml+xml"===Ga&&eb[B.namespaceURI]?!0:!1:!1},pa=function(B){G(S.removed,{element:B});try{Ka(B).removeChild(B)}catch(K){Sb(B)}},Aa=function(B,K){try{G(S.removed,{attribute:K.getAttributeNode(B),from:K})}catch(M){G(S.removed,{attribute:null,from:K})}K.removeAttribute(B);if("is"===B)if(wa||Ma)try{pa(K)}catch(M){}else try{K.setAttribute(B,"")}catch(M){}},Hb=function(B){var K=null,M=null;bb?B="<remove></remove>"+B:M=(M=e(B,/^[\r\n\t ]+/))&&
91
- M[0];"application/xhtml+xml"===Ga&&"http://www.w3.org/1999/xhtml"===za&&(B='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+B+"</body></html>");var P=fa?fa.createHTML(B):B;if("http://www.w3.org/1999/xhtml"===za)try{K=(new Qb).parseFromString(P,Ga)}catch(R){}if(!K||!K.documentElement){K=Va.createDocument(za,"template",null);try{K.documentElement.innerHTML=Db?Da:P}catch(R){}}P=K.body||K.documentElement;B&&M&&P.insertBefore(U.createTextNode(M),P.childNodes[0]||null);return"http://www.w3.org/1999/xhtml"===
92
- za?Xb.call(K,sa?"html":"body")[0]:sa?K.documentElement:P},Ib=function(B){return Vb.call(B.ownerDocument||B,B,Ca.SHOW_ELEMENT|Ca.SHOW_COMMENT|Ca.SHOW_TEXT|Ca.SHOW_PROCESSING_INSTRUCTION|Ca.SHOW_CDATA_SECTION,null)},gb=function(B){return B instanceof Pb&&("string"!==typeof B.nodeName||"string"!==typeof B.textContent||"function"!==typeof B.removeChild||!(B.attributes instanceof Ob)||"function"!==typeof B.removeAttribute||"function"!==typeof B.setAttribute||"string"!==typeof B.namespaceURI||"function"!==
93
- typeof B.insertBefore||"function"!==typeof B.hasChildNodes)},Jb=function(B){return"function"===typeof Ua&&B instanceof Ua},Kb=function(B){var K=null;T(ha.beforeSanitizeElements,B,null);if(gb(B))return pa(B),!0;var M=da(B.nodeName);T(ha.uponSanitizeElement,B,{tagName:M,allowedTags:ca});if(La&&B.hasChildNodes()&&!Jb(B.firstElementChild)&&L(/<[/\w!]/g,B.innerHTML)&&L(/<[/\w!]/g,B.textContent)||B.nodeType===Ba.progressingInstruction||La&&B.nodeType===Ba.comment&&L(/<[/\w]/g,B.data))return pa(B),!0;if(!ca[M]||
94
- Ea[M]){if(!Ea[M]&&"annotation-xml"!==M&&e(M,qb)&&(Z.tagNameCheck instanceof RegExp&&L(Z.tagNameCheck,M)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(M)))return!1;if(cb&&!ya[M]){M=Ka(B)||B.parentNode;var P=Ub(B)||B.childNodes;if(P&&M)for(var R=P.length-1;0<=R;--R){var ba=Rb(P[R],!0);ba.__removalCount=(B.__removalCount||0)+1;M.insertBefore(ba,Tb(B))}}pa(B);return!0}if(B instanceof mb&&!gc(B)||("noscript"===M||"noembed"===M||"noframes"===M)&&L(/<\/no(script|embed|frames)/i,B.innerHTML))return pa(B),
95
- !0;va&&B.nodeType===Ba.text&&(K=B.textContent,H([Wa,Xa,Ya],function(ja){K=w(K,ja," ")}),B.textContent!==K&&(G(S.removed,{element:B.cloneNode()}),B.textContent=K));T(ha.afterSanitizeElements,B,null);return!1},Lb=function(B,K,M){if(xb&&("id"===K||"name"===K)&&(M in U||M in ec))return!1;if(!$a||Za[K]||!L(Zb,K))if(!ub||!L($b,K))if(!ea[K]||Za[K]){if(!("annotation-xml"!==B&&e(B,qb)&&(Z.tagNameCheck instanceof RegExp&&L(Z.tagNameCheck,B)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(B))&&(Z.attributeNameCheck instanceof
96
- RegExp&&L(Z.attributeNameCheck,K)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(K))||"is"===K&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&L(Z.tagNameCheck,M)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(M))))return!1}else if(!(db[K]||L(rb,w(M,pb,""))||("src"===K||"xlink:href"===K||"href"===K)&&"script"!==B&&0===C(M,"data:")&&Ab[B]||vb&&!L(ac,w(M,pb,"")))&&M)return!1;return!0},Nb=function(B){T(ha.beforeSanitizeAttributes,B,null);var K=B.attributes;
97
- if(K&&!gb(B)){for(var M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ea,forceKeepAttr:void 0},P=K.length,R={};P--;){var ba=K[P],ja=ba.name,hb=ba.namespaceURI,ib=ba.value;ba=da(ja);R.$jscomp$loop$prop$value$10="value"===ja?ib:z(ib);M.attrName=ba;M.attrValue=R.$jscomp$loop$prop$value$10;M.keepAttr=!0;M.forceKeepAttr=void 0;T(ha.uponSanitizeAttribute,B,M);R.$jscomp$loop$prop$value$10=M.attrValue;!yb||"id"!==ba&&"name"!==ba||(Aa(ja,B),R.$jscomp$loop$prop$value$10="user-content-"+R.$jscomp$loop$prop$value$10);
98
- if(La&&L(/((--!?|])>)|<\/(style|title)/i,R.$jscomp$loop$prop$value$10))Aa(ja,B);else if(!M.forceKeepAttr)if(M.keepAttr)if(!wb&&L(/\/>/i,R.$jscomp$loop$prop$value$10))Aa(ja,B);else{va&&H([Wa,Xa,Ya],function(jb){return function(hc){jb.$jscomp$loop$prop$value$10=w(jb.$jscomp$loop$prop$value$10,hc," ")}}(R));var Mb=da(B.nodeName);if(Lb(Mb,ba,R.$jscomp$loop$prop$value$10)){if(fa&&"object"===typeof Ja&&"function"===typeof Ja.getAttributeType&&!hb)switch(Ja.getAttributeType(Mb,ba)){case "TrustedHTML":R.$jscomp$loop$prop$value$10=
99
- fa.createHTML(R.$jscomp$loop$prop$value$10);break;case "TrustedScriptURL":R.$jscomp$loop$prop$value$10=fa.createScriptURL(R.$jscomp$loop$prop$value$10)}if(R.$jscomp$loop$prop$value$10!==ib)try{hb?B.setAttributeNS(hb,ja,R.$jscomp$loop$prop$value$10):B.setAttribute(ja,R.$jscomp$loop$prop$value$10),gb(B)?pa(B):J(S.removed)}catch(jb){Aa(ja,B)}}else Aa(ja,B)}else Aa(ja,B);R={$jscomp$loop$prop$value$10:R.$jscomp$loop$prop$value$10}}T(ha.afterSanitizeAttributes,B,null)}},ic=function M(K){var P,R=Ib(K);for(T(ha.beforeSanitizeShadowDOM,
100
- K,null);P=R.nextNode();)T(ha.uponSanitizeShadowNode,P,null),Kb(P),Nb(P),P.content instanceof lb&&M(P.content);T(ha.afterSanitizeShadowDOM,K,null)};S.sanitize=function(K){var M=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},P=null,R=null;R=R=null;(Db=!K)&&(K="\x3c!--\x3e");if("string"!==typeof K&&!Jb(K))if("function"===typeof K.toString){if(K=K.toString(),"string"!==typeof K)throw N("dirty is not a string, aborting");}else throw N("toString is not a function");if(!S.isSupported)return K;
101
- ab||fb(M);S.removed=[];"string"===typeof K&&(Fa=!1);if(Fa){if(K.nodeName&&(M=da(K.nodeName),!ca[M]||Ea[M]))throw N("root node is forbidden and cannot be sanitized in-place");}else if(K instanceof Ua)P=Hb("\x3c!----\x3e"),R=P.ownerDocument.importNode(K,!0),R.nodeType===Ba.element&&"BODY"===R.nodeName?P=R:"HTML"===R.nodeName?P=R:P.appendChild(R);else{if(!wa&&!va&&!sa&&-1===K.indexOf("<"))return fa&&Na?fa.createHTML(K):K;P=Hb(K);if(!P)return wa?null:Na?Da:""}P&&bb&&pa(P.firstChild);for(M=Ib(Fa?K:P);R=
102
- M.nextNode();)Kb(R),Nb(R),R.content instanceof lb&&ic(R.content);if(Fa)return K;if(wa){if(Ma)for(R=Wb.call(P.ownerDocument);P.firstChild;)R.appendChild(P.firstChild);else R=P;if(ea.shadowroot||ea.shadowrootmode)R=Yb.call(W,R,!0);return R}var ba=sa?P.outerHTML:P.innerHTML;sa&&ca["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&L(Ra,P.ownerDocument.doctype.name)&&(ba="<!DOCTYPE "+P.ownerDocument.doctype.name+">\n"+ba);va&&H([Wa,Xa,Ya],function(ja){ba=w(ba,ja," ")});
103
- return fa&&Na?fa.createHTML(ba):ba};S.setConfig=function(){fb(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});ab=!0};S.clearConfig=function(){ua=null;ab=!1};S.isValidAttribute=function(K,M,P){ua||fb({});K=da(K);M=da(M);return Lb(K,M,P)};S.addHook=function(K,M){"function"===typeof M&&G(ha[K],M)};S.removeHook=function(K,M){return void 0!==M?(M=I(ha[K],M),-1===M?void 0:a(ha[K],M,1)[0]):J(ha[K])};S.removeHooks=function(K){ha[K]=[]};S.removeAllHooks=function(){ha=nb()};return S}var c=Object,
104
- m=c.entries,f=c.setPrototypeOf,k=c.isFrozen,h=c.getPrototypeOf,r=c.getOwnPropertyDescriptor,q=Object,g=q.freeze;c=q.seal;var x=q.create;q="undefined"!==typeof Reflect&&Reflect;var F=q.apply,D=q.construct;g||(g=function(T){return T});c||(c=function(T){return T});F||(F=function(T,O,S){return T.apply(O,S)});D||(D=function(T,O){return new (Function.prototype.bind.apply(T,[null].concat($jscomp.arrayFromIterable(O))))});var H=p(Array.prototype.forEach),I=p(Array.prototype.lastIndexOf),J=p(Array.prototype.pop),
105
- G=p(Array.prototype.push),a=p(Array.prototype.splice),b=p(String.prototype.toLowerCase),d=p(String.prototype.toString),e=p(String.prototype.match),w=p(String.prototype.replace),C=p(String.prototype.indexOf),z=p(String.prototype.trim),E=p(Object.prototype.hasOwnProperty),L=p(RegExp.prototype.test),N=function(T){return function(){for(var O=arguments.length,S=Array(O),U=0;U<O;U++)S[U]=arguments[U];return D(T,S)}}(TypeError),Q=g("a abbr acronym address area article aside audio b bdi bdo big blink blockquote body br button canvas caption center cite code col colgroup content data datalist dd decorator del details dfn dialog dir div dl dt element em fieldset figcaption figure font footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i img input ins kbd label legend li main map mark marquee menu menuitem meter nav nobr ol optgroup option output p picture pre progress q rp rt ruby s samp section select shadow small source spacer span strike strong style sub summary sup table tbody td template textarea tfoot th thead time tr track tt u ul var video wbr".split(" ")),
106
- V=g("svg a altglyph altglyphdef altglyphitem animatecolor animatemotion animatetransform circle clippath defs desc ellipse filter font g glyph glyphref hkern image line lineargradient marker mask metadata mpath path pattern polygon polyline radialgradient rect stop style switch symbol text textpath title tref tspan view vkern".split(" ")),X=g("feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence".split(" ")),
107
- ia=g("animate color-profile cursor discard font-face font-face-format font-face-name font-face-src font-face-uri foreignobject hatch hatchpath mesh meshgradient meshpatch meshrow missing-glyph script set solidcolor unknown use".split(" ")),ma=g("math menclose merror mfenced mfrac mglyph mi mlabeledtr mmultiscripts mn mo mover mpadded mphantom mroot mrow ms mspace msqrt mstyle msub msup msubsup mtable mtd mtext mtr munder munderover mprescripts".split(" ")),la=g("maction maligngroup malignmark mlongdiv mscarries mscarry msgroup mstack msline msrow semantics annotation annotation-xml mprescripts none".split(" ")),
108
- ka=g(["#text"]),qa=g("accept action align alt autocapitalize autocomplete autopictureinpicture autoplay background bgcolor border capture cellpadding cellspacing checked cite class clear color cols colspan controls controlslist coords crossorigin datetime decoding default dir disabled disablepictureinpicture disableremoteplayback download draggable enctype enterkeyhint face for headers height hidden high href hreflang id inputmode integrity ismap kind label lang list loading loop low max maxlength media method min minlength multiple muted name nonce noshade novalidate nowrap open optimum pattern placeholder playsinline popover popovertarget popovertargetaction poster preload pubdate radiogroup readonly rel required rev reversed role rows rowspan spellcheck scope selected shape size sizes span srclang start src srcset step style summary tabindex title translate type usemap valign value width wrap xmlns slot".split(" ")),
109
- oa=g("accent-height accumulate additive alignment-baseline amplitude ascent attributename attributetype azimuth basefrequency baseline-shift begin bias by class clip clippathunits clip-path clip-rule color color-interpolation color-interpolation-filters color-profile color-rendering cx cy d dx dy diffuseconstant direction display divisor dur edgemode elevation end exponent fill fill-opacity fill-rule filter filterunits flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight fx fy g1 g2 glyph-name glyphref gradientunits gradienttransform height href id image-rendering in in2 intercept k k1 k2 k3 k4 kerning keypoints keysplines keytimes lang lengthadjust letter-spacing kernelmatrix kernelunitlength lighting-color local marker-end marker-mid marker-start markerheight markerunits markerwidth maskcontentunits maskunits max mask media method mode min name numoctaves offset operator opacity order orient orientation origin overflow paint-order path pathlength patterncontentunits patterntransform patternunits points preservealpha preserveaspectratio primitiveunits r rx ry radius refx refy repeatcount repeatdur restart result rotate scale seed shape-rendering slope specularconstant specularexponent spreadmethod startoffset stddeviation stitchtiles stop-color stop-opacity stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke stroke-width style surfacescale systemlanguage tabindex tablevalues targetx targety transform transform-origin text-anchor text-decoration text-rendering textlength type u1 u2 unicode values viewbox visibility version vert-adv-y vert-origin-x vert-origin-y width word-spacing wrap writing-mode xchannelselector ychannelselector x x1 x2 xmlns y y1 y2 z zoomandpan".split(" ")),
110
- ra=g("accent accentunder align bevelled close columnsalign columnlines columnspan denomalign depth dir display displaystyle encoding fence frame height href id largeop length linethickness lspace lquote mathbackground mathcolor mathsize mathvariant maxsize minsize movablelimits notation numalign open rowalign rowlines rowspacing rowspan rspace rquote scriptlevel scriptminsize scriptsizemultiplier selection separator separators stretchy subscriptshift supscriptshift symmetric voffset width xmlns".split(" ")),
111
- Y=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]);q=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm);var Ha=c(/<%[\w\W]*|[\w\W]*%>/gm),Sa=c(/\$\{[\w\W]*/gm),kb=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ta=c(/^aria-[\-\w]+$/),Qa=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ia=c(/^(?:\w+script|data):/i),ta=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ra=c(/^html$/i);c=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var ob=Object.freeze({__proto__:null,
112
- ARIA_ATTR:Ta,ATTR_WHITESPACE:ta,CUSTOM_ELEMENT:c,DATA_ATTR:kb,DOCTYPE_NAME:Ra,ERB_EXPR:Ha,IS_ALLOWED_URI:Qa,IS_SCRIPT_OR_DATA:Ia,MUSTACHE_EXPR:q,TMPLIT_EXPR:Sa}),Ba={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},fc=function(T,O){if("object"!==typeof T||"function"!==typeof T.createPolicy)return null;var S=null;O&&O.hasAttribute("data-tt-policy-suffix")&&(S=O.getAttribute("data-tt-policy-suffix"));
113
- O="dompurify"+(S?"#"+S:"");try{return T.createPolicy(O,{createHTML:function(U){return U},createScriptURL:function(U){return U}})}catch(U){return console.warn("TrustedTypes policy "+O+" could not be created."),null}},nb=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};return t()})},function(v,A){function u(){throw Error("setTimeout has not been defined");
114
- }function p(){throw Error("clearTimeout has not been defined");}function n(x){if(f===setTimeout)return setTimeout(x,0);if((f===u||!f)&&setTimeout)return f=setTimeout,setTimeout(x,0);try{return f(x,0)}catch(F){try{return f.call(null,x,0)}catch(D){return f.call(this,x,0)}}}function y(x){if(k===clearTimeout)return clearTimeout(x);if((k===p||!k)&&clearTimeout)return k=clearTimeout,clearTimeout(x);try{return k(x)}catch(F){try{return k.call(null,x)}catch(D){return k.call(this,x)}}}function l(){r&&q&&(r=
115
- !1,q.length?h=q.concat(h):g=-1,h.length&&t())}function t(){if(!r){var x=n(l);r=!0;for(var F=h.length;F;){q=h;for(h=[];++g<F;)q&&q[g].run();g=-1;F=h.length}q=null;r=!1;y(x)}}function c(x,F){this.fun=x;this.array=F}function m(){}v=v.exports={};try{var f="function"===typeof setTimeout?setTimeout:u}catch(x){f=u}try{var k="function"===typeof clearTimeout?clearTimeout:p}catch(x){k=p}var h=[],r=!1,q,g=-1;v.nextTick=function(x){var F=Array(arguments.length-1);if(1<arguments.length)for(var D=1;D<arguments.length;D++)F[D-
116
- 1]=arguments[D];h.push(new c(x,F));1!==h.length||r||n(t)};c.prototype.run=function(){this.fun.apply(null,this.array)};v.title="browser";v.browser=!0;v.env={};v.argv=[];v.version="";v.versions={};v.on=m;v.addListener=m;v.once=m;v.off=m;v.removeListener=m;v.removeAllListeners=m;v.emit=m;v.prependListener=m;v.prependOnceListener=m;v.listeners=function(x){return[]};v.binding=function(x){throw Error("process.binding is not supported");};v.cwd=function(){return"/"};v.chdir=function(x){throw Error("process.chdir is not supported");
117
- };v.umask=function(){return 0}},function(v,A,u){A.a=function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(p,n){void 0===p&&(p=0);void 0===n&&(n=this.byteLength);p=Math.floor(p);n=Math.floor(n);0>p&&(p+=this.byteLength);0>n&&(n+=this.byteLength);p=Math.min(Math.max(0,p),this.byteLength);n=Math.min(Math.max(0,n),this.byteLength);if(0>=n-p)return new ArrayBuffer(0);var y=new ArrayBuffer(n-p),l=new Uint8Array(y);p=new Uint8Array(this,p,n-p);l.set(p);return y})}},function(v,A,u){A.a=
118
- function(p){var n={};decodeURIComponent(p.slice(1)).split("&").forEach(function(y){y=y.split("=",2);n[y[0]]=y[1]});return n}},function(v,A,u){(function(p){function n(H){"function"!==typeof H&&(H=new Function("".concat(H)));for(var I=Array(arguments.length-1),J=0;J<I.length;J++)I[J]=arguments[J+1];q[r]={callback:H,args:I};F(r);return r++}function y(H){delete q[H]}function l(H){if(g)setTimeout(l,0,H);else{var I=q[H];if(I){g=!0;try{var J=I.callback,G=I.args;switch(G.length){case 0:J();break;case 1:J(G[0]);
119
- break;case 2:J(G[0],G[1]);break;case 3:J(G[0],G[1],G[2]);break;default:J.apply(void 0,G)}}finally{y(H),g=!1}}}}function t(){F=function(H){p.nextTick(function(){l(H)})}}function c(){if(h.postMessage&&!h.importScripts){var H=!0,I=h.onmessage;h.onmessage=function(){H=!1};h.postMessage("","*");h.onmessage=I;return H}}function m(){var H="setImmediate$".concat(Math.random(),"$"),I=function(J){J.source!==h&&J.source!==h.parent||"string"!==typeof J.data||0!==J.data.indexOf(H)||l(+J.data.slice(H.length))};
120
- h.addEventListener?h.addEventListener("message",I,!1):h.attachEvent("onmessage",I);F=function(J){h.postMessage(H+J,"*")}}function f(){var H=x.documentElement;F=function(I){var J=x.createElement("script");J.onreadystatechange=function(){l(I);J.onreadystatechange=null;H.removeChild(J);J=null};H.appendChild(J)}}function k(){F=function(H){setTimeout(l,0,H)}}var h="undefined"===typeof window?self:window,r=1,q={},g=!1,x=h.document,F,D=Object.getPrototypeOf&&Object.getPrototypeOf(h);D=D&&D.setTimeout?D:
121
- h;"[object process]"==={}.toString.call(h.process)?t():c()?m():x&&"onreadystatechange"in x.createElement("script")?f():k();D.setImmediate=n;D.clearImmediate=y;A.a={setImmediate:n,clearImmediate:y}}).call(this,u(14))},function(v,A,u){var p=u(0),n=u(2);v=function(){function y(l,t){this.name=l;this.comObj=t;this.callbackIndex=1;this.postMessageTransfers=!0;this.callbacksCapabilities={};this.actionHandler={};this.actionHandlerAsync={};this.pdfnetCommandChain=this.nextAsync=null;this.pdfnetActiveCommands=
122
- new Set;this.isReset=!1;this.actionHandler.console_log=[function(c){Object(p.d)(c)}];this.actionHandler.console_error=[function(c){Object(p.c)(c)}];this.actionHandler.workerLoaded=[function(){}];this.msgHandler=this.handleMessage.bind(this);t.addEventListener("message",this.msgHandler)}y.prototype.on=function(l,t,c){var m=this.actionHandler;m[l]&&Object(p.c)('There is already an actionName called "'.concat(l,'"'));m[l]=[t,c]};y.prototype.clearActionHandlers=function(){this.actionHandler={};this.comObj.removeEventListener("message",
123
- this.msgHandler)};y.prototype.reset=function(){var l=this;this.isReset=!0;Object.keys(this.callbacksCapabilities).forEach(function(t){l.cancelPromise(parseInt(t,10))});this.clearActionHandlers();this.comObj.reset&&this.comObj.reset();this.comObj={};this.callbacksCapabilities={}};y.prototype.replace=function(l,t,c){this.actionHandler[l]=[t,c]};y.prototype.onAsync=function(l,t,c){var m=this.actionHandlerAsync;m[l]&&Object(p.c)('There is already an actionName called "'.concat(l,'"'));m[l]=[t,c]};y.prototype.replaceAsync=
124
- function(l,t,c){var m=this.actionHandlerAsync,f=this.actionHandler;f[l]&&delete f[l];m[l]=[t,c]};y.prototype.onNextAsync=function(l){this.nextAsync=l};y.prototype.send=function(l,t){this.postMessage({action:l,data:t})};y.prototype.getNextId=function(){return this.callbackIndex++};y.prototype.sendWithPromise=function(l,t,c){var m=this.getNextId();l={action:l,data:t,callbackId:m,priority:c};t=window.createPromiseCapability();if(!this.isReset){this.callbacksCapabilities[m]=t;try{this.postMessage(l)}catch(f){t.reject(f)}}return t.promise};
125
- y.prototype.sendWithPromiseReturnId=function(l,t,c){var m=this.getNextId();l={action:l,data:t,callbackId:m,priority:c};t=window.createPromiseCapability();if(!this.isReset){this.callbacksCapabilities[m]=t;try{this.postMessage(l)}catch(f){t.reject(f)}}return{promise:t.promise,callbackId:m}};y.prototype.sendWithPromiseWithId=function(l,t,c){t>this.callbackIndex&&Object(p.c)("Can't reuse callbackId ".concat(t," lesser than callbackIndex ").concat(this.callbackIndex));t in this.callbacksCapabilities&&
126
- Object(p.c)("Can't reuse callbackId ".concat(t,". There is a capability waiting to be resolved. "));l={action:l,data:c,callbackId:t};c=window.createPromiseCapability();if(!this.isReset){this.callbacksCapabilities[t]=c;try{this.postMessage(l)}catch(m){c.reject(m)}}return c.promise};y.prototype.sendError=function(l,t){if(l.message||l.errorData){l.message&&l.message.message&&(l.message=l.message.message);var c=l.errorData;l={type:l.type?l.type:"JavascriptError",message:l.message};c&&Object.keys(c).forEach(function(m){c.hasOwnProperty(m)&&
127
- (l[m]=c[m])})}this.postMessage({isReply:!0,callbackId:t,error:l})};y.prototype.getPromise=function(l){if(l in this.callbacksCapabilities)return this.callbacksCapabilities[l];Object(p.c)("Cannot get promise for callback ".concat(l))};y.prototype.cancelPromise=function(l){if(l in this.callbacksCapabilities){var t=this.callbacksCapabilities[l];delete this.callbacksCapabilities[l];this.pdfnetActiveCommands.has(l)&&this.pdfnetActiveCommands.delete(l);t.reject({type:"Cancelled",message:"Request has been cancelled."});
128
- this.postMessage({action:"actionCancel",data:{callbackId:l}})}else Object(p.b)("Cannot cancel callback ".concat(l))};y.prototype.postMessage=function(l){"officeeditor"!==this.name&&Object(n.a)("enableWorkerLogs")&&Object(p.d)("PDFWorker","".concat(performance.now()," Sent ").concat(JSON.stringify(l)));if(this.postMessageTransfers){var t=this.getTransfersArray(l);this.comObj.postMessage(l,t)}else this.comObj.postMessage(l)};y.prototype.getObjectTransfers=function(l,t){var c=this;null!==l&&"object"===
129
- typeof l&&(l instanceof Uint8Array?t.push(l.buffer):l instanceof ArrayBuffer?t.push(l):Object.keys(l).forEach(function(m){l.hasOwnProperty(m)&&c.getObjectTransfers(l[m],t)}))};y.prototype.getTransfersArray=function(l){var t=[];this.getObjectTransfers(l,t);return 0===t.length?void 0:t};y.prototype.handleMessage=function(l){var t=this,c=l.data;"officeeditor"!==this.name&&Object(n.a)("enableWorkerLogs")&&Object(p.d)("PDFWorker","".concat(performance.now()," Received ").concat(JSON.stringify(c)));var m=
130
- this.actionHandler,f=this.actionHandlerAsync;l=this.callbacksCapabilities;var k=this.pdfnetActiveCommands;if(c.isReply)m=c.callbackId,m in l?(f=l[m],delete l[m],k.has(m)&&k.delete(m),"error"in c?f.reject(c.error):f.resolve(c.data)):Object(p.a)("Cannot resolve callback ".concat(m));else if(c.action in m){var h=m[c.action];c.callbackId?Promise.resolve().then(function(){return h[0].call(h[1],c.data)}).then(function(r){t.postMessage({isReply:!0,callbackId:c.callbackId,data:r})},function(r){t.sendError(r,
131
- c.callbackId)}):h[0].call(h[1],c.data)}else c.action in f?(h=f[c.action],c.callbackId?h[0].call(h[1],c).then(function(r){t.postMessage({isReply:!0,callbackId:c.callbackId,data:r});t.nextAsync()},function(r){t.sendError(r,c.callbackId);t.nextAsync()}):h[0].call(h[1],c).then(function(){t.nextAsync()},function(){t.nextAsync()})):Object(p.c)("Unknown action from worker: ".concat(c.action))};return y}();A.a=v},function(v,A,u){u.d(A,"a",function(){return c});var p=u(3),n=u(11),y=u(7),l=u(8),t=function(){function m(f){var k=
132
- this;this.promise=f.then(function(h){k.response=h;k.status=200})}m.prototype.addEventListener=function(f,k){this.promise.then(k)};return m}(),c=function(m,f,k,h){if(Object(y.a)()&&!k){self.Module.instantiateWasm=function(q,g){return Object(n.a)("".concat(m,"Wasm.wasm"),q,f["Wasm.wasm"],h).then(function(x){g(x.instance)})};if(f.disableObjectURLBlobs){importScripts("".concat(m,"Wasm.js"));return}k=Object(p.b)("".concat(m,"Wasm.js.mem"),f["Wasm.js.mem"],!1,!1)}else{if(f.disableObjectURLBlobs){importScripts("".concat((self.Module.asmjsPrefix?
133
- self.Module.asmjsPrefix:"")+m,".js"));return}k=Object(p.b)("".concat((self.Module.asmjsPrefix?self.Module.asmjsPrefix:"")+m,".js.mem"),f[".js.mem"],!1);var r=Object(p.b)("".concat((self.Module.memoryInitializerPrefixURL?self.Module.memoryInitializerPrefixURL:"")+m,".mem"),f[".mem"],!0,!0);self.Module.memoryInitializerRequest=new t(r)}k=new Blob([k],{type:"application/javascript"});importScripts(Object(l.a)(URL.createObjectURL(k)))}},function(v,A,u){u.d(A,"a",function(){return p});var p="optimized/"},
134
- function(v,A,u){v.exports=u(22)},function(v,A,u){u.r(A);u(7);v=u(15);u(23);u(24);u(27);u(28);u(29);u(30);u(31);Object(v.a)()},function(v,A,u){(function(p){"undefined"===typeof p.crypto&&(p.crypto={getRandomValues:function(n){for(var y=0;y<n.length;y++)n[y]=256*Math.random()}})})("undefined"===typeof window?self:window)},function(v,A,u){(function(p,n){function y(l){"@babel/helpers - typeof";return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&
135
- "function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(l)}(function(l){function t(){for(var z=0;z<w.length;z++)w[z][0](w[z][1]);w=[];C=!1}function c(z,E){w.push([z,E]);C||(C=!0,e(t,0))}function m(z,E){function L(Q){h(E,Q)}function N(Q){q(E,Q)}try{z(L,N)}catch(Q){N(Q)}}function f(z){var E=z.owner,L=E.state_;E=E.data_;var N=z[L];z=z.then;if("function"===typeof N){L=a;try{E=N(E)}catch(Q){q(z,Q)}}k(z,E)||(L===a&&h(z,E),L===b&&q(z,E))}function k(z,E){var L;try{if(z===
136
- E)throw new TypeError("A promises callback cannot return that same promise.");if(E&&("function"===typeof E||"object"===y(E))){var N=E.then;if("function"===typeof N)return N.call(E,function(Q){L||(L=!0,E!==Q?h(z,Q):r(z,Q))},function(Q){L||(L=!0,q(z,Q))}),!0}}catch(Q){return L||q(z,Q),!0}return!1}function h(z,E){z!==E&&k(z,E)||r(z,E)}function r(z,E){z.state_===J&&(z.state_=G,z.data_=E,c(x,z))}function q(z,E){z.state_===J&&(z.state_=G,z.data_=E,c(F,z))}function g(z){var E=z.then_;z.then_=void 0;for(z=
137
- 0;z<E.length;z++)f(E[z])}function x(z){z.state_=a;g(z)}function F(z){z.state_=b;g(z)}function D(z){if("function"!==typeof z)throw new TypeError("Promise constructor takes a function argument");if(!(this instanceof D))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[];m(z,this)}l.createPromiseCapability=function(){var z={};z.promise=new D(function(E,L){z.resolve=E;z.reject=L});return z};var H=l.Promise,
138
- I=H&&"resolve"in H&&"reject"in H&&"all"in H&&"race"in H&&function(){var z;new H(function(E){z=E});return"function"===typeof z}();"undefined"!==typeof exports&&exports?(exports.Promise=I?H:D,exports.Polyfill=D):"function"===typeof define&&u(26)?define(function(){return I?H:D}):I||(l.Promise=D);var J="pending",G="sealed",a="fulfilled",b="rejected",d=function(){},e="undefined"!==typeof n?n:setTimeout,w=[],C;D.prototype={constructor:D,state_:J,then_:null,data_:void 0,then:function(z,E){z={owner:this,
139
- then:new this.constructor(d),fulfilled:z,rejected:E};this.state_===a||this.state_===b?c(f,z):this.then_.push(z);return z.then},"catch":function(z){return this.then(null,z)}};D.all=function(z){if("[object Array]"!==Object.prototype.toString.call(z))throw new TypeError("You must pass an array to Promise.all().");return new this(function(E,L){function N(ma){V++;return function(la){Q[ma]=la;--V||E(Q)}}for(var Q=[],V=0,X=0,ia;X<z.length;X++)(ia=z[X])&&"function"===typeof ia.then?ia.then(N(X),L):Q[X]=ia;
140
- V||E(Q)})};D.race=function(z){if("[object Array]"!==Object.prototype.toString.call(z))throw new TypeError("You must pass an array to Promise.race().");return new this(function(E,L){for(var N=0,Q;N<z.length;N++)(Q=z[N])&&"function"===typeof Q.then?Q.then(E,L):E(Q)})};D.resolve=function(z){return z&&"object"===y(z)&&z.constructor===this?z:new this(function(E){E(z)})};D.reject=function(z){return new this(function(E,L){L(z)})}})("undefined"!==typeof window?window:"undefined"!==typeof p?p:"undefined"!==
141
- typeof self?self:void 0)}).call(this,u(12),u(10).setImmediate)},function(v,A,u){(function(p,n){(function(y,l){function t(J){delete x[J]}function c(J){if(F)setTimeout(c,0,J);else{var G=x[J];if(G){F=!0;try{var a=G.callback,b=G.args;switch(b.length){case 0:a();break;case 1:a(b[0]);break;case 2:a(b[0],b[1]);break;case 3:a(b[0],b[1],b[2]);break;default:a.apply(l,b)}}finally{t(J),F=!1}}}}function m(){H=function(J){n.nextTick(function(){c(J)})}}function f(){if(y.postMessage&&!y.importScripts){var J=!0,G=
142
- y.onmessage;y.onmessage=function(){J=!1};y.postMessage("","*");y.onmessage=G;return J}}function k(){var J="setImmediate$"+Math.random()+"$",G=function(a){a.source===y&&"string"===typeof a.data&&0===a.data.indexOf(J)&&c(+a.data.slice(J.length))};y.addEventListener?y.addEventListener("message",G,!1):y.attachEvent("onmessage",G);H=function(a){y.postMessage(J+a,"*")}}function h(){var J=new MessageChannel;J.port1.onmessage=function(G){c(G.data)};H=function(G){J.port2.postMessage(G)}}function r(){var J=
143
- D.documentElement;H=function(G){var a=D.createElement("script");a.onreadystatechange=function(){c(G);a.onreadystatechange=null;J.removeChild(a);a=null};J.appendChild(a)}}function q(){H=function(J){setTimeout(c,0,J)}}if(!y.setImmediate){var g=1,x={},F=!1,D=y.document,H,I=Object.getPrototypeOf&&Object.getPrototypeOf(y);I=I&&I.setTimeout?I:y;"[object process]"==={}.toString.call(y.process)?m():f()?k():y.MessageChannel?h():D&&"onreadystatechange"in D.createElement("script")?r():q();I.setImmediate=function(J){"function"!==
144
- typeof J&&(J=new Function(""+J));for(var G=Array(arguments.length-1),a=0;a<G.length;a++)G[a]=arguments[a+1];x[g]={callback:J,args:G};H(g);return g++};I.clearImmediate=t}})("undefined"===typeof self?"undefined"===typeof p?this:p:self)}).call(this,u(12),u(14))},function(v,A){v.exports={}},function(v,A,u){(function(p){var n=function(y,l){var t=function(m){m=this["catch"](m);return{cancel:l,promise:m,then:c.bind(m),"catch":t.bind(m)}},c=function(m,f){m=this.then(m,f);return{cancel:l,promise:m,then:c.bind(m),
145
- "catch":t.bind(m)}};return{cancel:l,promise:y,then:c.bind(y),"catch":t.bind(y)}};p.CancellablePromise=function(y,l){var t=!1,c,m=new Promise(function(f,k){c=function(){t||(l(),k("cancelled"))};(new Promise(y)).then(function(h){t=!0;f(h)},function(h){t=!0;k(h)})});return n(m,c)};p.CancellablePromise.all=function(y){var l=Promise.all(y);return n(l,function(){y.forEach(function(t){t.cancel&&t.cancel()})})}})("undefined"===typeof self?void 0:self)},function(v,A,u){(function(p,n){function y(m){"@babel/helpers - typeof";
146
- return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"==typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},y(m)}function l(m,f){var k=Object.keys(m);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(m);f&&(h=h.filter(function(r){return Object.getOwnPropertyDescriptor(m,r).enumerable}));k.push.apply(k,h)}return k}function t(m){for(var f=1;f<arguments.length;f++){var k=null!=arguments[f]?
147
- arguments[f]:{};f%2?l(Object(k),!0).forEach(function(h){var r,q=k[h];a:if("object"==y(h)&&h){var g=h[Symbol.toPrimitive];if(void 0!==g){h=g.call(h,"string");if("object"!=y(h))break a;throw new TypeError("@@toPrimitive must return a primitive value.");}h=String(h)}(r="symbol"==y(h)?h:h+"")in m?Object.defineProperty(m,r,{value:q,enumerable:!0,configurable:!0,writable:!0}):m[r]=q}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(k)):l(Object(k)).forEach(function(h){Object.defineProperty(m,
148
- h,Object.getOwnPropertyDescriptor(k,h))})}return m}var c=u(1);(function(m){m.Module={INITIAL_MEMORY:50331648,noExitRuntime:!0,devicePixelRatio:1,cur_doc:null,cachePtrSize:0,hasBufOwnership:!0,loaded:!1,initCb:null,cachePtr:null,cleanupState:null,docs:{},postEvent:function(f,k,h){Module.workerMessageHandler.send("event",{docId:f,type:k,data:h})},postProgressiveRenderingStartEvent:function(f,k){Module.postEvent(f,"progressiveRenderingStart",{pageNum:k})},postPagesUpdatedEvent:function(f,k,h,r){f={pageDimensions:Module.GetPageDimensions(f)};
149
- if(h)for(var q=0;q<h.length;++q)h[q]in f.pageDimensions?(f.pageDimensions[h[q]].contentChanged=!0,r&&(f.pageDimensions[h[q]].annotationsUnchanged=!0)):console.warn("Invalid Page Number ".concat(h[q]));Module.postEvent(k,"pagesUpdated",f);return f},postPagesRenamedEvent:function(f,k){var h={};f=Module.PDFDocGetPageIterator(f,1);for(var r=1;Module.IteratorHasNext(f);++r){var q=Module.stackSave(),g=Module.IteratorCurrent(f);h[r]=Module.PageGetId(g);Module.IteratorNext(f);Module.stackRestore(q)}Module.postEvent(k,
150
- "pagesRenamed",{pageNumToId:h})},GetAnnotationObjs:function(f){var k=[],h=1;for(f=Module.PDFDocGetPageIterator(f,1);Module.IteratorHasNext(f);Module.IteratorNext(f)){for(var r=Module.PageGetNumAnnots(Module.IteratorCurrent(f)),q=0;q<r;++q){var g=Module.PageGetAnnot(Module.IteratorCurrent(f),q);g=Module.AnnotGetSDFObjNum(g);k.push(g)}h++}return k},GetLinearizedSaveReferenceChanges:function(f,k){var h=[],r=0,q=1;for(f=Module.PDFDocGetPageIterator(f,1);Module.IteratorHasNext(f);Module.IteratorNext(f))for(var g=
151
- Module.PageGetNumAnnots(Module.IteratorCurrent(f)),x=0;x<g;++x){var F=Module.PageGetAnnot(Module.IteratorCurrent(f),x),D=Module.AnnotGetSDFObjNum(F);D!=k[r]&&(F=Module.AnnotGetSDFObjGen(F),h.push({oldObjNum:k[r],discardAppearance:!1,newObjNum:D,genNum:F,pageNum:q}));++r;++q}r!=k.length&&console.warn("Annotation count has changed, cannot sync all the new obj numbers.");return h},GetIndividualPageDimensions:function(f,k,h){f=Module.PageGetPageInfo(h);f.id=Module.PageGetId(h);return f},GetPageDimensionsRange:function(f,
152
- k,h){for(var r={},q=Module.PDFDocGetPageIterator(f,k);k<h&&Module.IteratorHasNext(q);++k){var g=Module.stackSave(),x=Module.IteratorCurrent(q);r[k]=this.GetIndividualPageDimensions(f,k,x);Module.IteratorNext(q);Module.stackRestore(g)}return r},GetPageDimensionsContentChangedList:function(f,k){k.sort(function(H,I){return H-I});for(var h={},r=k[0],q=k[k.length-1],g=0,x=Module.PDFDocGetPageIterator(f,r);r<=q&&Module.IteratorHasNext(x);++r){if(k[g]==r){for(++g;k[g]==r;)++g;var F=Module.stackSave(),D=
153
- Module.IteratorCurrent(x);D=this.GetIndividualPageDimensions(f,r,D);D.contentChanged=!0;h[r]=D;Module.stackRestore(F)}Module.IteratorNext(x)}return h},GetPageDimensions:function(f){try{var k=Module.stackSave();var h=Module.GetPageCount(f);if(0===h)throw"This document has no pages.";return Module.GetPageDimensionsRange(f,1,h+1)}finally{Module.stackRestore(k)}},loadDoc:function(f,k){"undefined"===typeof Module&&this._main();var h=null;try{var r=Module.stackSave();f.customHandlerId&&Module._TRN_PDFNetAddPDFTronCustomHandler(f.customHandlerId);
154
- k=Module.CreateDoc(f,k);var q=Module.GetDoc(k);if(Module.PDFDocInitSecurityHandler(q))return{docId:k,pageDimensions:Module.GetPageDimensions(q)};h={type:"NeedsPassword",errorData:{docId:k},message:"This document requires a password"}}catch(g){h={type:"InvalidPDF",message:g}}finally{Module.stackRestore(r)}throw h;},loadCanvas:function(f,k,h,r,q,g,x,F){var D=Module.GetDoc(f),H=Module.docs[f].chunkStorage,I=Promise.resolve();if(H&&2===F.overprintMode){var J=Module.GetDownloadData(D);if(!J.docInfoRequested){var G=
155
- Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DownloaderPrefetchDocInfo(J.downloader,G));0==Module.getValue(G,"i8")&&(I=J.docInfoPromiseCapability.promise);J.docInfoRequested=!0}}return new Promise(function(a,b){var d=k+1,e=function(){a(I.then(function(){return Module.RasterizePage(D,d,h,r,g,q,x,F,f)}))};if(H){var w=Module.GetDownloadData(D).downloader,C=H.getRequiredChunkOffsetArrays(w,d);H.keepChunks(C.have);w=function(){var z=H.getChunks(C.missing);Module.loadPromise=z.then(function(){var E=
156
- Module.loadPromise.cancelled;Module.loadPromise=null;E||e()})["catch"](function(E){"cancelled"!==E?b(E):Module.loadPromise=null})};Module.loadPromise?Module.loadPromise.then(w,w):w()}else e()})},loadResources:function(f,k){Module.Initialize(k);Object(c.b)("worker","PDFNet initialized!");Module._TRN_PDFNetSetDefaultDiskCachingEnabled(!1);f=new Uint8Array(f);Module.PDFNetSetResourceData(f)},onRuntimeInitialized:function(){"undefined"===typeof Module&&(("undefined"!==typeof window?window:self).Module=
157
- {});(function(f){f.PDFDocExportXFDF=function(k,h){k=Module.GetDoc(k);var r=Module.stackSave();try{var q=h?Module.PDFDocFDFExtract(k,h):Module.PDFDocFDFExtract(k);var g=Module.FDFDocSaveAsXFDF(q);Module.stackRestore(r)}catch(x){throw Module.stackRestore(r),x;}return g};f.PageArrayToPageSet=function(k){var h=Module.stackSave();try{var r=Module.PageSetCreate();for(var q=0;q<k.length;++q)Module.PageSetAddPage(r,k[q]);Module.stackRestore(h)}catch(g){throw Module.stackRestore(h),g;}return r};f.cancelCurrent=
158
- function(){var k=Module.loadPromise;return k?(k.cancel(),k.cancelled=!0):(k=Module.cleanupState)?(p(k.timeout),k.cleanupArr.reverse().forEach(function(h){h()}),Module.cleanupState=null,!0):!1};f.SetWorkerRestartCallback=function(k){Module.workerRestartCallback=k};f.XFDFMerge=function(k,h,r){if(h){var q=Module.GetDoc(k),g=[];try{Object(c.b)("worker","Merge XFDF of length ".concat(h.length));var x=Module.GetUStringFromJSString(h,!0);g.push(function(){Module.UStringDestroy(x)});var F=Module.allocate(4,
159
- "i8",Module.ALLOC_STACK);REX(Module._TRN_FDFDocCreateFromXFDF(x,F));var D=Module.getValue(F,"i8*");g.push(function(){Module.FDFDocDestroy(D)});var H=Module.PDFDocFDFUpdate(q,D,r);H&&H.length&&Module.postEvent(k,"apRefChanged",{apRefChanges:H})}finally{g.reverse().forEach(function(I){I()})}}};f.ExecuteXFDFCommand=function(k,h){h&&REX(Module._TRN_PDFDocMergeXFDFString(Module.GetDoc(k),Module.GetUStringFromJSString(h),null))};f.MergeXFDF=function(k,h,r){return new Promise(function(q,g){var x=[];try{var F=
160
- Module.stackSave();x[x.length]=function(){Module.stackRestore(F)};Module.XFDFMerge(k,h,r);x.forEach(function(D){D()});q({})}catch(D){x.forEach(function(H){H()}),g(D)}})};f.CreateBufferFile=function(k,h,r){Module.MakeDev(k);var q=new ArrayBuffer(h);q=new Uint8Array(q);r=r?0:255;for(var g=0;g<h;++g)q[g]=r;Module.docs[k]={buffer:q}};f.ReadBufferFile=function(k,h){var r=Module.docs[k].buffer;h&&(Module.docs[k].buffer=new Uint8Array(r.buffer.slice(0)));return r};f.RemoveBufferFile=function(k){Module.docs[k]=
161
- null};f.SaveHelper=function(k,h,r){r="undefined"===typeof r?2:r;Module.MakeDev(h);var q=[];r&16&&(q=Module.GetAnnotationObjs(k));var g=Module._TRN_PDFDocSave(k,Module.GetUStringFromJSString(h),r);Module.docs[h].sink=null;REX(g);r&16&&(Module.postPagesRenamedEvent(k,h),0<q.length&&(k=Module.GetLinearizedSaveReferenceChanges(k,q),0<k.length&&Module.postEvent(h,"apRefChanged",{apRefChanges:k})));return Module.docs[h].buffer.buffer};f.SaveDoc=function(k,h,r,q,g,x,F,D,H,I){return new Promise(function(J,
162
- G){var a=[];try{var b=Module.GetDoc(k),d=Module.stackSave();a[a.length]=function(){Module.stackRestore(d)};h?Module.XFDFMerge(k,h,F):I&&Module.ExecuteXFDFCommand(k,I);var e=Module.allocate(8,"i8",Module.ALLOC_STACK),w=Module.allocate(Module.intArrayFromString('{"UseNonStandardRotation": true}'),"i8",Module.ALLOC_STACK);Module.setValue(e,w,"i8*");Module.setValue(e+4,0,"i32");Module._TRN_PDFDocRefreshAnnotAppearances(b,e);if(x){e=function(Y){Y=new Uint8Array(Y);m.FS.writeFile("watermarkFile",Y);Y=Module.ImageCreateFromFile(b,
163
- Module.GetUStringFromJSString("watermarkFile"));m.FS.unlink("watermarkFile");return Y};var C=Module.ElementBuilderCreate();a.push(function(){Module.ElementBuilderDestroy(C)});var z=Module.ElementWriterCreate();a.push(function(){Module.ElementWriterDestroy(z)});try{if(!x.hasOwnProperty("default"))throw Error("Watermark dictionary has no 'default' key!");var E=e(x["default"]),L=Module.PDFDocGetPageIterator(b,1);for(w=-1;Module.IteratorHasNext(L);){var N=Module.IteratorCurrent(L);Module.IteratorNext(L);
164
- w++;var Q=w.toString();try{var V=void 0;if(x.hasOwnProperty(Q)){var X=x[Q];if(X)V=e(X);else continue}else V=E;var ia=Module.PageGetPageInfo(N),ma=Module.ElementBuilderCreateImage(C,V,0,0,ia.width,ia.height);Module.ElementWriterBegin(z,N);Module.ElementWriterWritePlacedElement(z,ma);Module.ElementWriterEnd(z)}catch(Y){console.warn("Watermark for page "+Q+"can not be added due to error: "+Y)}}}catch(Y){console.warn("Watermarks can not be added due to error: "+Y)}}if(D){var la=Module.SecurityHandlerCreate(H);
165
- la&&(Module.SecurityHandlerChangeUserPasswordUString(la,D),Module.PDFDocSetSecurityHandler(b,la))}E=0;if(q){var ka=Module.PDFDocGetRoot(b);(E=Module.ObjFindObj(ka,"OpenAction"))&&Module.ObjPut(ka,"__OpenActionBackup__",E);var qa=Module.ObjPutDict(ka,"OpenAction");Module.ObjPutName(qa,"Type","Action");Module.ObjPutName(qa,"S","JavaScript");Module.ObjPutString(qa,"JS","this.print()")}var oa=Module.SaveHelper(b,k,g);q&&(E?Module.ObjPut(ka,"OpenAction",Module.ObjFindObj(ka,"__OpenActionBackup__")):Module.ObjErase(ka,
166
- "OpenAction"));a.reverse().forEach(function(Y){Y()});if(r)J({fileData:oa});else{var ra=oa.slice(0);J({fileData:ra})}}catch(Y){a.reverse().forEach(function(Ha){Ha()}),G(Y)}})};f.SaveDocFromFixedElements=function(k,h,r,q,g,x,F){k=Module.CreateDocFromLayoutEls(k);k=Module.CreateDoc({type:"ptr",value:k});return Module.SaveDoc(k,h,!0,!1,r,q,g,x,F)};f.GetCurrentCanvasData=function(k){var h=Module.currentRenderData;if(!h)return null;k&&REX(Module._TRN_PDFRasterizerUpdateBuffer(h.rast));var r=Date.now();
167
- if(h.bufPtr){k=new Uint8Array(new ArrayBuffer(h.buf_size));for(var q=0,g=0;g<h.out_height;++g)for(var x=h.bufPtr+h.stride*g,F=0;F<h.out_width;++F)k[q++]=Module.HEAPU8[x+2],k[q++]=Module.HEAPU8[x+1],k[q++]=Module.HEAPU8[x],k[q++]=Module.HEAPU8[x+3],x+=4}else k=Module.ReadBufferFile("b",k);Object(c.b)("bufferTiming","Copy took ".concat(Date.now()-r));return{pageBuf:k.buffer,pageWidth:h.out_width,pageHeight:h.out_height}};f.RasterizePage=function(k,h,r,q,g,x,F,D,H){return new Promise(function(I,J){Module.currentRenderData=
168
- {};var G=Module.currentRenderData;G.out_width=parseInt(r,10);G.out_height=parseInt(q,10);var a=[];a.push(function(){Module.currentRenderData=null});try{var b=Module.stackSave();a[a.length]=function(){Module.stackRestore(b)};var d=Module.GetPage(k,h),e=Module.PageGetPageWidth(d),w=Module.PageGetPageHeight(d);G.stride=4*G.out_width;G.buf_size=G.out_width*G.out_height*4;Object(c.b)("Memory","Created rasterizer");G.rast=Module.PDFRasterizerCreate();a.push(function(){Object(c.b)("Memory","Destroyed rasterizer");
169
- Module._TRN_PDFRasterizerDestroy(G.rast)});if(F){var C=Module.EMSCreateUpdatedLayersContext(k,F);0!==C&&(REX(Module._TRN_PDFRasterizerSetOCGContext(G.rast,C)),a.push(function(){Module._TRN_OCGContextDestroy(C)}))}var z=!1;D.hasOwnProperty("renderAnnots")?(D.renderAnnots&&(z=!0),REX(Module._TRN_PDFRasterizerSetDrawAnnotations(G.rast,D.renderAnnots?1:0))):REX(Module._TRN_PDFRasterizerSetDrawAnnotations(G.rast,0));D.hasOwnProperty("highlightFields")&&(D.highlightFields&&(z=!0),REX(Module._TRN_PDFRasterizerSetHighlightFields(G.rast,
170
- D.highlightFields)));D.hasOwnProperty("antiAliasing")&&REX(Module._TRN_PDFRasterizerSetAntiAliasing(G.rast,D.antiAliasing));D.hasOwnProperty("pathHinting")&&REX(Module._TRN_PDFRasterizerSetPathHinting(G.rast,D.pathHinting));if(D.hasOwnProperty("thinLinePixelGridFit")){var E=!0;D.hasOwnProperty("thinLineStrokeAdjust")&&(E=D.thinLineStrokeAdjust);REX(Module._TRN_PDFRasterizerSetThinLineAdjustment(G.rast,D.thinLinePixelGridFit,E))}else D.hasOwnProperty("thinLineStrokeAdjust")&&REX(Module._TRN_PDFRasterizerSetThinLineAdjustment(G.rast,
171
- !1,D.thinLineStrokeAdjust));D.hasOwnProperty("thinLineScaling")&&REX(Module._TRN_PDFRasterizerSetThinLineScaling(G.rast,D.thinLineScaling));if(D.hasOwnProperty("nightModeTuningContrast")||D.hasOwnProperty("nightModeTuningSaturation")||D.hasOwnProperty("nightModeTuningFlipness")){var L=D.hasOwnProperty("nightModeTuningContrast")?D.nightModeTuningContrast:.9,N=D.hasOwnProperty("nightModeTuningSaturation")?D.nightModeTuningSaturation:.8,Q=D.hasOwnProperty("nightModeTuningFlipness")?D.nightModeTuningFlipness:
172
- 1;REX(Module._TRN_PDFRasterizerSetNightModeTuning(G.rast,L,N,Q))}D.hasOwnProperty("imageSmoothing")?(E=!1,D.hasOwnProperty("hqImageResampling")&&(E=D.hqImageResampling),REX(Module._TRN_PDFRasterizerSetImageSmoothing(G.rast,D.imageSmoothing,E))):D.hasOwnProperty("hqImageResampling")&&REX(Module._TRN_PDFRasterizerSetImageSmoothing(G.rast,!0,D.hqImageResampling));D.hasOwnProperty("caching")&&REX(Module._TRN_PDFRasterizerSetCaching(G.rast,D.caching));D.hasOwnProperty("expGamma")&&REX(Module._TRN_PDFRasterizerSetGamma(G.rast,
173
- D.expGamma));D.hasOwnProperty("isPrinting")&&(D.isPrinting&&(z=!0),REX(Module._TRN_PDFRasterizerSetPrintMode(G.rast,D.isPrinting)));D.hasOwnProperty("colorPostProcessMode")&&(D.colorPostProcessMode&&(z=!0),REX(Module._TRN_PDFRasterizerSetColorPostProcessMode(G.rast,D.colorPostProcessMode)));var V=Module.PageGetRotation(d);E=1===x||3===x;V=(1===V||3===V)!==E;var X=Module.allocate(48,"i8",Module.ALLOC_STACK);if(g){g.x1=g[0];g.y1=g[1];g.x2=g[2];g.y2=g[3];var ia=Module.PageGetDefaultMatrix(d,0),ma=Module.Matrix2DInverse(ia);
174
- g=Module.Matrix2DMultBBox(ma,g);if(g.x2<g.x1){var la=g.x1;g.x1=g.x2;g.x2=la}g.y2<g.y1&&(la=g.y1,g.y1=g.y2,g.y2=la);var ka=G.out_width/(V?g.y2-g.y1:g.x2-g.x1);var qa=Module.GetDefaultMatrixBox(d,g,x)}else qa=Module.PageGetDefaultMatrix(d,x),ka=G.out_width/(E?w:e);Module.Matrix2DSet(X,ka,0,0,ka,0,0);Module.Matrix2DConcat(X,qa);var oa=Module.allocate(4,"i8",Module.ALLOC_STACK),ra=Module.allocate(4,"i8",Module.ALLOC_STACK);z?(G.bufPtr=Module._malloc(G.buf_size),Module._memset(G.bufPtr,D.pageTransparent?
175
- 0:255,G.buf_size),a.push(function(){Module._free(G.bufPtr)})):(Module.CreateBufferFile("b",G.buf_size,D.pageTransparent),a.push(function(){Module.RemoveBufferFile("b")}));var Y=D.overprintMode;if(10===Y){REX(Module._TRN_PDFRasterizerSetOverprint(G.rast,1));var Ha=Module.PDFRasterizerRasterizeSeparations(G.rast,d,G.out_width,G.out_height,X,0,0);I({pageBuf:Ha,pageWidth:G.out_width,pageHeight:G.out_height})}else{REX(Module._TRN_PDFRasterizerSetOverprint(G.rast,Y));z?REX(Module._TRN_PDFRasterizerGetChunkRenderer(G.rast,
176
- d,G.bufPtr,G.out_width,G.out_height,G.stride,4,!0,X,0,0,0,oa)):REX(Module._TRN_PDFRasterizerGetChunkRendererPath(G.rast,d,Module.GetUStringFromJSString("b"),G.out_width,G.out_height,!0,X,0,0,0,oa));var Sa=Module.getValue(oa,"i8*");a.push(function(){REX(Module._TRN_ChunkRendererDestroy(Sa))})}var kb=(new Date).getTime(),Ta=function(){try{if(REX(Module._TRN_ChunkRendererRenderForTimePeriod(Sa,200,ra)),Module.getValue(ra,"i8"))Module.cleanupState.timeout=n(Ta);else{var Ia=Module.GetCurrentCanvasData(!1);
177
- Object(c.b)("worker","Total Page Time ".concat((new Date).getTime()-kb));a.reverse().forEach(function(ta){ta()});I(Ia)}}catch(ta){a.reverse().forEach(function(Ra){Ra()}),J(ta)}};D.useProgress&&Module.postProgressiveRenderingStartEvent(H,h);var Qa=n(Ta);Module.cleanupState={cleanupArr:a,timeout:Qa};a.push(function(){Module.cleanupState=null})}catch(Ia){a.reverse().forEach(function(ta){ta()}),J(Ia)}})};f.UpdatePassword=function(k,h){try{var r=Module.stackSave();var q=Module.GetDoc(k);return Module.PDFDocInitStdSecurityHandler(q,
178
- h)?(q in downloadDataMap&&REX(Module._TRN_PDFDocDownloaderInitialize(q,downloadDataMap[q].downloader)),{success:!0,pageDimensions:Module.GetPageDimensions(q)}):{success:!1}}finally{Module.stackRestore(r)}};f.UpdateCustomHeader=function(k,h){Module.customHeadersMap[k]=k in Module.customHeadersMap?t(t({},Module.customHeadersMap[k]),h):h;Module.docs[k].chunkStorage&&(Module.docs[k].chunkStorage.customHeaders=Module.customHeadersMap[k])};f.TriggerFullDownload=function(k){return new Promise(function(h,
179
- r){var q=Module.GetDoc(k);try{q in downloadDataMap&&REX(Module.PDFDocDownloaderTriggerFullDownload(q,downloadDataMap[q].downloader)),h({})}catch(g){r(g)}})};f.InsertBlankPages=function(k,h,r,q){return new Promise(function(g,x){var F=[],D=Module.GetDoc(k);try{var H=Module.stackSave();F[F.length]=function(){Module.stackRestore(H)};for(var I=h.length-1;0<=I;--I){var J=Module.PDFDocGetPageIterator(D,h[I]),G=Module.PDFDocPageCreate(D,r,q);Module.PDFDocPageInsert(D,J,G)}var a=Module.postPagesUpdatedEvent(D,
180
- k);F.forEach(function(b){b()});g(a)}catch(b){F.forEach(function(d){d()}),x(b)}})};f.InsertPages=function(k,h,r,q,g,x){return new Promise(function(F,D){var H=[],I=Module.GetDoc(k);try{var J=Module.stackSave();H[H.length]=function(){Module.stackRestore(J)};if(h instanceof ArrayBuffer){var G=Module.CreateDoc(h);var a=Module.GetDoc(G);H[H.length]=function(){Module.DeleteDoc(G)}}else a=Module.GetDoc(h);for(var b=r.length,d=Module.PageSetCreate(),e=0;e<b;++e)Module.PageSetAddPage(d,r[e]);x?Module.PDFDocInsertPages2(I,
181
- q,a,d,g):Module.PDFDocInsertPages(I,q,a,d,g);var w;x||(w=Module.postPagesUpdatedEvent(I,k));H.reverse().forEach(function(C){C()});F(w)}catch(C){H.reverse().forEach(function(z){z()}),D(C)}})};f.MovePages=function(k,h,r){return new Promise(function(q,g){var x=[],F=Module.GetDoc(k);try{var D=Module.stackSave();x[x.length]=function(){Module.stackRestore(D)};for(var H=h.length,I=Module.PageSetCreate(),J=0;J<H;++J)Module.PageSetAddPage(I,h[J]);Module.PDFDocMovePages(F,r,I);var G=Module.postPagesUpdatedEvent(F,
182
- k);x.forEach(function(a){a()});q(G)}catch(a){x.forEach(function(b){b()}),g(a)}})};f.RemovePages=function(k,h,r){return new Promise(function(q,g){var x=Module.GetDoc(k),F=[];try{var D=Module.stackSave();F[F.length]=function(){Module.stackRestore(D)};for(var H=h.length-1;0<=H;--H){var I=Module.PDFDocGetPageIterator(x,h[H]);Module.IteratorHasNext(I)&&(r?Module.PDFDocPageRemove2(x,I):Module.PDFDocPageRemove(x,I))}var J;r||(J=Module.postPagesUpdatedEvent(x,k));F.forEach(function(G){G()});q(J)}catch(G){F.forEach(function(a){a()}),
183
- g(G)}})};f.RotatePages=function(k,h,r){return new Promise(function(q,g){var x=Module.GetDoc(k),F=[];try{var D=Module.stackSave();F[F.length]=function(){Module.stackRestore(D)};var H=h.length,I=0,J=Module.PDFDocGetPageIterator(x,h[0]),G=[];F.push(function(){Module._TRN_IteratorDestroy(J)});for(var a=h[0];Module.IteratorHasNext(J)&&I<h[H-1];++a){if(a===h[I]){var b=Module.IteratorCurrent(J),d=(Module.PageGetRotation(b)+r)%4;Module.PageSetRotation(b,d);G.push(a);I++}Module.IteratorNext(J)}var e=Module.postPagesUpdatedEvent(x,
184
- k,G,!0);F.reverse().forEach(function(w){w()});q(e)}catch(w){F.reverse().forEach(function(C){C()}),g(w)}})};f.ExtractPages=function(k,h,r,q,g,x){return new Promise(function(F,D){var H=[];try{var I=Module.stackSave();H[H.length]=function(){Module.stackRestore(I)};var J=function(b){H.reverse().forEach(function(d){d()});D(b)};Module.XFDFMerge(k,r,g);var G=Module.CreateEmptyDoc();H[H.length]=function(){Module.DeleteDoc(G)};var a=Module.InsertPages(G,k,h,1,!0,x).then(function(){return Module.SaveDoc(G,
185
- void 0,!0,!1,void 0,q)}).then(function(b){H.reverse().forEach(function(d){d()});return b});F(a)}catch(b){J(b)}})};f.CropPages=function(k,h,r,q,g,x){return new Promise(function(F,D){var H=Module.GetDoc(k),I=[];try{var J=Module.stackSave();I[I.length]=function(){Module.stackRestore(J)};var G=h.length,a=0,b=Module.PDFDocGetPageIterator(H,h[0]);I.push(function(){Module._TRN_IteratorDestroy(b)});for(var d=[],e=h[0];Module.IteratorHasNext(b)&&a<h[G-1];++e){if(e===h[a]){var w=Module.IteratorCurrent(b),C=
186
- Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetCropBox(w,C));var z=Module.PageGetRotation(w),E=Module.getValue(C,"double"),L=Module.getValue(C+8,"double"),N=Module.getValue(C+16,"double"),Q=Module.getValue(C+24,"double");0===z%4?(Module.setValue(C,E+g,"double"),Module.setValue(C+8,L+q,"double"),Module.setValue(C+16,N-x,"double"),Module.setValue(C+24,Q-r,"double")):1===z%4?(Module.setValue(C,E+r,"double"),Module.setValue(C+8,L+g,"double"),Module.setValue(C+16,N-q,"double"),Module.setValue(C+
187
- 24,Q-x,"double")):2===z%4?(Module.setValue(C,E+x,"double"),Module.setValue(C+8,L+r,"double"),Module.setValue(C+16,N-g,"double"),Module.setValue(C+24,Q-q,"double")):3===z%4&&(Module.setValue(C,E+q,"double"),Module.setValue(C+8,L+x,"double"),Module.setValue(C+16,N-r,"double"),Module.setValue(C+24,Q-g,"double"));Module.setValue(C+32,0,"double");REX(Module._TRN_PageSetBox(w,0,C));REX(Module._TRN_PageSetBox(w,1,C));d.push(e);a++}Module.IteratorNext(b)}var V=Module.postPagesUpdatedEvent(H,k,d,!0);I.reverse().forEach(function(X){X()});
188
- F(V)}catch(X){I.reverse().forEach(function(ia){ia()}),D(X)}})}})("undefined"===typeof self?this.Module:self.Module);this.loaded=!0;Module.initCb&&Module.initCb()}}})(self)}).call(this,u(10).clearImmediate,u(10).setImmediate)},function(v,A,u){(function(p){function n(c){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(m){return typeof m}:function(m){return m&&"function"==typeof Symbol&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},
189
- n(c)}var y=u(1),l=u(5),t="undefined"!==typeof window?window:self;t.global=t;(function(c){c.currentFileString="/current";var m=0,f=0,k={},h=null;Module.chunkMax=200;var r=function(a,b,d,e,w){var C=new XMLHttpRequest;return CancellablePromise(function(z,E){C.open("GET",a,!0);C.responseType="arraybuffer";C.onerror=function(){E("Network error occurred")};C.onload=function(){if(206===this.status&&C.response.byteLength===d){var N=new Int8Array(C.response);z(N)}else E("Download Failed")};var L=["bytes=",
190
- b,"-",b+d-1].join("");C.setRequestHeader("Range",L);w&&(C.withCredentials=w);e&&Object.keys(e).forEach(function(N){C.setRequestHeader(N,e[N])});C.send()},function(){C.abort()})},q=function(a){this.maxChunkNum=a;this.lruList=[];this.chunkMap={}};q.prototype={has:function(a){return a in this.chunkMap},insert:function(a,b){this.lruList.length>=this.maxChunkNum&&(delete this.chunkMap[this.lruList[0]],this.lruList.shift());this.lruList.push(b);this.chunkMap[b]=a},get:function(a){var b=this.lruList.lastIndexOf(a);
191
- 0<=b&&this.lruList.splice(b,1);this.lruList.push(a);return this.chunkMap[a]}};var g=function(a){this.file=a;this.filePosition=0;this.fileLength=a.size;this.chunkSize=1048576;this.chunkCache=new q(8);this.reader=new FileReaderSync};g.prototype={read:function(a,b,d){d=this.filePosition+d<=this.fileLength?d:this.fileLength-this.filePosition;a=a.subarray(b,b+d);b=d;for(var e=this.filePosition%this.chunkSize,w=this.filePosition-e,C=0;0<d;){if(this.chunkCache.has(w))var z=this.chunkCache.get(w);else z=
192
- new Int8Array(this.reader.readAsArrayBuffer(this.file.slice(w,w+this.chunkSize))),this.chunkCache.insert(z,w);var E=z.length,L=e+d;L<=E?(a.set(z.subarray(e,L),C),this.filePosition+=d,d=0):(a.set(z.subarray(e),C),this.filePosition+=E-e,e=0,w=this.filePosition,d=L-E,C=b-d)}return b},seek:function(a){this.filePosition=a},close:function(){this.reader=this.file=null},getPos:function(){return this.filePosition},getTotalSize:function(){return this.fileLength}};var x=function(a){this.data=a;this.position=
193
- 0;this.length=this.data.length};x.prototype={read:function(a,b,d){d=this.position+d<=this.length?d:this.length-this.position;a=a.subarray(b,b+d);b=this.data.subarray(this.position,this.position+d);a.set(b);this.position+=d;return d},write:function(a,b,d){d=this.position+d<=this.length?d:this.length-this.position;a=a.subarray(b,b+d);this.data.subarray(this.position,this.position+d).set(a);this.position+=d;return d},seek:function(a){this.position=a},close:function(){this.data=null},getPos:function(){return this.position},
194
- getTotalSize:function(){return this.length}};var F=function(a,b,d,e,w,C){"object"===n(a)?(this.lruList=a.lruList,this.chunkMap=a.chunkMap,this.length=a.length,this.url=a.url,this.customHeaders=a.customHeaders,this.withCredentials=a.withCredentials,this.chunkSize=a.chunkSize):(this.lruList=[],this.chunkMap={},this.chunkMap[b]=C,this.length=b,this.url=a,this.customHeaders=e,this.withCredentials=w,this.chunkSize=d)};F.prototype={lruUpdate:function(a){var b=this.lruList.lastIndexOf(a);0<=b&&this.lruList.splice(b,
195
- 1);this.lruList.push(a)},getChunk:function(a){var b=this;if(this.chunkMap[a])this.lruUpdate(a);else{var d=Math.min(a+this.chunkSize,this.length)-1,e=new XMLHttpRequest;e.open("GET",this.url,!1);e.responseType="arraybuffer";e.setRequestHeader("Range",["bytes=",a,"-",d].join(""));this.withCredentials&&(e.withCredentials=this.withCredentials);this.customHeaders&&Object.keys(this.customHeaders).forEach(function(w){e.setRequestHeader(w,b.customHeaders[w])});e.send();if(200===e.status||206===e.status)this.writeChunk(new Int8Array(e.response),
196
- a);else throw Error("Failed to load data from");}return this.chunkMap[a]},hadChunk:function(a){return a in this.chunkMap},hasChunk:function(a){return this.chunkMap[a]},getCacheData:function(){return this.chunkMap[this.length]},getRequiredChunkOffsetArrays:function(a,b){var d={have:[],downloading:[],missing:[]};try{var e=Module.stackSave();var w=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DownloaderGetRequiredChunksSize(a,b,w));var C=Module.getValue(w,"i8*");if(C){var z=Module._malloc(8*
197
- C);REX(Module._TRN_DownloaderGetRequiredChunks(a,b,z,C));for(a=0;a<C;++a){var E=Module.getValue(z+8*a,"double");this.hasChunk(E)?d.have.push(E):this.hadChunk(E)?d.missing.push(E):d.downloading.push(E)}}}finally{z&&Module._free(z),Module.stackRestore(e)}return d},keepVisibleChunks:function(a,b){for(var d=b.length,e=Module.chunkMax/2,w=0,C=0;C<d;++C){var z=this.getRequiredChunkOffsetArrays(a,b[C]),E=z.have,L=E.length;w+=L;if(w>e){this.keepChunks(E.slice(0,L-w+e));break}this.keepChunks(z.have)}},getChunkAsync:function(a){var b=
198
- this,d=a+this.chunkSize,e=this.chunkSize;d>this.length&&(e-=d-this.length);return r(this.url,a,e,this.customHeaders,this.withCredentials).then(function(w){b.writeChunk(w,a)})},getChunks:function(a){for(var b=a.length,d=Array(b),e=0;e<b;++e)d[e]=this.getChunkAsync(a[e]);return CancellablePromise.all(d)},keepChunks:function(a){for(var b=a.length,d=0;d<b;++d)this.lruUpdate(a[d])},writeChunk:function(a,b,d){Object(l.b)(this.lruList,this.chunkMap,this.chunkSize,Module.chunkMax,a,b,d);this.lruUpdate(b)}};
199
- var D=function(a){this.chunkStorage=a;this.position=0;this.length=this.chunkStorage.length;this.chunkSize=a.chunkSize};D.prototype={read:function(a,b,d){var e=this.position+d<=this.length,w=e?d:this.length-this.position;if(this.position<this.length){var C;for(C=0;C<w;){var z=this.position%this.chunkSize;var E=this.position-z;var L=w-C,N=a.subarray(b+C,b+C+L);if(this.chunkStorage.hadChunk(E))E=this.chunkStorage.getChunk(E).subarray(z,z+L),N.set(E),N=E.length,C+=N,this.position+=N;else for(this.position+=
200
- L;C<w;++C)N[C]=0}}if(!e){b+=w;if(d-=w)e=this.chunkStorage.getCacheData(),d>e.length&&(d=e.length),C=this.position-this.length,a=a.subarray(b,b+d),E=e.subarray(C,C+d),a.set(E);this.position+=d;return w+d}return w},write:function(a,b,d){var e=this.position+d<=this.length,w=this.position+d<=this.length?d:this.length-this.position,C=a.subarray(b,b+w),z=this.position%this.chunkSize;this.chunkStorage.writeChunk(C,this.position-z,z);this.position+=w;if(!e){C=b+w;if(d-=w)b=this.chunkStorage.getCacheData(),
201
- d>b.length&&(d=b.length),e=this.position-this.length,C=a.subarray(C,C+d),b.subarray(e,e+d).set(C);this.position+=d;return w+d}return w},seek:function(a){this.position=a},close:function(){this.chunkStorage=null},getPos:function(){return this.position},getTotalSize:function(){return this.length}};var H=function(a){this.docId=a;this.length=0;this.data=new Int8Array(8192);this.position=0};H.prototype={seek:function(a){this.position=a},close:function(){var a=new Int8Array(this.data.buffer.slice(0,this.length));
202
- Module.ChangeDocBackend(this.docId,{ptr:Module.GetDoc(this.docId),buffer:a});this.data=null},getPos:function(){return this.position},getTotalSize:function(){return this.length},read:function(a,b,d){var e=this.data.length;d=d+b<e?d:e-b;a=a.subarray(b,b+d);b=this.data.subarray(this.position,this.position+d);a.set(b);this.position+=d;return d},write:function(a,b,d){for(var e=this.position+d,w=this.data.length;e>w;){w=Math.max(w*(16777216<w?1.5:2),e);var C=new Int8Array(w);C.set(this.data.subarray(0,
203
- this.length),0);this.data=C}a=a.subarray(b,b+d);this.data.set(a,this.position);this.position+=d;this.position>this.length&&(this.length=this.position);return d}};var I={IsSink:function(a){return 66===(a.flags&255)},open:function(a){var b=a.path.slice(1);this.IsSink(a)?(a.provider=new H(b),Module.docs[b].sink=a.provider):a.provider=Module.docs[b].sink?new x(Module.docs[b].sink.data):Module.docs[b].chunkStorage?new D(Module.docs[b].chunkStorage):Module.docs[b].buffer?new x(Module.docs[b].buffer):new g(Module.docs[b].file)},
204
- close:function(a){a.provider.close()},read:function(a,b,d,e,w){return a.provider.read(b,d,e)},llseek:function(a,b,d){a=a.provider;1===d?b+=a.getPos():2===d&&(b=a.getTotalSize()+b);if(0>b)throw new FS.ErrnoError(t.ERRNO_CODES.EINVAL);a.seek(b);return b},write:function(a,b,d,e,w){return e?a.provider.write(b,d,e):0}};t.THROW=function(a){throw{type:"PDFWorkerError",message:a};};var J=function(a){return"Exception: \n\t Message: ".concat(c.GetJSStringFromCString(Module._TRN_GetMessage(a)),"\n\t Filename: ").concat(c.GetJSStringFromCString(Module._TRN_GetFileName(a)),
205
- "\n\t Function: ").concat(c.GetJSStringFromCString(Module._TRN_GetFunction(a)),"\n\t Linenumber: ").concat(c.GetJSStringFromCString(Module._TRN_GetLineNum(a)))};c.GetErrToString=J;t.REX=function(a){a&&THROW(J(a))};c.Initialize=function(a){var b=Module.stackSave();a=a?Module.allocate(Module.intArrayFromString(a),"i8",Module.ALLOC_STACK):0;REX(Module._TRN_PDFNetInitialize(a));Module.stackRestore(b)};c.GetDoc=function(a){if(a in Module.docs)return Module.docs[a].ptr;throw{type:"InvalidDocReference",
206
- message:"Unable to access Document id=".concat(a,". The document appears to be invalid or was deleted.")};};c.clearDocBackend=function(){null!==Module.cachePtr?(Module.hasBufOwnership&&Module._free(Module.cachePtr),Module.cachePtr=null):Module.docs[c.currentFileString]&&delete Module.docs[c.currentFileString]};c.MakeDev=function(a){if(!k[a]){var b=FS.makedev(3,5);FS.registerDevice(b,I);FS.mkdev(a,511,b);k[a]=!0}};c.CreateDocFileBackend=function(a,b){Module.MakeDev(b);var d=Module.allocate(4,"i8",
207
- Module.ALLOC_STACK);Module.docs[b]={file:a};a=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocCreateFromFilePath(a,d));d=Module.getValue(d,"i8*");Module.docs[b].ptr=d};c.InsertImageIntoDoc=function(a,b,d){var e=[];try{var w=Module.ElementBuilderCreate();e.push(function(){Module.ElementBuilderDestroy(w)});var C=Module.ElementWriterCreate();e.push(function(){Module.ElementWriterDestroy(C)});if(d){var z=d.width;var E=d.height}else z=Module.ImageGetImageWidth(b),
208
- E=Module.ImageGetImageHeight(b),d=z/E,d>612/792?(z=612,E=parseInt(z/d,10)):(E=792,z=parseInt(E*d,10));var L=Module.ElementBuilderCreateImage(w,b,0,0,z,E),N=Module.PDFDocPageCreate(a,z,E);Module.ElementWriterBegin(C,N);Module.ElementWriterWritePlacedElement(C,L);Module.ElementWriterEnd(C);Module.PDFDocPagePushBack(a,N)}finally{e.reverse().forEach(function(Q){Q()})}};var G=function(a,b,d){"object"===n(a)?(this.m_pages=a.m_pages,this.m_has_named_dests=a.m_has_named_dests,this.m_finished_download=a.m_finished_download,
209
- this.m_has_outline=a.m_has_outline,this.m_current_page=a.m_current_page,this.m_id=a.m_id,this.size=a.size,this.timeout=a.timeout,this.eventPageArray=a.eventPageArray,this.requirePageCallbacks=a.requirePageCallbacks):(this.m_pages=[],this.m_has_outline=this.m_finished_download=this.m_has_named_dests=!1,this.m_current_page=1,this.m_id=d,this.size=a,this.timeout=null,this.eventPageArray=[],this.requirePageCallbacks={});this.downloadUserData=Module.createDownloadUserData(b,d)};G.prototype={getJSUrl:function(){return Module.extractDownloadUserData(this.downloadUserData).url},
82
+ za="http://www.w3.org/1999/xhtml",Db=!1,eb=null,bc=n({},["http://www.w3.org/1998/Math/MathML","http://www.w3.org/2000/svg","http://www.w3.org/1999/xhtml"],d),Oa=n({},["mi","mo","mn","ms","mtext"]),Pa=n({},["annotation-xml"]),cc=n({},["title","style","font","a","script"]),Ga=null,dc=["application/xhtml+xml","text/html"],da=null,ua=null,ec=U.createElement("form"),Eb=function(C){return C instanceof RegExp||C instanceof Function},fb=function(){var C=0<arguments.length&&void 0!==arguments[0]?arguments[0]:
83
+ {};if(!ua||ua!==C){C&&"object"===typeof C||(C={});C=x(C);Ga=-1===dc.indexOf(C.PARSER_MEDIA_TYPE)?"text/html":C.PARSER_MEDIA_TYPE;da="application/xhtml+xml"===Ga?d:b;ca=E(C,"ALLOWED_TAGS")?n({},C.ALLOWED_TAGS,da):sb;ea=E(C,"ALLOWED_ATTR")?n({},C.ALLOWED_ATTR,da):tb;eb=E(C,"ALLOWED_NAMESPACES")?n({},C.ALLOWED_NAMESPACES,d):bc;db=E(C,"ADD_URI_SAFE_ATTR")?n(x(Cb),C.ADD_URI_SAFE_ATTR,da):Cb;Ab=E(C,"ADD_DATA_URI_TAGS")?n(x(Bb),C.ADD_DATA_URI_TAGS,da):Bb;ya=E(C,"FORBID_CONTENTS")?n({},C.FORBID_CONTENTS,
84
+ da):zb;Ea=E(C,"FORBID_TAGS")?n({},C.FORBID_TAGS,da):x({});Za=E(C,"FORBID_ATTR")?n({},C.FORBID_ATTR,da):x({});xa=E(C,"USE_PROFILES")?C.USE_PROFILES:!1;ub=!1!==C.ALLOW_ARIA_ATTR;$a=!1!==C.ALLOW_DATA_ATTR;vb=C.ALLOW_UNKNOWN_PROTOCOLS||!1;wb=!1!==C.ALLOW_SELF_CLOSE_IN_ATTR;va=C.SAFE_FOR_TEMPLATES||!1;La=!1!==C.SAFE_FOR_XML;sa=C.WHOLE_DOCUMENT||!1;wa=C.RETURN_DOM||!1;Ma=C.RETURN_DOM_FRAGMENT||!1;Na=C.RETURN_TRUSTED_TYPE||!1;bb=C.FORCE_BODY||!1;xb=!1!==C.SANITIZE_DOM;yb=C.SANITIZE_NAMED_PROPS||!1;cb=!1!==
85
+ C.KEEP_CONTENT;Fa=C.IN_PLACE||!1;rb=C.ALLOWED_URI_REGEXP||Qa;za=C.NAMESPACE||"http://www.w3.org/1999/xhtml";Oa=C.MATHML_TEXT_INTEGRATION_POINTS||Oa;Pa=C.HTML_INTEGRATION_POINTS||Pa;Z=C.CUSTOM_ELEMENT_HANDLING||{};C.CUSTOM_ELEMENT_HANDLING&&Eb(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Z.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck);C.CUSTOM_ELEMENT_HANDLING&&Eb(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Z.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck);C.CUSTOM_ELEMENT_HANDLING&&
86
+ "boolean"===typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Z.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements);va&&($a=!1);Ma&&(wa=!0);xa&&(ca=n({},ka),ea=[],!0===xa.html&&(n(ca,Q),n(ea,qa)),!0===xa.svg&&(n(ca,V),n(ea,oa),n(ea,Y)),!0===xa.svgFilters&&(n(ca,X),n(ea,oa),n(ea,Y)),!0===xa.mathMl&&(n(ca,ma),n(ea,ra),n(ea,Y)));C.ADD_TAGS&&(ca===sb&&(ca=x(ca)),n(ca,C.ADD_TAGS,da));C.ADD_ATTR&&(ea===tb&&(ea=x(ea)),n(ea,C.ADD_ATTR,da));C.ADD_URI_SAFE_ATTR&&
87
+ n(db,C.ADD_URI_SAFE_ATTR,da);C.FORBID_CONTENTS&&(ya===zb&&(ya=x(ya)),n(ya,C.FORBID_CONTENTS,da));cb&&(ca["#text"]=!0);sa&&n(ca,["html","head","body"]);ca.table&&(n(ca,["tbody"]),delete Ea.tbody);if(C.TRUSTED_TYPES_POLICY){if("function"!==typeof C.TRUSTED_TYPES_POLICY.createHTML)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!==typeof C.TRUSTED_TYPES_POLICY.createScriptURL)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
88
+ fa=C.TRUSTED_TYPES_POLICY;Da=fa.createHTML("")}else void 0===fa&&(fa=fc(Ja,na)),null!==fa&&"string"===typeof Da&&(Da=fa.createHTML(""));e&&e(C);ua=C}},Fb=n({},[].concat($jscomp.arrayFromIterable(V),$jscomp.arrayFromIterable(X),$jscomp.arrayFromIterable(ia))),Gb=n({},[].concat($jscomp.arrayFromIterable(ma),$jscomp.arrayFromIterable(la))),gc=function(C){var J=Ka(C);J&&J.tagName||(J={namespaceURI:za,tagName:"template"});var M=b(C.tagName),P=b(J.tagName);return eb[C.namespaceURI]?"http://www.w3.org/2000/svg"===
89
+ C.namespaceURI?"http://www.w3.org/1999/xhtml"===J.namespaceURI?"svg"===M:"http://www.w3.org/1998/Math/MathML"===J.namespaceURI?"svg"===M&&("annotation-xml"===P||Oa[P]):!!Fb[M]:"http://www.w3.org/1998/Math/MathML"===C.namespaceURI?"http://www.w3.org/1999/xhtml"===J.namespaceURI?"math"===M:"http://www.w3.org/2000/svg"===J.namespaceURI?"math"===M&&Pa[P]:!!Gb[M]:"http://www.w3.org/1999/xhtml"===C.namespaceURI?"http://www.w3.org/2000/svg"===J.namespaceURI&&!Pa[P]||"http://www.w3.org/1998/Math/MathML"===
90
+ J.namespaceURI&&!Oa[P]?!1:!Gb[M]&&(cc[M]||!Fb[M]):"application/xhtml+xml"===Ga&&eb[C.namespaceURI]?!0:!1:!1},pa=function(C){H(S.removed,{element:C});try{Ka(C).removeChild(C)}catch(J){Sb(C)}},Aa=function(C,J){try{H(S.removed,{attribute:J.getAttributeNode(C),from:J})}catch(M){H(S.removed,{attribute:null,from:J})}J.removeAttribute(C);if("is"===C)if(wa||Ma)try{pa(J)}catch(M){}else try{J.setAttribute(C,"")}catch(M){}},Hb=function(C){var J=null,M=null;bb?C="<remove></remove>"+C:M=(M=p(C,/^[\r\n\t ]+/))&&
91
+ M[0];"application/xhtml+xml"===Ga&&"http://www.w3.org/1999/xhtml"===za&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");var P=fa?fa.createHTML(C):C;if("http://www.w3.org/1999/xhtml"===za)try{J=(new Qb).parseFromString(P,Ga)}catch(R){}if(!J||!J.documentElement){J=Va.createDocument(za,"template",null);try{J.documentElement.innerHTML=Db?Da:P}catch(R){}}P=J.body||J.documentElement;C&&M&&P.insertBefore(U.createTextNode(M),P.childNodes[0]||null);return"http://www.w3.org/1999/xhtml"===
92
+ za?Xb.call(J,sa?"html":"body")[0]:sa?J.documentElement:P},Ib=function(C){return Vb.call(C.ownerDocument||C,C,Ca.SHOW_ELEMENT|Ca.SHOW_COMMENT|Ca.SHOW_TEXT|Ca.SHOW_PROCESSING_INSTRUCTION|Ca.SHOW_CDATA_SECTION,null)},gb=function(C){return C instanceof Pb&&("string"!==typeof C.nodeName||"string"!==typeof C.textContent||"function"!==typeof C.removeChild||!(C.attributes instanceof Ob)||"function"!==typeof C.removeAttribute||"function"!==typeof C.setAttribute||"string"!==typeof C.namespaceURI||"function"!==
93
+ typeof C.insertBefore||"function"!==typeof C.hasChildNodes)},Jb=function(C){return"function"===typeof Ua&&C instanceof Ua},Kb=function(C){var J=null;T(ha.beforeSanitizeElements,C,null);if(gb(C))return pa(C),!0;var M=da(C.nodeName);T(ha.uponSanitizeElement,C,{tagName:M,allowedTags:ca});if(La&&C.hasChildNodes()&&!Jb(C.firstElementChild)&&K(/<[/\w!]/g,C.innerHTML)&&K(/<[/\w!]/g,C.textContent)||C.nodeType===Ba.progressingInstruction||La&&C.nodeType===Ba.comment&&K(/<[/\w]/g,C.data))return pa(C),!0;if(!ca[M]||
94
+ Ea[M]){if(!Ea[M]&&"annotation-xml"!==M&&p(M,qb)&&(Z.tagNameCheck instanceof RegExp&&K(Z.tagNameCheck,M)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(M)))return!1;if(cb&&!ya[M]){M=Ka(C)||C.parentNode;var P=Ub(C)||C.childNodes;if(P&&M)for(var R=P.length-1;0<=R;--R){var ba=Rb(P[R],!0);ba.__removalCount=(C.__removalCount||0)+1;M.insertBefore(ba,Tb(C))}}pa(C);return!0}if(C instanceof mb&&!gc(C)||("noscript"===M||"noembed"===M||"noframes"===M)&&K(/<\/no(script|embed|frames)/i,C.innerHTML))return pa(C),
95
+ !0;va&&C.nodeType===Ba.text&&(J=C.textContent,I([Wa,Xa,Ya],function(ja){J=g(J,ja," ")}),C.textContent!==J&&(H(S.removed,{element:C.cloneNode()}),C.textContent=J));T(ha.afterSanitizeElements,C,null);return!1},Lb=function(C,J,M){if(xb&&("id"===J||"name"===J)&&(M in U||M in ec))return!1;if(!$a||Za[J]||!K(Zb,J))if(!ub||!K($b,J))if(!ea[J]||Za[J]){if(!("annotation-xml"!==C&&p(C,qb)&&(Z.tagNameCheck instanceof RegExp&&K(Z.tagNameCheck,C)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(C))&&(Z.attributeNameCheck instanceof
96
+ RegExp&&K(Z.attributeNameCheck,J)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(J))||"is"===J&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&K(Z.tagNameCheck,M)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(M))))return!1}else if(!(db[J]||K(rb,g(M,pb,""))||("src"===J||"xlink:href"===J||"href"===J)&&"script"!==C&&0===z(M,"data:")&&Ab[C]||vb&&!K(ac,g(M,pb,"")))&&M)return!1;return!0},Nb=function(C){T(ha.beforeSanitizeAttributes,C,null);var J=C.attributes;
97
+ if(J&&!gb(C)){for(var M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ea,forceKeepAttr:void 0},P=J.length,R={};P--;){var ba=J[P],ja=ba.name,hb=ba.namespaceURI,ib=ba.value;ba=da(ja);R.$jscomp$loop$prop$value$10="value"===ja?ib:y(ib);M.attrName=ba;M.attrValue=R.$jscomp$loop$prop$value$10;M.keepAttr=!0;M.forceKeepAttr=void 0;T(ha.uponSanitizeAttribute,C,M);R.$jscomp$loop$prop$value$10=M.attrValue;!yb||"id"!==ba&&"name"!==ba||(Aa(ja,C),R.$jscomp$loop$prop$value$10="user-content-"+R.$jscomp$loop$prop$value$10);
98
+ if(La&&K(/((--!?|])>)|<\/(style|title)/i,R.$jscomp$loop$prop$value$10))Aa(ja,C);else if(!M.forceKeepAttr)if(M.keepAttr)if(!wb&&K(/\/>/i,R.$jscomp$loop$prop$value$10))Aa(ja,C);else{va&&I([Wa,Xa,Ya],function(jb){return function(hc){jb.$jscomp$loop$prop$value$10=g(jb.$jscomp$loop$prop$value$10,hc," ")}}(R));var Mb=da(C.nodeName);if(Lb(Mb,ba,R.$jscomp$loop$prop$value$10)){if(fa&&"object"===typeof Ja&&"function"===typeof Ja.getAttributeType&&!hb)switch(Ja.getAttributeType(Mb,ba)){case "TrustedHTML":R.$jscomp$loop$prop$value$10=
99
+ fa.createHTML(R.$jscomp$loop$prop$value$10);break;case "TrustedScriptURL":R.$jscomp$loop$prop$value$10=fa.createScriptURL(R.$jscomp$loop$prop$value$10)}if(R.$jscomp$loop$prop$value$10!==ib)try{hb?C.setAttributeNS(hb,ja,R.$jscomp$loop$prop$value$10):C.setAttribute(ja,R.$jscomp$loop$prop$value$10),gb(C)?pa(C):G(S.removed)}catch(jb){Aa(ja,C)}}else Aa(ja,C)}else Aa(ja,C);R={$jscomp$loop$prop$value$10:R.$jscomp$loop$prop$value$10}}T(ha.afterSanitizeAttributes,C,null)}},ic=function M(J){var P,R=Ib(J);for(T(ha.beforeSanitizeShadowDOM,
100
+ J,null);P=R.nextNode();)T(ha.uponSanitizeShadowNode,P,null),Kb(P),Nb(P),P.content instanceof lb&&M(P.content);T(ha.afterSanitizeShadowDOM,J,null)};S.sanitize=function(J){var M=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},P=null,R=null;R=R=null;(Db=!J)&&(J="\x3c!--\x3e");if("string"!==typeof J&&!Jb(J))if("function"===typeof J.toString){if(J=J.toString(),"string"!==typeof J)throw N("dirty is not a string, aborting");}else throw N("toString is not a function");if(!S.isSupported)return J;
101
+ ab||fb(M);S.removed=[];"string"===typeof J&&(Fa=!1);if(Fa){if(J.nodeName&&(M=da(J.nodeName),!ca[M]||Ea[M]))throw N("root node is forbidden and cannot be sanitized in-place");}else if(J instanceof Ua)P=Hb("\x3c!----\x3e"),R=P.ownerDocument.importNode(J,!0),R.nodeType===Ba.element&&"BODY"===R.nodeName?P=R:"HTML"===R.nodeName?P=R:P.appendChild(R);else{if(!wa&&!va&&!sa&&-1===J.indexOf("<"))return fa&&Na?fa.createHTML(J):J;P=Hb(J);if(!P)return wa?null:Na?Da:""}P&&bb&&pa(P.firstChild);for(M=Ib(Fa?J:P);R=
102
+ M.nextNode();)Kb(R),Nb(R),R.content instanceof lb&&ic(R.content);if(Fa)return J;if(wa){if(Ma)for(R=Wb.call(P.ownerDocument);P.firstChild;)R.appendChild(P.firstChild);else R=P;if(ea.shadowroot||ea.shadowrootmode)R=Yb.call(W,R,!0);return R}var ba=sa?P.outerHTML:P.innerHTML;sa&&ca["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&K(Ra,P.ownerDocument.doctype.name)&&(ba="<!DOCTYPE "+P.ownerDocument.doctype.name+">\n"+ba);va&&I([Wa,Xa,Ya],function(ja){ba=g(ba,ja," ")});
103
+ return fa&&Na?fa.createHTML(ba):ba};S.setConfig=function(){fb(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});ab=!0};S.clearConfig=function(){ua=null;ab=!1};S.isValidAttribute=function(J,M,P){ua||fb({});J=da(J);M=da(M);return Lb(J,M,P)};S.addHook=function(J,M){"function"===typeof M&&H(ha[J],M)};S.removeHook=function(J,M){return void 0!==M?(M=L(ha[J],M),-1===M?void 0:a(ha[J],M,1)[0]):G(ha[J])};S.removeHooks=function(J){ha[J]=[]};S.removeAllHooks=function(){ha=nb()};return S}var c=Object,
104
+ m=c.entries,k=c.setPrototypeOf,h=c.isFrozen,f=c.getPrototypeOf,r=c.getOwnPropertyDescriptor,A=Object,e=A.freeze;c=A.seal;var w=A.create;A="undefined"!==typeof Reflect&&Reflect;var F=A.apply,D=A.construct;e||(e=function(T){return T});c||(c=function(T){return T});F||(F=function(T,O,S){return T.apply(O,S)});D||(D=function(T,O){return new (Function.prototype.bind.apply(T,[null].concat($jscomp.arrayFromIterable(O))))});var I=q(Array.prototype.forEach),L=q(Array.prototype.lastIndexOf),G=q(Array.prototype.pop),
105
+ H=q(Array.prototype.push),a=q(Array.prototype.splice),b=q(String.prototype.toLowerCase),d=q(String.prototype.toString),p=q(String.prototype.match),g=q(String.prototype.replace),z=q(String.prototype.indexOf),y=q(String.prototype.trim),E=q(Object.prototype.hasOwnProperty),K=q(RegExp.prototype.test),N=function(T){return function(){for(var O=arguments.length,S=Array(O),U=0;U<O;U++)S[U]=arguments[U];return D(T,S)}}(TypeError),Q=e("a abbr acronym address area article aside audio b bdi bdo big blink blockquote body br button canvas caption center cite code col colgroup content data datalist dd decorator del details dfn dialog dir div dl dt element em fieldset figcaption figure font footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i img input ins kbd label legend li main map mark marquee menu menuitem meter nav nobr ol optgroup option output p picture pre progress q rp rt ruby s samp section select shadow small source spacer span strike strong style sub summary sup table tbody td template textarea tfoot th thead time tr track tt u ul var video wbr".split(" ")),
106
+ V=e("svg a altglyph altglyphdef altglyphitem animatecolor animatemotion animatetransform circle clippath defs desc ellipse filter font g glyph glyphref hkern image line lineargradient marker mask metadata mpath path pattern polygon polyline radialgradient rect stop style switch symbol text textpath title tref tspan view vkern".split(" ")),X=e("feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence".split(" ")),
107
+ ia=e("animate color-profile cursor discard font-face font-face-format font-face-name font-face-src font-face-uri foreignobject hatch hatchpath mesh meshgradient meshpatch meshrow missing-glyph script set solidcolor unknown use".split(" ")),ma=e("math menclose merror mfenced mfrac mglyph mi mlabeledtr mmultiscripts mn mo mover mpadded mphantom mroot mrow ms mspace msqrt mstyle msub msup msubsup mtable mtd mtext mtr munder munderover mprescripts".split(" ")),la=e("maction maligngroup malignmark mlongdiv mscarries mscarry msgroup mstack msline msrow semantics annotation annotation-xml mprescripts none".split(" ")),
108
+ ka=e(["#text"]),qa=e("accept action align alt autocapitalize autocomplete autopictureinpicture autoplay background bgcolor border capture cellpadding cellspacing checked cite class clear color cols colspan controls controlslist coords crossorigin datetime decoding default dir disabled disablepictureinpicture disableremoteplayback download draggable enctype enterkeyhint face for headers height hidden high href hreflang id inputmode integrity ismap kind label lang list loading loop low max maxlength media method min minlength multiple muted name nonce noshade novalidate nowrap open optimum pattern placeholder playsinline popover popovertarget popovertargetaction poster preload pubdate radiogroup readonly rel required rev reversed role rows rowspan spellcheck scope selected shape size sizes span srclang start src srcset step style summary tabindex title translate type usemap valign value width wrap xmlns slot".split(" ")),
109
+ oa=e("accent-height accumulate additive alignment-baseline amplitude ascent attributename attributetype azimuth basefrequency baseline-shift begin bias by class clip clippathunits clip-path clip-rule color color-interpolation color-interpolation-filters color-profile color-rendering cx cy d dx dy diffuseconstant direction display divisor dur edgemode elevation end exponent fill fill-opacity fill-rule filter filterunits flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight fx fy g1 g2 glyph-name glyphref gradientunits gradienttransform height href id image-rendering in in2 intercept k k1 k2 k3 k4 kerning keypoints keysplines keytimes lang lengthadjust letter-spacing kernelmatrix kernelunitlength lighting-color local marker-end marker-mid marker-start markerheight markerunits markerwidth maskcontentunits maskunits max mask media method mode min name numoctaves offset operator opacity order orient orientation origin overflow paint-order path pathlength patterncontentunits patterntransform patternunits points preservealpha preserveaspectratio primitiveunits r rx ry radius refx refy repeatcount repeatdur restart result rotate scale seed shape-rendering slope specularconstant specularexponent spreadmethod startoffset stddeviation stitchtiles stop-color stop-opacity stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke stroke-width style surfacescale systemlanguage tabindex tablevalues targetx targety transform transform-origin text-anchor text-decoration text-rendering textlength type u1 u2 unicode values viewbox visibility version vert-adv-y vert-origin-x vert-origin-y width word-spacing wrap writing-mode xchannelselector ychannelselector x x1 x2 xmlns y y1 y2 z zoomandpan".split(" ")),
110
+ ra=e("accent accentunder align bevelled close columnsalign columnlines columnspan denomalign depth dir display displaystyle encoding fence frame height href id largeop length linethickness lspace lquote mathbackground mathcolor mathsize mathvariant maxsize minsize movablelimits notation numalign open rowalign rowlines rowspacing rowspan rspace rquote scriptlevel scriptminsize scriptsizemultiplier selection separator separators stretchy subscriptshift supscriptshift symmetric voffset width xmlns".split(" ")),
111
+ Y=e(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]);A=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm);var Ha=c(/<%[\w\W]*|[\w\W]*%>/gm),Sa=c(/\$\{[\w\W]*/gm),kb=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ta=c(/^aria-[\-\w]+$/),Qa=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ia=c(/^(?:\w+script|data):/i),ta=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ra=c(/^html$/i);c=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var ob=Object.freeze({__proto__:null,
112
+ ARIA_ATTR:Ta,ATTR_WHITESPACE:ta,CUSTOM_ELEMENT:c,DATA_ATTR:kb,DOCTYPE_NAME:Ra,ERB_EXPR:Ha,IS_ALLOWED_URI:Qa,IS_SCRIPT_OR_DATA:Ia,MUSTACHE_EXPR:A,TMPLIT_EXPR:Sa}),Ba={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},fc=function(T,O){if("object"!==typeof T||"function"!==typeof T.createPolicy)return null;var S=null;O&&O.hasAttribute("data-tt-policy-suffix")&&(S=O.getAttribute("data-tt-policy-suffix"));
113
+ O="dompurify"+(S?"#"+S:"");try{return T.createPolicy(O,{createHTML:function(U){return U},createScriptURL:function(U){return U}})}catch(U){return console.warn("TrustedTypes policy "+O+" could not be created."),null}},nb=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};return t()})},function(v,B){function u(){throw Error("setTimeout has not been defined");
114
+ }function q(){throw Error("clearTimeout has not been defined");}function n(w){if(k===setTimeout)return setTimeout(w,0);if((k===u||!k)&&setTimeout)return k=setTimeout,setTimeout(w,0);try{return k(w,0)}catch(F){try{return k.call(null,w,0)}catch(D){return k.call(this,w,0)}}}function x(w){if(h===clearTimeout)return clearTimeout(w);if((h===q||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(w);try{return h(w)}catch(F){try{return h.call(null,w)}catch(D){return h.call(this,w)}}}function l(){r&&A&&(r=
115
+ !1,A.length?f=A.concat(f):e=-1,f.length&&t())}function t(){if(!r){var w=n(l);r=!0;for(var F=f.length;F;){A=f;for(f=[];++e<F;)A&&A[e].run();e=-1;F=f.length}A=null;r=!1;x(w)}}function c(w,F){this.fun=w;this.array=F}function m(){}v=v.exports={};try{var k="function"===typeof setTimeout?setTimeout:u}catch(w){k=u}try{var h="function"===typeof clearTimeout?clearTimeout:q}catch(w){h=q}var f=[],r=!1,A,e=-1;v.nextTick=function(w){var F=Array(arguments.length-1);if(1<arguments.length)for(var D=1;D<arguments.length;D++)F[D-
116
+ 1]=arguments[D];f.push(new c(w,F));1!==f.length||r||n(t)};c.prototype.run=function(){this.fun.apply(null,this.array)};v.title="browser";v.browser=!0;v.env={};v.argv=[];v.version="";v.versions={};v.on=m;v.addListener=m;v.once=m;v.off=m;v.removeListener=m;v.removeAllListeners=m;v.emit=m;v.prependListener=m;v.prependOnceListener=m;v.listeners=function(w){return[]};v.binding=function(w){throw Error("process.binding is not supported");};v.cwd=function(){return"/"};v.chdir=function(w){throw Error("process.chdir is not supported");
117
+ };v.umask=function(){return 0}},function(v,B,u){B.a=function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(q,n){void 0===q&&(q=0);void 0===n&&(n=this.byteLength);q=Math.floor(q);n=Math.floor(n);0>q&&(q+=this.byteLength);0>n&&(n+=this.byteLength);q=Math.min(Math.max(0,q),this.byteLength);n=Math.min(Math.max(0,n),this.byteLength);if(0>=n-q)return new ArrayBuffer(0);var x=new ArrayBuffer(n-q),l=new Uint8Array(x);q=new Uint8Array(this,q,n-q);l.set(q);return x})}},function(v,B,u){B.a=
118
+ function(q){var n={};decodeURIComponent(q.slice(1)).split("&").forEach(function(x){x=x.split("=",2);n[x[0]]=x[1]});return n}},function(v,B,u){(function(q){function n(I){"function"!==typeof I&&(I=new Function("".concat(I)));for(var L=Array(arguments.length-1),G=0;G<L.length;G++)L[G]=arguments[G+1];A[r]={callback:I,args:L};F(r);return r++}function x(I){delete A[I]}function l(I){if(e)setTimeout(l,0,I);else{var L=A[I];if(L){e=!0;try{var G=L.callback,H=L.args;switch(H.length){case 0:G();break;case 1:G(H[0]);
119
+ break;case 2:G(H[0],H[1]);break;case 3:G(H[0],H[1],H[2]);break;default:G.apply(void 0,H)}}finally{x(I),e=!1}}}}function t(){F=function(I){q.nextTick(function(){l(I)})}}function c(){if(f.postMessage&&!f.importScripts){var I=!0,L=f.onmessage;f.onmessage=function(){I=!1};f.postMessage("","*");f.onmessage=L;return I}}function m(){var I="setImmediate$".concat(Math.random(),"$"),L=function(G){G.source!==f&&G.source!==f.parent||"string"!==typeof G.data||0!==G.data.indexOf(I)||l(+G.data.slice(I.length))};
120
+ f.addEventListener?f.addEventListener("message",L,!1):f.attachEvent("onmessage",L);F=function(G){f.postMessage(I+G,"*")}}function k(){var I=w.documentElement;F=function(L){var G=w.createElement("script");G.onreadystatechange=function(){l(L);G.onreadystatechange=null;I.removeChild(G);G=null};I.appendChild(G)}}function h(){F=function(I){setTimeout(l,0,I)}}var f="undefined"===typeof window?self:window,r=1,A={},e=!1,w=f.document,F,D=Object.getPrototypeOf&&Object.getPrototypeOf(f);D=D&&D.setTimeout?D:
121
+ f;"[object process]"==={}.toString.call(f.process)?t():c()?m():w&&"onreadystatechange"in w.createElement("script")?k():h();D.setImmediate=n;D.clearImmediate=x;B.a={setImmediate:n,clearImmediate:x}}).call(this,u(14))},function(v,B,u){var q=u(0),n=u(2);v=function(){function x(l,t){this.name=l;this.comObj=t;this.callbackIndex=1;this.postMessageTransfers=!0;this.callbacksCapabilities={};this.actionHandler={};this.actionHandlerAsync={};this.pdfnetCommandChain=this.nextAsync=null;this.pdfnetActiveCommands=
122
+ new Set;this.isReset=!1;this.actionHandler.console_log=[function(c){Object(q.d)(c)}];this.actionHandler.console_error=[function(c){Object(q.c)(c)}];this.actionHandler.workerLoaded=[function(){}];this.msgHandler=this.handleMessage.bind(this);t.addEventListener("message",this.msgHandler)}x.prototype.on=function(l,t,c){var m=this.actionHandler;m[l]&&Object(q.c)('There is already an actionName called "'.concat(l,'"'));m[l]=[t,c]};x.prototype.clearActionHandlers=function(){this.actionHandler={};this.comObj.removeEventListener("message",
123
+ this.msgHandler)};x.prototype.reset=function(){var l=this;this.isReset=!0;Object.keys(this.callbacksCapabilities).forEach(function(t){l.cancelPromise(parseInt(t,10))});this.clearActionHandlers();this.comObj.reset&&this.comObj.reset();this.comObj={};this.callbacksCapabilities={}};x.prototype.replace=function(l,t,c){this.actionHandler[l]=[t,c]};x.prototype.onAsync=function(l,t,c){var m=this.actionHandlerAsync;m[l]&&Object(q.c)('There is already an actionName called "'.concat(l,'"'));m[l]=[t,c]};x.prototype.replaceAsync=
124
+ function(l,t,c){var m=this.actionHandlerAsync,k=this.actionHandler;k[l]&&delete k[l];m[l]=[t,c]};x.prototype.onNextAsync=function(l){this.nextAsync=l};x.prototype.send=function(l,t){this.postMessage({action:l,data:t})};x.prototype.getNextId=function(){return this.callbackIndex++};x.prototype.sendWithPromise=function(l,t,c){var m=this.getNextId();l={action:l,data:t,callbackId:m,priority:c};t=window.createPromiseCapability();if(!this.isReset){this.callbacksCapabilities[m]=t;try{this.postMessage(l)}catch(k){t.reject(k)}}return t.promise};
125
+ x.prototype.sendWithPromiseReturnId=function(l,t,c){var m=this.getNextId();l={action:l,data:t,callbackId:m,priority:c};t=window.createPromiseCapability();if(!this.isReset){this.callbacksCapabilities[m]=t;try{this.postMessage(l)}catch(k){t.reject(k)}}return{promise:t.promise,callbackId:m}};x.prototype.sendWithPromiseWithId=function(l,t,c){t>this.callbackIndex&&Object(q.c)("Can't reuse callbackId ".concat(t," lesser than callbackIndex ").concat(this.callbackIndex));t in this.callbacksCapabilities&&
126
+ Object(q.c)("Can't reuse callbackId ".concat(t,". There is a capability waiting to be resolved. "));l={action:l,data:c,callbackId:t};c=window.createPromiseCapability();if(!this.isReset){this.callbacksCapabilities[t]=c;try{this.postMessage(l)}catch(m){c.reject(m)}}return c.promise};x.prototype.sendError=function(l,t){if(l.message||l.errorData){l.message&&l.message.message&&(l.message=l.message.message);var c=l.errorData;l={type:l.type?l.type:"JavascriptError",message:l.message};c&&Object.keys(c).forEach(function(m){c.hasOwnProperty(m)&&
127
+ (l[m]=c[m])})}this.postMessage({isReply:!0,callbackId:t,error:l})};x.prototype.getPromise=function(l){if(l in this.callbacksCapabilities)return this.callbacksCapabilities[l];Object(q.c)("Cannot get promise for callback ".concat(l))};x.prototype.cancelPromise=function(l){if(l in this.callbacksCapabilities){var t=this.callbacksCapabilities[l];delete this.callbacksCapabilities[l];this.pdfnetActiveCommands.has(l)&&this.pdfnetActiveCommands.delete(l);t.reject({type:"Cancelled",message:"Request has been cancelled."});
128
+ this.postMessage({action:"actionCancel",data:{callbackId:l}})}else Object(q.b)("Cannot cancel callback ".concat(l))};x.prototype.postMessage=function(l){"officeeditor"!==this.name&&Object(n.a)("enableWorkerLogs")&&Object(q.d)("PDFWorker","".concat(performance.now()," Sent ").concat(JSON.stringify(l)));if(this.postMessageTransfers){var t=this.getTransfersArray(l);this.comObj.postMessage(l,t)}else this.comObj.postMessage(l)};x.prototype.getObjectTransfers=function(l,t){var c=this;null!==l&&"object"===
129
+ typeof l&&(l instanceof Uint8Array?t.push(l.buffer):l instanceof ArrayBuffer?t.push(l):Object.keys(l).forEach(function(m){l.hasOwnProperty(m)&&c.getObjectTransfers(l[m],t)}))};x.prototype.getTransfersArray=function(l){var t=[];this.getObjectTransfers(l,t);return 0===t.length?void 0:t};x.prototype.handleMessage=function(l){var t=this,c=l.data;"officeeditor"!==this.name&&Object(n.a)("enableWorkerLogs")&&Object(q.d)("PDFWorker","".concat(performance.now()," Received ").concat(JSON.stringify(c)));var m=
130
+ this.actionHandler,k=this.actionHandlerAsync;l=this.callbacksCapabilities;var h=this.pdfnetActiveCommands;if(c.isReply)m=c.callbackId,m in l?(k=l[m],delete l[m],h.has(m)&&h.delete(m),"error"in c?k.reject(c.error):k.resolve(c.data)):Object(q.a)("Cannot resolve callback ".concat(m));else if(c.action in m){var f=m[c.action];c.callbackId?Promise.resolve().then(function(){return f[0].call(f[1],c.data)}).then(function(r){t.postMessage({isReply:!0,callbackId:c.callbackId,data:r})},function(r){t.sendError(r,
131
+ c.callbackId)}):f[0].call(f[1],c.data)}else c.action in k?(f=k[c.action],c.callbackId?f[0].call(f[1],c).then(function(r){t.postMessage({isReply:!0,callbackId:c.callbackId,data:r});t.nextAsync()},function(r){t.sendError(r,c.callbackId);t.nextAsync()}):f[0].call(f[1],c).then(function(){t.nextAsync()},function(){t.nextAsync()})):Object(q.c)("Unknown action from worker: ".concat(c.action))};return x}();B.a=v},function(v,B,u){u.d(B,"a",function(){return c});var q=u(3),n=u(11),x=u(7),l=u(8),t=function(){function m(k){var h=
132
+ this;this.promise=k.then(function(f){h.response=f;h.status=200})}m.prototype.addEventListener=function(k,h){this.promise.then(h)};return m}(),c=function(m,k,h,f){if(Object(x.a)()&&!h){self.Module.instantiateWasm=function(A,e){return Object(n.a)("".concat(m,"Wasm.wasm"),A,k["Wasm.wasm"],f).then(function(w){e(w.instance)})};if(k.disableObjectURLBlobs){importScripts("".concat(m,"Wasm.js"));return}h=Object(q.b)("".concat(m,"Wasm.js.mem"),k["Wasm.js.mem"],!1,!1)}else{if(k.disableObjectURLBlobs){importScripts("".concat((self.Module.asmjsPrefix?
133
+ self.Module.asmjsPrefix:"")+m,".js"));return}h=Object(q.b)("".concat((self.Module.asmjsPrefix?self.Module.asmjsPrefix:"")+m,".js.mem"),k[".js.mem"],!1);var r=Object(q.b)("".concat((self.Module.memoryInitializerPrefixURL?self.Module.memoryInitializerPrefixURL:"")+m,".mem"),k[".mem"],!0,!0);self.Module.memoryInitializerRequest=new t(r)}h=new Blob([h],{type:"application/javascript"});importScripts(Object(l.a)(URL.createObjectURL(h)))}},function(v,B,u){u.d(B,"a",function(){return q});var q="optimized/"},
134
+ function(v,B,u){v.exports=u(22)},function(v,B,u){u.r(B);u(7);v=u(15);u(23);u(24);u(27);u(28);u(29);u(30);u(31);Object(v.a)()},function(v,B,u){(function(q){"undefined"===typeof q.crypto&&(q.crypto={getRandomValues:function(n){for(var x=0;x<n.length;x++)n[x]=256*Math.random()}})})("undefined"===typeof window?self:window)},function(v,B,u){(function(q,n){function x(l){"@babel/helpers - typeof";return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&
135
+ "function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x(l)}(function(l){function t(){for(var y=0;y<g.length;y++)g[y][0](g[y][1]);g=[];z=!1}function c(y,E){g.push([y,E]);z||(z=!0,p(t,0))}function m(y,E){function K(Q){f(E,Q)}function N(Q){A(E,Q)}try{y(K,N)}catch(Q){N(Q)}}function k(y){var E=y.owner,K=E.state_;E=E.data_;var N=y[K];y=y.then;if("function"===typeof N){K=a;try{E=N(E)}catch(Q){A(y,Q)}}h(y,E)||(K===a&&f(y,E),K===b&&A(y,E))}function h(y,E){var K;try{if(y===
136
+ E)throw new TypeError("A promises callback cannot return that same promise.");if(E&&("function"===typeof E||"object"===x(E))){var N=E.then;if("function"===typeof N)return N.call(E,function(Q){K||(K=!0,E!==Q?f(y,Q):r(y,Q))},function(Q){K||(K=!0,A(y,Q))}),!0}}catch(Q){return K||A(y,Q),!0}return!1}function f(y,E){y!==E&&h(y,E)||r(y,E)}function r(y,E){y.state_===G&&(y.state_=H,y.data_=E,c(w,y))}function A(y,E){y.state_===G&&(y.state_=H,y.data_=E,c(F,y))}function e(y){var E=y.then_;y.then_=void 0;for(y=
137
+ 0;y<E.length;y++)k(E[y])}function w(y){y.state_=a;e(y)}function F(y){y.state_=b;e(y)}function D(y){if("function"!==typeof y)throw new TypeError("Promise constructor takes a function argument");if(!(this instanceof D))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[];m(y,this)}l.createPromiseCapability=function(){var y={};y.promise=new D(function(E,K){y.resolve=E;y.reject=K});return y};var I=l.Promise,
138
+ L=I&&"resolve"in I&&"reject"in I&&"all"in I&&"race"in I&&function(){var y;new I(function(E){y=E});return"function"===typeof y}();"undefined"!==typeof exports&&exports?(exports.Promise=L?I:D,exports.Polyfill=D):"function"===typeof define&&u(26)?define(function(){return L?I:D}):L||(l.Promise=D);var G="pending",H="sealed",a="fulfilled",b="rejected",d=function(){},p="undefined"!==typeof n?n:setTimeout,g=[],z;D.prototype={constructor:D,state_:G,then_:null,data_:void 0,then:function(y,E){y={owner:this,
139
+ then:new this.constructor(d),fulfilled:y,rejected:E};this.state_===a||this.state_===b?c(k,y):this.then_.push(y);return y.then},"catch":function(y){return this.then(null,y)}};D.all=function(y){if("[object Array]"!==Object.prototype.toString.call(y))throw new TypeError("You must pass an array to Promise.all().");return new this(function(E,K){function N(ma){V++;return function(la){Q[ma]=la;--V||E(Q)}}for(var Q=[],V=0,X=0,ia;X<y.length;X++)(ia=y[X])&&"function"===typeof ia.then?ia.then(N(X),K):Q[X]=ia;
140
+ V||E(Q)})};D.race=function(y){if("[object Array]"!==Object.prototype.toString.call(y))throw new TypeError("You must pass an array to Promise.race().");return new this(function(E,K){for(var N=0,Q;N<y.length;N++)(Q=y[N])&&"function"===typeof Q.then?Q.then(E,K):E(Q)})};D.resolve=function(y){return y&&"object"===x(y)&&y.constructor===this?y:new this(function(E){E(y)})};D.reject=function(y){return new this(function(E,K){K(y)})}})("undefined"!==typeof window?window:"undefined"!==typeof q?q:"undefined"!==
141
+ typeof self?self:void 0)}).call(this,u(12),u(10).setImmediate)},function(v,B,u){(function(q,n){(function(x,l){function t(G){delete w[G]}function c(G){if(F)setTimeout(c,0,G);else{var H=w[G];if(H){F=!0;try{var a=H.callback,b=H.args;switch(b.length){case 0:a();break;case 1:a(b[0]);break;case 2:a(b[0],b[1]);break;case 3:a(b[0],b[1],b[2]);break;default:a.apply(l,b)}}finally{t(G),F=!1}}}}function m(){I=function(G){n.nextTick(function(){c(G)})}}function k(){if(x.postMessage&&!x.importScripts){var G=!0,H=
142
+ x.onmessage;x.onmessage=function(){G=!1};x.postMessage("","*");x.onmessage=H;return G}}function h(){var G="setImmediate$"+Math.random()+"$",H=function(a){a.source===x&&"string"===typeof a.data&&0===a.data.indexOf(G)&&c(+a.data.slice(G.length))};x.addEventListener?x.addEventListener("message",H,!1):x.attachEvent("onmessage",H);I=function(a){x.postMessage(G+a,"*")}}function f(){var G=new MessageChannel;G.port1.onmessage=function(H){c(H.data)};I=function(H){G.port2.postMessage(H)}}function r(){var G=
143
+ D.documentElement;I=function(H){var a=D.createElement("script");a.onreadystatechange=function(){c(H);a.onreadystatechange=null;G.removeChild(a);a=null};G.appendChild(a)}}function A(){I=function(G){setTimeout(c,0,G)}}if(!x.setImmediate){var e=1,w={},F=!1,D=x.document,I,L=Object.getPrototypeOf&&Object.getPrototypeOf(x);L=L&&L.setTimeout?L:x;"[object process]"==={}.toString.call(x.process)?m():k()?h():x.MessageChannel?f():D&&"onreadystatechange"in D.createElement("script")?r():A();L.setImmediate=function(G){"function"!==
144
+ typeof G&&(G=new Function(""+G));for(var H=Array(arguments.length-1),a=0;a<H.length;a++)H[a]=arguments[a+1];w[e]={callback:G,args:H};I(e);return e++};L.clearImmediate=t}})("undefined"===typeof self?"undefined"===typeof q?this:q:self)}).call(this,u(12),u(14))},function(v,B){v.exports={}},function(v,B,u){(function(q){var n=function(x,l){var t=function(m){m=this["catch"](m);return{cancel:l,promise:m,then:c.bind(m),"catch":t.bind(m)}},c=function(m,k){m=this.then(m,k);return{cancel:l,promise:m,then:c.bind(m),
145
+ "catch":t.bind(m)}};return{cancel:l,promise:x,then:c.bind(x),"catch":t.bind(x)}};q.CancellablePromise=function(x,l){var t=!1,c,m=new Promise(function(k,h){c=function(){t||(l(),h("cancelled"))};(new Promise(x)).then(function(f){t=!0;k(f)},function(f){t=!0;h(f)})});return n(m,c)};q.CancellablePromise.all=function(x){var l=Promise.all(x);return n(l,function(){x.forEach(function(t){t.cancel&&t.cancel()})})}})("undefined"===typeof self?void 0:self)},function(v,B,u){(function(q,n){function x(m){"@babel/helpers - typeof";
146
+ return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(k){return typeof k}:function(k){return k&&"function"==typeof Symbol&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},x(m)}function l(m,k){var h=Object.keys(m);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(m);k&&(f=f.filter(function(r){return Object.getOwnPropertyDescriptor(m,r).enumerable}));h.push.apply(h,f)}return h}function t(m){for(var k=1;k<arguments.length;k++){var h=null!=arguments[k]?
147
+ arguments[k]:{};k%2?l(Object(h),!0).forEach(function(f){var r,A=h[f];a:if("object"==x(f)&&f){var e=f[Symbol.toPrimitive];if(void 0!==e){f=e.call(f,"string");if("object"!=x(f))break a;throw new TypeError("@@toPrimitive must return a primitive value.");}f=String(f)}(r="symbol"==x(f)?f:f+"")in m?Object.defineProperty(m,r,{value:A,enumerable:!0,configurable:!0,writable:!0}):m[r]=A}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(h)):l(Object(h)).forEach(function(f){Object.defineProperty(m,
148
+ f,Object.getOwnPropertyDescriptor(h,f))})}return m}var c=u(1);(function(m){m.Module={INITIAL_MEMORY:50331648,noExitRuntime:!0,devicePixelRatio:1,cur_doc:null,cachePtrSize:0,hasBufOwnership:!0,loaded:!1,initCb:null,cachePtr:null,cleanupState:null,docs:{},postEvent:function(k,h,f){Module.workerMessageHandler.send("event",{docId:k,type:h,data:f})},postProgressiveRenderingStartEvent:function(k,h){Module.postEvent(k,"progressiveRenderingStart",{pageNum:h})},postPagesUpdatedEvent:function(k,h,f,r){k={pageDimensions:Module.GetPageDimensions(k)};
149
+ if(f)for(var A=0;A<f.length;++A)f[A]in k.pageDimensions?(k.pageDimensions[f[A]].contentChanged=!0,r&&(k.pageDimensions[f[A]].annotationsUnchanged=!0)):console.warn("Invalid Page Number ".concat(f[A]));Module.postEvent(h,"pagesUpdated",k);return k},postPagesRenamedEvent:function(k,h){var f={};k=Module.PDFDocGetPageIterator(k,1);for(var r=1;Module.IteratorHasNext(k);++r){var A=Module.stackSave(),e=Module.IteratorCurrent(k);f[r]=Module.PageGetId(e);Module.IteratorNext(k);Module.stackRestore(A)}Module.postEvent(h,
150
+ "pagesRenamed",{pageNumToId:f})},GetAnnotationObjs:function(k){var h=[],f=1;for(k=Module.PDFDocGetPageIterator(k,1);Module.IteratorHasNext(k);Module.IteratorNext(k)){for(var r=Module.PageGetNumAnnots(Module.IteratorCurrent(k)),A=0;A<r;++A){var e=Module.PageGetAnnot(Module.IteratorCurrent(k),A);e=Module.AnnotGetSDFObjNum(e);h.push(e)}f++}return h},GetLinearizedSaveReferenceChanges:function(k,h){var f=[],r=0,A=1;for(k=Module.PDFDocGetPageIterator(k,1);Module.IteratorHasNext(k);Module.IteratorNext(k))for(var e=
151
+ Module.PageGetNumAnnots(Module.IteratorCurrent(k)),w=0;w<e;++w){var F=Module.PageGetAnnot(Module.IteratorCurrent(k),w),D=Module.AnnotGetSDFObjNum(F);D!=h[r]&&(F=Module.AnnotGetSDFObjGen(F),f.push({oldObjNum:h[r],discardAppearance:!1,newObjNum:D,genNum:F,pageNum:A}));++r;++A}r!=h.length&&console.warn("Annotation count has changed, cannot sync all the new obj numbers.");return f},GetIndividualPageDimensions:function(k,h,f){k=Module.PageGetPageInfo(f);k.id=Module.PageGetId(f);return k},GetPageDimensionsRange:function(k,
152
+ h,f){for(var r={},A=Module.PDFDocGetPageIterator(k,h);h<f&&Module.IteratorHasNext(A);++h){var e=Module.stackSave(),w=Module.IteratorCurrent(A);r[h]=this.GetIndividualPageDimensions(k,h,w);Module.IteratorNext(A);Module.stackRestore(e)}return r},GetPageDimensionsContentChangedList:function(k,h){h.sort(function(I,L){return I-L});for(var f={},r=h[0],A=h[h.length-1],e=0,w=Module.PDFDocGetPageIterator(k,r);r<=A&&Module.IteratorHasNext(w);++r){if(h[e]==r){for(++e;h[e]==r;)++e;var F=Module.stackSave(),D=
153
+ Module.IteratorCurrent(w);D=this.GetIndividualPageDimensions(k,r,D);D.contentChanged=!0;f[r]=D;Module.stackRestore(F)}Module.IteratorNext(w)}return f},GetPageDimensions:function(k){try{var h=Module.stackSave();var f=Module.GetPageCount(k);if(0===f)throw"This document has no pages.";return Module.GetPageDimensionsRange(k,1,f+1)}finally{Module.stackRestore(h)}},loadDoc:function(k,h){"undefined"===typeof Module&&this._main();var f=null;try{var r=Module.stackSave();k.customHandlerId&&Module._TRN_PDFNetAddPDFTronCustomHandler(k.customHandlerId);
154
+ h=Module.CreateDoc(k,h);var A=Module.GetDoc(h);if(Module.PDFDocInitSecurityHandler(A))return{docId:h,pageDimensions:Module.GetPageDimensions(A)};f={type:"NeedsPassword",errorData:{docId:h},message:"This document requires a password"}}catch(e){f={type:"InvalidPDF",message:e}}finally{Module.stackRestore(r)}throw f;},loadCanvas:function(k,h,f,r,A,e,w,F){var D=Module.GetDoc(k),I=Module.docs[k].chunkStorage,L=Promise.resolve();if(I&&2===F.overprintMode){var G=Module.GetDownloadData(D);if(!G.docInfoRequested){var H=
155
+ Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DownloaderPrefetchDocInfo(G.downloader,H));0==Module.getValue(H,"i8")&&(L=G.docInfoPromiseCapability.promise);G.docInfoRequested=!0}}return new Promise(function(a,b){var d=h+1,p=function(){a(L.then(function(){return Module.RasterizePage(D,d,f,r,e,A,w,F,k)}))};if(I){var g=Module.GetDownloadData(D).downloader,z=I.getRequiredChunkOffsetArrays(g,d);I.keepChunks(z.have);g=function(){var y=I.getChunks(z.missing);Module.loadPromise=y.then(function(){var E=
156
+ Module.loadPromise.cancelled;Module.loadPromise=null;E||p()})["catch"](function(E){"cancelled"!==E?b(E):Module.loadPromise=null})};Module.loadPromise?Module.loadPromise.then(g,g):g()}else p()})},loadResources:function(k,h){Module.Initialize(h);Object(c.b)("worker","PDFNet initialized!");Module._TRN_PDFNetSetDefaultDiskCachingEnabled(!1);k=new Uint8Array(k);Module.PDFNetSetResourceData(k)},onRuntimeInitialized:function(){"undefined"===typeof Module&&(("undefined"!==typeof window?window:self).Module=
157
+ {});(function(k){k.PDFDocExportXFDF=function(h,f){h=Module.GetDoc(h);var r=Module.stackSave();try{var A=f?Module.PDFDocFDFExtract(h,f):Module.PDFDocFDFExtract(h);var e=Module.FDFDocSaveAsXFDF(A);Module.stackRestore(r)}catch(w){throw Module.stackRestore(r),w;}return e};k.PageArrayToPageSet=function(h){var f=Module.stackSave();try{var r=Module.PageSetCreate();for(var A=0;A<h.length;++A)Module.PageSetAddPage(r,h[A]);Module.stackRestore(f)}catch(e){throw Module.stackRestore(f),e;}return r};k.cancelCurrent=
158
+ function(){var h=Module.loadPromise;return h?(h.cancel(),h.cancelled=!0):(h=Module.cleanupState)?(q(h.timeout),h.cleanupArr.reverse().forEach(function(f){f()}),Module.cleanupState=null,!0):!1};k.SetWorkerRestartCallback=function(h){Module.workerRestartCallback=h};k.XFDFMerge=function(h,f,r){if(f){var A=Module.GetDoc(h),e=[];try{Object(c.b)("worker","Merge XFDF of length ".concat(f.length));var w=Module.GetUStringFromJSString(f,!0);e.push(function(){Module.UStringDestroy(w)});var F=Module.allocate(4,
159
+ "i8",Module.ALLOC_STACK);REX(Module._TRN_FDFDocCreateFromXFDF(w,F));var D=Module.getValue(F,"i8*");e.push(function(){Module.FDFDocDestroy(D)});var I=Module.PDFDocFDFUpdate(A,D,r);I&&I.length&&Module.postEvent(h,"apRefChanged",{apRefChanges:I})}finally{e.reverse().forEach(function(L){L()})}}};k.ExecuteXFDFCommand=function(h,f){f&&REX(Module._TRN_PDFDocMergeXFDFString(Module.GetDoc(h),Module.GetUStringFromJSString(f),null))};k.MergeXFDF=function(h,f,r){return new Promise(function(A,e){var w=[];try{var F=
160
+ Module.stackSave();w[w.length]=function(){Module.stackRestore(F)};Module.XFDFMerge(h,f,r);w.forEach(function(D){D()});A({})}catch(D){w.forEach(function(I){I()}),e(D)}})};k.CreateBufferFile=function(h,f,r){Module.MakeDev(h);var A=new ArrayBuffer(f);A=new Uint8Array(A);r=r?0:255;for(var e=0;e<f;++e)A[e]=r;Module.docs[h]={buffer:A}};k.ReadBufferFile=function(h,f){var r=Module.docs[h].buffer;f&&(Module.docs[h].buffer=new Uint8Array(r.buffer.slice(0)));return r};k.RemoveBufferFile=function(h){Module.docs[h]=
161
+ null};k.SaveHelper=function(h,f,r){r="undefined"===typeof r?2:r;Module.MakeDev(f);var A=[];r&16&&(A=Module.GetAnnotationObjs(h));var e=Module._TRN_PDFDocSave(h,Module.GetUStringFromJSString(f),r);Module.docs[f].sink=null;REX(e);r&16&&(Module.postPagesRenamedEvent(h,f),0<A.length&&(h=Module.GetLinearizedSaveReferenceChanges(h,A),0<h.length&&Module.postEvent(f,"apRefChanged",{apRefChanges:h})));return Module.docs[f].buffer.buffer};k.SaveDoc=function(h,f,r,A,e,w,F,D,I,L){return new Promise(function(G,
162
+ H){var a=[];try{var b=Module.GetDoc(h),d=Module.stackSave();a[a.length]=function(){Module.stackRestore(d)};f?Module.XFDFMerge(h,f,F):L&&Module.ExecuteXFDFCommand(h,L);var p=Module.allocate(8,"i8",Module.ALLOC_STACK),g=Module.allocate(Module.intArrayFromString('{"UseNonStandardRotation": true}'),"i8",Module.ALLOC_STACK);Module.setValue(p,g,"i8*");Module.setValue(p+4,0,"i32");Module._TRN_PDFDocRefreshAnnotAppearances(b,p);if(w){p=function(Y){Y=new Uint8Array(Y);m.FS.writeFile("watermarkFile",Y);Y=Module.ImageCreateFromFile(b,
163
+ Module.GetUStringFromJSString("watermarkFile"));m.FS.unlink("watermarkFile");return Y};var z=Module.ElementBuilderCreate();a.push(function(){Module.ElementBuilderDestroy(z)});var y=Module.ElementWriterCreate();a.push(function(){Module.ElementWriterDestroy(y)});try{if(!w.hasOwnProperty("default"))throw Error("Watermark dictionary has no 'default' key!");var E=p(w["default"]),K=Module.PDFDocGetPageIterator(b,1);for(g=-1;Module.IteratorHasNext(K);){var N=Module.IteratorCurrent(K);Module.IteratorNext(K);
164
+ g++;var Q=g.toString();try{var V=void 0;if(w.hasOwnProperty(Q)){var X=w[Q];if(X)V=p(X);else continue}else V=E;var ia=Module.PageGetPageInfo(N),ma=Module.ElementBuilderCreateImage(z,V,0,0,ia.width,ia.height);Module.ElementWriterBegin(y,N);Module.ElementWriterWritePlacedElement(y,ma);Module.ElementWriterEnd(y)}catch(Y){console.warn("Watermark for page "+Q+"can not be added due to error: "+Y)}}}catch(Y){console.warn("Watermarks can not be added due to error: "+Y)}}if(D){var la=Module.SecurityHandlerCreate(I);
165
+ la&&(Module.SecurityHandlerChangeUserPasswordUString(la,D),Module.PDFDocSetSecurityHandler(b,la))}E=0;if(A){var ka=Module.PDFDocGetRoot(b);(E=Module.ObjFindObj(ka,"OpenAction"))&&Module.ObjPut(ka,"__OpenActionBackup__",E);var qa=Module.ObjPutDict(ka,"OpenAction");Module.ObjPutName(qa,"Type","Action");Module.ObjPutName(qa,"S","JavaScript");Module.ObjPutString(qa,"JS","this.print()")}var oa=Module.SaveHelper(b,h,e);A&&(E?Module.ObjPut(ka,"OpenAction",Module.ObjFindObj(ka,"__OpenActionBackup__")):Module.ObjErase(ka,
166
+ "OpenAction"));a.reverse().forEach(function(Y){Y()});if(r)G({fileData:oa});else{var ra=oa.slice(0);G({fileData:ra})}}catch(Y){a.reverse().forEach(function(Ha){Ha()}),H(Y)}})};k.SaveDocFromFixedElements=function(h,f,r,A,e,w,F){h=Module.CreateDocFromLayoutEls(h);h=Module.CreateDoc({type:"ptr",value:h});return Module.SaveDoc(h,f,!0,!1,r,A,e,w,F)};k.GetCurrentCanvasData=function(h){var f=Module.currentRenderData;if(!f)return null;h&&REX(Module._TRN_PDFRasterizerUpdateBuffer(f.rast));var r=Date.now();
167
+ if(f.bufPtr){h=new Uint8Array(new ArrayBuffer(f.buf_size));for(var A=0,e=0;e<f.out_height;++e)for(var w=f.bufPtr+f.stride*e,F=0;F<f.out_width;++F)h[A++]=Module.HEAPU8[w+2],h[A++]=Module.HEAPU8[w+1],h[A++]=Module.HEAPU8[w],h[A++]=Module.HEAPU8[w+3],w+=4}else h=Module.ReadBufferFile("b",h);Object(c.b)("bufferTiming","Copy took ".concat(Date.now()-r));return{pageBuf:h.buffer,pageWidth:f.out_width,pageHeight:f.out_height}};k.RasterizePage=function(h,f,r,A,e,w,F,D,I){return new Promise(function(L,G){Module.currentRenderData=
168
+ {};var H=Module.currentRenderData;H.out_width=parseInt(r,10);H.out_height=parseInt(A,10);var a=[];a.push(function(){Module.currentRenderData=null});try{var b=Module.stackSave();a[a.length]=function(){Module.stackRestore(b)};var d=Module.GetPage(h,f),p=Module.PageGetPageWidth(d),g=Module.PageGetPageHeight(d);H.stride=4*H.out_width;H.buf_size=H.out_width*H.out_height*4;Object(c.b)("Memory","Created rasterizer");H.rast=Module.PDFRasterizerCreate();a.push(function(){Object(c.b)("Memory","Destroyed rasterizer");
169
+ Module._TRN_PDFRasterizerDestroy(H.rast)});if(F){var z=Module.EMSCreateUpdatedLayersContext(h,F);0!==z&&(REX(Module._TRN_PDFRasterizerSetOCGContext(H.rast,z)),a.push(function(){Module._TRN_OCGContextDestroy(z)}))}var y=!1;D.hasOwnProperty("renderAnnots")?(D.renderAnnots&&(y=!0),REX(Module._TRN_PDFRasterizerSetDrawAnnotations(H.rast,D.renderAnnots?1:0))):REX(Module._TRN_PDFRasterizerSetDrawAnnotations(H.rast,0));D.hasOwnProperty("highlightFields")&&(D.highlightFields&&(y=!0),REX(Module._TRN_PDFRasterizerSetHighlightFields(H.rast,
170
+ D.highlightFields)));D.hasOwnProperty("antiAliasing")&&REX(Module._TRN_PDFRasterizerSetAntiAliasing(H.rast,D.antiAliasing));D.hasOwnProperty("pathHinting")&&REX(Module._TRN_PDFRasterizerSetPathHinting(H.rast,D.pathHinting));if(D.hasOwnProperty("thinLinePixelGridFit")){var E=!0;D.hasOwnProperty("thinLineStrokeAdjust")&&(E=D.thinLineStrokeAdjust);REX(Module._TRN_PDFRasterizerSetThinLineAdjustment(H.rast,D.thinLinePixelGridFit,E))}else D.hasOwnProperty("thinLineStrokeAdjust")&&REX(Module._TRN_PDFRasterizerSetThinLineAdjustment(H.rast,
171
+ !1,D.thinLineStrokeAdjust));D.hasOwnProperty("thinLineScaling")&&REX(Module._TRN_PDFRasterizerSetThinLineScaling(H.rast,D.thinLineScaling));if(D.hasOwnProperty("nightModeTuningContrast")||D.hasOwnProperty("nightModeTuningSaturation")||D.hasOwnProperty("nightModeTuningFlipness")){var K=D.hasOwnProperty("nightModeTuningContrast")?D.nightModeTuningContrast:.9,N=D.hasOwnProperty("nightModeTuningSaturation")?D.nightModeTuningSaturation:.8,Q=D.hasOwnProperty("nightModeTuningFlipness")?D.nightModeTuningFlipness:
172
+ 1;REX(Module._TRN_PDFRasterizerSetNightModeTuning(H.rast,K,N,Q))}D.hasOwnProperty("imageSmoothing")?(E=!1,D.hasOwnProperty("hqImageResampling")&&(E=D.hqImageResampling),REX(Module._TRN_PDFRasterizerSetImageSmoothing(H.rast,D.imageSmoothing,E))):D.hasOwnProperty("hqImageResampling")&&REX(Module._TRN_PDFRasterizerSetImageSmoothing(H.rast,!0,D.hqImageResampling));D.hasOwnProperty("caching")&&REX(Module._TRN_PDFRasterizerSetCaching(H.rast,D.caching));D.hasOwnProperty("expGamma")&&REX(Module._TRN_PDFRasterizerSetGamma(H.rast,
173
+ D.expGamma));D.hasOwnProperty("isPrinting")&&(D.isPrinting&&(y=!0),REX(Module._TRN_PDFRasterizerSetPrintMode(H.rast,D.isPrinting)));D.hasOwnProperty("colorPostProcessMode")&&(D.colorPostProcessMode&&(y=!0),REX(Module._TRN_PDFRasterizerSetColorPostProcessMode(H.rast,D.colorPostProcessMode)));var V=Module.PageGetRotation(d);E=1===w||3===w;V=(1===V||3===V)!==E;var X=Module.allocate(48,"i8",Module.ALLOC_STACK);if(e){e.x1=e[0];e.y1=e[1];e.x2=e[2];e.y2=e[3];var ia=Module.PageGetDefaultMatrix(d,0),ma=Module.Matrix2DInverse(ia);
174
+ e=Module.Matrix2DMultBBox(ma,e);if(e.x2<e.x1){var la=e.x1;e.x1=e.x2;e.x2=la}e.y2<e.y1&&(la=e.y1,e.y1=e.y2,e.y2=la);var ka=H.out_width/(V?e.y2-e.y1:e.x2-e.x1);var qa=Module.GetDefaultMatrixBox(d,e,w)}else qa=Module.PageGetDefaultMatrix(d,w),ka=H.out_width/(E?g:p);Module.Matrix2DSet(X,ka,0,0,ka,0,0);Module.Matrix2DConcat(X,qa);var oa=Module.allocate(4,"i8",Module.ALLOC_STACK),ra=Module.allocate(4,"i8",Module.ALLOC_STACK);y?(H.bufPtr=Module._malloc(H.buf_size),Module._memset(H.bufPtr,D.pageTransparent?
175
+ 0:255,H.buf_size),a.push(function(){Module._free(H.bufPtr)})):(Module.CreateBufferFile("b",H.buf_size,D.pageTransparent),a.push(function(){Module.RemoveBufferFile("b")}));var Y=D.overprintMode;if(10===Y){REX(Module._TRN_PDFRasterizerSetOverprint(H.rast,1));var Ha=Module.PDFRasterizerRasterizeSeparations(H.rast,d,H.out_width,H.out_height,X,0,0);L({pageBuf:Ha,pageWidth:H.out_width,pageHeight:H.out_height})}else{REX(Module._TRN_PDFRasterizerSetOverprint(H.rast,Y));y?REX(Module._TRN_PDFRasterizerGetChunkRenderer(H.rast,
176
+ d,H.bufPtr,H.out_width,H.out_height,H.stride,4,!0,X,0,0,0,oa)):REX(Module._TRN_PDFRasterizerGetChunkRendererPath(H.rast,d,Module.GetUStringFromJSString("b"),H.out_width,H.out_height,!0,X,0,0,0,oa));var Sa=Module.getValue(oa,"i8*");a.push(function(){REX(Module._TRN_ChunkRendererDestroy(Sa))})}var kb=(new Date).getTime(),Ta=function(){try{if(REX(Module._TRN_ChunkRendererRenderForTimePeriod(Sa,200,ra)),Module.getValue(ra,"i8"))Module.cleanupState.timeout=n(Ta);else{var Ia=Module.GetCurrentCanvasData(!1);
177
+ Object(c.b)("worker","Total Page Time ".concat((new Date).getTime()-kb));a.reverse().forEach(function(ta){ta()});L(Ia)}}catch(ta){a.reverse().forEach(function(Ra){Ra()}),G(ta)}};D.useProgress&&Module.postProgressiveRenderingStartEvent(I,f);var Qa=n(Ta);Module.cleanupState={cleanupArr:a,timeout:Qa};a.push(function(){Module.cleanupState=null})}catch(Ia){a.reverse().forEach(function(ta){ta()}),G(Ia)}})};k.UpdatePassword=function(h,f){try{var r=Module.stackSave();var A=Module.GetDoc(h);return Module.PDFDocInitStdSecurityHandler(A,
178
+ f)?(A in downloadDataMap&&REX(Module._TRN_PDFDocDownloaderInitialize(A,downloadDataMap[A].downloader)),{success:!0,pageDimensions:Module.GetPageDimensions(A)}):{success:!1}}finally{Module.stackRestore(r)}};k.UpdateCustomHeader=function(h,f){Module.customHeadersMap[h]=h in Module.customHeadersMap?t(t({},Module.customHeadersMap[h]),f):f;Module.docs[h].chunkStorage&&(Module.docs[h].chunkStorage.customHeaders=Module.customHeadersMap[h])};k.TriggerFullDownload=function(h){return new Promise(function(f,
179
+ r){var A=Module.GetDoc(h);try{A in downloadDataMap&&REX(Module.PDFDocDownloaderTriggerFullDownload(A,downloadDataMap[A].downloader)),f({})}catch(e){r(e)}})};k.InsertBlankPages=function(h,f,r,A){return new Promise(function(e,w){var F=[],D=Module.GetDoc(h);try{var I=Module.stackSave();F[F.length]=function(){Module.stackRestore(I)};for(var L=f.length-1;0<=L;--L){var G=Module.PDFDocGetPageIterator(D,f[L]),H=Module.PDFDocPageCreate(D,r,A);Module.PDFDocPageInsert(D,G,H)}var a=Module.postPagesUpdatedEvent(D,
180
+ h);F.forEach(function(b){b()});e(a)}catch(b){F.forEach(function(d){d()}),w(b)}})};k.InsertPages=function(h,f,r,A,e,w){return new Promise(function(F,D){var I=[],L=Module.GetDoc(h);try{var G=Module.stackSave();I[I.length]=function(){Module.stackRestore(G)};if(f instanceof ArrayBuffer){var H=Module.CreateDoc(f);var a=Module.GetDoc(H);I[I.length]=function(){Module.DeleteDoc(H)}}else a=Module.GetDoc(f);for(var b=r.length,d=Module.PageSetCreate(),p=0;p<b;++p)Module.PageSetAddPage(d,r[p]);w?Module.PDFDocInsertPages2(L,
181
+ A,a,d,e):Module.PDFDocInsertPages(L,A,a,d,e);var g;w||(g=Module.postPagesUpdatedEvent(L,h));I.reverse().forEach(function(z){z()});F(g)}catch(z){I.reverse().forEach(function(y){y()}),D(z)}})};k.MovePages=function(h,f,r){return new Promise(function(A,e){var w=[],F=Module.GetDoc(h);try{var D=Module.stackSave();w[w.length]=function(){Module.stackRestore(D)};for(var I=f.length,L=Module.PageSetCreate(),G=0;G<I;++G)Module.PageSetAddPage(L,f[G]);Module.PDFDocMovePages(F,r,L);var H=Module.postPagesUpdatedEvent(F,
182
+ h);w.forEach(function(a){a()});A(H)}catch(a){w.forEach(function(b){b()}),e(a)}})};k.RemovePages=function(h,f,r){return new Promise(function(A,e){var w=Module.GetDoc(h),F=[];try{var D=Module.stackSave();F[F.length]=function(){Module.stackRestore(D)};for(var I=f.length-1;0<=I;--I){var L=Module.PDFDocGetPageIterator(w,f[I]);Module.IteratorHasNext(L)&&(r?Module.PDFDocPageRemove2(w,L):Module.PDFDocPageRemove(w,L))}var G;r||(G=Module.postPagesUpdatedEvent(w,h));F.forEach(function(H){H()});A(G)}catch(H){F.forEach(function(a){a()}),
183
+ e(H)}})};k.RotatePages=function(h,f,r){return new Promise(function(A,e){var w=Module.GetDoc(h),F=[];try{var D=Module.stackSave();F[F.length]=function(){Module.stackRestore(D)};var I=f.length,L=0,G=Module.PDFDocGetPageIterator(w,f[0]),H=[];F.push(function(){Module._TRN_IteratorDestroy(G)});for(var a=f[0];Module.IteratorHasNext(G)&&L<f[I-1];++a){if(a===f[L]){var b=Module.IteratorCurrent(G),d=(Module.PageGetRotation(b)+r)%4;Module.PageSetRotation(b,d);H.push(a);L++}Module.IteratorNext(G)}var p=Module.postPagesUpdatedEvent(w,
184
+ h,H,!0);F.reverse().forEach(function(g){g()});A(p)}catch(g){F.reverse().forEach(function(z){z()}),e(g)}})};k.ExtractPages=function(h,f,r,A,e,w){return new Promise(function(F,D){var I=[];try{var L=Module.stackSave();I[I.length]=function(){Module.stackRestore(L)};var G=function(b){I.reverse().forEach(function(d){d()});D(b)};Module.XFDFMerge(h,r,e);var H=Module.CreateEmptyDoc();I[I.length]=function(){Module.DeleteDoc(H)};var a=Module.InsertPages(H,h,f,1,!0,w).then(function(){return Module.SaveDoc(H,
185
+ void 0,!0,!1,void 0,A)}).then(function(b){I.reverse().forEach(function(d){d()});return b});F(a)}catch(b){G(b)}})};k.CropPages=function(h,f,r,A,e,w){return new Promise(function(F,D){var I=Module.GetDoc(h),L=[];try{var G=Module.stackSave();L[L.length]=function(){Module.stackRestore(G)};var H=f.length,a=0,b=Module.PDFDocGetPageIterator(I,f[0]);L.push(function(){Module._TRN_IteratorDestroy(b)});for(var d=[],p=f[0];Module.IteratorHasNext(b)&&a<f[H-1];++p){if(p===f[a]){var g=Module.IteratorCurrent(b),z=
186
+ Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetCropBox(g,z));var y=Module.PageGetRotation(g),E=Module.getValue(z,"double"),K=Module.getValue(z+8,"double"),N=Module.getValue(z+16,"double"),Q=Module.getValue(z+24,"double");0===y%4?(Module.setValue(z,E+e,"double"),Module.setValue(z+8,K+A,"double"),Module.setValue(z+16,N-w,"double"),Module.setValue(z+24,Q-r,"double")):1===y%4?(Module.setValue(z,E+r,"double"),Module.setValue(z+8,K+e,"double"),Module.setValue(z+16,N-A,"double"),Module.setValue(z+
187
+ 24,Q-w,"double")):2===y%4?(Module.setValue(z,E+w,"double"),Module.setValue(z+8,K+r,"double"),Module.setValue(z+16,N-e,"double"),Module.setValue(z+24,Q-A,"double")):3===y%4&&(Module.setValue(z,E+A,"double"),Module.setValue(z+8,K+w,"double"),Module.setValue(z+16,N-r,"double"),Module.setValue(z+24,Q-e,"double"));Module.setValue(z+32,0,"double");REX(Module._TRN_PageSetBox(g,0,z));REX(Module._TRN_PageSetBox(g,1,z));d.push(p);a++}Module.IteratorNext(b)}var V=Module.postPagesUpdatedEvent(I,h,d,!0);L.reverse().forEach(function(X){X()});
188
+ F(V)}catch(X){L.reverse().forEach(function(ia){ia()}),D(X)}})}})("undefined"===typeof self?this.Module:self.Module);this.loaded=!0;Module.initCb&&Module.initCb()}}})(self)}).call(this,u(10).clearImmediate,u(10).setImmediate)},function(v,B,u){(function(q){function n(c){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(m){return typeof m}:function(m){return m&&"function"==typeof Symbol&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},
189
+ n(c)}var x=u(1),l=u(5),t="undefined"!==typeof window?window:self;t.global=t;(function(c){c.currentFileString="/current";var m=0,k=0,h={},f=null;Module.chunkMax=200;var r=function(a,b,d,p,g){var z=new XMLHttpRequest;return CancellablePromise(function(y,E){z.open("GET",a,!0);z.responseType="arraybuffer";z.onerror=function(){E("Network error occurred")};z.onload=function(){if(206===this.status&&z.response.byteLength===d){var N=new Int8Array(z.response);y(N)}else E("Download Failed")};var K=["bytes=",
190
+ b,"-",b+d-1].join("");z.setRequestHeader("Range",K);g&&(z.withCredentials=g);p&&Object.keys(p).forEach(function(N){z.setRequestHeader(N,p[N])});z.send()},function(){z.abort()})},A=function(a){this.maxChunkNum=a;this.lruList=[];this.chunkMap={}};A.prototype={has:function(a){return a in this.chunkMap},insert:function(a,b){this.lruList.length>=this.maxChunkNum&&(delete this.chunkMap[this.lruList[0]],this.lruList.shift());this.lruList.push(b);this.chunkMap[b]=a},get:function(a){var b=this.lruList.lastIndexOf(a);
191
+ 0<=b&&this.lruList.splice(b,1);this.lruList.push(a);return this.chunkMap[a]}};var e=function(a){this.file=a;this.filePosition=0;this.fileLength=a.size;this.chunkSize=1048576;this.chunkCache=new A(8);this.reader=new FileReaderSync};e.prototype={read:function(a,b,d){d=this.filePosition+d<=this.fileLength?d:this.fileLength-this.filePosition;a=a.subarray(b,b+d);b=d;for(var p=this.filePosition%this.chunkSize,g=this.filePosition-p,z=0;0<d;){if(this.chunkCache.has(g))var y=this.chunkCache.get(g);else y=
192
+ new Int8Array(this.reader.readAsArrayBuffer(this.file.slice(g,g+this.chunkSize))),this.chunkCache.insert(y,g);var E=y.length,K=p+d;K<=E?(a.set(y.subarray(p,K),z),this.filePosition+=d,d=0):(a.set(y.subarray(p),z),this.filePosition+=E-p,p=0,g=this.filePosition,d=K-E,z=b-d)}return b},seek:function(a){this.filePosition=a},close:function(){this.reader=this.file=null},getPos:function(){return this.filePosition},getTotalSize:function(){return this.fileLength}};var w=function(a){this.data=a;this.position=
193
+ 0;this.length=this.data.length};w.prototype={read:function(a,b,d){d=this.position+d<=this.length?d:this.length-this.position;a=a.subarray(b,b+d);b=this.data.subarray(this.position,this.position+d);a.set(b);this.position+=d;return d},write:function(a,b,d){d=this.position+d<=this.length?d:this.length-this.position;a=a.subarray(b,b+d);this.data.subarray(this.position,this.position+d).set(a);this.position+=d;return d},seek:function(a){this.position=a},close:function(){this.data=null},getPos:function(){return this.position},
194
+ getTotalSize:function(){return this.length}};var F=function(a,b,d,p,g,z){"object"===n(a)?(this.lruList=a.lruList,this.chunkMap=a.chunkMap,this.length=a.length,this.url=a.url,this.customHeaders=a.customHeaders,this.withCredentials=a.withCredentials,this.chunkSize=a.chunkSize):(this.lruList=[],this.chunkMap={},this.chunkMap[b]=z,this.length=b,this.url=a,this.customHeaders=p,this.withCredentials=g,this.chunkSize=d)};F.prototype={lruUpdate:function(a){var b=this.lruList.lastIndexOf(a);0<=b&&this.lruList.splice(b,
195
+ 1);this.lruList.push(a)},getChunk:function(a){var b=this;if(this.chunkMap[a])this.lruUpdate(a);else{var d=Math.min(a+this.chunkSize,this.length)-1,p=new XMLHttpRequest;p.open("GET",this.url,!1);p.responseType="arraybuffer";p.setRequestHeader("Range",["bytes=",a,"-",d].join(""));this.withCredentials&&(p.withCredentials=this.withCredentials);this.customHeaders&&Object.keys(this.customHeaders).forEach(function(g){p.setRequestHeader(g,b.customHeaders[g])});p.send();if(200===p.status||206===p.status)this.writeChunk(new Int8Array(p.response),
196
+ a);else throw Error("Failed to load data from");}return this.chunkMap[a]},hadChunk:function(a){return a in this.chunkMap},hasChunk:function(a){return this.chunkMap[a]},getCacheData:function(){return this.chunkMap[this.length]},getRequiredChunkOffsetArrays:function(a,b){var d={have:[],downloading:[],missing:[]};try{var p=Module.stackSave();var g=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DownloaderGetRequiredChunksSize(a,b,g));var z=Module.getValue(g,"i8*");if(z){var y=Module._malloc(8*
197
+ z);REX(Module._TRN_DownloaderGetRequiredChunks(a,b,y,z));for(a=0;a<z;++a){var E=Module.getValue(y+8*a,"double");this.hasChunk(E)?d.have.push(E):this.hadChunk(E)?d.missing.push(E):d.downloading.push(E)}}}finally{y&&Module._free(y),Module.stackRestore(p)}return d},keepVisibleChunks:function(a,b){for(var d=b.length,p=Module.chunkMax/2,g=0,z=0;z<d;++z){var y=this.getRequiredChunkOffsetArrays(a,b[z]),E=y.have,K=E.length;g+=K;if(g>p){this.keepChunks(E.slice(0,K-g+p));break}this.keepChunks(y.have)}},getChunkAsync:function(a){var b=
198
+ this,d=a+this.chunkSize,p=this.chunkSize;d>this.length&&(p-=d-this.length);return r(this.url,a,p,this.customHeaders,this.withCredentials).then(function(g){b.writeChunk(g,a)})},getChunks:function(a){for(var b=a.length,d=Array(b),p=0;p<b;++p)d[p]=this.getChunkAsync(a[p]);return CancellablePromise.all(d)},keepChunks:function(a){for(var b=a.length,d=0;d<b;++d)this.lruUpdate(a[d])},writeChunk:function(a,b,d){Object(l.b)(this.lruList,this.chunkMap,this.chunkSize,Module.chunkMax,a,b,d);this.lruUpdate(b)}};
199
+ var D=function(a){this.chunkStorage=a;this.position=0;this.length=this.chunkStorage.length;this.chunkSize=a.chunkSize};D.prototype={read:function(a,b,d){var p=this.position+d<=this.length,g=p?d:this.length-this.position;if(this.position<this.length){var z;for(z=0;z<g;){var y=this.position%this.chunkSize;var E=this.position-y;var K=g-z,N=a.subarray(b+z,b+z+K);if(this.chunkStorage.hadChunk(E))E=this.chunkStorage.getChunk(E).subarray(y,y+K),N.set(E),N=E.length,z+=N,this.position+=N;else for(this.position+=
200
+ K;z<g;++z)N[z]=0}}if(!p){b+=g;if(d-=g)p=this.chunkStorage.getCacheData(),d>p.length&&(d=p.length),z=this.position-this.length,a=a.subarray(b,b+d),E=p.subarray(z,z+d),a.set(E);this.position+=d;return g+d}return g},write:function(a,b,d){var p=this.position+d<=this.length,g=this.position+d<=this.length?d:this.length-this.position,z=a.subarray(b,b+g),y=this.position%this.chunkSize;this.chunkStorage.writeChunk(z,this.position-y,y);this.position+=g;if(!p){z=b+g;if(d-=g)b=this.chunkStorage.getCacheData(),
201
+ d>b.length&&(d=b.length),p=this.position-this.length,z=a.subarray(z,z+d),b.subarray(p,p+d).set(z);this.position+=d;return g+d}return g},seek:function(a){this.position=a},close:function(){this.chunkStorage=null},getPos:function(){return this.position},getTotalSize:function(){return this.length}};var I=function(a){this.docId=a;this.length=0;this.data=new Int8Array(8192);this.position=0};I.prototype={seek:function(a){this.position=a},close:function(){var a=new Int8Array(this.data.buffer.slice(0,this.length));
202
+ Module.ChangeDocBackend(this.docId,{ptr:Module.GetDoc(this.docId),buffer:a});this.data=null},getPos:function(){return this.position},getTotalSize:function(){return this.length},read:function(a,b,d){var p=this.data.length;d=d+b<p?d:p-b;a=a.subarray(b,b+d);b=this.data.subarray(this.position,this.position+d);a.set(b);this.position+=d;return d},write:function(a,b,d){for(var p=this.position+d,g=this.data.length;p>g;){g=Math.max(g*(16777216<g?1.5:2),p);var z=new Int8Array(g);z.set(this.data.subarray(0,
203
+ this.length),0);this.data=z}a=a.subarray(b,b+d);this.data.set(a,this.position);this.position+=d;this.position>this.length&&(this.length=this.position);return d}};var L={IsSink:function(a){return 66===(a.flags&255)},open:function(a){var b=a.path.slice(1);this.IsSink(a)?(a.provider=new I(b),Module.docs[b].sink=a.provider):a.provider=Module.docs[b].sink?new w(Module.docs[b].sink.data):Module.docs[b].chunkStorage?new D(Module.docs[b].chunkStorage):Module.docs[b].buffer?new w(Module.docs[b].buffer):new e(Module.docs[b].file)},
204
+ close:function(a){a.provider.close()},read:function(a,b,d,p,g){return a.provider.read(b,d,p)},llseek:function(a,b,d){a=a.provider;1===d?b+=a.getPos():2===d&&(b=a.getTotalSize()+b);if(0>b)throw new FS.ErrnoError(t.ERRNO_CODES.EINVAL);a.seek(b);return b},write:function(a,b,d,p,g){return p?a.provider.write(b,d,p):0}};t.THROW=function(a){throw{type:"PDFWorkerError",message:a};};var G=function(a){return"Exception: \n\t Message: ".concat(c.GetJSStringFromCString(Module._TRN_GetMessage(a)),"\n\t Filename: ").concat(c.GetJSStringFromCString(Module._TRN_GetFileName(a)),
205
+ "\n\t Function: ").concat(c.GetJSStringFromCString(Module._TRN_GetFunction(a)),"\n\t Linenumber: ").concat(c.GetJSStringFromCString(Module._TRN_GetLineNum(a)))};c.GetErrToString=G;t.REX=function(a){a&&THROW(G(a))};c.Initialize=function(a){var b=Module.stackSave();a=a?Module.allocate(Module.intArrayFromString(a),"i8",Module.ALLOC_STACK):0;REX(Module._TRN_PDFNetInitialize(a));Module.stackRestore(b)};c.GetDoc=function(a){if(a in Module.docs)return Module.docs[a].ptr;throw{type:"InvalidDocReference",
206
+ message:"Unable to access Document id=".concat(a,". The document appears to be invalid or was deleted.")};};c.clearDocBackend=function(){null!==Module.cachePtr?(Module.hasBufOwnership&&Module._free(Module.cachePtr),Module.cachePtr=null):Module.docs[c.currentFileString]&&delete Module.docs[c.currentFileString]};c.MakeDev=function(a){if(!h[a]){var b=FS.makedev(3,5);FS.registerDevice(b,L);FS.mkdev(a,511,b);h[a]=!0}};c.CreateDocFileBackend=function(a,b){Module.MakeDev(b);var d=Module.allocate(4,"i8",
207
+ Module.ALLOC_STACK);Module.docs[b]={file:a};a=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocCreateFromFilePath(a,d));d=Module.getValue(d,"i8*");Module.docs[b].ptr=d};c.InsertImageIntoDoc=function(a,b,d){var p=[];try{var g=Module.ElementBuilderCreate();p.push(function(){Module.ElementBuilderDestroy(g)});var z=Module.ElementWriterCreate();p.push(function(){Module.ElementWriterDestroy(z)});if(d){var y=d.width;var E=d.height}else y=Module.ImageGetImageWidth(b),
208
+ E=Module.ImageGetImageHeight(b),d=y/E,d>612/792?(y=612,E=parseInt(y/d,10)):(E=792,y=parseInt(E*d,10));var K=Module.ElementBuilderCreateImage(g,b,0,0,y,E),N=Module.PDFDocPageCreate(a,y,E);Module.ElementWriterBegin(z,N);Module.ElementWriterWritePlacedElement(z,K);Module.ElementWriterEnd(z);Module.PDFDocPagePushBack(a,N)}finally{p.reverse().forEach(function(Q){Q()})}};var H=function(a,b,d){"object"===n(a)?(this.m_pages=a.m_pages,this.m_has_named_dests=a.m_has_named_dests,this.m_finished_download=a.m_finished_download,
209
+ this.m_has_outline=a.m_has_outline,this.m_current_page=a.m_current_page,this.m_id=a.m_id,this.size=a.size,this.timeout=a.timeout,this.eventPageArray=a.eventPageArray,this.requirePageCallbacks=a.requirePageCallbacks):(this.m_pages=[],this.m_has_outline=this.m_finished_download=this.m_has_named_dests=!1,this.m_current_page=1,this.m_id=d,this.size=a,this.timeout=null,this.eventPageArray=[],this.requirePageCallbacks={});this.downloadUserData=Module.createDownloadUserData(b,d)};H.prototype={getJSUrl:function(){return Module.extractDownloadUserData(this.downloadUserData).url},
210
210
  getDocId:function(){return Module.extractDownloadUserData(this.downloadUserData).docId},destroyUserData:function(){this.m_id in Module.withCredentials&&delete Module.withCredentials[this.m_id];this.m_id in Module.customHeadersMap&&delete Module.customHeadersMap[this.m_id];Module.destroyDownloadUserData(this.downloadUserData)}};c.createDownloadUserData=function(a,b){a=Module.allocate(Module.intArrayFromString(a),"i8",Module.ALLOC_NORMAL);var d=Module.allocate(8,"i8",Module.ALLOC_NORMAL);Module.setValue(d,
211
211
  a,"i8*");Module.setValue(d+4,parseInt(b,10),"i32");return this.downloadUserData=d};c.extractDownloadUserData=function(a){var b=Module.getValue(a,"i8*");b=c.GetJSStringFromCString(b);a=Module.getValue(a+4,"i32").toString();return{url:b,docId:a}};c.destroyDownloadUserData=function(a){Module._free(Module.getValue(a,"i8*"));Module._free(a)};t.downloadDataMap={};Module.customHeadersMap={};Module.withCredentials={};c.GetDownloadData=function(a){if(a in downloadDataMap)return downloadDataMap[a]};c.DownloaderHint=
212
- function(a,b){var d=Module.GetDoc(a),e=downloadDataMap[d];b.currentPage&&(e.m_current_page=b.currentPage);if(b.visiblePages){var w=b.visiblePages;for(b=0;b<w.length;++b)++w[b];Object.keys(e.requirePageCallbacks).forEach(function(z){e.requirePageCallbacks.hasOwnProperty(z)&&w.push(parseInt(z,10))});(b=Module.docs[a].chunkStorage)&&b.keepVisibleChunks(e.downloader,w);a=w.length;var C=Module.allocate(4*a,"i8",Module.ALLOC_STACK);for(b=0;b<a;++b)Module.setValue(C+4*b,w[b],"i32");REX(Module._TRN_PDFDocDownloadPages(d,
213
- C,a,1,0))}};c.RequirePage=function(a,b){return new Promise(function(d,e){e=Module.GetDoc(a);var w=downloadDataMap[e];!w||w.m_finished_download||w.m_pages[b]?d():(b in w.requirePageCallbacks?w.requirePageCallbacks[b].push(d):w.requirePageCallbacks[b]=[d],d=Module.allocate(4,"i8",Module.ALLOC_STACK),Module.setValue(d,b,"i32"),Module._TRN_PDFDocDownloadPages(e,d,1,0,0))})};c.IsLinearizationValid=function(a){a=Module.GetDoc(a);if(a=downloadDataMap[a]){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);
214
- REX(Module._TRN_DownloaderIsLinearizationValid(a.downloader,b));return 0!==Module.getValue(b,"i8")}return!1};c.ShouldRunRender=function(a,b){a=Module.GetDoc(a);return(a=downloadDataMap[a])?a.m_finished_download?!0:a.m_pages[b]:!0};c.postPagesDownloadedEvent=function(a,b,d){a={pageDimensions:Module.GetPageDimensionsContentChangedList(a,d),pageNumbers:d};Module.postEvent(b,"pagesDownloaded",a);return a};c.createCallbacksStruct=function(a){if(!h){var b=function(d){return function(e){var w=arguments;
215
- e in downloadDataMap?d.apply(this,w):p(function(){e in downloadDataMap&&d.apply(this,w)},0)}};h={downloadProc:Module.addFunction(function(d,e,w,C,z){p(function(){var E=Module.extractDownloadUserData(C),L=E.docId;r(E.url,e,w,Module.customHeadersMap[L],Module.withCredentials[L]).then(function(N){L in Module.docs&&Module.docs[L].chunkStorage&&Module.docs[L].chunkStorage.writeChunk(N,e);Module._TRN_DownloadComplete(0,e,w,d)})})},"vidiii"),notifyUpdatePage:Module.addFunction(b(function(d,e,w,C){var z=
216
- downloadDataMap[d];z.m_pages[e]=!0;var E=z.eventPageArray;if(e in z.requirePageCallbacks)for(w=z.requirePageCallbacks[e],C=0;C<w.length;++C)w[C]();z.timeout?E.push(e):(E=z.eventPageArray=[e],z.timeout=setTimeout(function(){Module.postPagesDownloadedEvent(d,z.m_id,E);z.timeout=null},100))}),"viiii"),notifyUpdateOutline:Module.addFunction(b(function(d,e){d=downloadDataMap[d];d.m_has_outline||(d.m_has_outline=!0,Module.postEvent(d.m_id,"bookmarksUpdated",{}))}),"vii"),notifyUpdateNamedDests:Module.addFunction(b(function(d,
217
- e){d=downloadDataMap[d];d.m_has_named_dests||(d.m_has_named_dests=!0)}),"vii"),notifyDocInfoDownloaded:Module.addFunction(b(function(d,e){downloadDataMap[d].docInfoPromiseCapability.resolve()}),"vii"),notifyUpdateThumb:Module.addFunction(b(function(d,e){}),"viiii"),notifyFinishedDownload:Module.addFunction(b(function(d,e){d=downloadDataMap[d];d.m_finished_download||(d.m_finished_download=!0,Module.postEvent(d.m_id,"documentComplete",{}))}),"vii"),notifyDocumentError:Module.addFunction(function(d,
218
- e){},"viii"),getCurrentPage:Module.addFunction(function(d,e){return downloadDataMap[d].m_current_page},"iii")}}b=Module.allocate(44,"i8",Module.ALLOC_STACK);Module.setValue(b,h.downloadProc,"i8*");Module.setValue(b+4,a,"i8*");Module.setValue(b+8,h.notifyUpdatePage,"i8*");Module.setValue(b+12,h.notifyUpdateOutline,"i8*");Module.setValue(b+16,h.notifyUpdateNamedDests,"i8*");Module.setValue(b+20,h.notifyDocInfoDownloaded,"i8*");Module.setValue(b+24,h.notifyUpdateThumb,"i8*");Module.setValue(b+28,h.notifyFinishedDownload,
219
- "i8*");Module.setValue(b+32,h.notifyDocumentError,"i8*");Module.setValue(b+36,h.getCurrentPage,"i8*");Module.setValue(b+40,0,"i8*");return b};c.CreateDocDownloaderBackend=function(a,b,d){var e=a.url,w=a.size,C=a.customHeaders,z=a.withCredentials,E=a.shouldUseMinimumDownloads,L=a.chunkSize;C&&(Module.customHeadersMap[d]=C);z&&(Module.withCredentials[d]=z);var N=a.downloadData?new G(a.downloadData,e,d):new G(a.size,e,d);var Q=Module.createCallbacksStruct(N.downloadUserData),V=Module.allocate(4,"i8",
220
- Module.ALLOC_STACK);Module.MakeDev(d);a.chunkStorage?e=new F(a.chunkStorage):(a=new Int8Array(new ArrayBuffer(Math.ceil((a.size+L-1)/L/8))),e=new F(e,w,L,C,z,a));Module.docs[d]={chunkStorage:e};REX(Module._TRN_DownloaderCreate(Q,w,Module.GetUStringFromJSString(d),E,e.chunkSize,V));N.downloader=Module.getValue(V,"i8*");N.docInfoPromiseCapability=createPromiseCapability();N.docInfoRequested=!1;if(w=Module._TRN_PDFDocCreateFromFilter(N.downloader,b))Module._TRN_FilterDestroy(N.downloader),REX(w);b=Module.getValue(b,
221
- "i8*");Module.docs[d].ptr=b;Module.PDFDocInitSecurityHandler(b)&&REX(Module._TRN_PDFDocDownloaderInitialize(b,N.downloader));downloadDataMap[b]=N};c.CreateDocBackend=function(a,b){var d=a.value,e=a.extension,w=a.type,C=Module.allocate(4,"i8",Module.ALLOC_STACK),z=Module.stackSave();try{if(d)if("ptr"===w)Module.docs[b]={ptr:d};else{d.shouldUseMinimumDownloads=a.shouldUseMinimumDownloads;d.chunkSize=a.chunkSize;var E="object"===n(d)&&d.url;w=e&&"pdf"!==e;if(E)c.CreateDocDownloaderBackend(d,C,b);else{var L=
222
- d instanceof ArrayBuffer;E=L?"buffer":"file";if(L&&(d=new Uint8Array(d),10485760>d.length+m&&!w)){m+=d.length;var N=d.length,Q=Module._malloc(d.length);Module.HEAPU8.set(d,Q);REX(Module._TRN_PDFDocCreateFromBuffer(Q,N,C));var V=Module.getValue(C,"i8*");Module.docs[b]={ptr:V,bufPtr:Q,bufPtrSize:N,ownership:!0};Module.docs[b].extension=e;return}Module.MakeDev(b);L={};L[E]=d;Module.docs[b]=L;if(w){if(a.pageSizes&&a.pageSizes.length)var X=a.pageSizes[0];else a.defaultPageSize&&(X=a.defaultPageSize);var ia=
223
- Module.GetUStringFromJSString(b);REX(Module._TRN_PDFDocCreate(C));V=Module.getValue(C,"i8*");var ma=Module.ImageCreateFromFile(V,ia);Module.InsertImageIntoDoc(V,ma,X)}else{var la=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocCreateFromFilePath(la,C));V=Module.getValue(C,"i8*")}Module.docs[b].extension=e;Module.docs[b].ptr=V}}else REX(Module._TRN_PDFDocCreate(C)),V=Module.getValue(C,"i8*"),Module.docs[b]={ptr:V},Module.docs[b].extension=e}finally{Module.stackRestore(z)}};
224
- c.ChangeDocBackend=function(a,b){var d=Module.docs[a];d?(d.bufPtr&&d.ownership&&(Module._free(d.bufPtr),m-=d.bufPtrSize),delete Module.docs[a]):Object(y.d)("Trying to delete document ".concat(a," that does not exist."));Module.docs[a]=b};c.DeleteDoc=function(a){var b=Module.docs[a];b?(b.ptr&&(b.ptr in downloadDataMap&&(clearTimeout(downloadDataMap[b.ptr].timeout),downloadDataMap[b.ptr].destroyUserData(),delete downloadDataMap[b.ptr]),Module.PDFDocDestroy(b.ptr)),b.bufPtr&&b.ownership&&(Module._free(b.bufPtr),
225
- m-=b.bufPtrSize),delete Module.docs[a]):Object(y.d)("Trying to delete document ".concat(a," that does not exist."))};c.CreateDoc=function(a,b){if("id"===a.type){if(Module.docPtrStringToIdMap&&a.value in Module.docPtrStringToIdMap)return Module.docPtrStringToIdMap[a.value];a.type="ptr";a.value=Number("0x".concat(a.value))}if(!b){do b=(++f).toString();while(b in Module.docs)}Module.hasBufOwnership=!0;c.CreateDocBackend(a,b);return b};c.CreateEmptyDoc=function(){var a=(++f).toString(),b=Module.allocate(4,
226
- "i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocCreate(b));b=Module.getValue(b,"i8*");Module.docs[a]={ptr:b};return a};c.CreateDocFromLayoutEls=function(a){var b=new Uint8Array(a);a=Module._malloc(b.length);var d=Module.stackSave(),e=Module.allocate(4,"i8",Module.ALLOC_STACK);Module.HEAPU8.set(b,a);b=Module._TRN_PDFDocCreateFromLayoutEls(a,b.length,e);e=Module.getValue(e,"i8*");Module._free(a);Module.stackRestore(d);REX(b);return e};c.GetPageCount=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);
212
+ function(a,b){var d=Module.GetDoc(a),p=downloadDataMap[d];b.currentPage&&(p.m_current_page=b.currentPage);if(b.visiblePages){var g=b.visiblePages;for(b=0;b<g.length;++b)++g[b];Object.keys(p.requirePageCallbacks).forEach(function(y){p.requirePageCallbacks.hasOwnProperty(y)&&g.push(parseInt(y,10))});(b=Module.docs[a].chunkStorage)&&b.keepVisibleChunks(p.downloader,g);a=g.length;var z=Module.allocate(4*a,"i8",Module.ALLOC_STACK);for(b=0;b<a;++b)Module.setValue(z+4*b,g[b],"i32");REX(Module._TRN_PDFDocDownloadPages(d,
213
+ z,a,1,0))}};c.RequirePage=function(a,b){return new Promise(function(d,p){p=Module.GetDoc(a);var g=downloadDataMap[p];!g||g.m_finished_download||g.m_pages[b]?d():(b in g.requirePageCallbacks?g.requirePageCallbacks[b].push(d):g.requirePageCallbacks[b]=[d],d=Module.allocate(4,"i8",Module.ALLOC_STACK),Module.setValue(d,b,"i32"),Module._TRN_PDFDocDownloadPages(p,d,1,0,0))})};c.IsLinearizationValid=function(a){a=Module.GetDoc(a);if(a=downloadDataMap[a]){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);
214
+ REX(Module._TRN_DownloaderIsLinearizationValid(a.downloader,b));return 0!==Module.getValue(b,"i8")}return!1};c.ShouldRunRender=function(a,b){a=Module.GetDoc(a);return(a=downloadDataMap[a])?a.m_finished_download?!0:a.m_pages[b]:!0};c.postPagesDownloadedEvent=function(a,b,d){a={pageDimensions:Module.GetPageDimensionsContentChangedList(a,d),pageNumbers:d};Module.postEvent(b,"pagesDownloaded",a);return a};c.createCallbacksStruct=function(a){if(!f){var b=function(d){return function(p){var g=arguments;
215
+ p in downloadDataMap?d.apply(this,g):q(function(){p in downloadDataMap&&d.apply(this,g)},0)}};f={downloadProc:Module.addFunction(function(d,p,g,z,y){q(function(){var E=Module.extractDownloadUserData(z),K=E.docId;r(E.url,p,g,Module.customHeadersMap[K],Module.withCredentials[K]).then(function(N){K in Module.docs&&Module.docs[K].chunkStorage&&Module.docs[K].chunkStorage.writeChunk(N,p);Module._TRN_DownloadComplete(0,p,g,d)})})},"vidiii"),notifyUpdatePage:Module.addFunction(b(function(d,p,g,z){var y=
216
+ downloadDataMap[d];y.m_pages[p]=!0;var E=y.eventPageArray;if(p in y.requirePageCallbacks)for(g=y.requirePageCallbacks[p],z=0;z<g.length;++z)g[z]();y.timeout?E.push(p):(E=y.eventPageArray=[p],y.timeout=setTimeout(function(){Module.postPagesDownloadedEvent(d,y.m_id,E);y.timeout=null},100))}),"viiii"),notifyUpdateOutline:Module.addFunction(b(function(d,p){d=downloadDataMap[d];d.m_has_outline||(d.m_has_outline=!0,Module.postEvent(d.m_id,"bookmarksUpdated",{}))}),"vii"),notifyUpdateNamedDests:Module.addFunction(b(function(d,
217
+ p){d=downloadDataMap[d];d.m_has_named_dests||(d.m_has_named_dests=!0)}),"vii"),notifyDocInfoDownloaded:Module.addFunction(b(function(d,p){downloadDataMap[d].docInfoPromiseCapability.resolve()}),"vii"),notifyUpdateThumb:Module.addFunction(b(function(d,p){}),"viiii"),notifyFinishedDownload:Module.addFunction(b(function(d,p){d=downloadDataMap[d];d.m_finished_download||(d.m_finished_download=!0,Module.postEvent(d.m_id,"documentComplete",{}))}),"vii"),notifyDocumentError:Module.addFunction(function(d,
218
+ p){},"viii"),getCurrentPage:Module.addFunction(function(d,p){return downloadDataMap[d].m_current_page},"iii")}}b=Module.allocate(44,"i8",Module.ALLOC_STACK);Module.setValue(b,f.downloadProc,"i8*");Module.setValue(b+4,a,"i8*");Module.setValue(b+8,f.notifyUpdatePage,"i8*");Module.setValue(b+12,f.notifyUpdateOutline,"i8*");Module.setValue(b+16,f.notifyUpdateNamedDests,"i8*");Module.setValue(b+20,f.notifyDocInfoDownloaded,"i8*");Module.setValue(b+24,f.notifyUpdateThumb,"i8*");Module.setValue(b+28,f.notifyFinishedDownload,
219
+ "i8*");Module.setValue(b+32,f.notifyDocumentError,"i8*");Module.setValue(b+36,f.getCurrentPage,"i8*");Module.setValue(b+40,0,"i8*");return b};c.CreateDocDownloaderBackend=function(a,b,d){var p=a.url,g=a.size,z=a.customHeaders,y=a.withCredentials,E=a.shouldUseMinimumDownloads,K=a.chunkSize;z&&(Module.customHeadersMap[d]=z);y&&(Module.withCredentials[d]=y);var N=a.downloadData?new H(a.downloadData,p,d):new H(a.size,p,d);var Q=Module.createCallbacksStruct(N.downloadUserData),V=Module.allocate(4,"i8",
220
+ Module.ALLOC_STACK);Module.MakeDev(d);a.chunkStorage?p=new F(a.chunkStorage):(a=new Int8Array(new ArrayBuffer(Math.ceil((a.size+K-1)/K/8))),p=new F(p,g,K,z,y,a));Module.docs[d]={chunkStorage:p};REX(Module._TRN_DownloaderCreate(Q,g,Module.GetUStringFromJSString(d),E,p.chunkSize,V));N.downloader=Module.getValue(V,"i8*");N.docInfoPromiseCapability=createPromiseCapability();N.docInfoRequested=!1;if(g=Module._TRN_PDFDocCreateFromFilter(N.downloader,b))Module._TRN_FilterDestroy(N.downloader),REX(g);b=Module.getValue(b,
221
+ "i8*");Module.docs[d].ptr=b;Module.PDFDocInitSecurityHandler(b)&&REX(Module._TRN_PDFDocDownloaderInitialize(b,N.downloader));downloadDataMap[b]=N};c.CreateDocBackend=function(a,b){var d=a.value,p=a.extension,g=a.type,z=Module.allocate(4,"i8",Module.ALLOC_STACK),y=Module.stackSave();try{if(d)if("ptr"===g)Module.docs[b]={ptr:d};else{d.shouldUseMinimumDownloads=a.shouldUseMinimumDownloads;d.chunkSize=a.chunkSize;var E="object"===n(d)&&d.url;g=p&&"pdf"!==p;if(E)c.CreateDocDownloaderBackend(d,z,b);else{var K=
222
+ d instanceof ArrayBuffer;E=K?"buffer":"file";if(K&&(d=new Uint8Array(d),10485760>d.length+m&&!g)){m+=d.length;var N=d.length,Q=Module._malloc(d.length);Module.HEAPU8.set(d,Q);REX(Module._TRN_PDFDocCreateFromBuffer(Q,N,z));var V=Module.getValue(z,"i8*");Module.docs[b]={ptr:V,bufPtr:Q,bufPtrSize:N,ownership:!0};Module.docs[b].extension=p;return}Module.MakeDev(b);K={};K[E]=d;Module.docs[b]=K;if(g){if(a.pageSizes&&a.pageSizes.length)var X=a.pageSizes[0];else a.defaultPageSize&&(X=a.defaultPageSize);var ia=
223
+ Module.GetUStringFromJSString(b);REX(Module._TRN_PDFDocCreate(z));V=Module.getValue(z,"i8*");var ma=Module.ImageCreateFromFile(V,ia);Module.InsertImageIntoDoc(V,ma,X)}else{var la=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocCreateFromFilePath(la,z));V=Module.getValue(z,"i8*")}Module.docs[b].extension=p;Module.docs[b].ptr=V}}else REX(Module._TRN_PDFDocCreate(z)),V=Module.getValue(z,"i8*"),Module.docs[b]={ptr:V},Module.docs[b].extension=p}finally{Module.stackRestore(y)}};
224
+ c.ChangeDocBackend=function(a,b){var d=Module.docs[a];d?(d.bufPtr&&d.ownership&&(Module._free(d.bufPtr),m-=d.bufPtrSize),delete Module.docs[a]):Object(x.d)("Trying to delete document ".concat(a," that does not exist."));Module.docs[a]=b};c.DeleteDoc=function(a){var b=Module.docs[a];b?(b.ptr&&(b.ptr in downloadDataMap&&(clearTimeout(downloadDataMap[b.ptr].timeout),downloadDataMap[b.ptr].destroyUserData(),delete downloadDataMap[b.ptr]),Module.PDFDocDestroy(b.ptr)),b.bufPtr&&b.ownership&&(Module._free(b.bufPtr),
225
+ m-=b.bufPtrSize),delete Module.docs[a]):Object(x.d)("Trying to delete document ".concat(a," that does not exist."))};c.CreateDoc=function(a,b){if("id"===a.type){if(Module.docPtrStringToIdMap&&a.value in Module.docPtrStringToIdMap)return Module.docPtrStringToIdMap[a.value];a.type="ptr";a.value=Number("0x".concat(a.value))}if(!b){do b=(++k).toString();while(b in Module.docs)}Module.hasBufOwnership=!0;c.CreateDocBackend(a,b);return b};c.CreateEmptyDoc=function(){var a=(++k).toString(),b=Module.allocate(4,
226
+ "i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocCreate(b));b=Module.getValue(b,"i8*");Module.docs[a]={ptr:b};return a};c.CreateDocFromLayoutEls=function(a){var b=new Uint8Array(a);a=Module._malloc(b.length);var d=Module.stackSave(),p=Module.allocate(4,"i8",Module.ALLOC_STACK);Module.HEAPU8.set(b,a);b=Module._TRN_PDFDocCreateFromLayoutEls(a,b.length,p);p=Module.getValue(p,"i8*");Module._free(a);Module.stackRestore(d);REX(b);return p};c.GetPageCount=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);
227
227
  REX(Module._TRN_PDFDocGetPageCount(a,b));return Module.getValue(b,"i8*")};c.GetPage=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetPage(a,b,d));a=Module.getValue(d,"i8*");Module.PageIsValid(a)||THROW("Trying to access page that doesn't exist at index ".concat(b));return a};c.PageGetPageWidth=function(a){var b=Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetPageWidth(a,1,b));return Module.getValue(b,"double")};c.PageGetPageHeight=function(a){var b=
228
228
  Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetPageHeight(a,1,b));return Module.getValue(b,"double")};c.PageGetDefaultMatrix=function(a,b){var d=Module.allocate(48,"i8",Module.ALLOC_STACK);b||(b=0);REX(Module._TRN_PageGetDefaultMatrix(a,!0,1,b,d));return d};c.GetMatrixAsArray=function(a){for(var b=[],d=0;6>d;++d)b[d]=Module.getValue(a+8*d,"double");return b};c.PageGetPageInfo=function(a){var b=Module.allocate(48,"i8",Module.ALLOC_STACK),d=Module.allocate(8,"i8",Module.ALLOC_STACK),
229
- e=Module.allocate(8,"i8",Module.ALLOC_STACK),w=Module.allocate(4,"i8",Module.ALLOC_STACK),C=Module.allocate(4,"i8",Module.ALLOC_STACK),z=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetPageInfo(a,!0,1,0,d,e,b,w,C,z));return{rotation:Module.getValue(w,"i8*"),width:Module.getValue(d,"double"),height:Module.getValue(e,"double"),matrix:Module.GetMatrixAsArray(b),linkAnnotCount:Module.getValue(C,"i8*"),otherExceptPopupAnnotCount:Module.getValue(z,"i8*")}};c.GetUStringFromJSString=function(a,
230
- b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK),e=2*(a.length+1),w=Module.allocate(e,"i8",b?Module.ALLOC_NORMAL:Module.ALLOC_STACK);Module.stringToUTF16(a,w,e);a=Module._TRN_UStringCreateFromString(w,d);b&&Module._free(w);REX(a);return Module.getValue(d,"i8*")};c.GetJSStringFromUString=function(a){var b=Module.allocate(4,"i16*",Module.ALLOC_STACK);REX(Module._TRN_UStringCStr(a,b));return Module.UTF16ToString(Module.getValue(b,"i16*"))};c.GetJSStringFromCString=function(a){return Module.UTF8ToString(a)};
229
+ p=Module.allocate(8,"i8",Module.ALLOC_STACK),g=Module.allocate(4,"i8",Module.ALLOC_STACK),z=Module.allocate(4,"i8",Module.ALLOC_STACK),y=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetPageInfo(a,!0,1,0,d,p,b,g,z,y));return{rotation:Module.getValue(g,"i8*"),width:Module.getValue(d,"double"),height:Module.getValue(p,"double"),matrix:Module.GetMatrixAsArray(b),linkAnnotCount:Module.getValue(z,"i8*"),otherExceptPopupAnnotCount:Module.getValue(y,"i8*")}};c.GetUStringFromJSString=function(a,
230
+ b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK),p=2*(a.length+1),g=Module.allocate(p,"i8",b?Module.ALLOC_NORMAL:Module.ALLOC_STACK);Module.stringToUTF16(a,g,p);a=Module._TRN_UStringCreateFromString(g,d);b&&Module._free(g);REX(a);return Module.getValue(d,"i8*")};c.GetJSStringFromUString=function(a){var b=Module.allocate(4,"i16*",Module.ALLOC_STACK);REX(Module._TRN_UStringCStr(a,b));return Module.UTF16ToString(Module.getValue(b,"i16*"))};c.GetJSStringFromCString=function(a){return Module.UTF8ToString(a)};
231
231
  c.PDFNetSetResourceData=function(a){Module.res_ptr=Module._malloc(a.length);Module.HEAPU8.set(a,Module.res_ptr);REX(Module._TRN_PDFNetSetResourceData(Module.res_ptr,a.length));Module.res_ptr_size=a.length};c.PDFDocDestroy=function(a){REX(Module._TRN_PDFDocDestroy(a))};c.VectorGetSize=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_VectorGetSize(a,b));return Module.getValue(b,"i32")};c.VectorGetAt=function(a,b){var d=Module.allocate(1,"i8*",Module.ALLOC_STACK);REX(Module._TRN_VectorGetAt(a,
232
- b,d));return Module.getValue(d,"i8*")};c.VectorDestroy=function(a){REX(Module._TRN_VectorDestroy(a))};c.PDFRasterizerCreate=function(){var a=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFRasterizerCreate(0,a));return Module.getValue(a,"i8*")};c.ExtractSeparationData=function(a){var b=Module.getValue(a,"i8*"),d=Module.getValue(a+4,"i32"),e=Module.getValue(a+8,"i8*"),w=Module.HEAPU8[a+12],C=Module.HEAPU8[a+13],z=Module.HEAPU8[a+14];a=Module.HEAPU8[a+15];var E=new Uint8Array(d);E.set(Module.HEAPU8.subarray(b,
233
- b+d));b=Module.GetJSStringFromUString(e);return{color:[w,C,z,a],data:E.buffer,name:b}};c.ExtractApRefChangeData=function(a){var b=Module.getValue(a,"i32"),d=Module.getValue(a+4,"i32"),e=Module.getValue(a+8,"i32"),w=Module.getValue(a+12,"i32");a=0!==Module.getValue(a+16,"i8");return{oldObjNum:b,discardAppearance:a,newObjNum:d,genNum:e,pageNum:w}};c.PDFRasterizerRasterizeSeparations=function(a,b,d,e,w,C,z){var E=Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFRasterizerRasterizeSeparations(a,
234
- b,d,e,w,C,z,E));a=Module.getValue(E,"i8*");b=Module.VectorGetSize(a);d=Array(b);for(e=0;e<b;++e)w=Module.VectorGetAt(a,e),d[e]=Module.ExtractSeparationData(w);Module.VectorDestroy(a);return d};c.PageGetRotation=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetRotation(a,b));return Module.getValue(b,"i8*")};c.PageGetId=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetSDFObj(a,b));b=Module.getValue(b,"i8*");a=Module.allocate(4,"i8",
235
- Module.ALLOC_STACK);REX(Module._TRN_ObjGetObjNum(b,a));a=Module.getValue(a,"i32");var d=Module.allocate(2,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetGenNum(b,d));d=Module.getValue(d,"i16");return"".concat(a,"-").concat(d)};c.PageSetRotation=function(a,b){REX(Module._TRN_PageSetRotation(a,b))};c.GetDefaultMatrixBox=function(a,b,d){var e=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetRotation(a,e));a=(Module.getValue(e,"i32")+d)%4;d=Module.allocate(48,"i8",Module.ALLOC_STACK);
236
- switch(a){case 0:return REX(Module._TRN_Matrix2DSet(d,1,0,0,-1,-b.x1,b.y2)),d;case 1:return REX(Module._TRN_Matrix2DSet(d,0,1,1,0,-b.y1,-b.x1)),d;case 2:return REX(Module._TRN_Matrix2DSet(d,-1,0,0,1,b.x2,-b.y1)),d;case 3:return REX(Module._TRN_Matrix2DSet(d,0,-1,-1,0,b.y2,b.x2)),d}throw Error("Yikes, we don't support that rotation type");};c.Matrix2DMultBBox=function(a,b){var d=Module.allocate(8,"i8",Module.ALLOC_STACK),e=Module.allocate(8,"i8",Module.ALLOC_STACK);Module.setValue(d,b.x1,"double");
237
- Module.setValue(e,b.y1,"double");REX(Module._TRN_Matrix2DMult(a,d,e));b.x1=Module.getValue(d,"double");b.y1=Module.getValue(e,"double");Module.setValue(d,b.x2,"double");Module.setValue(e,b.y2,"double");REX(Module._TRN_Matrix2DMult(a,d,e));b.x2=Module.getValue(d,"double");b.y2=Module.getValue(e,"double");return b};c.Matrix2DMult=function(a,b){var d=Module.allocate(8,"i8",Module.ALLOC_STACK),e=Module.allocate(8,"i8",Module.ALLOC_STACK);Module.setValue(d,b.x,"double");Module.setValue(e,b.y,"double");
238
- REX(Module._TRN_Matrix2DMult(a,d,e));b.x=Module.getValue(d,"double");b.y=Module.getValue(e,"double");return b};c.Matrix2DConcat=function(a,b){var d=Module.getValue(b,"double"),e=Module.getValue(b+8,"double"),w=Module.getValue(b+16,"double"),C=Module.getValue(b+24,"double"),z=Module.getValue(b+32,"double");b=Module.getValue(b+40,"double");REX(Module._TRN_Matrix2DConcat(a,d,e,w,C,z,b))};c.Matrix2DSet=function(a,b,d,e,w,C,z){REX(Module._TRN_Matrix2DSet(a,b,d,e,w,C,z))};c.IteratorHasNext=function(a){var b=
232
+ b,d));return Module.getValue(d,"i8*")};c.VectorDestroy=function(a){REX(Module._TRN_VectorDestroy(a))};c.PDFRasterizerCreate=function(){var a=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFRasterizerCreate(0,a));return Module.getValue(a,"i8*")};c.ExtractSeparationData=function(a){var b=Module.getValue(a,"i8*"),d=Module.getValue(a+4,"i32"),p=Module.getValue(a+8,"i8*"),g=Module.HEAPU8[a+12],z=Module.HEAPU8[a+13],y=Module.HEAPU8[a+14];a=Module.HEAPU8[a+15];var E=new Uint8Array(d);E.set(Module.HEAPU8.subarray(b,
233
+ b+d));b=Module.GetJSStringFromUString(p);return{color:[g,z,y,a],data:E.buffer,name:b}};c.ExtractApRefChangeData=function(a){var b=Module.getValue(a,"i32"),d=Module.getValue(a+4,"i32"),p=Module.getValue(a+8,"i32"),g=Module.getValue(a+12,"i32");a=0!==Module.getValue(a+16,"i8");return{oldObjNum:b,discardAppearance:a,newObjNum:d,genNum:p,pageNum:g}};c.PDFRasterizerRasterizeSeparations=function(a,b,d,p,g,z,y){var E=Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFRasterizerRasterizeSeparations(a,
234
+ b,d,p,g,z,y,E));a=Module.getValue(E,"i8*");b=Module.VectorGetSize(a);d=Array(b);for(p=0;p<b;++p)g=Module.VectorGetAt(a,p),d[p]=Module.ExtractSeparationData(g);Module.VectorDestroy(a);return d};c.PageGetRotation=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetRotation(a,b));return Module.getValue(b,"i8*")};c.PageGetId=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetSDFObj(a,b));b=Module.getValue(b,"i8*");a=Module.allocate(4,"i8",
235
+ Module.ALLOC_STACK);REX(Module._TRN_ObjGetObjNum(b,a));a=Module.getValue(a,"i32");var d=Module.allocate(2,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetGenNum(b,d));d=Module.getValue(d,"i16");return"".concat(a,"-").concat(d)};c.PageSetRotation=function(a,b){REX(Module._TRN_PageSetRotation(a,b))};c.GetDefaultMatrixBox=function(a,b,d){var p=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetRotation(a,p));a=(Module.getValue(p,"i32")+d)%4;d=Module.allocate(48,"i8",Module.ALLOC_STACK);
236
+ switch(a){case 0:return REX(Module._TRN_Matrix2DSet(d,1,0,0,-1,-b.x1,b.y2)),d;case 1:return REX(Module._TRN_Matrix2DSet(d,0,1,1,0,-b.y1,-b.x1)),d;case 2:return REX(Module._TRN_Matrix2DSet(d,-1,0,0,1,b.x2,-b.y1)),d;case 3:return REX(Module._TRN_Matrix2DSet(d,0,-1,-1,0,b.y2,b.x2)),d}throw Error("Yikes, we don't support that rotation type");};c.Matrix2DMultBBox=function(a,b){var d=Module.allocate(8,"i8",Module.ALLOC_STACK),p=Module.allocate(8,"i8",Module.ALLOC_STACK);Module.setValue(d,b.x1,"double");
237
+ Module.setValue(p,b.y1,"double");REX(Module._TRN_Matrix2DMult(a,d,p));b.x1=Module.getValue(d,"double");b.y1=Module.getValue(p,"double");Module.setValue(d,b.x2,"double");Module.setValue(p,b.y2,"double");REX(Module._TRN_Matrix2DMult(a,d,p));b.x2=Module.getValue(d,"double");b.y2=Module.getValue(p,"double");return b};c.Matrix2DMult=function(a,b){var d=Module.allocate(8,"i8",Module.ALLOC_STACK),p=Module.allocate(8,"i8",Module.ALLOC_STACK);Module.setValue(d,b.x,"double");Module.setValue(p,b.y,"double");
238
+ REX(Module._TRN_Matrix2DMult(a,d,p));b.x=Module.getValue(d,"double");b.y=Module.getValue(p,"double");return b};c.Matrix2DConcat=function(a,b){var d=Module.getValue(b,"double"),p=Module.getValue(b+8,"double"),g=Module.getValue(b+16,"double"),z=Module.getValue(b+24,"double"),y=Module.getValue(b+32,"double");b=Module.getValue(b+40,"double");REX(Module._TRN_Matrix2DConcat(a,d,p,g,z,y,b))};c.Matrix2DSet=function(a,b,d,p,g,z,y){REX(Module._TRN_Matrix2DSet(a,b,d,p,g,z,y))};c.IteratorHasNext=function(a){var b=
239
239
  Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_IteratorHasNext(a,b));return 0!==Module.getValue(b,"i8")};c.IteratorCurrent=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_IteratorCurrent(a,b));return Module.getValue(Module.getValue(b,"i8*"),"i8*")};c.IteratorNext=function(a){REX(Module._TRN_IteratorNext(a))};c.PageGetNumAnnots=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetNumAnnots(a,b));return Module.getValue(b,"i32")};
240
240
  c.PageGetAnnot=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetAnnot(a,b,d));return Module.getValue(d,"i8*")};c.PageAnnotRemove=function(a,b){REX(Module._TRN_PageAnnotRemoveByIndex(a,b))};c.AnnotGetType=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_AnnotGetType(a,b));return Module.getValue(b,"i32")};c.AnnotGetSDFObjNum=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_AnnotGetSDFObj(a,b));b=Module.getValue(b,
241
241
  "i8*");a=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetObjNum(b,a));return a=Module.getValue(a,"i32")};c.AnnotGetSDFObjGen=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_AnnotGetSDFObj(a,b));b=Module.getValue(b,"i8*");a=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetGenNum(b,a));return a=Module.getValue(a,"i32")};c.AnnotHasAppearance=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_AnnotGetAppearance(a,
242
- 0,0,b));return 0!==Module.getValue(b,"i8")};c.AnnotRefreshAppearance=function(a){REX(Module._TRN_AnnotRefreshAppearance(a))};c.ObjErase=function(a,b){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjEraseFromKey(a,b))};c.GetJSDoubleArrFromCore=function(a,b){for(var d=Array(b),e=0;e<b;++e)d[e]=Module.getValue(a,"double"),a+=8;return d};c.GetJSIntArrayFromCore=function(a,b){for(var d=Array(b),e=0;e<b;++e)d[e]=Module.getValue(a,"i32"),a+=4;return d};c.BookmarkIsValid=
242
+ 0,0,b));return 0!==Module.getValue(b,"i8")};c.AnnotRefreshAppearance=function(a){REX(Module._TRN_AnnotRefreshAppearance(a))};c.ObjErase=function(a,b){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjEraseFromKey(a,b))};c.GetJSDoubleArrFromCore=function(a,b){for(var d=Array(b),p=0;p<b;++p)d[p]=Module.getValue(a,"double"),a+=8;return d};c.GetJSIntArrayFromCore=function(a,b){for(var d=Array(b),p=0;p<b;++p)d[p]=Module.getValue(a,"i32"),a+=4;return d};c.BookmarkIsValid=
243
243
  function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_BookmarkIsValid(a,b));return 0!==Module.getValue(b,"i8")};c.BookmarkGetNext=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_BookmarkGetNext(a,b));return Module.getValue(b,"i8*")};c.BookmarkGetFirstChild=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_BookmarkGetFirstChild(a,b));return Module.getValue(b,"i8*")};c.BookmarkHasChildren=function(a){var b=Module.allocate(4,
244
244
  "i8",Module.ALLOC_STACK);REX(Module._TRN_BookmarkHasChildren(a,b));return 0!==Module.getValue(b,"i8")};c.BookmarkGetAction=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_BookmarkGetAction(a,b));return Module.getValue(b,"i8*")};c.BookmarkGetTitle=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_BookmarkGetTitle(a,b));a=Module.getValue(b,"i8*");return Module.GetJSStringFromUString(a)};c.ActionIsValid=function(a){var b=Module.allocate(4,"i8",
245
245
  Module.ALLOC_STACK);REX(Module._TRN_ActionIsValid(a,b));return 0!==Module.getValue(b,"i8")};c.ActionGetType=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ActionGetType(a,b));return Module.getValue(b,"i32")};c.ActionGetDest=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ActionGetDest(a,b));return Module.getValue(b,"i8*")};c.DestinationIsValid=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DestinationIsValid(a,
246
246
  b));return 0!==Module.getValue(b,"i8")};c.DestinationGetPage=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DestinationGetPage(a,b));return Module.getValue(b,"i8*")};c.PageIsValid=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageIsValid(a,b));return 0!==Module.getValue(b,"i8")};c.PageGetIndex=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetIndex(a,b));return Module.getValue(b,"i32")};c.ObjGetAsPDFText=
247
247
  function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetAsPDFText(a,b));a=Module.getValue(b,"i8*");return Module.GetJSStringFromUString(a)};c.ObjFindObj=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjFindObj(a,b,d));return Module.getValue(d,"i8*")};c.PDFDocGetFirstBookmark=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetFirstBookmark(a,
248
248
  b));return Module.getValue(b,"i8*")};c.DestinationGetExplicitDestObj=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DestinationGetExplicitDestObj(a,b));return Module.getValue(b,"i8*")};c.DestinationGetFitType=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DestinationGetFitType(a,b));return Module.getValue(b,"i32")};c.ObjIsNumber=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjIsNumber(a,b));return 0!==Module.getValue(b,
249
- "i8")};c.ObjGetNumber=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetNumber(a,b));return Module.getValue(b,"double")};c.PDFDocGetRoot=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetRoot(a,b));return Module.getValue(b,"i8*")};c.ObjPutName=function(a,b,d){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);d=Module.allocate(Module.intArrayFromString(d),"i8",Module.ALLOC_STACK);var e=Module.allocate(4,"i8",
250
- Module.ALLOC_STACK);REX(Module._TRN_ObjPutName(a,b,d,e));return Module.getValue(e,"i8*")};c.ObjPutDict=function(a,b){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjPutDict(a,b,d));return Module.getValue(d,"i8*")};c.ObjPutString=function(a,b,d){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);d=Module.allocate(Module.intArrayFromString(d),"i8",Module.ALLOC_STACK);var e=Module.allocate(4,
251
- "i8",Module.ALLOC_STACK);REX(Module._TRN_ObjPutString(a,b,d,e));return Module.getValue(e,"i8*")};c.ObjPut=function(a,b,d){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);var e=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjPut(a,b,d,e));return Module.getValue(e,"i8*")};c.ObjGetAt=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetAt(a,b,d));return Module.getValue(d,"i8*")};c.Matrix2DInverse=function(a){var b=Module.allocate(48,
249
+ "i8")};c.ObjGetNumber=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetNumber(a,b));return Module.getValue(b,"double")};c.PDFDocGetRoot=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetRoot(a,b));return Module.getValue(b,"i8*")};c.ObjPutName=function(a,b,d){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);d=Module.allocate(Module.intArrayFromString(d),"i8",Module.ALLOC_STACK);var p=Module.allocate(4,"i8",
250
+ Module.ALLOC_STACK);REX(Module._TRN_ObjPutName(a,b,d,p));return Module.getValue(p,"i8*")};c.ObjPutDict=function(a,b){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjPutDict(a,b,d));return Module.getValue(d,"i8*")};c.ObjPutString=function(a,b,d){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);d=Module.allocate(Module.intArrayFromString(d),"i8",Module.ALLOC_STACK);var p=Module.allocate(4,
251
+ "i8",Module.ALLOC_STACK);REX(Module._TRN_ObjPutString(a,b,d,p));return Module.getValue(p,"i8*")};c.ObjPut=function(a,b,d){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);var p=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjPut(a,b,d,p));return Module.getValue(p,"i8*")};c.ObjGetAt=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetAt(a,b,d));return Module.getValue(d,"i8*")};c.Matrix2DInverse=function(a){var b=Module.allocate(48,
252
252
  "i8",Module.ALLOC_STACK);REX(Module._TRN_Matrix2DInverse(a,b));return b};c.PDFDocInitSecurityHandler=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocInitSecurityHandler(a,0,b));return 0!==Module.getValue(b,"i8")};c.PDFDocSetSecurityHandler=function(a,b){REX(Module._TRN_PDFDocSetSecurityHandler(a,b))};c.SecurityHandlerCreate=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_SecurityHandlerCreate(a,b));return Module.getValue(b,"i8*")};c.SecurityHandlerChangeUserPasswordUString=
253
- function(a,b){REX(Module._TRN_SecurityHandlerChangeUserPasswordUString(a,Module.GetUStringFromJSString(b)))};c.PDFDocInitStdSecurityHandler=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocInitStdSecurityHandlerUString(a,Module.GetUStringFromJSString(b),d));return 0!==Module.getValue(d,"i8")};c.PDFDocDownloaderTriggerFullDownload=function(a,b){REX(Module._TRN_PDFDocDownloaderTriggerFullDownload(a,b))};c.PDFDocInsertPages=function(a,b,d,e,w){REX(Module._TRN_PDFDocInsertPageSet(a,
254
- b,d,e,w?1:0,0))};c.PDFDocInsertPages2=function(a,b,d,e,w){REX(Module._TRN_PDFDocInsertPageSet2(a,b,d,e,w?1:0,0))};c.PDFDocMovePages=function(a,b,d){REX(Module._TRN_PDFDocMovePageSet(a,b,a,d,0,0))};c.PDFDocGetPageIterator=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetPageIterator(a,b,d));return Module.getValue(d,"i8*")};c.PDFDocPageRemove=function(a,b){REX(Module._TRN_PDFDocPageRemove(a,b))};c.PDFDocPageRemove2=function(a,b){REX(Module._TRN_PDFDocPageRemove2(a,
255
- b))};c.PDFDocPageCreate=function(a,b,d){var e=Module.allocate(40,"i8",Module.ALLOC_STACK);Module.setValue(e,0,"double");Module.setValue(e+8,0,"double");Module.setValue(e+16,b,"double");Module.setValue(e+24,d,"double");Module.setValue(e+32,0,"double");b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocPageCreate(a,e,b));return Module.getValue(b,"i8*")};c.PDFDocPageInsert=function(a,b,d){REX(Module._TRN_PDFDocPageInsert(a,b,d))};c.PageSetCreate=function(){var a=Module.allocate(4,"i8",
253
+ function(a,b){REX(Module._TRN_SecurityHandlerChangeUserPasswordUString(a,Module.GetUStringFromJSString(b)))};c.PDFDocInitStdSecurityHandler=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocInitStdSecurityHandlerUString(a,Module.GetUStringFromJSString(b),d));return 0!==Module.getValue(d,"i8")};c.PDFDocDownloaderTriggerFullDownload=function(a,b){REX(Module._TRN_PDFDocDownloaderTriggerFullDownload(a,b))};c.PDFDocInsertPages=function(a,b,d,p,g){REX(Module._TRN_PDFDocInsertPageSet(a,
254
+ b,d,p,g?1:0,0))};c.PDFDocInsertPages2=function(a,b,d,p,g){REX(Module._TRN_PDFDocInsertPageSet2(a,b,d,p,g?1:0,0))};c.PDFDocMovePages=function(a,b,d){REX(Module._TRN_PDFDocMovePageSet(a,b,a,d,0,0))};c.PDFDocGetPageIterator=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetPageIterator(a,b,d));return Module.getValue(d,"i8*")};c.PDFDocPageRemove=function(a,b){REX(Module._TRN_PDFDocPageRemove(a,b))};c.PDFDocPageRemove2=function(a,b){REX(Module._TRN_PDFDocPageRemove2(a,
255
+ b))};c.PDFDocPageCreate=function(a,b,d){var p=Module.allocate(40,"i8",Module.ALLOC_STACK);Module.setValue(p,0,"double");Module.setValue(p+8,0,"double");Module.setValue(p+16,b,"double");Module.setValue(p+24,d,"double");Module.setValue(p+32,0,"double");b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocPageCreate(a,p,b));return Module.getValue(b,"i8*")};c.PDFDocPageInsert=function(a,b,d){REX(Module._TRN_PDFDocPageInsert(a,b,d))};c.PageSetCreate=function(){var a=Module.allocate(4,"i8",
256
256
  Module.ALLOC_STACK);REX(Module._TRN_PageSetCreate(a));return Module.getValue(a,"i8*")};c.PageSetCreateRange=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageSetCreateRange(d,a,b));return Module.getValue(d,"i8*")};c.PageSetAddPage=function(a,b){REX(Module._TRN_PageSetAddPage(a,b))};c.ElementBuilderCreate=function(){var a=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ElementBuilderCreate(a));return Module.getValue(a,"i8*")};c.ElementBuilderDestroy=function(a){REX(Module._TRN_ElementBuilderDestroy(a))};
257
- c.ElementBuilderCreateImage=function(a,b,d,e,w,C){var z=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ElementBuilderCreateImageScaled(a,b,d,e,w,C,z));return Module.getValue(z,"i8*")};c.ElementWriterCreate=function(){var a=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ElementWriterCreate(a));return Module.getValue(a,"i8*")};c.ElementWriterDestroy=function(a){REX(Module._TRN_ElementWriterDestroy(a))};c.ElementWriterBegin=function(a,b){REX(Module._TRN_ElementWriterBeginOnPage(a,
257
+ c.ElementBuilderCreateImage=function(a,b,d,p,g,z){var y=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ElementBuilderCreateImageScaled(a,b,d,p,g,z,y));return Module.getValue(y,"i8*")};c.ElementWriterCreate=function(){var a=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ElementWriterCreate(a));return Module.getValue(a,"i8*")};c.ElementWriterDestroy=function(a){REX(Module._TRN_ElementWriterDestroy(a))};c.ElementWriterBegin=function(a,b){REX(Module._TRN_ElementWriterBeginOnPage(a,
258
258
  b,1,1,1,0))};c.ElementWriterWritePlacedElement=function(a,b){REX(Module._TRN_ElementWriterWritePlacedElement(a,b))};c.ElementWriterEnd=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ElementWriterEnd(a,b))};c.ImageGetImageWidth=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ImageGetImageWidth(a,b));return Module.getValue(b,"i32")};c.ImageGetImageHeight=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ImageGetImageHeight(a,
259
- b));return Module.getValue(b,"i32")};c.ImageCreateFromMemory2=function(a,b,d){var e=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ImageCreateFromMemory2(a,b,d,0,e));return Module.getValue(e,"i8*")};c.ImageCreateFromFile=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ImageCreateFromFile(a,b,0,d));return Module.getValue(d,"i8*")};c.PDFDocPagePushBack=function(a,b){REX(Module._TRN_PDFDocPagePushBack(a,b))};c.PDFDocHasOC=function(a){var b=Module.allocate(4,
259
+ b));return Module.getValue(b,"i32")};c.ImageCreateFromMemory2=function(a,b,d){var p=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ImageCreateFromMemory2(a,b,d,0,p));return Module.getValue(p,"i8*")};c.ImageCreateFromFile=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ImageCreateFromFile(a,b,0,d));return Module.getValue(d,"i8*")};c.PDFDocPagePushBack=function(a,b){REX(Module._TRN_PDFDocPagePushBack(a,b))};c.PDFDocHasOC=function(a){var b=Module.allocate(4,
260
260
  "i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocHasOC(a,b));return 0!==Module.getValue(b,"i8")};c.PDFDocGetOCGConfig=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetOCGConfig(a,b));return Module.getValue(b,"i8*")};c.OCGContextCreate=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_OCGContextCreateFromConfig(a,b));return Module.getValue(b,"i8*")};c.UStringDestroy=function(a){REX(Module._TRN_UStringDestroy(a))};c.PDFDocFDFUpdate=function(a,
261
- b,d){if(d){for(var e=Object.keys(d),w=e.length,C=Module._malloc(8*w),z=0;z<w;++z){var E=8*z,L=e[z],N=Module.GetDoc(d[L]);L=Module.GetUStringFromJSString(L);Module.setValue(C+E,N,"i8*");Module.setValue(C+E+4,L,"i8*")}d=Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocFDFUpdateAppearanceDocs(a,b,C,w,d));a=Module.getValue(d,"i8*");b=Module.VectorGetSize(a);w=Array(b);for(C=0;C<b;++C)d=Module.VectorGetAt(a,C),w[C]=Module.ExtractApRefChangeData(d);Module.VectorDestroy(a);if(b)return w}else REX(Module._TRN_PDFDocFDFUpdate(a,
262
- b))};c.FDFDocDestroy=function(a){REX(Module._TRN_FDFDocDestroy(a))}})(t.Module)}).call(this,u(10).setImmediate)},function(v,A,u){function p(n){"@babel/helpers - typeof";return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(y){return typeof y}:function(y){return y&&"function"==typeof Symbol&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},p(n)}(function(n){n.SetupPDFNetFunctions=function(y){Module._IB_=[];for(var l=function(g){if("object"===p(g)&&null!==g)if("undefined"!==
263
- typeof g.byteLength){var x=Module._IB_.length;Module._IB_[x]=new Uint8Array(g);g={handle:x,isArrayBufferRef:!0}}else Object.keys(g).forEach(function(F){g.hasOwnProperty(F)&&(g[F]=l(g[F]))});return g},t=function(g){"object"===p(g)&&null!==g&&(g.buffer?g=g.buffer.slice(g.byteOffset,g.byteOffset+g.length):g.isArrayBufferRef?g=Module._IB_[g.handle].buffer:Object.keys(g).forEach(function(x){g.hasOwnProperty(x)&&(g[x]=t(g[x]))}));return g},c=Module._TRN_EMSCreateSharedWorkerInstance(),m,f=Module._TRN_EMSWorkerInstanceGetFunctionIterator(c),
264
- k=function(g,x){return new Promise(function(F,D){g=l(g);var H=g.docId;H=H?Module.GetDoc(H):0;(H=Module.EMSCallSharedFunction(c,x,H))?D({type:"PDFWorkerError",message:Module.GetErrToString(H)}):(D=Module.EMSGetLastResponse(c),D=t(D),F(D))})};m=Module._TRN_EMSFunctionIteratorGetNextCommandName(f);)m=Module.GetJSStringFromCString(m),n.queue.onAsync(m,k);Module._TRN_EMSFunctionIteratorDestroy(f);if(Module._TRN_EMSCreatePDFNetWorkerInstance){var h={};f=function(g,x){y.on(g,x);h[g]=!0};Module.docPtrStringToIdMap=
265
- {};var r=function(g){if(g in Module.docPtrStringToIdMap)return Module.docPtrStringToIdMap[g];throw Error("Couldn't find document ".concat(g));};n.queue.onAsync("PDFDoc.RequirePage",function(g){return Module.RequirePage(r(g.docId),g.pageNum)});f("pdfDocCreateFromBuffer",function(g){g=Module.CreateDoc({type:"array",value:g.buf});var x=Module.GetDoc(g).toString(16);Module.docPtrStringToIdMap[x]=g;return x});f("pdfDocCreateFromLayoutEls",function(g){var x=Module.CreateDocFromLayoutEls(g.buf);g=Module.CreateDoc({type:"ptr",
266
- value:x});x=x.toString(16);Module.docPtrStringToIdMap[x]=g;return x});f("PDFDoc.destroy",function(g){g=r(g.auto_dealloc_obj);Module.DeleteDoc(g)});f("PDFDoc.saveMemoryBuffer",function(g){var x=r(g.doc);return Module.SaveHelper(Module.GetDoc(x),x,g.flags).slice(0)});f("pdfDocCreate",function(){var g=Module.CreateDoc({type:"new"}),x=Module.GetDoc(g).toString(16);Module.docPtrStringToIdMap[x]=g;return x});f("GetPDFDoc",function(g){g=g.docId;var x=Module.GetDoc(g).toString(16);Module.docPtrStringToIdMap[x]=
267
- g;return x});f("ExtractPDFNetLayersContext",function(g){var x=g.layers;g=Module.GetDoc(g.docId);var F=0;x?F=Module.EMSCreateUpdatedLayersContext(g,x):Module.PDFDocHasOC(g)&&(x=Module.PDFDocGetOCGConfig(g),F=Module.OCGContextCreate(x));return F.toString(16)});var q=Module._TRN_EMSCreatePDFNetWorkerInstance();f=Module._TRN_EMSWorkerInstanceGetFunctionIterator(q);for(k=function(g){return new Promise(function(x,F){g=l(g);var D=Module.EMSCallPDFNetFunction(q,g);D?F(Module.GetErrToString(D)):(F=Module.EMSGetLastResponse(q),
268
- F=t(F),x(F))})};m=Module._TRN_EMSFunctionIteratorGetNextCommandName(f);)if(m=Module.GetJSStringFromCString(m),!h[m])y.onAsync(m,k);Module._TRN_EMSFunctionIteratorDestroy(f)}}})(self)},function(v,A,u){v=u(9);var p=u.n(v),n=u(17),y=u(18),l=u(7),t=u(19),c=u(1),m=u(20);(function(f){var k=null;f.basePath="../";var h=function(){var q=f.pdfWorkerPath||"";f.workerBasePath&&(f.basePath=f.workerBasePath);var g=f.isFull,x=g?"full/":"lean/";f.useOptimizedWorker&&(x+=m.a);var F=f.wasmDisabled,D=f.disableObjectURLBlobs,
269
- H=f.pdfWorkerChunkPaths;Object(c.c)();f.overriddenPdfWorkerPath&&(q=f.overriddenPdfWorkerPath,f.basePath="../",!Object(l.a)()||F)&&(q="");f.basePath=f.externalPath?f.externalPath:f.basePath+"external/";Object(t.a)("".concat(q+x,"PDFNetC"),{"Wasm.wasm":g?1E7:4E6,"Wasm.js.mem":1E5,".js.mem":12E6,".mem":g?2E6:6E5,disableObjectURLBlobs:D},F,H)};f.EmscriptenPDFManager=function(){};f.EmscriptenPDFManager.prototype={OnInitialized:function(q){Module.loaded?q():(Module.initCb=function(){q()},Object(c.b)("worker",
270
- "PDFNet is not initialized yet!"))},NewDoc:function(q,g){return new Promise(function(x,F){try{x(Module.loadDoc(q,g))}catch(D){F(D)}})},Initialize:function(q,g,x,F){q&&(Module.TOTAL_MEMORY=q);Module.memoryInitializerPrefixURL=g;Module.asmjsPrefix=x;f.basePath=F;h()},shouldRunRender:function(q){return Module.ShouldRunRender(q.docId,q.pageIndex+1)}};var r={setup:function(q){function g(e){var w=e.data,C=e.action;var z="GetCanvas"===C||"GetCanvasPartial"===C?H.shouldRunRender(w):!0;if(z){k=e;var E=e.asyncCallCapability;
271
- Object(c.b)("Memory","Worker running command: ".concat(C));I.actionMap[C](w,e).then(function(L){"BeginOperation"!==k.action&&(k=null);E.resolve(L)},function(L){k=null;E.reject(L)})}else f.deferredQueue.queue(e),D()}function x(e){e.asyncCallCapability=createPromiseCapability();k||I.length?I.queue(e):g(e);return e.asyncCallCapability.promise}function F(e){self.shouldResize&&H.Initialize(e.options.workerHeapSize,e.options.pdfResourcePath,e.options.pdfAsmPath,e.options.parentUrl);Module.chunkMax=e.options.chunkMax;
272
- if(e.array instanceof Uint8Array){var w=255===e.array[0];q.postMessageTransfers=w;"response"in new XMLHttpRequest?H.OnInitialized(function(){f.SetupPDFNetFunctions(q);a();q.send("test",{supportTypedArray:!0,supportTransfers:w})}):q.send("test",!1)}else q.send("test",!1)}function D(){n.a.setImmediate(function(){if((!k||"BeginOperation"!==k.action)&&I.length&&!k){var e=I.dequeue();g(e)}})}var H=new f.EmscriptenPDFManager,I,J=!1,G=!1;Module.workerMessageHandler=q;var a=function(){J?G||(q.send("workerLoaded",
273
- {}),G=!0):J=!0};H.OnInitialized(a);(function(){f.queue=I=new p.a({strategy:p.a.ArrayStrategy,comparator:function(e,w){return e.priority===w.priority?e.callbackId-w.callbackId:w.priority-e.priority}});f.deferredQueue=new p.a({strategy:p.a.ArrayStrategy,comparator:function(e,w){return e.priority===w.priority?e.callbackId-w.callbackId:w.priority-e.priority}});I.actionMap={};I.onAsync=function(e,w){q.onAsync(e,x);I.actionMap[e]=w}})();q.on("test",F);q.on("InitWorker",F);var b=function(e){k&&e(k)&&(Module.cancelCurrent(),
274
- k=null);I.removeAllMatching(e,function(w){w.asyncCallCapability.reject({type:"Cancelled",message:"Operation was cancelled due to a change affecting the loaded document."})})},d=function(e){b(function(w){return w.data&&w.data.docId===e})};q.on("UpdatePassword",function(e){return Module.UpdatePassword(e.docId,e.password)});q.on("UpdateCustomHeader",function(e){return Module.UpdateCustomHeader(e.docId,e.customHeader)});q.on("LoadRes",function(e){Module.loadResources(e.array,e.l);return{}});q.on("DownloaderHint",
275
- function(e){Module.DownloaderHint(e.docId,e.hint)});q.on("IsLinearized",function(e){return Module.IsLinearizationValid(e.docId)});q.onNextAsync(D);I.onAsync("NewDoc",function(e){return H.NewDoc(e)});I.onAsync("GetCanvas",function(e){Object(c.b)("workerdetails","Run GetCanvas PageIdx: ".concat(e.pageIndex," Width: ").concat(e.width));Object(c.b)("Memory","loadCanvas with potential memory usage ".concat(e.width*e.height*8));return Module.loadCanvas(e.docId,e.pageIndex,e.width,e.height,e.rotation,null,
276
- e.layers,e.renderOptions)});I.onAsync("GetCanvasPartial",function(e){Object(c.b)("Memory","GetCanvasPartial with potential memory usage ".concat(e.width*e.height*8));return Module.loadCanvas(e.docId,e.pageIndex,e.width,e.height,e.rotation,e.bbox,e.layers,e.renderOptions)});I.onAsync("SaveDoc",function(e){return Module.SaveDoc(e.docId,e.xfdfString,e.finishedWithDocument,e.printDocument,e.flags,e.watermarks,e.apdocs,e.password,e.encryptionAlgorithmType,e.xfdfCommand)});I.onAsync("SaveDocFromFixedElements",
277
- function(e){return Module.SaveDocFromFixedElements(e.bytes,e.xfdfString,e.flags,e.watermarks,e.password,e.encryptionAlgorithmType,e.xfdfCommand)});I.onAsync("MergeXFDF",function(e){return Module.MergeXFDF(e.docId,e.xfdf,e.apdocs)});I.onAsync("InsertPages",function(e){return Module.InsertPages(e.docId,e.doc,e.pageArray,e.destPos,e.insertBookmarks,e.skipUpdateEvent)});I.onAsync("MovePages",function(e){return Module.MovePages(e.docId,e.pageArray,e.destPos)});I.onAsync("RemovePages",function(e){return Module.RemovePages(e.docId,
278
- e.pageArray,e.skipUpdateEvent)});I.onAsync("RotatePages",function(e){return Module.RotatePages(e.docId,e.pageArray,e.rotation)});I.onAsync("ExtractPages",function(e){return Module.ExtractPages(e.docId,e.pageArray,e.xfdfString,e.watermarks,e.apdocs,e.skipUpdateEvent)});I.onAsync("CropPages",function(e){return Module.CropPages(e.docId,e.pageArray,e.topMargin,e.botMargin,e.leftMargin,e.rightMargin)});I.onAsync("TriggerFullDownload",function(e){return Module.TriggerFullDownload(e.docId)});I.onAsync("InsertBlankPages",
279
- function(e){return Module.InsertBlankPages(e.docId,e.pageArray,e.width,e.height)});I.onAsync("BeginOperation",function(){return Promise.resolve()});I.onAsync("RequirePage",function(e,w){return Module.RequirePage(e.docId,e.pageNum)});q.on("FinishOperation",function(){if(k&&"BeginOperation"===k.action)k=null,D();else throw{message:"Operation has not started."};});q.on("DeleteDocument",function(e){e=e.docId;d(e);Module.DeleteDoc(e)});q.on("GetCanvasProgressive",function(e){if(k&&k.callbackId===e.callbackId){Object(c.b)("worker",
280
- "Progressive request in progress");var w=Module.GetCurrentCanvasData(!0)}else{if(I.find({priority:0,callbackId:e.callbackId}))throw Object(c.b)("worker","Progressive request Queued"),{type:"Queued",message:"Rendering has not started yet."};if(f.deferredQueue.find({priority:0,callbackId:e.callbackId}))throw Object(c.b)("worker","Progressive request Deferred"),{type:"Queued",message:"Rendering has not started yet."};}if(!w)throw Object(c.b)("worker","Progressive request invalid (render already complete)"),
281
- {type:"Unavailable",message:"Rendering is complete or was cancelled."};return w});q.on("actionCancel",function(e){k&&k.callbackId===e.callbackId?(Object(c.b)("workerdetails","Cancelled Current Operation"),Module.cancelCurrent()&&(k=null,D())):(Object(c.b)("workerdetails","Cancelled queued operation"),I.remove({priority:0,callbackId:e.callbackId}),f.deferredQueue.remove({priority:0,callbackId:e.callbackId}))})}};f.onmessage=function(q){if("init"===q.data.action){var g=q.data.shouldResize;f.shouldResize=
282
- g;f.isFull=q.data.isFull;f.wasmDisabled=!q.data.wasm;f.externalPath=q.data.externalPath;f.useOptimizedWorker=q.data.useOptimizedWorker;f.disableObjectURLBlobs=q.data.disableObjectURLBlobs;f.pdfWorkerChunkPaths=q.data.pdfWorkerChunkPaths;if(q=q.data.pdfWorkerPath)f.overriddenPdfWorkerPath=q;g||h();g=new y.a("worker_processor",self);Object(c.a)(g);r.setup(g)}}})("undefined"===typeof window?self:window)}]);}).call(this || window)
261
+ b,d){if(d){for(var p=Object.keys(d),g=p.length,z=Module._malloc(8*g),y=0;y<g;++y){var E=8*y,K=p[y],N=Module.GetDoc(d[K]);K=Module.GetUStringFromJSString(K);Module.setValue(z+E,N,"i8*");Module.setValue(z+E+4,K,"i8*")}d=Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocFDFUpdateAppearanceDocs(a,b,z,g,d));a=Module.getValue(d,"i8*");b=Module.VectorGetSize(a);g=Array(b);for(z=0;z<b;++z)d=Module.VectorGetAt(a,z),g[z]=Module.ExtractApRefChangeData(d);Module.VectorDestroy(a);if(b)return g}else REX(Module._TRN_PDFDocFDFUpdate(a,
262
+ b))};c.FDFDocDestroy=function(a){REX(Module._TRN_FDFDocDestroy(a))}})(t.Module)}).call(this,u(10).setImmediate)},function(v,B,u){function q(n){"@babel/helpers - typeof";return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(x){return typeof x}:function(x){return x&&"function"==typeof Symbol&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},q(n)}(function(n){n.SetupPDFNetFunctions=function(x){Module._IB_=[];for(var l=function(e){if("object"===q(e)&&null!==e)if("undefined"!==
263
+ typeof e.byteLength){var w=Module._IB_.length;Module._IB_[w]=new Uint8Array(e);e={handle:w,isArrayBufferRef:!0}}else Object.keys(e).forEach(function(F){e.hasOwnProperty(F)&&(e[F]=l(e[F]))});return e},t=function(e){"object"===q(e)&&null!==e&&(e.buffer?e=e.buffer.slice(e.byteOffset,e.byteOffset+e.length):e.isArrayBufferRef?e=Module._IB_[e.handle].buffer:Object.keys(e).forEach(function(w){e.hasOwnProperty(w)&&(e[w]=t(e[w]))}));return e},c=Module._TRN_EMSCreateSharedWorkerInstance(),m,k=Module._TRN_EMSWorkerInstanceGetFunctionIterator(c),
264
+ h=function(e,w){return new Promise(function(F,D){e=l(e);var I=e.docId;I=I?Module.GetDoc(I):0;(I=Module.EMSCallSharedFunction(c,w,I))?D({type:"PDFWorkerError",message:Module.GetErrToString(I)}):(D=Module.EMSGetLastResponse(c),D=t(D),F(D))})};m=Module._TRN_EMSFunctionIteratorGetNextCommandName(k);)m=Module.GetJSStringFromCString(m),n.queue.onAsync(m,h);Module._TRN_EMSFunctionIteratorDestroy(k);if(Module._TRN_EMSCreatePDFNetWorkerInstance){var f={};k=function(e,w){x.on(e,w);f[e]=!0};Module.docPtrStringToIdMap=
265
+ {};var r=function(e){if(e in Module.docPtrStringToIdMap)return Module.docPtrStringToIdMap[e];throw Error("Couldn't find document ".concat(e));};n.queue.onAsync("PDFDoc.RequirePage",function(e){return Module.RequirePage(r(e.docId),e.pageNum)});k("pdfDocCreateFromBuffer",function(e){e=Module.CreateDoc({type:"array",value:e.buf});var w=Module.GetDoc(e).toString(16);Module.docPtrStringToIdMap[w]=e;return w});k("pdfDocCreateFromLayoutEls",function(e){var w=Module.CreateDocFromLayoutEls(e.buf);e=Module.CreateDoc({type:"ptr",
266
+ value:w});w=w.toString(16);Module.docPtrStringToIdMap[w]=e;return w});k("PDFDoc.destroy",function(e){e=r(e.auto_dealloc_obj);Module.DeleteDoc(e)});k("PDFDoc.saveMemoryBuffer",function(e){var w=r(e.doc);return Module.SaveHelper(Module.GetDoc(w),w,e.flags).slice(0)});k("pdfDocCreate",function(){var e=Module.CreateDoc({type:"new"}),w=Module.GetDoc(e).toString(16);Module.docPtrStringToIdMap[w]=e;return w});k("GetPDFDoc",function(e){e=e.docId;var w=Module.GetDoc(e).toString(16);Module.docPtrStringToIdMap[w]=
267
+ e;return w});k("ExtractPDFNetLayersContext",function(e){var w=e.layers;e=Module.GetDoc(e.docId);var F=0;w?F=Module.EMSCreateUpdatedLayersContext(e,w):Module.PDFDocHasOC(e)&&(w=Module.PDFDocGetOCGConfig(e),F=Module.OCGContextCreate(w));return F.toString(16)});var A=Module._TRN_EMSCreatePDFNetWorkerInstance();k=Module._TRN_EMSWorkerInstanceGetFunctionIterator(A);for(h=function(e){return new Promise(function(w,F){e=l(e);var D=Module.EMSCallPDFNetFunction(A,e);D?F(Module.GetErrToString(D)):(F=Module.EMSGetLastResponse(A),
268
+ F=t(F),w(F))})};m=Module._TRN_EMSFunctionIteratorGetNextCommandName(k);)if(m=Module.GetJSStringFromCString(m),!f[m])x.onAsync(m,h);Module._TRN_EMSFunctionIteratorDestroy(k)}}})(self)},function(v,B,u){var q=u(9),n=u.n(q),x=u(17),l=u(18),t=u(7),c=u(19),m=u(1),k=u(20);(function(h){var f=null;h.basePath="../";var r=function(){var e=h.pdfWorkerPath||"";h.workerBasePath&&(h.basePath=h.workerBasePath);var w=h.isFull,F=w?"full/":"lean/";h.useOptimizedWorker&&(F+=k.a);var D=h.wasmDisabled,I=h.disableObjectURLBlobs,
269
+ L=h.pdfWorkerChunkPaths;Object(m.c)();h.overriddenPdfWorkerPath&&(e=h.overriddenPdfWorkerPath,h.basePath="../",!Object(t.a)()||D)&&(e="");h.basePath=h.externalPath?h.externalPath:h.basePath+"external/";Object(c.a)("".concat(e+F,"PDFNetC"),{"Wasm.wasm":w?1E7:4E6,"Wasm.js.mem":1E5,".js.mem":12E6,".mem":w?2E6:6E5,disableObjectURLBlobs:I},D,L)};h.EmscriptenPDFManager=function(){};h.EmscriptenPDFManager.prototype={OnInitialized:function(e){Module.loaded?e():(Module.initCb=function(){e()},Object(m.b)("worker",
270
+ "PDFNet is not initialized yet!"))},NewDoc:function(e,w){return new Promise(function(F,D){try{F(Module.loadDoc(e,w))}catch(I){D(I)}})},Initialize:function(e,w,F,D){e&&(Module.TOTAL_MEMORY=e);Module.memoryInitializerPrefixURL=w;Module.asmjsPrefix=F;h.basePath=D;r()},shouldRunRender:function(e){return Module.ShouldRunRender(e.docId,e.pageIndex+1)}};var A={setup:function(e){function w(g){var z=g.data,y=g.action;var E="GetCanvas"===y||"GetCanvasPartial"===y?L.shouldRunRender(z):!0;if(E){f=g;var K=g.asyncCallCapability;
271
+ Object(m.b)("Memory","Worker running command: ".concat(y));G.actionMap[y](z,g).then(function(N){"BeginOperation"!==f.action&&(f=null);K.resolve(N)},function(N){f=null;K.reject(N)})}else h.deferredQueue.queue(g),I()}function F(g){g.asyncCallCapability=createPromiseCapability();f||G.length?G.queue(g):w(g);return g.asyncCallCapability.promise}function D(g){self.shouldResize&&L.Initialize(g.options.workerHeapSize,g.options.pdfResourcePath,g.options.pdfAsmPath,g.options.parentUrl);Module.chunkMax=g.options.chunkMax;
272
+ if(g.array instanceof Uint8Array){var z=255===g.array[0];e.postMessageTransfers=z;"response"in new XMLHttpRequest?L.OnInitialized(function(){h.SetupPDFNetFunctions(e);b();e.send("test",{supportTypedArray:!0,supportTransfers:z})}):e.send("test",!1)}else e.send("test",!1)}function I(){x.a.setImmediate(function(){if((!f||"BeginOperation"!==f.action)&&G.length&&!f){var g=G.dequeue();w(g)}})}var L=new h.EmscriptenPDFManager,G,H=!1,a=!1;Module.workerMessageHandler=e;var b=function(){H?a||(e.send("workerLoaded",
273
+ {}),a=!0):H=!0};L.OnInitialized(b);(function(){h.queue=G=new n.a({strategy:q.ArrayStrategy,comparator:function(g,z){return g.priority===z.priority?g.callbackId-z.callbackId:z.priority-g.priority}});h.deferredQueue=new n.a({strategy:q.ArrayStrategy,comparator:function(g,z){return g.priority===z.priority?g.callbackId-z.callbackId:z.priority-g.priority}});G.actionMap={};G.onAsync=function(g,z){e.onAsync(g,F);G.actionMap[g]=z}})();e.on("test",D);e.on("InitWorker",D);var d=function(g){f&&g(f)&&(Module.cancelCurrent(),
274
+ f=null);G.removeAllMatching(g,function(z){z.asyncCallCapability.reject({type:"Cancelled",message:"Operation was cancelled due to a change affecting the loaded document."})})},p=function(g){d(function(z){return z.data&&z.data.docId===g})};e.on("UpdatePassword",function(g){return Module.UpdatePassword(g.docId,g.password)});e.on("UpdateCustomHeader",function(g){return Module.UpdateCustomHeader(g.docId,g.customHeader)});e.on("LoadRes",function(g){Module.loadResources(g.array,g.l);return{}});e.on("DownloaderHint",
275
+ function(g){Module.DownloaderHint(g.docId,g.hint)});e.on("IsLinearized",function(g){return Module.IsLinearizationValid(g.docId)});e.onNextAsync(I);G.onAsync("NewDoc",function(g){return L.NewDoc(g)});G.onAsync("GetCanvas",function(g){Object(m.b)("workerdetails","Run GetCanvas PageIdx: ".concat(g.pageIndex," Width: ").concat(g.width));Object(m.b)("Memory","loadCanvas with potential memory usage ".concat(g.width*g.height*8));return Module.loadCanvas(g.docId,g.pageIndex,g.width,g.height,g.rotation,null,
276
+ g.layers,g.renderOptions)});G.onAsync("GetCanvasPartial",function(g){Object(m.b)("Memory","GetCanvasPartial with potential memory usage ".concat(g.width*g.height*8));return Module.loadCanvas(g.docId,g.pageIndex,g.width,g.height,g.rotation,g.bbox,g.layers,g.renderOptions)});G.onAsync("SaveDoc",function(g){return Module.SaveDoc(g.docId,g.xfdfString,g.finishedWithDocument,g.printDocument,g.flags,g.watermarks,g.apdocs,g.password,g.encryptionAlgorithmType,g.xfdfCommand)});G.onAsync("SaveDocFromFixedElements",
277
+ function(g){return Module.SaveDocFromFixedElements(g.bytes,g.xfdfString,g.flags,g.watermarks,g.password,g.encryptionAlgorithmType,g.xfdfCommand)});G.onAsync("MergeXFDF",function(g){return Module.MergeXFDF(g.docId,g.xfdf,g.apdocs)});G.onAsync("InsertPages",function(g){return Module.InsertPages(g.docId,g.doc,g.pageArray,g.destPos,g.insertBookmarks,g.skipUpdateEvent)});G.onAsync("MovePages",function(g){return Module.MovePages(g.docId,g.pageArray,g.destPos)});G.onAsync("RemovePages",function(g){return Module.RemovePages(g.docId,
278
+ g.pageArray,g.skipUpdateEvent)});G.onAsync("RotatePages",function(g){return Module.RotatePages(g.docId,g.pageArray,g.rotation)});G.onAsync("ExtractPages",function(g){return Module.ExtractPages(g.docId,g.pageArray,g.xfdfString,g.watermarks,g.apdocs,g.skipUpdateEvent)});G.onAsync("CropPages",function(g){return Module.CropPages(g.docId,g.pageArray,g.topMargin,g.botMargin,g.leftMargin,g.rightMargin)});G.onAsync("TriggerFullDownload",function(g){return Module.TriggerFullDownload(g.docId)});G.onAsync("InsertBlankPages",
279
+ function(g){return Module.InsertBlankPages(g.docId,g.pageArray,g.width,g.height)});G.onAsync("BeginOperation",function(){return Promise.resolve()});G.onAsync("RequirePage",function(g,z){return Module.RequirePage(g.docId,g.pageNum)});e.on("FinishOperation",function(){if(f&&"BeginOperation"===f.action)f=null,I();else throw{message:"Operation has not started."};});e.on("DeleteDocument",function(g){g=g.docId;p(g);Module.DeleteDoc(g)});e.on("GetCanvasProgressive",function(g){if(f&&f.callbackId===g.callbackId){Object(m.b)("worker",
280
+ "Progressive request in progress");var z=Module.GetCurrentCanvasData(!0)}else{if(G.find({priority:0,callbackId:g.callbackId}))throw Object(m.b)("worker","Progressive request Queued"),{type:"Queued",message:"Rendering has not started yet."};if(h.deferredQueue.find({priority:0,callbackId:g.callbackId}))throw Object(m.b)("worker","Progressive request Deferred"),{type:"Queued",message:"Rendering has not started yet."};}if(!z)throw Object(m.b)("worker","Progressive request invalid (render already complete)"),
281
+ {type:"Unavailable",message:"Rendering is complete or was cancelled."};return z});e.on("actionCancel",function(g){f&&f.callbackId===g.callbackId?(Object(m.b)("workerdetails","Cancelled Current Operation"),Module.cancelCurrent()&&(f=null,I())):(Object(m.b)("workerdetails","Cancelled queued operation"),G.remove({priority:0,callbackId:g.callbackId}),h.deferredQueue.remove({priority:0,callbackId:g.callbackId}))})}};h.onmessage=function(e){if("init"===e.data.action){var w=e.data.shouldResize;h.shouldResize=
282
+ w;h.isFull=e.data.isFull;h.wasmDisabled=!e.data.wasm;h.externalPath=e.data.externalPath;h.useOptimizedWorker=e.data.useOptimizedWorker;h.disableObjectURLBlobs=e.data.disableObjectURLBlobs;h.pdfWorkerChunkPaths=e.data.pdfWorkerChunkPaths;if(e=e.data.pdfWorkerPath)h.overriddenPdfWorkerPath=e;w||r();w=new l.a("worker_processor",self);Object(m.a)(w);A.setup(w)}}})("undefined"===typeof window?self:window)}]);}).call(this || window)