(function() {/*
 Notice * This file contains works from many authors under various (but compatible) licenses. Please see legal.txt for more information. **/
(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,w=Object.keys,_=i.bind,j=function(n){return n instanceof j?n:this instanceof j?(this._wrapped=n,void 0):new j(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):
n._=j,j.VERSION="1.5.2";var A=j.each=j.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length)for(var u=0,i=n.length;i>u;u++){if(t.call(e,n[u],u,n)===r)return}else for(var a=j.keys(n),u=0,i=a.length;i>u;u++)if(t.call(e,n[a[u]],a[u],n)===r)return};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var E="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=
function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(E);return r},j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,
n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(E);return r},j.find=j.detect=function(n,t,r){var e;return O(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,
e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var O=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:O(n,function(n){return n===t})},j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},j.pluck=function(n,
t){return j.map(n,function(n){return n[t]})},j.where=function(n,t,r){return j.isEmpty(t)?r?void 0:[]:j[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},j.findWhere=function(n,t){return j.where(n,t,!0)},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);if(!t&&j.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>e.computed&&(e={value:n,computed:a})}),e.value},
j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);if(!t&&j.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a<e.computed&&(e={value:n,computed:a})}),e.value},j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e},j.sample=function(n,t,r){return arguments.length<2||r?n[j.random(n.length-1)]:j.shuffle(n).slice(0,Math.max(0,t))};var k=function(n){return j.isFunction(n)?
n:function(t){return t[n]}};j.sortBy=function(n,t,r){var e=k(t);return j.pluck(j.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={},i=null==r?j.identity:k(r);return A(t,function(r,a){var o=i.call(e,r,a,t);n(u,o,r)}),u}};j.groupBy=F(function(n,t,r){(j.has(n,t)?n[t]:n[t]=[]).push(r)}),
j.indexBy=F(function(n,t,r){n[t]=r}),j.countBy=F(function(n,t){j.has(n,t)?n[t]++:n[t]=1}),j.sortedIndex=function(n,t,r,e){r=null==r?j.identity:k(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])<u?i=o+1:a=o}return i},j.toArray=function(n){return n?j.isArray(n)?o.call(n):n.length===+n.length?j.map(n,j.identity):j.values(n):[]},j.size=function(n){return null==n?0:n.length===+n.length?n.length:j.keys(n).length},j.first=j.head=j.take=function(n,t,r){return null==n?void 0:null==
t||r?n[0]:o.call(n,0,t)},j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},j.compact=function(n){return j.filter(n,j.identity)};var M=function(n,t,r){return t&&j.every(n,j.isArray)?c.apply(r,n):(A(n,function(n){j.isArray(n)||j.isArguments(n)?t?a.apply(r,n):M(n,t,r):r.push(n)}),r)};j.flatten=function(n,t){return M(n,
t,[])},j.without=function(n){return j.difference(n,o.call(arguments,1))},j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),i.push(n[e]))}),i},j.union=function(){return j.uniq(j.flatten(arguments,!0))},j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.indexOf(t,n)>=0})})},j.difference=function(n){var t=
c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+
r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var R=function(){};j.bind=function(n,t){var r,e;if(_&&
n.bind===_)return _.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));R.prototype=n.prototype;var u=new R;R.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},j.bindAll=function(n){var t=o.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");
return A(t,function(t){n[t]=j.bind(n[t],n)}),n},j.memoize=function(n,t){var r={};return t||(t=j.identity),function(){var e=t.apply(this,arguments);return j.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},j.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},j.defer=function(n){return j.delay.apply(j,[n,1].concat(o.call(arguments,1)))},j.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var c=function(){o=r.leading===!1?0:new Date,a=null,i=n.apply(e,
u)};return function(){var l=new Date;o||r.leading!==!1||(o=l);var f=t-(l-o);return e=this,u=arguments,0>=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u)):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u,i,a,o;return function(){i=this,u=arguments,a=new Date;var c=function(){var l=new Date-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u)))},l=r&&!e;return e||(e=setTimeout(c,t)),l&&(o=n.apply(i,u)),o}},j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=
n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=w||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){for(var t=
j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},j.pairs=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},j.invert=function(n){for(var t={},r=j.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){var t=
{},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==
t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case "[object String]":return n==String(t);case "[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case "[object Date]":case "[object Boolean]":return+n==+t;case "[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==
t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||
j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n){return"function"==
typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=
function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var I={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"}};I.unescape=j.invert(I.escape);var T={escape:new RegExp("["+j.keys(I.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(I.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(T[n],function(t){return I[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?
r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,
r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+
"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o;}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var z=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;
return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);(function(){var h=this,p=h.Backbone,e;e=typeof exports!=="undefined"?exports:h.Backbone={};e.VERSION="0.5.1";var f=h._;if(!f&&typeof require!=="undefined")f=require("underscore")._;var g=h.jQuery||h.Zepto;e.noConflict=function(){h.Backbone=p;return this};e.emulateHTTP=!1;e.emulateJSON=!1;e.Events={bind:function(a,b){var c=this._callbacks||(this._callbacks={});(c[a]||(c[a]=[])).push(b);return this},unbind:function(a,b){var c;if(a){if(c=this._callbacks)if(b){c=c[a];if(!c)return this;for(var d=0,e=c.length;d<
e;d++)if(b===c[d]){c[d]=null;break}}else c[a]=[]}else this._callbacks={};return this},trigger:function(a){var b,c,d,e,f=2;if(!(c=this._callbacks))return this;for(;f--;)if(b=f?a:"all",b=c[b])for(var g=0,h=b.length;g<h;g++)(d=b[g])?(e=f?Array.prototype.slice.call(arguments,1):arguments,d.apply(this,e)):(b.splice(g,1),g--,h--);return this}};e.Model=function(a,b){var c;a||(a={});if(c=this.defaults)f.isFunction(c)&&(c=c()),a=f.extend({},c,a);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");
this.set(a,{silent:!0});this._changed=!1;this._previousAttributes=f.clone(this.attributes);if(b&&b.collection)this.collection=b.collection;this.initialize(a,b)};f.extend(e.Model.prototype,e.Events,{_previousAttributes:null,_changed:!1,idAttribute:"id",initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.attributes[a];return this._escapedAttributes[a]=(b==null?"":
""+b).replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27").replace(/\//g,"&#x2F;")},has:function(a){return this.attributes[a]!=null},set:function(a,b){b||(b={});if(!a)return this;if(a.attributes)a=a.attributes;var c=this.attributes,d=this._escapedAttributes;if(!b.silent&&this.validate&&!this._performValidation(a,b))return!1;if(this.idAttribute in a)this.id=a[this.idAttribute];var e=this._changing;this._changing=!0;
for(var g in a){var h=a[g];if(!f.isEqual(c[g],h))c[g]=h,delete d[g],this._changed=!0,b.silent||this.trigger("change:"+g,this,h,b)}!e&&!b.silent&&this._changed&&this.change(b);this._changing=!1;return this},unset:function(a,b){if(!(a in this.attributes))return this;b||(b={});var c={};c[a]=void 0;if(!b.silent&&this.validate&&!this._performValidation(c,b))return!1;delete this.attributes[a];delete this._escapedAttributes[a];a==this.idAttribute&&delete this.id;this._changed=!0;b.silent||(this.trigger("change:"+
a,this,void 0,b),this.change(b));return this},clear:function(a){a||(a={});var b,c=this.attributes,d={};for(b in c)d[b]=void 0;if(!a.silent&&this.validate&&!this._performValidation(d,a))return!1;this.attributes={};this._escapedAttributes={};this._changed=!0;if(!a.silent){for(b in c)this.trigger("change:"+b,this,void 0,a);this.change(a)}return this},fetch:function(a){a||(a={});var b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)};a.error=i(a.error,b,a);return(this.sync||
e.sync).call(this,"read",this,a)},save:function(a,b){b||(b={});if(a&&!this.set(a,b))return!1;var c=this,d=b.success;b.success=function(a,e,f){if(!c.set(c.parse(a,f),b))return!1;d&&d(c,a,f)};b.error=i(b.error,c,b);var f=this.isNew()?"create":"update";return(this.sync||e.sync).call(this,f,this,b)},destroy:function(a){a||(a={});if(this.isNew())return this.trigger("destroy",this,this.collection,a);var b=this,c=a.success;a.success=function(d){b.trigger("destroy",b,b.collection,a);c&&c(b,d)};a.error=i(a.error,
b,a);return(this.sync||e.sync).call(this,"delete",this,a)},url:function(){var a=k(this.collection)||this.urlRoot||l();if(this.isNew())return a;return a+(a.charAt(a.length-1)=="/"?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this)},isNew:function(){return this.id==null},change:function(a){this.trigger("change",this,a);this._previousAttributes=f.clone(this.attributes);this._changed=!1},hasChanged:function(a){if(a)return this._previousAttributes[a]!=
this.attributes[a];return this._changed},changedAttributes:function(a){a||(a=this.attributes);var b=this._previousAttributes,c=!1,d;for(d in a)f.isEqual(b[d],a[d])||(c=c||{},c[d]=a[d]);return c},previous:function(a){if(!a||!this._previousAttributes)return null;return this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},_performValidation:function(a,b){var c=this.validate(a);if(c)return b.error?b.error(this,c,b):this.trigger("error",this,c,b),!1;return!0}});
e.Collection=function(a,b){b||(b={});if(b.comparator)this.comparator=b.comparator;f.bindAll(this,"_onModelEvent","_removeReference");this._reset();a&&this.reset(a,{silent:!0});this.initialize.apply(this,arguments)};f.extend(e.Collection.prototype,e.Events,{model:e.Model,initialize:function(){},toJSON:function(){return this.map(function(a){return a.toJSON()})},add:function(a,b){if(f.isArray(a))for(var c=0,d=a.length;c<d;c++)this._add(a[c],b);else this._add(a,b);return this},remove:function(a,b){if(f.isArray(a))for(var c=
0,d=a.length;c<d;c++)this._remove(a[c],b);else this._remove(a,b);return this},get:function(a){if(a==null)return null;return this._byId[a.id!=null?a.id:a]},getByCid:function(a){return a&&this._byCid[a.cid||a]},at:function(a){return this.models[a]},sort:function(a){a||(a={});if(!this.comparator)throw Error("Cannot sort a set without a comparator");this.models=this.sortBy(this.comparator);a.silent||this.trigger("reset",this,a);return this},pluck:function(a){return f.map(this.models,function(b){return b.get(a)})},
reset:function(a,b){a||(a=[]);b||(b={});this.each(this._removeReference);this._reset();this.add(a,{silent:!0});b.silent||this.trigger("reset",this,b);return this},fetch:function(a){a||(a={});var b=this,c=a.success;a.success=function(d,f,e){b[a.add?"add":"reset"](b.parse(d,e),a);c&&c(b,d)};a.error=i(a.error,b,a);return(this.sync||e.sync).call(this,"read",this,a)},create:function(a,b){var c=this;b||(b={});a=this._prepareModel(a,b);if(!a)return!1;var d=b.success;b.success=function(a,e,f){c.add(a,b);
d&&d(a,e,f)};a.save(null,b);return a},parse:function(a){return a},chain:function(){return f(this.models).chain()},_reset:function(){this.length=0;this.models=[];this._byId={};this._byCid={}},_prepareModel:function(a,b){if(a instanceof e.Model){if(!a.collection)a.collection=this}else{var c=a;a=new this.model(c,{collection:this});a.validate&&!a._performValidation(c,b)&&(a=!1)}return a},_add:function(a,b){b||(b={});a=this._prepareModel(a,b);if(!a)return!1;var c=this.getByCid(a)||this.get(a);if(c)throw Error(["Can't add the same model to a set twice",
c.id]);this._byId[a.id]=a;this._byCid[a.cid]=a;this.models.splice(b.at!=null?b.at:this.comparator?this.sortedIndex(a,this.comparator):this.length,0,a);a.bind("all",this._onModelEvent);this.length++;b.silent||a.trigger("add",a,this,b);return a},_remove:function(a,b){b||(b={});a=this.getByCid(a)||this.get(a);if(!a)return null;delete this._byId[a.id];delete this._byCid[a.cid];this.models.splice(this.indexOf(a),1);this.length--;b.silent||a.trigger("remove",a,this,b);this._removeReference(a);return a},
_removeReference:function(a){this==a.collection&&delete a.collection;a.unbind("all",this._onModelEvent)},_onModelEvent:function(a,b,c,d){(a=="add"||a=="remove")&&c!=this||(a=="destroy"&&this._remove(b,d),b&&a==="change:"+b.idAttribute&&(delete this._byId[b.previous(b.idAttribute)],this._byId[b.id]=b),this.trigger.apply(this,arguments))}});f.each(["forEach","each","map","reduce","reduceRight","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max",
"min","sortBy","sortedIndex","toArray","size","first","rest","last","without","indexOf","lastIndexOf","isEmpty"],function(a){e.Collection.prototype[a]=function(){return f[a].apply(f,[this.models].concat(f.toArray(arguments)))}});e.Router=function(a){a||(a={});if(a.routes)this.routes=a.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var q=/:([\w\d]+)/g,r=/\*([\w\d]+)/g,s=/[-[\]{}()+?.,\\^$|#\s]/g;f.extend(e.Router.prototype,e.Events,{initialize:function(){},route:function(a,b,c){e.history||
(e.history=new e.History);f.isRegExp(a)||(a=this._routeToRegExp(a));e.history.route(a,f.bind(function(d){d=this._extractParameters(a,d);c.apply(this,d);this.trigger.apply(this,["route:"+b].concat(d))},this))},navigate:function(a,b){e.history.navigate(a,b)},_bindRoutes:function(){if(this.routes){var a=[],b;for(b in this.routes)a.unshift([b,this.routes[b]]);b=0;for(var c=a.length;b<c;b++)this.route(a[b][0],a[b][1],this[a[b][1]])}},_routeToRegExp:function(a){a=a.replace(s,"\\$&").replace(q,"([^/]*)").replace(r,
"(.*?)");return RegExp("^"+a+"$")},_extractParameters:function(a,b){return a.exec(b).slice(1)}});e.History=function(){this.handlers=[];f.bindAll(this,"checkUrl")};var j=/^#*/,t=/msie [\w.]+/,m=!1;f.extend(e.History.prototype,{interval:50,getFragment:function(a,b){if(a==null)if(this._hasPushState||b){a=window.location.pathname;var c=window.location.search;c&&(a+=c);a.indexOf(this.options.root)==0&&(a=a.substr(this.options.root.length))}else a=window.location.hash;return a.replace(j,"")},start:function(a){if(m)throw Error("Backbone.history has already been started");
this.options=f.extend({},{root:"/"},this.options,a);this._wantsPushState=!!this.options.pushState;this._hasPushState=!(!this.options.pushState||!window.history||!window.history.pushState);a=this.getFragment();var b=document.documentMode;if(b=t.exec(navigator.userAgent.toLowerCase())&&(!b||b<=7))this.iframe=g('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(a);this._hasPushState?g(window).bind("popstate",this.checkUrl):"onhashchange"in window&&!b?
g(window).bind("hashchange",this.checkUrl):setInterval(this.checkUrl,this.interval);this.fragment=a;m=!0;a=window.location;b=a.pathname==this.options.root;if(this._wantsPushState&&!this._hasPushState&&!b)this.fragment=this.getFragment(null,!0),window.location.replace(this.options.root+"#"+this.fragment);else if(this._wantsPushState&&this._hasPushState&&b&&a.hash)this.fragment=a.hash.replace(j,""),window.history.replaceState({},document.title,a.protocol+"//"+a.host+this.options.root+this.fragment);
return this.loadUrl()},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();a==this.fragment&&this.iframe&&(a=this.getFragment(this.iframe.location.hash));if(a==this.fragment||a==decodeURIComponent(this.fragment))return!1;this.iframe&&this.navigate(a);this.loadUrl()||this.loadUrl(window.location.hash)},loadUrl:function(a){var b=this.fragment=this.getFragment(a);return f.any(this.handlers,function(a){if(a.route.test(b))return a.callback(b),!0})},
navigate:function(a,b){var c=(a||"").replace(j,"");if(!(this.fragment==c||this.fragment==decodeURIComponent(c))){if(this._hasPushState){var d=window.location;c.indexOf(this.options.root)!=0&&(c=this.options.root+c);this.fragment=c;window.history.pushState({},document.title,d.protocol+"//"+d.host+c)}else if(window.location.hash=this.fragment=c,this.iframe&&c!=this.getFragment(this.iframe.location.hash))this.iframe.document.open().close(),this.iframe.location.hash=c;b&&this.loadUrl(a)}}});e.View=function(a){this.cid=
f.uniqueId("view");this._configure(a||{});this._ensureElement();this.delegateEvents();this.initialize.apply(this,arguments)};var u=/^(\S+)\s*(.*)$/,n=["model","collection","el","id","attributes","className","tagName"];f.extend(e.View.prototype,e.Events,{tagName:"div",$:function(a){return g(a,this.el)},initialize:function(){},render:function(){return this},remove:function(){g(this.el).remove();return this},make:function(a,b,c){a=document.createElement(a);b&&g(a).attr(b);c&&g(a).html(c);return a},delegateEvents:function(a){if(a||
(a=this.events))for(var b in g(this.el).unbind(".delegateEvents"+this.cid),a){var c=this[a[b]];if(!c)throw Error('Event "'+a[b]+'" does not exist');var d=b.match(u),e=d[1];d=d[2];c=f.bind(c,this);e+=".delegateEvents"+this.cid;d===""?g(this.el).bind(e,c):g(this.el).delegate(d,e,c)}},_configure:function(a){this.options&&(a=f.extend({},this.options,a));for(var b=0,c=n.length;b<c;b++){var d=n[b];a[d]&&(this[d]=a[d])}this.options=a},_ensureElement:function(){if(this.el){if(f.isString(this.el))this.el=
g(this.el).get(0)}else{var a=this.attributes||{};if(this.id)a.id=this.id;if(this.className)a["class"]=this.className;this.el=this.make(this.tagName,a)}}});e.Model.extend=e.Collection.extend=e.Router.extend=e.View.extend=function(a,b){var c=v(this,a,b);c.extend=this.extend;return c};var w={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};e.sync=function(a,b,c){var d=w[a];c=f.extend({type:d,dataType:"json",processData:!1},c);if(!c.url)c.url=k(b)||l();if(!c.data&&b&&(a=="create"||a=="update"))c.contentType=
"application/json",c.data=JSON.stringify(b.toJSON());if(e.emulateJSON)c.contentType="application/x-www-form-urlencoded",c.processData=!0,c.data=c.data?{model:c.data}:{};if(e.emulateHTTP&&(d==="PUT"||d==="DELETE")){if(e.emulateJSON)c.data._method=d;c.type="POST";c.beforeSend=function(a){a.setRequestHeader("X-HTTP-Method-Override",d)}}return g.ajax(c)};var o=function(){},v=function(a,b,c){var d;d=b&&b.hasOwnProperty("constructor")?b.constructor:function(){return a.apply(this,arguments)};f.extend(d,
a);o.prototype=a.prototype;d.prototype=new o;b&&f.extend(d.prototype,b);c&&f.extend(d,c);d.prototype.constructor=d;d.__super__=a.prototype;return d},k=function(a){if(!a||!a.url)return null;return f.isFunction(a.url)?a.url():a.url},l=function(){throw Error('A "url" property or function must be specified');},i=function(a,b,c){return function(d){a?a(b,d,c):b.trigger("error",b,d,c)}}}).call(this);var fakeworker=function(global){function extend(dest,src){for(var i in src)dest[i]=src[i]}var userAgent=navigator.userAgent.toLowerCase();var browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};function httpSuccess(xhr){try{return!xhr.status&&location.protocol=="file:"||xhr.status>=200&&
xhr.status<300||xhr.status==304||xhr.status==1223||browser.safari&&xhr.status==undefined}catch(e){}return false}function __syncXhrGet(url,fn){var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest;xhr.open("GET",url,false);xhr.send("");if(httpSuccess(xhr))fn(xhr);else throw new Error("Could not load resource("+url+") result="+xhr.status+":"+xhr.statusText);}function parseUri(str){var o=parseUri.options,m=o.parser[o.strictMode?"strict":"loose"].exec(str),uri={},i=14;
while(i--)uri[o.key[i]]=m[i]||"";uri[o.q.name]={};uri[o.key[12]].replace(o.q.parser,function($0,$1,$2){if($1)uri[o.q.name][$1]=$2});return uri}parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function absolutePath(path){var e=document.createElement("span");e.innerHTML='<a href="'+path+'" />';return e.firstChild.href}function FakeMessageEvent(worker){extend(this,Event);Event.constructor.call(this);this.currentTarget=worker;this.srcElement=worker;this.target=worker;this.timestamp=(new Date).getTime()}
FakeMessageEvent.prototype={initMessageEvent:function(type,canBubble,cancelable,data,origin,lastEventId,source,ports){this.initMessageEventNS("",type,canBubble,cancelable,data,origin,lastEventId,source,ports)},initMessageEventNS:function(namespaceURI,type,canBubble,cancelable,data,origin,lastEventId,source,ports){this.namespaceURI=namespaceURI;this.type=type;this.canBubble=canBubble;this.cancelable=cancelable;this.data=data;this.origin=origin;this.lastEventId=lastEventId;this.source=source;this.ports=
ports}};function FakeErrorEvent(worker){extend(this,Event);Event.constructor.call(this);this.currentTarget=worker;this.srcElement=worker;this.target=worker;this.timestamp=(new Date).getTime()}FakeErrorEvent.prototype={initErrorEvent:function(type,canBubble,cancelable,message,filename,lineno){this.initErrorEventNS("",type,canBubble,cancelable,message,filename,lineno)},initErrorEventNS:function(namespaceURI,type,canBubble,cancelable,message,filename,lineno){this.namespaceURI=namespaceURI;this.type=
type;this.canBubble=canBubble;this.cancelable=cancelable;this.message=message;this.filename=filename;this.lineno=lineno}};var nativeWorker=global["Worker"];var FakeWorker=function(url){var self=this;this._listenerNamespaces={};this._eventQueues={};__syncXhrGet(url,function(xhr){try{self._workerContext=new FakeWorkerContext(url,xhr.responseText,self)}catch(e){throw e;}})};FakeWorker.prototype={isFake:true,addEventListener:function(type,listener,useCapture){this.addEventListenerNS("",type,listener,
useCapture)},addEventListenerNS:function(namespaceURI,type,listener,useCapture){var namespace=this._listenerNamespaces[namespaceURI];if(!namespace)this._listenerNamespaces[namespaceURI]=namespace={};var listeners=namespace[type];if(!listeners)namespace[type]=listeners=[];listeners.push(listener)},removeEventListener:function(type,listener,useCapture){this.removeEventListener("",type,listener,useCapture)},removeEventListenerNS:function(namespaceURI,eventName,fn,useCapture){var namespace=this._listenerNamespaces[namespaceURI];
if(namespace){var listeners=namespace[type];if(listeners)for(var i=0;i<listeners.length;i++)if(listeners[i]===listener)delete listeners[i]}},dispatchEvent:function(event){if(typeof this["on"+event.type]=="function")this["on"+event.type].call(this,event);var namespace=this._listenerNamespaces[event.namespaceURI];if(namespace){var listeners=namespace[event.type];if(listeners)for(var i=0;i<listeners.length;i++)listeners[i].call(this,event)}return true},postMessage:function(msg){var self=this;var workerContext=
this._workerContext;if(typeof workerContext.onmessage=="function"){var event=new FakeMessageEvent(self);event.initMessageEvent("message",false,false,msg,"","",null,null);setTimeout(function(){try{workerContext.onmessage.call(workerContext,event)}catch(e){var errorEvent=new FakeErrorEvent(self);var lineno=e.line||e.lineNumber;errorEvent.initErrorEvent("error",false,false,e.message,workerContext.location.filename,lineno);self.dispatchEvent(errorEvent);throw e;}},0)}},terminate:function(){this._workerContext.close()}};
function FakeWorkerLocation(url){var absolute=absolutePath(url);var parsed=parseUri(absolute);this.href=absolute;this.protocol=parsed.protocol+":";this.host=parsed.port?parsed.host+":"+parsed.port:parsed.host;this.hostname=parsed.host;this.port=parsed.port;this.pathname=parsed.path;this.search=parsed.query?"?"+parsed.query:"";this.hash=parsed.anchor?"#"+parsed.anchor:"";this.filename=parsed.file}FakeWorkerLocation.prototype={toString:function(){return this.href}};function FakeWorkerContext(url,source,
worker){var postMessage=this.postMessage=function(msg){var event=new FakeMessageEvent(worker);event.initMessageEvent("message",false,false,msg,"","",null,null);setTimeout(function(){worker.dispatchEvent(event)},0)};var setTimeout=this.setTimeout=global.setTimeout;var clearTimeout=this.clearTimeout=global.clearTimeout;var setInterval=this.setInterval=global.setInterval;var clearInterval=this.clearInterval=global.clearInterval;var XMLHttpRequest=this.XMLHttpRequest=global.XMLHttpRequest;var openDatabase=
this.openDatabase=global.openDatabase;var openDatabaseSync=this.openDatabaseSync=global.openDatabaseSync;var WebSocket=this.WebSocket=global.WebSocket;var EventSource=this.EventSource=global.EventSource;var MessageChannel=this.MessageChannel=global.MessageChannel;var Worker=this.Worker=FakeWorker;var location=this.location=new FakeWorkerLocation(url);var close=this.close=function(){this.closing=true};var navigator=this.navigator=global.navigator;var self=this.self=this;var importScripts=this.importScripts=
function(){for(var i=0;i<arguments.length;i++)__syncXhrGet(arguments[i],function(xhr){eval(xhr.responseText)})};eval(source);try{if(typeof onmessage=="function")this.onmessage=onmessage}catch(e){}}var ret={nativeWorker:nativeWorker,install:function(){global["Worker"]=FakeWorker},uninstall:function(){global["Worker"]=nativeWorker}};if(typeof Worker==="undefined"||browser.opera)ret.install();return ret}(this);(function(exports){exports.utils=exports.utils||{};if(!String.fromCodePoint)(function(){var defineProperty=function(){var result;try{var object={};var $defineProperty=Object.defineProperty;result=$defineProperty(object,object,object)&&$defineProperty}catch(error){}return result}();var stringFromCharCode=String.fromCharCode;var floor=Math.floor;var fromCodePoint=function(){var MAX_SIZE=16384;var codeUnits=[];var highSurrogate;var lowSurrogate;var index=-1;var length=arguments.length;if(!length)return"";
var result="";while(++index<length){var codePoint=Number(arguments[index]);if(!isFinite(codePoint)||codePoint<0||codePoint>1114111||floor(codePoint)!==codePoint)throw RangeError("Invalid code point: "+codePoint);if(codePoint<=65535)codeUnits.push(codePoint);else{codePoint-=65536;highSurrogate=(codePoint>>10)+55296;lowSurrogate=codePoint%1024+56320;codeUnits.push(highSurrogate,lowSurrogate)}if(index+1===length||codeUnits.length>MAX_SIZE){result+=stringFromCharCode.apply(null,codeUnits);codeUnits.length=
0}}return result};if(defineProperty)defineProperty(String,"fromCodePoint",{"value":fromCodePoint,"configurable":true,"writable":true});else String.fromCodePoint=fromCodePoint})();if(!Element.prototype.scrollIntoViewIfNeeded)Element.prototype.scrollIntoViewIfNeeded=function(centerIfNeeded){function withinBounds(value,min,max,extent){if(centerIfNeeded===false||max<=value+extent&&value<=min+extent)return Math.min(max,Math.max(min,value));return(min+max)/2}function makeArea(left,top,width,height){return{"left":left,
"top":top,"width":width,"height":height,"right":left+width,"bottom":top+height,"translate":function(x,y){return makeArea(x+left,y+top,width,height)},"relativeFromTo":function(lhs,rhs){var newLeft=left,newTop=top;lhs=lhs.offsetParent;rhs=rhs.offsetParent;if(lhs===rhs)return area;for(;lhs;lhs=lhs.offsetParent){newLeft+=lhs.offsetLeft+lhs.clientLeft;newTop+=lhs.offsetTop+lhs.clientTop}for(;rhs;rhs=rhs.offsetParent){newLeft-=rhs.offsetLeft+rhs.clientLeft;newTop-=rhs.offsetTop+rhs.clientTop}return makeArea(newLeft,
newTop,width,height)}}}var parent,elem=this,area=makeArea(this.offsetLeft,this.offsetTop,this.offsetWidth,this.offsetHeight);while((parent=elem.parentNode)instanceof HTMLElement){var clientLeft=parent.offsetLeft+parent.clientLeft;var clientTop=parent.offsetTop+parent.clientTop;area=area.relativeFromTo(elem,parent).translate(-clientLeft,-clientTop);parent.scrollLeft=withinBounds(parent.scrollLeft,area.right-parent.clientWidth,area.left,parent.clientWidth);parent.scrollTop=withinBounds(parent.scrollTop,
area.bottom-parent.clientHeight,area.top,parent.clientHeight);area=area.translate(clientLeft-parent.scrollLeft,clientTop-parent.scrollTop);elem=parent}};if(window.NodeList&&!NodeList.prototype.forEach)NodeList.prototype.forEach=function(callback,thisArg){thisArg=thisArg||window;for(var i=0;i<this.length;i++)callback.call(thisArg,this[i],i,this)};exports.console=exports.console||{log:function(){},warn:function(){},error:function(){},assert:function(){}};if(!String.prototype.startsWith)String.prototype.startsWith=
function(search,pos){return this.substr(!pos||pos<0?0:+pos,search.length)===search};if(!String.prototype.endsWith)String.prototype.endsWith=function(search,thisLen){if(thisLen===undefined||thisLen>this.length)thisLen=this.length;return this.substring(thisLen-search.length,thisLen)===search};console.assert=function(condition,message){if(!condition)if(exports._trnDebugMode)throw new Error("Assertion failed: "+message);else console.warn("Assertion failed: "+message)};exports.$log=exports.$out=function(){Array.prototype.forEach.call(arguments,
function(e){console.log(e)})};var ie=function(){var ua=navigator.userAgent.toLowerCase();var match=/(msie) ([\w.]+)/.exec(ua)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(ua);return match?parseInt(match[2],10):match}();exports.utils.ie=ie;exports.utils.windowsApp=false;exports.utils.isEdge=!!navigator.userAgent.match(/Edge/i);exports.utils.isMobileDevice=function(){return!!(!ie&&(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||
navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Touch/i)||navigator.userAgent.match(/IEMobile/i)||navigator.userAgent.match(/Silk/i)))}();exports.busyLoop=function(step,finished,sync){var start=Date.now();function nextSlice(){while(step())if(Date.now()-start>100&&!sync){start=Date.now();setTimeout(nextSlice,0);return}finished()}nextSlice()};exports.utils.mouseUpEventBug=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/i);exports.utils.isChrome=function(){var opera=window.navigator.userAgent.match(/OPR/);
var maxthon=window.navigator.userAgent.match(/Maxthon/);var edge=window.navigator.userAgent.match(/Edge/);return window.navigator.userAgent.match(/Chrome\/(.*?) /)&&!opera&&!maxthon&&!edge}();var chromeVersion=function(){var match=window.navigator.userAgent.match(/Chrome\/(.*?) /);return match?parseInt(match[1],10):match}();exports.utils.chromeHasSubzero=exports.utils.isChrome&&chromeVersion>=56;exports.utils.isSafari=window.navigator.userAgent.match(/Safari/)&&!exports.utils.isChrome&&!exports.utils.isEdge;
exports.utils.isIOS=window.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);exports.utils.isFirefox=window.navigator.userAgent.match(/Firefox/);exports.utils.disableFormCharacterProcessing=window.navigator.userAgent.indexOf("Android")>-1;var multiplierOverride;var getCanvasMultiplier=function(){return function(){if(!_.isUndefined(multiplierOverride))return multiplierOverride;return Math.min(window.devicePixelRatio,2)||1}}();exports.utils.getCanvasMultiplier=getCanvasMultiplier;exports.utils.setCanvasMultiplier=
function(value){multiplierOverride=value};exports.utils.unsetCanvasMultiplier=function(){multiplierOverride=undefined};exports.utils.canvasFontMultiplier=function(){var canvas=document.createElement("canvas");var ctx=canvas.getContext("2d");var testSize=20;ctx.font=testSize+"px f0";return parseFloat(ctx.font)/testSize}();if(window.CanvasPixelArray)window.CanvasPixelArray.prototype.set=function(arr){var l=this.length,i=0;for(;i<l;i+=4){this[i]=arr[i];this[i+1]=arr[i+1];this[i+2]=arr[i+2];this[i+3]=
255}};if(!window.Uint8ClampedArray)window.Uint8ClampedArray=window.Uint8Array;var canvasClipBug=function(){function basicClipIssue(){var canvas=document.createElement("canvas");canvas.style.width="1px";canvas.style.height="1px";var ctx=canvas.getContext("2d");ctx.fillStyle="#FFFFFF";ctx.fillRect(0,0,1,1);ctx.beginPath();ctx.rect(0,0,1,1);ctx.clip();ctx.fillStyle="#000000";ctx.fillRect(0,0,1,1);var val=ctx.getImageData(0,0,1,1).data[0];return val===255}function nonIntegerValueIssue(){var canvas=document.createElement("canvas");
canvas.style.width="5px";canvas.style.height="5px";var ctx=canvas.getContext("2d");ctx.rect(0,0,4.5,4.5);ctx.clip();ctx.fillStyle="#FFFFFF";ctx.fillRect(0,0,5,5);ctx.clearRect(0,0,5,5);var val=ctx.getImageData(1,1,1,1).data[3];return val!==0}return basicClipIssue()||nonIntegerValueIssue()}();exports.utils.canvasClipBug=canvasClipBug;var typedArrayApply=function(){if(exports.Uint8Array)try{var testArray=new exports.Uint8Array(new ArrayBuffer(1));String.fromCharCode.apply(null,testArray);return true}catch(e){return false}else return false}();
exports.utils.typedArrayApply=typedArrayApply;exports.utils.hasObjectURL=!!(exports.URL&&exports.URL.createObjectURL);if(!Document.prototype.createAttributeNS)Document.prototype.createAttributeNS=function(namespaceURI,qualifiedName){var dummy=this.createElement("dummy");dummy.setAttributeNS(namespaceURI,qualifiedName,"");var attr=dummy.attributes[0];dummy.removeAttributeNode(attr);return attr};if(!Element.prototype.setAttributeNodeNS)Element.prototype.setAttributeNodeNS=Element.prototype.setAttributeNode;
exports.utils.xmlSerializerNamespaceSupported=function(){var body=document.createElementNS("http://www.w3.org/1999/xhtml","body");var attr=document.createAttributeNS("http://www.xfa.org/schema/xfa-data/1.0/","xfa:spec");attr.nodeValue="2.0.2";body.setAttributeNodeNS(attr);attr=document.createAttributeNS("http://www.xfa.org/schema/xfa-data/1.0/","xfa:APIVersion");attr.nodeValue="Acrobat:10.1.3";body.setAttributeNodeNS(attr);var serializer=new XMLSerializer;var annotstr=serializer.serializeToString(body);
function passTest(actual){return actual.indexOf(' xmlns="http://www.w3.org/1999/xhtml"')>0&&actual.indexOf(' xfa:spec="2.0.2"')>0&&actual.indexOf(' xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"')>0&&actual.indexOf(' xfa:APIVersion="Acrobat:10.1.3"')>0}var result=passTest(annotstr);var $body=$("<body>").attr({"xmlns":"http://www.w3.org/1999/xhtml","xmlns:xfa":"http://www.xfa.org/schema/xfa-data/1.0/","xfa:APIVersion":"Acrobat:10.1.3","xfa:spec":"2.0.2"});annotstr=serializer.serializeToString($body[0]);
exports.utils.xmlSerializerJQueryNamespaceSupported=passTest(annotstr);return result}();window.matchMedia||(window.matchMedia=function(){var styleMedia=window.styleMedia||window.media;if(!styleMedia){var style=document.createElement("style"),script=document.getElementsByTagName("script")[0],info=null;style.type="text/css";style.id="matchmediajs-test";script.parentNode.insertBefore(style,script);info="getComputedStyle"in window&&window.getComputedStyle(style,null)||style.currentStyle;styleMedia={matchMedium:function(media){var text=
"@media "+media+"{ #matchmediajs-test { width: 1px; } }";if(style.styleSheet)style.styleSheet.cssText=text;else style.textContent=text;return info.width==="1px"}}}return function(media){return{matches:styleMedia.matchMedium(media||"all"),media:media||"all"}}}());(function(){if(window.matchMedia&&window.matchMedia("all").addListener)return false;var localMatchMedia=window.matchMedia,hasMediaQueries=localMatchMedia("only all").matches,isListening=false,timeoutID=0,queries=[],handleChange=function(){clearTimeout(timeoutID);
timeoutID=setTimeout(function(){for(var i=0,il=queries.length;i<il;i++){var mql=queries[i].mql,listeners=queries[i].listeners||[],matches=localMatchMedia(mql.media).matches;if(matches!==mql.matches){mql.matches=matches;for(var j=0,jl=listeners.length;j<jl;j++)listeners[j].call(window,mql)}}},30)};window.matchMedia=function(media){var mql=localMatchMedia(media),listeners=[],index=0;mql.addListener=function(listener){if(!hasMediaQueries)return;if(!isListening){isListening=true;window.addEventListener("resize",
handleChange,true)}if(index===0)index=queries.push({mql:mql,listeners:listeners});listeners.push(listener)};mql.removeListener=function(listener){for(var i=0,il=listeners.length;i<il;i++)if(listeners[i]===listener)listeners.splice(i,1)};return mql}})();exports.utils.specialBlendSupportedTest=function(){var canvas=document.createElement("canvas");canvas.width=1;canvas.height=1;var ctx=canvas.getContext("2d");ctx.fillStyle="#000";ctx.fillRect(0,0,1,1);ctx.globalCompositeOperation="multiply";ctx.fillStyle=
"#fff";ctx.fillRect(0,0,1,1);var result=ctx.getImageData(0,0,1,1).data[0]===0;exports.utils.specialBlendSupported=result;return result}();exports.utils.supportsImageDataConstructor=function(){try{new ImageData(1,1);return true}catch(e){return false}}();var vendors=["webkit","moz"];for(var i=0;i<vendors.length&&!window.requestAnimationFrame;++i){var vp=vendors[i];window.requestAnimationFrame=window[vp+"RequestAnimationFrame"];window.cancelAnimationFrame=window[vp+"CancelAnimationFrame"]||window[vp+
"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var lastTime=0;window.requestAnimationFrame=function(callback){var now=Date.now();var nextTime=Math.max(lastTime+16,now);return setTimeout(function(){callback(lastTime=nextTime)},nextTime-now)};window.cancelAnimationFrame=clearTimeout}exports.utils.hasClass=function(element,cls){return(" "+element.className+" ").indexOf(" "+cls+" ")>-1};exports.utils.eventHandler=
{on:function(){this.applyWithArgs($(this).on,arguments);return this},off:function(){this.applyWithArgs($(this).off,arguments);return this},trigger:function(){this.applyWithArgs($(this).triggerHandler,arguments);return this},applyWithArgs:function(func,args){func.apply($(this),Array.prototype.slice.call(args))},one:function(){this.applyWithArgs($(this).one,arguments);return this}};exports.utils.isEditableElement=function(ele){return ele.is("input:text")||ele.is("textarea")};if(!exports.server)exports.server=
{log:function(){},error:function(){},capture:function(){}};var arrprint=function(array,msg){var str="[";for(var i=0;i<array.length;i++){str+=array[i];if(i>=array.length-1)break;str+=", "}str+="]";if(!_.isUndefined(msg))str+=" "+msg;console.log(str)};exports.utils.arrprint=arrprint;var logvar=function(varname,variable){if(_.isArray(varname)&&_.isArray(variable)&&varname.length===variable.length){var varlist="";for(var i=0;i<varname.length;i++)varlist=varlist+varname[i]+": "+variable[i]+" ";console.log(varlist)}else console.log(varname+
": "+variable)};exports.utils.logvar=logvar;var fCmp=function(f1,f2){var eps=1E-6;return Math.abs(f1-f2)<eps};exports.utils.fCmp=fCmp;var documentReady=function(callback){if(document.readyState==="complete")callback();else if(document.addEventListener)exports.addEventListener("load",function(){callback()},false);else if(document.attachEvent)exports.attachEvent("onload",function(){callback()})};exports.utils.documentReady=documentReady;exports.runEval=function(str,c,t){c.clo=undefined;t.clo=undefined;
eval(str);str=null};if(typeof Object.defineProperties==="undefined"){Object.defineProperty=function(prototype,name,property){if(property.get)prototype.__defineGetter__(name,property.get);if(property.set)prototype.__defineSetter__(name,property.set)};Object.defineProperties=function(prototype,properties){for(var name in properties)if(properties.hasOwnProperty(name)){var property=properties[name];Object.defineProperty(prototype,name,property)}}}if(!HTMLCanvasElement.prototype.toBlob&&HTMLCanvasElement.prototype.msToBlob)HTMLCanvasElement.prototype.toBlob=
function(callback){callback(HTMLCanvasElement.prototype.msToBlob.call(this))};var canvasProto=CanvasRenderingContext2D.prototype;var originalTransform=CanvasRenderingContext2D.prototype.transform;var originalTranslate=CanvasRenderingContext2D.prototype.translate;var originalScale=CanvasRenderingContext2D.prototype.scale;var originalRotate=CanvasRenderingContext2D.prototype.rotate;var originalSetTransform=CanvasRenderingContext2D.prototype.setTransform;var originalSave=CanvasRenderingContext2D.prototype.save;
var originalRestore=CanvasRenderingContext2D.prototype.restore;_(canvasProto).extend({getTransformReference:function(){var contextArray=this.canvas.mtxArray;if(!contextArray||!contextArray.length)contextArray=this.canvas.mtxArray=[new XODText.Matrix2D(1,0,0,1,0,0)];return contextArray[contextArray.length-1]},getTransform:function(){var copy=new XODText.Matrix2D;copy.initMatrix(this.getTransformReference());return copy},setCurrentTransform:function(transform){this.canvas.mtxArray[this.canvas.mtxArray.length-
1]=transform},transform:function(a,b,c,d,h,v){this.getTransformReference().concat(new XODText.Matrix2D(a,b,c,d,h,v));return originalTransform.apply(this,arguments)},translate:function(h,v){this.getTransformReference().concat(new XODText.Matrix2D(1,0,0,1,h,v));return originalTranslate.apply(this,arguments)},scale:function(x,y){this.getTransformReference().concat(new XODText.Matrix2D(x,0,0,y,0,0));return originalScale.apply(this,arguments)},rotate:function(angle){this.getTransformReference().concat(new XODText.Matrix2D.rotationMatrix(angle));
return originalRotate.apply(this,arguments)},setTransform:function(a,b,c,d,h,v){this.getTransformReference();this.setCurrentTransform(new XODText.Matrix2D(a,b,c,d,h,v));return originalSetTransform.apply(this,arguments)},save:function(){var currentTransform=this.getTransformReference();var newMatrix=new XODText.Matrix2D;newMatrix.initMatrix(currentTransform);this.canvas.mtxArray.push(newMatrix);return originalSave.apply(this,arguments)},restore:function(){var mtxArray=this.canvas.mtxArray;if(mtxArray&&
mtxArray.length)mtxArray.pop();return originalRestore.apply(this,arguments)}});Object.defineProperties(canvasProto,{w:{set:function(val){this.lineWidth=val}},c:{set:function(val){this.lineCap=val}},s:{set:function(val){this.strokeStyle=val}},f:{set:function(val){this.fillStyle=val}},a:{set:function(val){this.globalAlpha=val}},n:{set:function(val){this.font=val}},i:{set:function(val){this.miterLimit=val}},j:{set:function(val){this.lineJoin=val}},g:{set:function(val){this.globalCompositeOperation=val}}});
_(canvasProto).extend({S:function(){if(typeof this.saves==="undefined")this.saves=0;this.saves++;this.save()},r:function(){this.saves--;this.restore()},t:canvasProto.transform,T:canvasProto.translate,ro:canvasProto.rotate,L:canvasProto.createLinearGradient,R:canvasProto.createRadialGradient,P:canvasProto.createPattern,b:canvasProto.beginPath,z:canvasProto.closePath,F:canvasProto.fill,X:canvasProto.stroke,C:canvasProto.clip,M:canvasProto.moveTo,m:canvasProto.measureText,l:canvasProto.lineTo,q:canvasProto.quadraticCurveTo,
B:canvasProto.bezierCurveTo,x:canvasProto.fillText,fillTextCustom:function(text,x,y){},xc:function(text,x,y){},tm:function(mapping){},cgb:function(){},cge:function(){},xw:function(text,x,y,skipLast){this.fillText(text,x,y)},xcw:function(text,x,y,skipLast){},I:function(img){if(typeof img!=="undefined")this.drawImage.apply(this,arguments)},Z:canvasProto.setTransform,d:canvasProto.getImageData,D:canvasProto.putImageData,e:canvasProto.scale,cr:function(x,y,w,h){this.beginPath();this.rect(x,y,w,h);this.clip()},
createCanvas:function(){return document.createElement("canvas")}});Object.defineProperty(TextMetrics.prototype,"W",{get:function(){return this.width}});var CanvasGradientPrototype;if(typeof exports.CanvasGradient==="undefined")CanvasGradientPrototype=document.createElement("canvas").getContext("2d").createLinearGradient(0,0,0,0).__proto__;else CanvasGradientPrototype=CanvasGradient.prototype;_(CanvasGradientPrototype).extend({A:CanvasGradientPrototype.addColorStop});exports.utils.isRectIntersecting=
function(rect1,rect2){if(rect1.x1<=rect2.x2&&rect1.x2>=rect2.x1&&rect1.y1<=rect2.y2&&rect1.y2>=rect2.y1)return true;return false};exports.utils.containsRect=function(rect1,rect2){if(rect1.x1<=rect2.x1&&rect1.x2>=rect2.x2&&rect1.y1<=rect2.y1&&rect1.y2>=rect2.y2)return true;return false};exports.utils.getRectIntersection=function(rect1,rect2){var rect={x1:0,y1:0,x2:0,y2:0};if(exports.utils.isRectIntersecting(rect1,rect2)===true){rect.x1=Math.max(rect1.x1,rect2.x1);rect.y1=Math.max(rect1.y1,rect2.y1);
rect.x2=Math.min(rect1.x2,rect2.x2);rect.y2=Math.min(rect1.y2,rect2.y2)}return rect};exports.utils.normalizeRect=function(pt1,pt2){var x1=pt1.x;var x2=pt2.x;var y1=pt1.y;var y2=pt2.y;if(pt1.x>pt2.x){x2=pt1.x;x1=pt2.x}if(pt1.y>pt2.y){y2=pt1.y;y1=pt2.y}return{x1:x1,y1:y1,x2:x2,y2:y2}};exports.utils.getRotationOffsets=function(rotation,w,h){var dx=0,dy=0;rotation=Number(rotation);switch(rotation){case 90:dy=w;break;case 180:dx=w;dy=h;break;case 270:dx=h;break}return{dx:dx,dy:dy}};exports.json2xml=function(o,
tab){var toXml=function(v,name,ind){var xml="";if(v instanceof Array)for(var i=0,n=v.length;i<n;i++)xml+=ind+toXml(v[i],name,ind+"\t")+"\n";else if(typeof v==="object"){var hasChild=false;xml+=ind+"<"+name;for(var m in v)if(m.charAt(0)=="@")xml+=" "+m.substr(1)+'="'+v[m].toString()+'"';else hasChild=true;xml+=hasChild?">":"/>";if(hasChild){for(var m in v)if(m=="#text")xml+=v[m];else if(m=="#cdata")xml+="<![CDATA["+v[m]+"]]\x3e";else if(m.charAt(0)!="@")xml+=toXml(v[m],m,ind+"\t");xml+=(xml.charAt(xml.length-
1)=="\n"?ind:"")+"</"+name+">"}}else xml+=ind+"<"+name+">"+v.toString()+"</"+name+">";return xml},xml="";for(var m in o)xml+=toXml(o[m],m,"");return tab?xml.replace(/\t/g,tab):xml.replace(/\t|\n/g,"")};exports.roundToPrecision=function(number,precision){var factor=Math.pow(10,precision);var tempNumber=number*factor;var roundedTempNumber=Math.round(tempNumber);return roundedTempNumber/factor};if(!Array.prototype.fill)Object.defineProperty(Array.prototype,"fill",{value:function(value){if(this==null)throw new TypeError("this is null or not defined");
var O=Object(this);var len=O.length>>>0;var start=arguments[1];var relativeStart=start>>0;var k=relativeStart<0?Math.max(len+relativeStart,0):Math.min(relativeStart,len);var end=arguments[2];var relativeEnd=end===undefined?len:end>>0;var final=relativeEnd<0?Math.max(len+relativeEnd,0):Math.min(relativeEnd,len);while(k<final){O[k]=value;k++}return O}});exports.joinPaths=function(){var lhs,rhs;var arr=[];arr[arguments.length-1]=null;var i=0;if(arguments.length>0){rhs=arguments[i].endsWith("/")?arguments[i].length-
1:arguments[i].length;arr[i]=arguments[i].substring(0,rhs)}for(i=1;i<arguments.length-1;++i){lhs=arguments[i].startsWith("/")?1:0;rhs=arguments[i].endsWith("/")?arguments[i].length-1:arguments[i].length;arr[i]=arguments[i].substring(lhs,rhs)}if(arguments.length>1){lhs=arguments[i].startsWith("/")?1:0;arr[i]=arguments[i].substring(lhs,arguments[i].length)}return arr.join("/")};exports.utils.utf8_decode=function(utftext){var string="";var i=0;var c1=0,c2=0,c3=0;while(i<utftext.length){c1=utftext.charCodeAt(i);
if(c1<128){string+=String.fromCharCode(c1);i++}else if(c1>191&&c1<224){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode((c1&31)<<6|c2&63);i+=2}else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode((c1&15)<<12|(c2&63)<<6|c3&63);i+=3}}return string};exports.utils.splitInkListBetween=function(inklist,splitpoint,inklistpos){var ArrayToSplit=inklist[inklistpos];var arrsize=ArrayToSplit.length;var newarray=[];for(var i=splitpoint+1;i<arrsize;++i)newarray.push(ArrayToSplit[i]);
for(var j=arrsize-1;j>splitpoint;--j)ArrayToSplit.splice(j,1);return newarray};exports.utils.rotationDirection=function(p1x,p1y,p2x,p2y,p3x,p3y){if((p3y-p1y)*(p2x-p1x)>(p2y-p1y)*(p3x-p1x))return 1;if((p3y-p1y)*(p2x-p1x)===(p2y-p1y)*(p3x-p1x))return 0;return-1};exports.utils.containsSegment=function(x1,y1,x2,y2,sx,sy){if(x1<x2&&x1<sx&&sx<x2)return true;if(x2<x1&&x2<sx&&sx<x1)return true;if(y1<y2&&y1<sy&&sy<y2)return true;if(y2<y1&&y2<sy&&sy<y1)return true;if(x1===sx&&y1===sy||x2===sx&&y2===sy)return true;
return false};exports.utils.twoLineSegmentsIntersect=function(A,B,P1,P2){var x1=A.x;var y1=A.y;var x2=B.x;var y2=B.y;var x3=P1.x;var y3=P1.y;var x4=P2.x;var y4=P2.y;var f1=exports.utils.rotationDirection(x1,y1,x2,y2,x4,y4);var f2=exports.utils.rotationDirection(x1,y1,x2,y2,x3,y3);var f3=exports.utils.rotationDirection(x1,y1,x3,y3,x4,y4);var f4=exports.utils.rotationDirection(x2,y2,x3,y3,x4,y4);var intersect=f1!==f2&&f3!==f4;if(f1===0&&f2===0&&f3===0&&f4===0)intersect=exports.utils.containsSegment(x1,
y1,x2,y2,x3,y3)||exports.utils.containsSegment(x1,y1,x2,y2,x4,y4)||exports.utils.containsSegment(x3,y3,x4,y4,x1,y1)||exports.utils.containsSegment(x3,y3,x4,y4,x2,y2);return intersect};exports.utils.crossProduct=function(x1,y1,x2,y2,x,y){return(x-x2)*(y2-y1)-(y-y2)*(x2-x1)};exports.utils.pointInTriangle=function(x1,y1,x2,y2,x3,y3,x,y){var cp1=exports.utils.crossProduct(x1,y1,x2,y2,x,y)<0;var cp2=exports.utils.crossProduct(x2,y2,x3,y3,x,y)<0;var cp3=exports.utils.crossProduct(x3,y3,x1,y1,x,y)<0;return cp1===
cp2&&cp2===cp3&&cp3===cp1};exports.utils.isPointInQuad=function(testpt,qp){var A=qp[0];var B=qp[1];var C=qp[2];var D=qp[3];var t1=exports.utils.pointInTriangle(A.x,A.y,B.x,B.y,C.x,C.y,testpt.x,testpt.y);var t2=exports.utils.pointInTriangle(C.x,C.y,D.x,D.y,A.x,A.y,testpt.x,testpt.y);return t1||t2};exports.utils.calcDistance=function(x1,y1,x2,y2){var dx=x2-x1;var dy=y2-y1;return Math.sqrt(dx*dx+dy*dy)};var INTERSECTION_EPSILON=1E-30;exports.utils.calcIntersection=function(ax,ay,bx,by,cx,cy,dx,dy){var num=
(ay-cy)*(dx-cx)-(ax-cx)*(dy-cy);var den=(bx-ax)*(dy-cy)-(by-ay)*(dx-cx);if(Math.abs(den)<INTERSECTION_EPSILON)return null;var r=num/den;var x=ax+r*(bx-ax);var y=ay+r*(by-ay);return{x:x,y:y}};exports.utils.getQuadFromPoints=function(pt1,pt2,eraserRadius){var THRESHOLD=5;var Pa={};var Pb={};var Pc={};var Pd={};var pp1={};var pp2={};pp1.x=pt1.x;pp1.y=pt1.y;pp2.x=pt2.x;pp2.y=pt2.y;if(pt1.x===pt2.x&&pt1.y===pt2.y)pp2.x+=THRESHOLD;var dx=pp2.x-pp1.x;var dy=pp2.y-pp1.y;var linelength=Math.sqrt(dx*dx+dy*
dy);dx/=linelength;dy/=linelength;var tdx=eraserRadius*dx;var tdy=eraserRadius*dy;var pt1x=pp1.x-tdx;var pt1y=pp1.y-tdy;var pt2x=pp2.x+tdx;var pt2y=pp2.y+tdy;var px=eraserRadius*-dy;var py=eraserRadius*dx;Pa.x=pt1x-px;Pa.y=pt1y-py;Pb.x=pt2x-px;Pb.y=pt2y-py;Pc.x=pt2x+px;Pc.y=pt2y+py;Pd.x=pt1x+px;Pd.y=pt1y+py;var QuadPoint=[Pa,Pb,Pc,Pd];return QuadPoint};exports.utils.returnPointThatIntersectsQuad=function(qp,pt1,pt2){var A={x:qp[0].x,y:qp[0].y};var B={x:qp[1].x,y:qp[1].y};var C={x:qp[2].x,y:qp[2].y};
var D={x:qp[3].x,y:qp[3].y};var P1={x:pt1.x,y:pt1.y};var P2={x:pt2.x,y:pt2.y};var fresult=[];if(exports.utils.twoLineSegmentsIntersect(A,B,P1,P2)){var res=exports.utils.calcIntersection(A.x,A.y,B.x,B.y,P1.x,P1.y,P2.x,P2.y);if(res)fresult.push(res)}if(exports.utils.twoLineSegmentsIntersect(B,C,P1,P2)){var res2=exports.utils.calcIntersection(B.x,B.y,C.x,C.y,P1.x,P1.y,P2.x,P2.y);if(res2)fresult.push(res2)}if(exports.utils.twoLineSegmentsIntersect(C,D,P1,P2)){var res3=exports.utils.calcIntersection(C.x,
C.y,D.x,D.y,P1.x,P1.y,P2.x,P2.y);if(res3)fresult.push(res3)}if(exports.utils.twoLineSegmentsIntersect(D,A,P1,P2)){var res4=exports.utils.calcIntersection(D.x,D.y,A.x,A.y,P1.x,P1.y,P2.x,P2.y);if(res4)fresult.push(res4)}if(fresult.length===2){var d1=exports.utils.calcDistance(fresult[0].x,fresult[0].y,P1.x,P1.y);var d2=exports.utils.calcDistance(fresult[1].x,fresult[1].y,P1.x,P1.y);if(d1>d2){var b=fresult[0];fresult[0]=fresult[1];fresult[1]=b}}return fresult}})(window);function XMLWriter(a,b){if(a)this.encoding=a;if(b)this.version=b}
(function(){XMLWriter.prototype={encoding:"ISO-8859-1",version:"1.0",formatting:"indented",indentChar:"\t",indentation:1,newLine:"\n",writeStartDocument:function(a){this.close();this.stack=[];this.standalone=a},writeEndDocument:function(){this.active=this.root;this.stack=[]},writeDocType:function(a){this.doctype=a},writeStartElement:function(c,d){if(d)c=d+":"+c;var a=this,b=a.active,e={n:c,a:{},c:[]};if(b){b.c.push(e);this.stack.push(b)}else a.root=e;a.active=e},writeEndElement:function(){this.active=
this.stack.pop()||this.root},writeAttributeString:function(a,b){if(this.active)this.active.a[a]=b},writeString:function(a){if(this.active)this.active.c.push(a)},writeElementString:function(a,b,c){this.writeStartElement(a,c);this.writeString(b);this.writeEndElement()},writeCDATA:function(a){this.writeString("<![CDATA["+a+"]]\x3e")},writeComment:function(a){this.writeString("\x3c!-- "+a+" --\x3e")},flush:function(){var a=this,b="",c="",d=a.indentation,e=a.formatting.toLowerCase()=="indented",f='<?xml version="'+
a.version+'" encoding="'+a.encoding+'"';if(a.stack&&a.stack[0])a.writeEndDocument();if(a.standalone!==undefined)f+=' standalone="'+!!a.standalone+'"';f+=" ?>";f=[f];if(a.doctype&&a.root)f.push("<!DOCTYPE "+a.root.n+" "+a.doctype+">");if(e)while(d--)b+=a.indentChar;if(a.root)k(a.root,c,b,f);return f.join(e?a.newLine:"")},close:function(){var a=this;if(a.root)j(a.root);a.active=a.root=a.stack=null},getDocument:function(){return(new DOMParser).parseFromString(this.flush(),"text/xml")}};function j(a){var l=
a.c.length;while(l--)if(typeof a.c[l]=="object")j(a.c[l]);a.n=a.a=a.c=null}function k(a,b,c,d){var e=b+"<"+a.n,f=a.c.length,g,h,i=0;for(g in a.a)e+=" "+g+'="'+a.a[g]+'"';e+=f?">":" />";d.push(e);if(f){do{h=a.c[i++];if(typeof h=="string")if(f==1)return d.push(d.pop()+h+"</"+a.n+">");else d.push(b+c+h);else if(typeof h=="object")k(h,b+c,c,d)}while(i<f);d.push(b+"</"+a.n+">")}}})();var idbModules={};
(function(idbModules){function callback(fn,context,event,func){event.target=context;typeof context[fn]==="function"&&context[fn].apply(context,[event]);typeof func==="function"&&func()}function throwDOMException(name,message,error){var e=new DOMException.constructor(0,message);e.name=name;e.message=message;e.stack=arguments.callee.caller;idbModules.DEBUG&&console.log(name,message,error,e);throw e;}var StringList=function(){this.length=0;this._items=[]};StringList.prototype={contains:function(str){return-1!==this._items.indexOf(str)},
item:function(key){return this._items[key]},indexOf:function(str){return this._items.indexOf(str)},push:function(item){this._items.push(item);this.length+=1},splice:function(){this._items.splice.apply(this._items,arguments);this.length=this._items.length}};idbModules.util={"throwDOMException":throwDOMException,"callback":callback,"quote":function(arg){return"'"+arg+"'"},"StringList":StringList}})(idbModules);
(function(idbModules){var Sca=function(){return{"encode":function(val){return JSON.stringify(val)},"decode":function(val){return JSON.parse(val)}}}();idbModules.Sca=Sca})(idbModules);
(function(idbModules){var collations=["","number","string","boolean","object","undefined"];var getGenericEncoder=function(){return{"encode":function(key){return collations.indexOf(typeof key)+"-"+JSON.stringify(key)},"decode":function(key){if(typeof key==="undefined")return undefined;else return JSON.parse(key.substring(2))}}};var types={"number":getGenericEncoder("number"),"boolean":getGenericEncoder(),"object":getGenericEncoder(),"string":{"encode":function(key){return collations.indexOf("string")+
"-"+key},"decode":function(key){return""+key.substring(2)}},"undefined":{"encode":function(key){return collations.indexOf("undefined")+"-undefined"},"decode":function(key){return undefined}}};var Key=function(){return{encode:function(key){return types[typeof key].encode(key)},decode:function(key){return types[collations[key.substring(0,1)]].decode(key)}}}();idbModules.Key=Key})(idbModules);
(function(idbModules,undefined){var Event=function(type,debug){return{"type":type,debug:debug,bubbles:false,cancelable:false,eventPhase:0,timeStamp:new Date}};idbModules.Event=Event})(idbModules);
(function(idbModules){var IDBRequest=function(){this.onsuccess=this.onerror=this.result=this.error=this.source=this.transaction=null;this.readyState="pending"};var IDBOpenRequest=function(){this.onblocked=this.onupgradeneeded=null};IDBOpenRequest.prototype=IDBRequest;idbModules.IDBRequest=IDBRequest;idbModules.IDBOpenRequest=IDBOpenRequest})(idbModules);
(function(idbModules,undefined){var IDBKeyRange=function(lower,upper,lowerOpen,upperOpen){this.lower=lower;this.upper=upper;this.lowerOpen=lowerOpen;this.upperOpen=upperOpen};IDBKeyRange.only=function(value){return new IDBKeyRange(value,value,true,true)};IDBKeyRange.lowerBound=function(value,open){return new IDBKeyRange(value,undefined,open,undefined)};IDBKeyRange.upperBound=function(value){return new IDBKeyRange(undefined,value,undefined,open)};IDBKeyRange.bound=function(lower,upper,lowerOpen,upperOpen){return new IDBKeyRange(lower,
upper,lowerOpen,upperOpen)};idbModules.IDBKeyRange=IDBKeyRange})(idbModules);
(function(idbModules,undefined){function IDBCursor(range,direction,idbObjectStore,cursorRequest,keyColumnName,valueColumnName){this.__range=range;this.source=this.__idbObjectStore=idbObjectStore;this.__req=cursorRequest;this.key=undefined;this.direction=direction;this.__keyColumnName=keyColumnName;this.__valueColumnName=valueColumnName;if(!this.source.transaction.__active)idbModules.util.throwDOMException("TransactionInactiveError - The transaction this IDBObjectStore belongs to is not active.");this.__offset=
-1;this.__lastKeyContinued=undefined;this["continue"]()}IDBCursor.prototype.__find=function(key,tx,success,error){var me=this;var sql=["SELECT * FROM ",idbModules.util.quote(me.__idbObjectStore.name)];var sqlValues=[];sql.push("WHERE ",me.__keyColumnName," NOT NULL");if(me.__range&&(me.__range.lower||me.__range.upper)){sql.push("AND");if(me.__range.lower){sql.push(me.__keyColumnName+(me.__range.lowerOpen?" >=":" >")+" ?");sqlValues.push(idbModules.Key.encode(me.__range.lower))}me.__range.lower&&me.__range.upper&&
sql.push("AND");if(me.__range.upper){sql.push(me.__keyColumnName+(me.__range.upperOpen?" <= ":" < ")+" ?");sqlValues.push(idbModules.Key.encode(me.__range.upper))}}if(typeof key!=="undefined"){me.__lastKeyContinued=key;me.__offset=0}if(me.__lastKeyContinued!==undefined){sql.push("AND "+me.__keyColumnName+" >= ?");sqlValues.push(idbModules.Key.encode(me.__lastKeyContinued))}sql.push("ORDER BY ",me.__keyColumnName);sql.push("LIMIT 1 OFFSET "+me.__offset);idbModules.DEBUG&&console.log(sql.join(" "),
sqlValues);tx.executeSql(sql.join(" "),sqlValues,function(tx,data){if(data.rows.length===1){var key=idbModules.Key.decode(data.rows.item(0)[me.__keyColumnName]);var val=me.__valueColumnName==="value"?idbModules.Sca.decode(data.rows.item(0)[me.__valueColumnName]):idbModules.Key.decode(data.rows.item(0)[me.__valueColumnName]);success(key,val)}else{idbModules.DEBUG&&console.log("Reached end of cursors");success(undefined,undefined)}},function(tx,data){idbModules.DEBUG&&console.log("Could not execute Cursor.continue");
error(data)})};IDBCursor.prototype["continue"]=function(key){var me=this;this.__idbObjectStore.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__offset++;me.__find(key,tx,function(key,val){me.key=key;me.value=val;success(typeof me.key!=="undefined"?me:undefined,me.__req)},function(data){error(data)})})};IDBCursor.prototype.advance=function(count){if(count<=0)idbModules.util.throwDOMException("Type Error - Count is invalid - 0 or negative",count);var me=this;this.__idbObjectStore.transaction.__addToTransactionQueue(function(tx,
args,success,error){me.__offset+=count;me.__find(undefined,tx,function(key,value){me.key=key;me.value=value;success(typeof me.key!=="undefined"?me:undefined,me.__req)},function(data){error(data)})})};IDBCursor.prototype.update=function(valueToUpdate){var me=this;return this.__idbObjectStore.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__find(undefined,tx,function(key,value){var sql="UPDATE "+idbModules.util.quote(me.__idbObjectStore.name)+" SET value = ? WHERE key = ?";idbModules.DEBUG&&
console.log(sql,valueToUpdate,key);tx.executeSql(sql,[idbModules.Sca.encode(valueToUpdate),idbModules.Key.encode(key)],function(tx,data){if(data.rowsAffected===1)success(key);else error("No rowns with key found"+key)},function(tx,data){error(data)})},function(data){error(data)})})};IDBCursor.prototype["delete"]=function(){var me=this;return this.__idbObjectStore.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__find(undefined,tx,function(key,value){var sql="DELETE FROM  "+idbModules.util.quote(me.__idbObjectStore.name)+
" WHERE key = ?";idbModules.DEBUG&&console.log(sql,key);tx.executeSql(sql,[idbModules.Key.encode(key)],function(tx,data){if(data.rowsAffected===1)success(undefined);else error("No rowns with key found"+key)},function(tx,data){error(data)})},function(data){error(data)})})};idbModules.IDBCursor=IDBCursor})(idbModules);
(function(idbModules,undefined){function IDBIndex(indexName,idbObjectStore){this.indexName=indexName;this.__idbObjectStore=this.source=idbObjectStore}IDBIndex.prototype.__createIndex=function(indexName,keyPath,optionalParameters){var me=this;var transaction=me.__idbObjectStore.transaction;transaction.__addToTransactionQueue(function(tx,args,success,failure){me.__idbObjectStore.__getStoreProps(tx,function(){function error(){idbModules.util.throwDOMException(0,"Could not create new index",arguments)}
if(transaction.mode!==2)idbModules.util.throwDOMException(0,"Invalid State error, not a version transaction",me.transaction);var idxList=JSON.parse(me.__idbObjectStore.__storeProps.indexList);if(typeof idxList[indexName]!=="undefined")idbModules.util.throwDOMException(0,"Index already exists on store",idxList);var columnName=indexName;idxList[indexName]={"columnName":columnName,"keyPath":keyPath,"optionalParams":optionalParameters};me.__idbObjectStore.__storeProps.indexList=JSON.stringify(idxList);
var sql=["ALTER TABLE",idbModules.util.quote(me.__idbObjectStore.name),"ADD",columnName,"BLOB"].join(" ");idbModules.DEBUG&&console.log(sql);tx.executeSql(sql,[],function(tx,data){tx.executeSql("SELECT * FROM "+idbModules.util.quote(me.__idbObjectStore.name),[],function(tx,data){(function initIndexForRow(i){if(i<data.rows.length)try{var value=idbModules.Sca.decode(data.rows.item(i).value);var indexKey=eval("value['"+keyPath+"']");tx.executeSql("UPDATE "+idbModules.util.quote(me.__idbObjectStore.name)+
" set "+columnName+" = ? where key = ?",[idbModules.Key.encode(indexKey),data.rows.item(i).key],function(tx,data){initIndexForRow(i+1)},error)}catch(e){initIndexForRow(i+1)}else{idbModules.DEBUG&&console.log("Updating the indexes in table",me.__idbObjectStore.__storeProps);tx.executeSql("UPDATE __sys__ set indexList = ? where name = ?",[me.__idbObjectStore.__storeProps.indexList,me.__idbObjectStore.name],function(){me.__idbObjectStore.__setReadyState("createIndex",true);success(me)},error)}})(0)},
error)},error)},"createObjectStore")})};IDBIndex.prototype.openCursor=function(range,direction){var cursorRequest=new idbModules.IDBRequest;var cursor=new idbModules.IDBCursor(range,direction,this.source,cursorRequest,this.indexName,"value");return cursorRequest};IDBIndex.prototype.openKeyCursor=function(range,direction){var cursorRequest=new idbModules.IDBRequest;var cursor=new idbModules.IDBCursor(range,direction,this.source,cursorRequest,this.indexName,"key");return cursorRequest};IDBIndex.prototype.__fetchIndexData=
function(key,opType){var me=this;return me.__idbObjectStore.transaction.__addToTransactionQueue(function(tx,args,success,error){var sql=["SELECT * FROM ",idbModules.util.quote(me.__idbObjectStore.name)," WHERE",me.indexName,"NOT NULL"];var sqlValues=[];if(typeof key!=="undefined"){sql.push("AND",me.indexName," = ?");sqlValues.push(idbModules.Key.encode(key))}idbModules.DEBUG&&console.log("Trying to fetch data for Index",sql.join(" "),sqlValues);tx.executeSql(sql.join(" "),sqlValues,function(tx,data){var d;
if(typeof opType==="count")d=data.rows.length;else if(data.rows.length===0)d=undefined;else if(opType==="key")d=idbModules.Key.decode(data.rows.item(0).key);else d=idbModules.Sca.decode(data.rows.item(0).value);success(d)},error)})};IDBIndex.prototype.get=function(key){return this.__fetchIndexData(key,"value")};IDBIndex.prototype.getKey=function(key){return this.__fetchIndexData(key,"key")};IDBIndex.prototype.count=function(key){return this.__fetchIndexData(key,"count")};idbModules.IDBIndex=IDBIndex})(idbModules);
(function(idbModules){var IDBObjectStore=function(name,idbTransaction,ready){this.name=name;this.transaction=idbTransaction;this.__ready={};this.__setReadyState("createObjectStore",typeof ready==="undefined"?true:ready);this.indexNames=new idbModules.util.StringList};IDBObjectStore.prototype.__setReadyState=function(key,val){this.__ready[key]=val};IDBObjectStore.prototype.__waitForReady=function(callback,key){var ready=true;if(typeof key!=="undefined")ready=typeof this.__ready[key]==="undefined"?
true:this.__ready[key];else for(var x in this.__ready)if(!this.__ready[x])ready=false;if(ready)callback();else{idbModules.DEBUG&&console.log("Waiting for to be ready",key);var me=this;window.setTimeout(function(){me.__waitForReady(callback,key)},100)}};IDBObjectStore.prototype.__getStoreProps=function(tx,callback,waitOnProperty){var me=this;this.__waitForReady(function(){if(me.__storeProps){idbModules.DEBUG&&console.log("Store properties - cached",me.__storeProps);callback(me.__storeProps)}else tx.executeSql("SELECT * FROM __sys__ where name = ?",
[me.name],function(tx,data){if(data.rows.length!==1)callback();else{me.__storeProps={"name":data.rows.item(0).name,"indexList":data.rows.item(0).indexList,"autoInc":data.rows.item(0).autoInc,"keyPath":data.rows.item(0).keyPath};idbModules.DEBUG&&console.log("Store properties",me.__storeProps);callback(me.__storeProps)}},function(){callback()})},waitOnProperty)};IDBObjectStore.prototype.__deriveKey=function(tx,value,key,callback){function getNextAutoIncKey(){tx.executeSql("SELECT * FROM sqlite_sequence where name like ?",
[me.name],function(tx,data){if(data.rows.length!==1)callback(0);else callback(data.rows.item(0).seq)},function(tx,error){idbModules.util.throwDOMException(0,"Data Error - Could not get the auto increment value for key",error)})}var me=this;me.__getStoreProps(tx,function(props){if(!props)idbModules.util.throwDOMException(0,"Data Error - Could not locate defination for this table",props);if(props.keyPath){if(typeof key!=="undefined")idbModules.util.throwDOMException(0,"Data Error - The object store uses in-line keys and the key parameter was provided",
props);if(value)try{var primaryKey=eval("value['"+props.keyPath+"']");if(!primaryKey)if(props.autoInc==="true")getNextAutoIncKey();else idbModules.util.throwDOMException(0,"Data Error - Could not eval key from keyPath");else callback(primaryKey)}catch(e){idbModules.util.throwDOMException(0,"Data Error - Could not eval key from keyPath",e)}else idbModules.util.throwDOMException(0,"Data Error - KeyPath was specified, but value was not")}else if(typeof key!=="undefined")callback(key);else if(props.autoInc===
"false")idbModules.util.throwDOMException(0,"Data Error - The object store uses out-of-line keys and has no key generator and the key parameter was not provided. ",props);else getNextAutoIncKey()})};IDBObjectStore.prototype.__insertData=function(tx,value,primaryKey,success,error){var paramMap={};if(typeof primaryKey!=="undefined")paramMap.key=idbModules.Key.encode(primaryKey);var indexes=JSON.parse(this.__storeProps.indexList);for(var key in indexes)try{paramMap[indexes[key].columnName]=idbModules.Key.encode(eval("value['"+
indexes[key].keyPath+"']"))}catch(e){error(e)}var sqlStart=["INSERT INTO ",idbModules.util.quote(this.name),"("];var sqlEnd=[" VALUES ("];var sqlValues=[];for(key in paramMap){sqlStart.push(key+",");sqlEnd.push("?,");sqlValues.push(paramMap[key])}sqlStart.push("value )");sqlEnd.push("?)");sqlValues.push(idbModules.Sca.encode(value));var sql=sqlStart.join(" ")+sqlEnd.join(" ");idbModules.DEBUG&&console.log("SQL for adding",sql,sqlValues);tx.executeSql(sql,sqlValues,function(tx,data){success(primaryKey)},
function(tx,err){error(err)})};IDBObjectStore.prototype.add=function(value,key){var me=this;return me.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__deriveKey(tx,value,key,function(primaryKey){me.__insertData(tx,value,primaryKey,success,error)})})};IDBObjectStore.prototype.put=function(value,key){var me=this;return me.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__deriveKey(tx,value,key,function(primaryKey){var sql="DELETE FROM "+idbModules.util.quote(me.name)+
" where key = ?";tx.executeSql(sql,[idbModules.Key.encode(primaryKey)],function(tx,data){idbModules.DEBUG&&console.log("Did the row with the",primaryKey,"exist? ",data.rowsAffected);me.__insertData(tx,value,primaryKey,success,error)},function(tx,err){error(err)})})})};IDBObjectStore.prototype.get=function(key){var me=this;return me.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__waitForReady(function(){var primaryKey=idbModules.Key.encode(key);idbModules.DEBUG&&console.log("Fetching",
me.name,primaryKey);tx.executeSql("SELECT * FROM "+idbModules.util.quote(me.name)+" where key = ?",[primaryKey],function(tx,data){idbModules.DEBUG&&console.log("Fetched data",data);try{if(0===data.rows.length)return success();success(idbModules.Sca.decode(data.rows.item(0).value))}catch(e){idbModules.DEBUG&&console.log(e);success(undefined)}},function(tx,err){error(err)})})})};IDBObjectStore.prototype["delete"]=function(key){var me=this;return me.transaction.__addToTransactionQueue(function(tx,args,
success,error){me.__waitForReady(function(){var primaryKey=idbModules.Key.encode(key);idbModules.DEBUG&&console.log("Fetching",me.name,primaryKey);tx.executeSql("DELETE FROM "+idbModules.util.quote(me.name)+" where key = ?",[primaryKey],function(tx,data){idbModules.DEBUG&&console.log("Deleted from database",data.rowsAffected);success()},function(tx,err){error(err)})})})};IDBObjectStore.prototype.clear=function(){var me=this;return me.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__waitForReady(function(){tx.executeSql("DELETE FROM "+
idbModules.util.quote(me.name),[],function(tx,data){idbModules.DEBUG&&console.log("Cleared all records from database",data.rowsAffected);success()},function(tx,err){error(err)})})})};IDBObjectStore.prototype.count=function(key){var me=this;return me.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__waitForReady(function(){var sql="SELECT * FROM "+idbModules.util.quote(me.name)+(typeof key!=="undefined"?" WHERE key = ?":"");var sqlValues=[];typeof key!=="undefined"&&sqlValues.push(idbModules.Key.encode(key));
tx.executeSql(sql,sqlValues,function(tx,data){success(data.rows.length)},function(tx,err){error(err)})})})};IDBObjectStore.prototype.openCursor=function(range,direction){var cursorRequest=new idbModules.IDBRequest;var cursor=new idbModules.IDBCursor(range,direction,this,cursorRequest,"key","value");return cursorRequest};IDBObjectStore.prototype.index=function(indexName){var index=new idbModules.IDBIndex(indexName,this);return index};IDBObjectStore.prototype.createIndex=function(indexName,keyPath,
optionalParameters){var me=this;optionalParameters=optionalParameters||{};me.__setReadyState("createIndex",false);var result=new idbModules.IDBIndex(indexName,me);me.__waitForReady(function(){result.__createIndex(indexName,keyPath,optionalParameters)},"createObjectStore");me.indexNames.push(indexName);return result};IDBObjectStore.prototype.deleteIndex=function(indexName){var result=new idbModules.IDBIndex(indexName,this,false);result.__deleteIndex(indexName);return result};idbModules.IDBObjectStore=
IDBObjectStore})(idbModules);
(function(idbModules){var READ=0;var READ_WRITE=1;var VERSION_TRANSACTION=2;var IDBTransaction=function(storeNames,mode,db){if(typeof mode==="number"){this.mode=mode;mode!==2&&idbModules.DEBUG&&console.log("Mode should be a string, but was specified as ",mode)}else if(typeof mode==="string")switch(mode){case "readonly":this.mode=READ_WRITE;break;case "readwrite":this.mode=READ;break;default:this.mode=READ;break}this.storeNames=typeof storeNames==="string"?[storeNames]:storeNames;for(var i=0;i<this.storeNames.length;i++)if(!db.objectStoreNames.contains(this.storeNames[i]))idbModules.util.throwDOMException(0,
"The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened.",this.storeNames[i]);this.__active=true;this.__running=false;this.__requests=[];this.__aborted=false;this.db=db;this.error=null;this.onabort=this.onerror=this.oncomplete=null;var me=this};IDBTransaction.prototype.__executeRequests=function(){if(this.__running&&this.mode!==VERSION_TRANSACTION){idbModules.DEBUG&&console.log("Looks like the request set is already running",
this.mode);return}this.__running=true;var me=this;window.setTimeout(function(){if(me.mode!==2&&!me.__active)idbModules.util.throwDOMException(0,"A request was placed against a transaction which is currently not active, or which is finished",me.__active);me.db.__db.transaction(function(tx){me.__tx=tx;var q=null,i=0;function success(result,req){if(req)q.req=req;q.req.readyState="done";q.req.result=result;delete q.req.error;var e=idbModules.Event("success");idbModules.util.callback("onsuccess",q.req,
e);i++;executeRequest()}function error(errorVal){q.req.readyState="done";q.req.error="DOMError";var e=idbModules.Event("error",arguments);idbModules.util.callback("onerror",q.req,e);i++;executeRequest()}try{function executeRequest(){if(i>=me.__requests.length){me.__active=false;me.__requests=[];return}q=me.__requests[i];q.op(tx,q.args,success,error)}executeRequest()}catch(e){idbModules.DEBUG&&console.log("An exception occured in transaction",arguments);typeof me.onerror==="function"&&me.onerror()}},
function(){idbModules.DEBUG&&console.log("An error in transaction",arguments);typeof me.onerror==="function"&&me.onerror()},function(){idbModules.DEBUG&&console.log("Transaction completed",arguments);typeof me.oncomplete==="function"&&me.oncomplete()})},1)};IDBTransaction.prototype.__addToTransactionQueue=function(callback,args){if(!this.__active&&this.mode!==VERSION_TRANSACTION)idbModules.util.throwDOMException(0,"A request was placed against a transaction which is currently not active, or which is finished.",
this.__mode);var request=new idbModules.IDBRequest;request.source=this.db;this.__requests.push({"op":callback,"args":args,"req":request});this.__executeRequests();return request};IDBTransaction.prototype.objectStore=function(objectStoreName){return new idbModules.IDBObjectStore(objectStoreName,this)};IDBTransaction.prototype.abort=function(){!this.__active&&idbModules.util.throwDOMException(0,"A request was placed against a transaction which is currently not active, or which is finished",this.__active)};
IDBTransaction.prototype.READ_ONLY=0;IDBTransaction.prototype.READ_WRITE=1;IDBTransaction.prototype.VERSION_CHANGE=2;idbModules.IDBTransaction=IDBTransaction})(idbModules);
(function(idbModules){var IDBDatabase=function(db,name,version,storeProperties){this.__db=db;this.version=version;this.__storeProperties=storeProperties;this.objectStoreNames=new idbModules.util.StringList;for(var i=0;i<storeProperties.rows.length;i++)this.objectStoreNames.push(storeProperties.rows.item(i).name);this.name=name;this.onabort=this.onerror=this.onversionchange=null};IDBDatabase.prototype.createObjectStore=function(storeName,createOptions){var me=this;createOptions=createOptions||{};createOptions.keyPath=
createOptions.keyPath||null;var result=new idbModules.IDBObjectStore(storeName,me.__versionTransaction,false);var transaction=me.__versionTransaction;transaction.__addToTransactionQueue(function(tx,args,success,failure){function error(){idbModules.util.throwDOMException(0,"Could not create new object store",arguments)}if(!me.__versionTransaction)idbModules.util.throwDOMException(0,"Invalid State error",me.transaction);var sql=["CREATE TABLE",idbModules.util.quote(storeName),"(key BLOB",createOptions.autoIncrement?
", inc INTEGER PRIMARY KEY AUTOINCREMENT":"PRIMARY KEY",", value BLOB)"].join(" ");idbModules.DEBUG&&console.log(sql);tx.executeSql(sql,[],function(tx,data){tx.executeSql("INSERT INTO __sys__ VALUES (?,?,?,?)",[storeName,createOptions.keyPath,createOptions.autoIncrement?true:false,"{}"],function(){result.__setReadyState("createObjectStore",true);success(result)},error)},error)});me.objectStoreNames.push(storeName);return result};IDBDatabase.prototype.deleteObjectStore=function(storeName){var error=
function(){idbModules.util.throwDOMException(0,"Could not delete ObjectStore",arguments)};var me=this;!me.objectStoreNames.contains(storeName)&&error("Object Store does not exist");me.objectStoreNames.splice(me.objectStoreNames.indexOf(storeName),1);var transaction=me.__versionTransaction;transaction.__addToTransactionQueue(function(tx,args,success,failure){if(!me.__versionTransaction)idbModules.util.throwDOMException(0,"Invalid State error",me.transaction);me.__db.transaction(function(tx){tx.executeSql("SELECT * FROM __sys__ where name = ?",
[storeName],function(tx,data){if(data.rows.length>0)tx.executeSql("DROP TABLE "+idbModules.util.quote(storeName),[],function(){tx.executeSql("DELETE FROM __sys__ WHERE name = ?",[storeName],function(){},error)},error)})})})};IDBDatabase.prototype.close=function(){};IDBDatabase.prototype.transaction=function(storeNames,mode){var transaction=new idbModules.IDBTransaction(storeNames,mode||1,this);return transaction};idbModules.IDBDatabase=IDBDatabase})(idbModules);
(function(idbModules){var DEFAULT_DB_SIZE=4*1024*1024;if(!window.openDatabase)return;try{var sysdb=window.openDatabase("__sysdb__",1,"System Database",DEFAULT_DB_SIZE)}catch(err){window.openDatabase=undefined;return}sysdb.transaction(function(tx){tx.executeSql("SELECT * FROM dbVersions",[],function(t,data){},function(){sysdb.transaction(function(tx){tx.executeSql("CREATE TABLE IF NOT EXISTS dbVersions (name VARCHAR(255), version INT);",[],function(){},function(){idbModules.util.throwDOMException("Could not create table __sysdb__ to save DB versions")})})})},
function(){idbModules.DEBUG&&console.log("Error in sysdb transaction - when selecting from dbVersions",arguments)});var shimIndexedDB={open:function(name,version){try{window.openDatabase("__test__",1,"Test Database",26*1024*1024)}catch(err){return}var req=new idbModules.IDBOpenRequest;var calledDbCreateError=false;function dbCreateError(){if(calledDbCreateError)return;var e=idbModules.Event("error",arguments);req.readyState="done";req.error="DOMError";idbModules.util.callback("onerror",req,e);calledDbCreateError=
true}function openDB(oldVersion){var db=window.openDatabase(name,1,name,DEFAULT_DB_SIZE);req.readyState="done";if(typeof version==="undefined")version=oldVersion||1;if(version<=0||oldVersion>version)idbModules.util.throwDOMException(0,"An attempt was made to open a database using a lower version than the existing version.",version);db.transaction(function(tx){tx.executeSql("CREATE TABLE IF NOT EXISTS __sys__ (name VARCHAR(255), keyPath VARCHAR(255), autoInc BOOLEAN, indexList BLOB)",[],function(){tx.executeSql("SELECT * FROM __sys__",
[],function(tx,data){var e=idbModules.Event("success");req.source=req.result=new idbModules.IDBDatabase(db,name,version,data);if(oldVersion<version)sysdb.transaction(function(systx){systx.executeSql("UPDATE dbVersions set version = ? where name = ?",[version,name],function(){var e=idbModules.Event("upgradeneeded");e.oldVersion=oldVersion;e.newVersion=version;req.transaction=req.result.__versionTransaction=new idbModules.IDBTransaction([],2,req.source);idbModules.util.callback("onupgradeneeded",req,
e,function(){var e=idbModules.Event("success");idbModules.util.callback("onsuccess",req,e)})},dbCreateError)},dbCreateError);else idbModules.util.callback("onsuccess",req,e)},dbCreateError)},dbCreateError)},dbCreateError)}sysdb.transaction(function(tx){tx.executeSql("SELECT * FROM dbVersions where name = ?",[name],function(tx,data){if(data.rows.length===0)tx.executeSql("INSERT INTO dbVersions VALUES (?,?)",[name,version||1],function(){openDB(0)},dbCreateError);else openDB(data.rows.item(0).version)},
dbCreateError)},dbCreateError);return req},"deleteDatabase":function(name){var req=new idbModules.IDBOpenRequest;var calledDBError=false;function dbError(msg){if(calledDBError)return;req.readyState="done";req.error="DOMError";var e=idbModules.Event("error");e.message=msg;e.debug=arguments;idbModules.util.callback("onerror",req,e);calledDBError=true}var version=null;function deleteFromDbVersions(){sysdb.transaction(function(systx){systx.executeSql("DELETE FROM dbVersions where name = ? ",[name],function(){req.result=
undefined;var e=idbModules.Event("success");e.newVersion=null;e.oldVersion=version;idbModules.util.callback("onsuccess",req,e)},dbError)},dbError)}sysdb.transaction(function(systx){systx.executeSql("SELECT * FROM dbVersions where name = ?",[name],function(tx,data){if(data.rows.length===0){req.result=undefined;var e=idbModules.Event("success");e.newVersion=null;e.oldVersion=version;idbModules.util.callback("onsuccess",req,e);return}version=data.rows.item(0).version;var db=window.openDatabase(name,
1,name,DEFAULT_DB_SIZE);db.transaction(function(tx){tx.executeSql("SELECT * FROM __sys__",[],function(tx,data){var tables=data.rows;(function deleteTables(i){if(i>=tables.length)tx.executeSql("DROP TABLE __sys__",[],function(){deleteFromDbVersions()},dbError);else tx.executeSql("DROP TABLE "+idbModules.util.quote(tables.item(i).name),[],function(){deleteTables(i+1)},function(){deleteTables(i+1)})})(0)},function(e){deleteFromDbVersions()})},dbError)})},dbError);return req},"cmp":function(key1,key2){return idbModules.Key.encode(key1)>
idbModules.Key.encode(key2)?1:key1===key2?0:-1}};idbModules.shimIndexedDB=shimIndexedDB})(idbModules);
(function(window,idbModules){if(typeof window.openDatabase!=="undefined"){window.shimIndexedDB=idbModules.shimIndexedDB;if(window.shimIndexedDB){window.shimIndexedDB.__useShim=function(){window._indexedDB=idbModules.shimIndexedDB;window._IDBDatabase=idbModules.IDBDatabase;window._IDBTransaction=idbModules.IDBTransaction;window._IDBCursor=idbModules.IDBCursor;window._IDBKeyRange=idbModules.IDBKeyRange};window.shimIndexedDB.__debug=function(val){idbModules.DEBUG=val}}}try{window.indexedDB=window.indexedDB||
window.webkitIndexedDB||window.mozIndexedDB||window.oIndexedDB||window.msIndexedDB;if((typeof window.indexedDB==="undefined"||window.indexedDB===null)&&typeof window.openDatabase!=="undefined")window.shimIndexedDB.__useShim();else if(typeof window.openDatabase!=="undefined"){window.IDBDatabase=window.IDBDatabase||window.webkitIDBDatabase;window.IDBTransaction=window.IDBTransaction||window.webkitIDBTransaction;window.IDBCursor=window.IDBCursor||window.webkitIDBCursor;window.IDBKeyRange=window.IDBKeyRange||
window.webkitIDBKeyRange;if(!window.IDBTransaction)window.IDBTransaction={};window.IDBTransaction.READ_ONLY=window.IDBTransaction.READ_ONLY||"readonly";window.IDBTransaction.READ_WRITE=window.IDBTransaction.READ_WRITE||"readwrite"}}catch(error){console.warn("No access to IndexedDB")}})(window,idbModules);(function(exports){exports.setImmediate||function(){var uid=0;var storage={};var firstCall=true;var slice=Array.prototype.slice;var message="IM";function fastApply(args){var func=args[0];switch(args.length){case 1:return func();case 2:return func(args[1]);case 3:return func(args[1],args[2])}return func.apply(window,slice.call(args,1))}function callback(event){var key=event.data;var data;if(typeof key=="string"&&key.indexOf(message)==0){data=storage[key];if(data){delete storage[key];fastApply(data)}}}
exports.setImmediate=function setImmediate(){var id=uid++;var key=message+id;var i=arguments.length;var args=new Array(i);while(i--)args[i]=arguments[i];storage[key]=args;if(firstCall){firstCall=false;exports.addEventListener("message",callback)}exports.postMessage(key,"*");return id};exports.clearImmediate=function clearImmediate(id){delete storage[message+id]}}()})(typeof self==="undefined"?this:self);(function(global){global.createPromiseCapability=function(){var promiseCapability={};var promise=new Promise(function(resolve,reject){promiseCapability.resolve=resolve;promiseCapability.reject=reject});promiseCapability.promise=promise;return promiseCapability};var NativePromise=global["Promise"];var nativePromiseSupported=NativePromise&&"resolve"in NativePromise&&"reject"in NativePromise&&"all"in NativePromise&&"race"in NativePromise&&function(){var resolve;new NativePromise(function(r){resolve=
r});return typeof resolve==="function"}();if(typeof exports!=="undefined"&&exports){exports.Promise=nativePromiseSupported?NativePromise:Promise;exports.Polyfill=Promise}else if(typeof define=="function"&&define.amd)define(function(){return nativePromiseSupported?NativePromise:Promise});else if(!nativePromiseSupported)global["Promise"]=Promise;var PENDING="pending";var SEALED="sealed";var FULFILLED="fulfilled";var REJECTED="rejected";var NOOP=function(){};function isArray(value){return Object.prototype.toString.call(value)===
"[object Array]"}var asyncSetTimer=typeof setImmediate!=="undefined"?setImmediate:setTimeout;var asyncQueue=[];var asyncTimer;function asyncFlush(){for(var i=0;i<asyncQueue.length;i++)asyncQueue[i][0](asyncQueue[i][1]);asyncQueue=[];asyncTimer=false}function asyncCall(callback,arg){asyncQueue.push([callback,arg]);if(!asyncTimer){asyncTimer=true;asyncSetTimer(asyncFlush,0)}}function invokeResolver(resolver,promise){function resolvePromise(value){resolve(promise,value)}function rejectPromise(reason){reject(promise,
reason)}try{resolver(resolvePromise,rejectPromise)}catch(e){rejectPromise(e)}}function invokeCallback(subscriber){var owner=subscriber.owner;var settled=owner.state_;var value=owner.data_;var callback=subscriber[settled];var promise=subscriber.then;if(typeof callback==="function"){settled=FULFILLED;try{value=callback(value)}catch(e){reject(promise,e)}}if(!handleThenable(promise,value)){if(settled===FULFILLED)resolve(promise,value);if(settled===REJECTED)reject(promise,value)}}function handleThenable(promise,
value){var resolved;try{if(promise===value)throw new TypeError("A promises callback cannot return that same promise.");if(value&&(typeof value==="function"||typeof value==="object")){var then=value.then;if(typeof then==="function"){then.call(value,function(val){if(!resolved){resolved=true;if(value!==val)resolve(promise,val);else fulfill(promise,val)}},function(reason){if(!resolved){resolved=true;reject(promise,reason)}});return true}}}catch(e){if(!resolved)reject(promise,e);return true}return false}
function resolve(promise,value){if(promise===value||!handleThenable(promise,value))fulfill(promise,value)}function fulfill(promise,value){if(promise.state_===PENDING){promise.state_=SEALED;promise.data_=value;asyncCall(publishFulfillment,promise)}}function reject(promise,reason){if(promise.state_===PENDING){promise.state_=SEALED;promise.data_=reason;asyncCall(publishRejection,promise)}}function publish(promise){var callbacks=promise.then_;promise.then_=undefined;for(var i=0;i<callbacks.length;i++)invokeCallback(callbacks[i])}
function publishFulfillment(promise){promise.state_=FULFILLED;publish(promise)}function publishRejection(promise){promise.state_=REJECTED;publish(promise)}function Promise(resolver){if(typeof resolver!=="function")throw new TypeError("Promise constructor takes a function argument");if(this instanceof Promise===false)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[];invokeResolver(resolver,this)}
Promise.prototype={constructor:Promise,state_:PENDING,then_:null,data_:undefined,then:function(onFulfillment,onRejection){var subscriber={owner:this,then:new this.constructor(NOOP),fulfilled:onFulfillment,rejected:onRejection};if(this.state_===FULFILLED||this.state_===REJECTED)asyncCall(invokeCallback,subscriber);else this.then_.push(subscriber);return subscriber.then},"catch":function(onRejection){return this.then(null,onRejection)}};Promise.all=function(promises){var Class=this;if(!isArray(promises))throw new TypeError("You must pass an array to Promise.all().");
return new Class(function(resolve,reject){var results=[];var remaining=0;function resolver(index){remaining++;return function(value){results[index]=value;if(!--remaining)resolve(results)}}for(var i=0,promise;i<promises.length;i++){promise=promises[i];if(promise&&typeof promise.then==="function")promise.then(resolver(i),reject);else results[i]=promise}if(!remaining)resolve(results)})};Promise.race=function(promises){var Class=this;if(!isArray(promises))throw new TypeError("You must pass an array to Promise.race().");
return new Class(function(resolve,reject){for(var i=0,promise;i<promises.length;i++){promise=promises[i];if(promise&&typeof promise.then==="function")promise.then(resolve,reject);else resolve(promise)}})};Promise.resolve=function(value){var Class=this;if(value&&typeof value==="object"&&value.constructor===Class)return value;return new Class(function(resolve){resolve(value)})};Promise.reject=function(reason){var Class=this;return new Class(function(resolve,reject){reject(reason)})}})(typeof window!=
"undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this);/*
 Advanced Encryption Standard (AES) Cipher-Block Chaining implementation.|This implementation is based on the public domain library 'jscrypto' which|was written by:|Emily Stark (estark@stanford.edu)|Mike Hamburg (mhamburg@stanford.edu)|Dan Boneh (dabo@cs.stanford.edu)|Parts of this code are based on the OpenSSL implementation of AES:|http://www.openssl.org|@author Dave Longley|Copyright (c) 2010-2012 Digital Bazaar, Inc.*/
(function(){if(typeof window!=="undefined"){var forge=window.forge=window.forge||{};forge.aes={}}else if(typeof module!=="undefined"&&module.exports){var forge={util:require("./util")};module.exports=forge.aes={}}else if(typeof self!=="undefined"){var forge=self.forge=self.forge||{};forge.aes={}}var init=false;var Nb=4;var sbox;var isbox;var rcon;var mix;var imix;var initialize=function(){init=true;rcon=[0,1,2,4,8,16,32,64,128,27,54];var xtime=new Array(256);for(var i=0;i<128;++i){xtime[i]=i<<1;xtime[i+
128]=i+128<<1^283}sbox=new Array(256);isbox=new Array(256);mix=new Array(4);imix=new Array(4);for(var i=0;i<4;++i){mix[i]=new Array(256);imix[i]=new Array(256)}var e=0,ei=0,e2,e4,e8,sx,sx2,me,ime;for(var i=0;i<256;++i){sx=ei^ei<<1^ei<<2^ei<<3^ei<<4;sx=sx>>8^sx&255^99;sbox[e]=sx;isbox[sx]=e;sx2=xtime[sx];e2=xtime[e];e4=xtime[e2];e8=xtime[e4];me=sx2<<24^sx<<16^sx<<8^(sx^sx2);ime=(e2^e4^e8)<<24^(e^e8)<<16^(e^e4^e8)<<8^(e^e2^e8);for(var n=0;n<4;++n){mix[n][e]=me;imix[n][sx]=ime;me=me<<24|me>>>8;ime=ime<<
24|ime>>>8}if(e===0)e=ei=1;else{e=e2^xtime[xtime[xtime[e2^e8]]];ei^=xtime[xtime[ei]]}}};var expandKey=function(key,decrypt){var w=key.slice(0);var temp,iNk=1;var Nk=w.length;var Nr1=Nk+6+1;var end=Nb*Nr1;for(var i=Nk;i<end;++i){temp=w[i-1];if(i%Nk===0){temp=sbox[temp>>>16&255]<<24^sbox[temp>>>8&255]<<16^sbox[temp&255]<<8^sbox[temp>>>24]^rcon[iNk]<<24;iNk++}else if(Nk>6&&i%Nk==4)temp=sbox[temp>>>24]<<24^sbox[temp>>>16&255]<<16^sbox[temp>>>8&255]<<8^sbox[temp&255];w[i]=w[i-Nk]^temp}if(decrypt){var tmp;
var m0=imix[0];var m1=imix[1];var m2=imix[2];var m3=imix[3];var wnew=w.slice(0);var end=w.length;for(var i=0,wi=end-Nb;i<end;i+=Nb,wi-=Nb)if(i===0||i===end-Nb){wnew[i]=w[wi];wnew[i+1]=w[wi+3];wnew[i+2]=w[wi+2];wnew[i+3]=w[wi+1]}else for(var n=0;n<Nb;++n){tmp=w[wi+n];wnew[i+(3&-n)]=m0[sbox[tmp>>>24]]^m1[sbox[tmp>>>16&255]]^m2[sbox[tmp>>>8&255]]^m3[sbox[tmp&255]]}w=wnew}return w};var _updateBlock=function(w,input,output,decrypt){var Nr=w.length/4-1;var m0,m1,m2,m3,sub;if(decrypt){m0=imix[0];m1=imix[1];
m2=imix[2];m3=imix[3];sub=isbox}else{m0=mix[0];m1=mix[1];m2=mix[2];m3=mix[3];sub=sbox}var a,b,c,d,a2,b2,c2;a=input[0]^w[0];b=input[decrypt?3:1]^w[1];c=input[2]^w[2];d=input[decrypt?1:3]^w[3];var i=3;for(var round=1;round<Nr;++round){a2=m0[a>>>24]^m1[b>>>16&255]^m2[c>>>8&255]^m3[d&255]^w[++i];b2=m0[b>>>24]^m1[c>>>16&255]^m2[d>>>8&255]^m3[a&255]^w[++i];c2=m0[c>>>24]^m1[d>>>16&255]^m2[a>>>8&255]^m3[b&255]^w[++i];d=m0[d>>>24]^m1[a>>>16&255]^m2[b>>>8&255]^m3[c&255]^w[++i];a=a2;b=b2;c=c2}output[0]=sub[a>>>
24]<<24^sub[b>>>16&255]<<16^sub[c>>>8&255]<<8^sub[d&255]^w[++i];output[decrypt?3:1]=sub[b>>>24]<<24^sub[c>>>16&255]<<16^sub[d>>>8&255]<<8^sub[a&255]^w[++i];output[2]=sub[c>>>24]<<24^sub[d>>>16&255]<<16^sub[a>>>8&255]<<8^sub[b&255]^w[++i];output[decrypt?1:3]=sub[d>>>24]<<24^sub[a>>>16&255]<<16^sub[b>>>8&255]<<8^sub[c&255]^w[++i]};var _createCipher=function(key,iv,output,decrypt){var cipher=null;if(!init)initialize();if(key.constructor==String&&(key.length==16||key.length==24||key.length==32))key=forge.util.createBuffer(key);
else if(key.constructor==Array&&(key.length==16||key.length==24||key.length==32)){var tmp=key;var key=forge.util.createBuffer();for(var i=0;i<tmp.length;++i)key.putByte(tmp[i])}if(key.constructor!=Array){var tmp=key;key=[];var len=tmp.length();if(len==16||len==24||len==32){len=len>>>2;for(var i=0;i<len;++i)key.push(tmp.getInt32())}}if(key.constructor==Array&&(key.length==4||key.length==6||key.length==8)){var _w=expandKey(key,decrypt);var _blockSize=Nb<<2;var _input;var _output;var _inBlock;var _outBlock;
var _prev;var _finish;cipher={output:null};cipher.update=function(input){if(!_finish)_input.putBuffer(input);var threshold=decrypt&&!_finish?_blockSize<<1:_blockSize;while(_input.length()>=threshold){if(decrypt)for(var i=0;i<Nb;++i)_inBlock[i]=_input.getInt32();else for(var i=0;i<Nb;++i)_inBlock[i]=_prev[i]^_input.getInt32();_updateBlock(_w,_inBlock,_outBlock,decrypt);if(decrypt){for(var i=0;i<Nb;++i)_output.putInt32(_prev[i]^_outBlock[i]);_prev=_inBlock.slice(0)}else{for(var i=0;i<Nb;++i)_output.putInt32(_outBlock[i]);
_prev=_outBlock}}};cipher.finish=function(pad){var rval=true;if(!decrypt)if(pad)rval=pad(_blockSize,_input,decrypt);else{var padding=_input.length()==_blockSize?_blockSize:_blockSize-_input.length();_input.fillWithByte(padding,padding)}if(rval){_finish=true;cipher.update()}if(decrypt){rval=_input.length()===0;if(rval)if(pad)rval=pad(_blockSize,_output,decrypt);else{var len=_output.length();var count=_output.at(len-1);if(count>Nb<<2)rval=false;else _output.truncate(count)}}return rval};cipher.start=
function(iv,output){iv=iv||_prev.slice(0);if(iv.constructor==String&&iv.length==16)iv=forge.util.createBuffer(iv);else if(iv.constructor==Array&&iv.length==16){var tmp=iv;var iv=forge.util.createBuffer();for(var i=0;i<16;++i)iv.putByte(tmp[i])}if(iv.constructor!=Array){var tmp=iv;iv=new Array(4);iv[0]=tmp.getInt32();iv[1]=tmp.getInt32();iv[2]=tmp.getInt32();iv[3]=tmp.getInt32()}_input=forge.util.createBuffer();_output=output||forge.util.createBuffer();_prev=iv.slice(0);_inBlock=new Array(Nb);_outBlock=
new Array(Nb);_finish=false;cipher.output=_output};if(iv!==null)cipher.start(iv,output)}return cipher};forge.aes.startEncrypting=function(key,iv,output){return _createCipher(key,iv,output,false)};forge.aes.createEncryptionCipher=function(key){return _createCipher(key,null,null,false)};forge.aes.startDecrypting=function(key,iv,output){return _createCipher(key,iv,output,true)};forge.aes.createDecryptionCipher=function(key){return _createCipher(key,null,null,true)};forge.aes._expandKey=function(key,
decrypt){if(!init)initialize();return expandKey(key,decrypt)};forge.aes._updateBlock=_updateBlock})();(function(){if(typeof window!=="undefined"){var forge=window.forge=window.forge||{};forge.util={}}else if(typeof module!=="undefined"&&module.exports){var forge={};module.exports=forge.util={}}else if(typeof self!=="undefined"){var forge=self.forge=self.forge||{};forge.util={}}var util=forge.util;util.ByteBuffer=function(b){this.data=b||"";this.read=0};util.ByteBuffer.prototype.length=function(){return this.data.length-this.read};util.ByteBuffer.prototype.isEmpty=function(){return this.data.length-
this.read===0};util.ByteBuffer.prototype.putByte=function(b){this.data+=String.fromCharCode(b)};util.ByteBuffer.prototype.fillWithByte=function(b,n){b=String.fromCharCode(b);var d=this.data;while(n>0){if(n&1)d+=b;n>>>=1;if(n>0)b+=b}this.data=d};util.ByteBuffer.prototype.putBytes=function(bytes){this.data+=bytes};util.ByteBuffer.prototype.putString=function(str){this.data+=util.encodeUtf8(str)};util.ByteBuffer.prototype.putInt16=function(i){this.data+=String.fromCharCode(i>>8&255)+String.fromCharCode(i&
255)};util.ByteBuffer.prototype.putInt24=function(i){this.data+=String.fromCharCode(i>>16&255)+String.fromCharCode(i>>8&255)+String.fromCharCode(i&255)};util.ByteBuffer.prototype.putInt32=function(i){this.data+=String.fromCharCode(i>>24&255)+String.fromCharCode(i>>16&255)+String.fromCharCode(i>>8&255)+String.fromCharCode(i&255)};util.ByteBuffer.prototype.putInt16Le=function(i){this.data+=String.fromCharCode(i&255)+String.fromCharCode(i>>8&255)};util.ByteBuffer.prototype.putInt24Le=function(i){this.data+=
String.fromCharCode(i&255)+String.fromCharCode(i>>8&255)+String.fromCharCode(i>>16&255)};util.ByteBuffer.prototype.putInt32Le=function(i){this.data+=String.fromCharCode(i&255)+String.fromCharCode(i>>8&255)+String.fromCharCode(i>>16&255)+String.fromCharCode(i>>24&255)};util.ByteBuffer.prototype.putInt=function(i,n){do{n-=8;this.data+=String.fromCharCode(i>>n&255)}while(n>0)};util.ByteBuffer.prototype.putBuffer=function(buffer){this.data+=buffer.getBytes()};util.ByteBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};
util.ByteBuffer.prototype.getInt16=function(){var rval=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return rval};util.ByteBuffer.prototype.getInt24=function(){var rval=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return rval};util.ByteBuffer.prototype.getInt32=function(){var rval=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<
8^this.data.charCodeAt(this.read+3);this.read+=4;return rval};util.ByteBuffer.prototype.getInt16Le=function(){var rval=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return rval};util.ByteBuffer.prototype.getInt24Le=function(){var rval=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return rval};util.ByteBuffer.prototype.getInt32Le=function(){var rval=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return rval};util.ByteBuffer.prototype.getInt=function(n){var rval=0;do{rval=(rval<<n)+this.data.charCodeAt(this.read++);n-=8}while(n>0);return rval};util.ByteBuffer.prototype.getBytes=function(count){var rval;if(count){count=Math.min(this.length(),count);rval=this.data.slice(this.read,this.read+count);this.read+=count}else if(count===0)rval="";else{rval=this.read===0?this.data:this.data.slice(this.read);
this.clear()}return rval};util.ByteBuffer.prototype.bytes=function(count){return typeof count==="undefined"?this.data.slice(this.read):this.data.slice(this.read,this.read+count)};util.ByteBuffer.prototype.at=function(i){return this.data.charCodeAt(this.read+i)};util.ByteBuffer.prototype.setAt=function(i,b){this.data=this.data.substr(0,this.read+i)+String.fromCharCode(b)+this.data.substr(this.read+i+1)};util.ByteBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};util.ByteBuffer.prototype.copy=
function(){var c=util.createBuffer(this.data);c.read=this.read;return c};util.ByteBuffer.prototype.compact=function(){if(this.read>0){this.data=this.data.slice(this.read);this.read=0}};util.ByteBuffer.prototype.clear=function(){this.data="";this.read=0};util.ByteBuffer.prototype.truncate=function(count){var len=Math.max(0,this.length()-count);this.data=this.data.substr(this.read,len);this.read=0};util.ByteBuffer.prototype.toHex=function(){var rval="";for(var i=this.read;i<this.data.length;++i){var b=
this.data.charCodeAt(i);if(b<16)rval+="0";rval+=b.toString(16)}return rval};util.ByteBuffer.prototype.toString=function(){return util.decodeUtf8(this.bytes())};util.createBuffer=function(input,encoding){encoding=encoding||"raw";if(input!==undefined&&encoding==="utf8")input=util.encodeUtf8(input);return new util.ByteBuffer(input)};util.fillString=function(c,n){var s="";while(n>0){if(n&1)s+=c;n>>>=1;if(n>0)c+=c}return s};util.xorBytes=function(s1,s2,n){var s3="";var b="";var t="";var i=0;var c=0;for(;n>
0;--n,++i){b=s1.charCodeAt(i)^s2.charCodeAt(i);if(c>=10){s3+=t;t="";c=0}t+=String.fromCharCode(b);++c}s3+=t;return s3};util.hexToBytes=function(hex){var rval="";var i=0;if(hex.length&1==1){i=1;rval+=String.fromCharCode(parseInt(hex[0],16))}for(;i<hex.length;i+=2)rval+=String.fromCharCode(parseInt(hex.substr(i,2),16));return rval};util.bytesToHex=function(bytes){return util.createBuffer(bytes).toHex()};util.int32ToBytes=function(i){return String.fromCharCode(i>>24&255)+String.fromCharCode(i>>16&255)+
String.fromCharCode(i>>8&255)+String.fromCharCode(i&255)};var _base64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var _base64Idx=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];util.encode64=function(input,maxline){var line="";var output="";var chr1,chr2,chr3;var i=0;while(i<input.length){chr1=
input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);line+=_base64.charAt(chr1>>2);line+=_base64.charAt((chr1&3)<<4|chr2>>4);if(isNaN(chr2))line+="==";else{line+=_base64.charAt((chr2&15)<<2|chr3>>6);line+=isNaN(chr3)?"=":_base64.charAt(chr3&63)}if(maxline&&line.length>maxline){output+=line.substr(0,maxline)+"\r\n";line=line.substr(maxline)}}output+=line;return output};util.decode64=function(input){input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");var output="";var enc1,enc2,enc3,
enc4;var i=0;while(i<input.length){enc1=_base64Idx[input.charCodeAt(i++)-43];enc2=_base64Idx[input.charCodeAt(i++)-43];enc3=_base64Idx[input.charCodeAt(i++)-43];enc4=_base64Idx[input.charCodeAt(i++)-43];output+=String.fromCharCode(enc1<<2|enc2>>4);if(enc3!==64){output+=String.fromCharCode((enc2&15)<<4|enc3>>2);if(enc4!==64)output+=String.fromCharCode((enc3&3)<<6|enc4)}}return output};util.encodeUtf8=function(str){return unescape(encodeURIComponent(str))};util.decodeUtf8=function(str){return decodeURIComponent(escape(str))};
util.deflate=function(api,bytes,raw){bytes=util.decode64(api.deflate(util.encode64(bytes)).rval);if(raw){var start=2;var flg=bytes.charCodeAt(1);if(flg&32)start=6;bytes=bytes.substring(start,bytes.length-4)}return bytes};util.inflate=function(api,bytes,raw){var rval=api.inflate(util.encode64(bytes)).rval;return rval===null?null:util.decode64(rval)};var _setStorageObject=function(api,id,obj){if(!api)throw{message:"WebStorage not available."};var rval;if(obj===null)rval=api.removeItem(id);else{obj=
util.encode64(JSON.stringify(obj));rval=api.setItem(id,obj)}if(typeof rval!=="undefined"&&rval.rval!==true)throw rval.error;};var _getStorageObject=function(api,id){if(!api)throw{message:"WebStorage not available."};var rval=api.getItem(id);if(api.init)if(rval.rval===null){if(rval.error)throw rval.error;rval=null}else rval=rval.rval;if(rval!==null)rval=JSON.parse(util.decode64(rval));return rval};var _setItem=function(api,id,key,data){var obj=_getStorageObject(api,id);if(obj===null)obj={};obj[key]=
data;_setStorageObject(api,id,obj)};var _getItem=function(api,id,key){var rval=_getStorageObject(api,id);if(rval!==null)rval=key in rval?rval[key]:null;return rval};var _removeItem=function(api,id,key){var obj=_getStorageObject(api,id);if(obj!==null&&key in obj){delete obj[key];var empty=true;for(var prop in tmp){empty=false;break}if(empty)obj=null;_setStorageObject(api,id,obj)}};var _clearItems=function(api,id){_setStorageObject(api,id,null)};var _callStorageFunction=function(func,args,location){var rval=
null;if(typeof location==="undefined")location=["web","flash"];var type;var done=false;var exception=null;for(var idx in location){type=location[idx];try{if(type==="flash"||type==="both")if(args[0]===null)throw{message:"Flash local storage not available."};else{rval=func.apply(this,args);done=type==="flash"}if(type==="web"||type==="both"){args[0]=localStorage;rval=func.apply(this,args);done=true}}catch(ex){exception=ex}if(done)break}if(!done)throw exception;return rval};util.setItem=function(api,
id,key,data,location){_callStorageFunction(_setItem,arguments,location)};util.getItem=function(api,id,key,location){return _callStorageFunction(_getItem,arguments,location)};util.removeItem=function(api,id,key,location){_callStorageFunction(_removeItem,arguments,location)};util.clearItems=function(api,id,location){_callStorageFunction(_clearItems,arguments,location)};util.parseUrl=function(str){var regex=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;regex.lastIndex=0;var m=regex.exec(str);var url=m===
null?null:{full:str,scheme:m[1],host:m[2],port:m[3],path:m[4]};if(url){url.fullHost=url.host;if(url.port)if(url.port!==80&&url.scheme==="http")url.fullHost+=":"+url.port;else{if(url.port!==443&&url.scheme==="https")url.fullHost+=":"+url.port}else if(url.scheme==="http")url.port=80;else if(url.scheme==="https")url.port=443;url.full=url.scheme+"://"+url.fullHost}return url};var _queryVariables=null;util.getQueryVariables=function(query){var parse=function(q){var rval={};var kvpairs=q.split("&");for(var i=
0;i<kvpairs.length;i++){var pos=kvpairs[i].indexOf("=");var key;var val;if(pos>0){key=kvpairs[i].substring(0,pos);val=kvpairs[i].substring(pos+1)}else{key=kvpairs[i];val=null}if(!(key in rval))rval[key]=[];if(val!==null)rval[key].push(unescape(val))}return rval};var rval;if(typeof query==="undefined"){if(_queryVariables===null)if(typeof window==="undefined")_queryVariables={};else _queryVariables=parse(window.location.search.substring(1));rval=_queryVariables}else rval=parse(query);return rval};util.parseFragment=
function(fragment){var fp=fragment;var fq="";var pos=fragment.indexOf("?");if(pos>0){fp=fragment.substring(0,pos);fq=fragment.substring(pos+1)}var path=fp.split("/");if(path.length>0&&path[0]=="")path.shift();var query=fq==""?{}:util.getQueryVariables(fq);return{pathString:fp,queryString:fq,path:path,query:query}};util.makeRequest=function(reqString){var frag=util.parseFragment(reqString);var req={path:frag.pathString,query:frag.queryString,getPath:function(i){return typeof i==="undefined"?frag.path:
frag.path[i]},getQuery:function(k,i){var rval;if(typeof k==="undefined")rval=frag.query;else{rval=frag.query[k];if(rval&&typeof i!=="undefined")rval=rval[i]}return rval},getQueryLast:function(k,_default){var rval;var vals=req.getQuery(k);if(vals)rval=vals[vals.length-1];else rval=_default;return rval}};return req};util.makeLink=function(path,query,fragment){path=jQuery.isArray(path)?path.join("/"):path;var qstr=jQuery.param(query||{});fragment=fragment||"";return path+(qstr.length>0?"?"+qstr:"")+
(fragment.length>0?"#"+fragment:"")};util.setPath=function(object,keys,value){if(typeof object==="object"&&object!==null){var i=0;var len=keys.length;while(i<len){var next=keys[i++];if(i==len)object[next]=value;else{var hasNext=next in object;if(!hasNext||hasNext&&typeof object[next]!=="object"||hasNext&&object[next]===null)object[next]={};object=object[next]}}}};util.getPath=function(object,keys,_default){var i=0;var len=keys.length;var hasNext=true;while(hasNext&&i<len&&typeof object==="object"&&
object!==null){var next=keys[i++];hasNext=next in object;if(hasNext)object=object[next]}return hasNext?object:_default};util.deletePath=function(object,keys){if(typeof object==="object"&&object!==null){var i=0;var len=keys.length;while(i<len){var next=keys[i++];if(i==len)delete object[next];else{if(!(next in object)||typeof object[next]!=="object"||object[next]===null)break;object=object[next]}}}};util.isEmpty=function(obj){for(var prop in obj)if(obj.hasOwnProperty(prop))return false;return true};
util.format=function(format){var re=/%./g;var match;var part;var argi=0;var parts=[];var last=0;while(match=re.exec(format)){part=format.substring(last,re.lastIndex-2);if(part.length>0)parts.push(part);last=re.lastIndex;var code=match[0][1];switch(code){case "s":case "o":if(argi<arguments.length)parts.push(arguments[argi++ +1]);else parts.push("<?>");break;case "%":parts.push("%");break;default:parts.push("<%"+code+"?>")}}parts.push(format.substring(last));return parts.join("")};util.formatNumber=
function(number,decimals,dec_point,thousands_sep){var n=number,c=isNaN(decimals=Math.abs(decimals))?2:decimals;var d=dec_point===undefined?",":dec_point;var t=thousands_sep===undefined?".":thousands_sep,s=n<0?"-":"";var i=parseInt(n=Math.abs(+n||0).toFixed(c),10)+"";var j=i.length>3?i.length%3:0;return s+(j?i.substr(0,j)+t:"")+i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+t)+(c?d+Math.abs(n-i).toFixed(c).slice(2):"")};util.formatSize=function(size){if(size>=1073741824)size=util.formatNumber(size/1073741824,
2,".","")+" GiB";else if(size>=1048576)size=util.formatNumber(size/1048576,2,".","")+" MiB";else if(size>=1024)size=util.formatNumber(size/1024,0)+" KiB";else size=util.formatNumber(size,0)+" bytes";return size}})();(function(){function getSqDist(p1,p2){var dx=p1.x-p2.x,dy=p1.y-p2.y;return dx*dx+dy*dy}function getSqSegDist(p,p1,p2){var x=p1.x,y=p1.y,dx=p2.x-x,dy=p2.y-y;if(dx!==0||dy!==0){var t=((p.x-x)*dx+(p.y-y)*dy)/(dx*dx+dy*dy);if(t>1){x=p2.x;y=p2.y}else if(t>0){x+=dx*t;y+=dy*t}}dx=p.x-x;dy=p.y-y;return dx*dx+dy*dy}function simplifyRadialDist(points,sqTolerance){var prevPoint=points[0],newPoints=[prevPoint],point;for(var i=1,len=points.length;i<len;i++){point=points[i];if(getSqDist(point,prevPoint)>sqTolerance){newPoints.push(point);
prevPoint=point}}if(prevPoint!==point)newPoints.push(point);return newPoints}function simplifyDouglasPeucker(points,sqTolerance){var len=points.length,MarkerArray=typeof Uint8Array!=="undefined"?Uint8Array:Array,markers=new MarkerArray(len),first=0,last=len-1,stack=[],newPoints=[],i,maxSqDist,sqDist,index;markers[first]=markers[last]=1;while(last){maxSqDist=0;for(i=first+1;i<last;i++){sqDist=getSqSegDist(points[i],points[first],points[last]);if(sqDist>maxSqDist){index=i;maxSqDist=sqDist}}if(maxSqDist>
sqTolerance){markers[index]=1;stack.push(first,index,index,last)}last=stack.pop();first=stack.pop()}for(i=0;i<len;i++)if(markers[i])newPoints.push(points[i]);return newPoints}function simplify(points,tolerance,highestQuality){if(points.length<=1)return points;var sqTolerance=tolerance!==undefined?tolerance*tolerance:1;points=highestQuality?points:simplifyRadialDist(points,sqTolerance);points=simplifyDouglasPeucker(points,sqTolerance);return points}window.simplify=simplify})();!function(e,t){var n,a,o,i="._tap",c="._tapActive",r="tap",u="clientX clientY screenX screenY pageX pageY".split(" "),s={count:0,event:0},g=function(e,n){var a=n.originalEvent,o=t.Event(a);o.type=e;for(var i=0,c=u.length;c>i;i++)o[u[i]]=n[u[i]];return o},p=function(e){if(e.isTrigger)return!1;var n=s.event,a=Math.abs(e.pageX-n.pageX),o=Math.abs(e.pageY-n.pageY),i=Math.max(a,o);return e.timeStamp-n.timeStamp<t.tap.TIME_DELTA&&i<t.tap.POSITION_DELTA&&(!n.touches||1===s.count)&&T.isTracking},l=function(e){if(!o)return!1;
var n=Math.abs(e.pageX-o.pageX),a=Math.abs(e.pageY-o.pageY),i=Math.max(n,a);return Math.abs(e.timeStamp-o.timeStamp)<750&&i<t.tap.POSITION_DELTA},h=function(e){if(0===e.type.indexOf("touch")){e.touches=e.originalEvent.changedTouches;for(var t=e.touches[0],n=0,a=u.length;a>n;n++)e[u[n]]=t[u[n]]}e.timeStamp=Date.now?Date.now():+new Date},T={isEnabled:!1,isTracking:!1,enable:function(){T.isEnabled||$.event.special.tap||(T.isEnabled=!0,n=t(e.body).on("touchstart"+i,T.onStart).on("mousedown"+i,T.onStart).on("click"+
i,T.onClick))},disable:function(){T.isEnabled&&(T.isEnabled=!1,n.off(i))},onStart:function(e){e.isTrigger||(h(e),(!t.tap.LEFT_BUTTON_ONLY||e.touches||1===e.which)&&(e.touches&&(s.count=e.touches.length),T.isTracking&&T.onCancel(e),(e.touches||!l(e))&&(T.isTracking=!0,s.event=e,e.touches?(o=e,n.on("touchend"+i+c,T.onEnd).on("touchcancel"+i+c,T.onCancel)):n.on("mouseup"+i+c,T.onEnd))))},onEnd:function(e){var n;e.isTrigger||(h(e),p(e)&&(n=g(r,e),a=n,t(s.event.target).trigger(n)),T.onCancel(e))},onCancel:function(e){e&&
"touchcancel"===e.type&&e.preventDefault(),T.isTracking=!1,n.off(c)},onClick:function(e){return!e.isTrigger&&a&&a.isDefaultPrevented()&&a.target===e.target&&a.pageX===e.pageX&&a.pageY===e.pageY&&e.timeStamp-a.timeStamp<750?(a=null,!1):void 0}};t(e).ready(T.enable),t.tap={POSITION_DELTA:10,TIME_DELTA:400,LEFT_BUTTON_ONLY:!0}}(document,jQuery);!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){function a(){return Dc.apply(null,arguments)}function b(a){Dc=a}function c(a){return"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function f(a,b){return Object.prototype.hasOwnProperty.call(a,
b)}function g(a,b){for(var c in b)f(b,c)&&(a[c]=b[c]);return f(b,"toString")&&(a.toString=b.toString),f(b,"valueOf")&&(a.valueOf=b.valueOf),a}function h(a,b,c,d){return za(a,b,c,d,!0).utc()}function i(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function j(a){return null==a._pf&&(a._pf=i()),a._pf}function k(a){if(null==a._isValid){var b=j(a);a._isValid=!isNaN(a._d.getTime())&&b.overflow<0&&!b.empty&&
!b.invalidMonth&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour)}return a._isValid}function l(a){var b=h(0/0);return null!=a?g(j(b),a):j(b).userInvalidated=!0,b}function m(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=
typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=j(b)),"undefined"!=typeof b._locale&&(a._locale=b._locale),Fc.length>0)for(c in Fc)d=Fc[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function n(b){m(this,b),this._d=new Date(+b._d),Gc===!1&&(Gc=!0,a.updateOffset(this),Gc=!1)}function o(a){return a instanceof n||null!=a&&null!=
a._isAMomentObject}function p(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function q(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&p(a[d])!==p(b[d]))&&g++;return g+f}function r(){}function s(a){return a?a.toLowerCase().replace("_","-"):a}function t(a){for(var b,c,d,e,f=0;f<a.length;){for(e=s(a[f]).split("-"),b=e.length,c=s(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=u(e.slice(0,b).join("-")))return d;
if(c&&c.length>=b&&q(e,c,!0)>=b-1)break;b--}f++}return null}function u(a){var b=null;if(!Hc[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=Ec._abbr,require("./locale/"+a),v(b)}catch(c){}return Hc[a]}function v(a,b){var c;return a&&(c="undefined"==typeof b?x(a):w(a,b),c&&(Ec=c)),Ec._abbr}function w(a,b){return null!==b?(b.abbr=a,Hc[a]||(Hc[a]=new r),Hc[a].set(b),v(a),Hc[a]):(delete Hc[a],null)}function x(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Ec;if(!c(a)){if(b=
u(a))return b;a=[a]}return t(a)}function y(a,b){var c=a.toLowerCase();Ic[c]=Ic[c+"s"]=Ic[b]=a}function z(a){return"string"==typeof a?Ic[a]||Ic[a.toLowerCase()]:void 0}function A(a){var b,c,d={};for(c in a)f(a,c)&&(b=z(c),b&&(d[b]=a[c]));return d}function B(b,c){return function(d){return null!=d?(D(this,b,d),a.updateOffset(this,c),this):C(this,b)}}function C(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function D(a,b,c){return a._d["set"+(a._isUTC?"UTC":"")+b](c)}function E(a,b){var c;if("object"==
typeof a)for(c in a)this.set(c,a[c]);else if(a=z(a),"function"==typeof this[a])return this[a](b);return this}function F(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function G(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Mc[a]=e),b&&(Mc[b[0]]=function(){return F(e.apply(this,arguments),b[1],b[2])}),c&&(Mc[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function H(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,
""):a.replace(/\\/g,"")}function I(a){var b,c,d=a.match(Jc);for(b=0,c=d.length;c>b;b++)Mc[d[b]]?d[b]=Mc[d[b]]:d[b]=H(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function J(a,b){return a.isValid()?(b=K(b,a.localeData()),Lc[b]||(Lc[b]=I(b)),Lc[b](a)):a.localeData().invalidDate()}function K(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Kc.lastIndex=0;d>=0&&Kc.test(a);)a=a.replace(Kc,c),Kc.lastIndex=0,d-=1;return a}function L(a,
b,c){_c[a]="function"==typeof b?b:function(a){return a&&c?c:b}}function M(a,b){return f(_c,a)?_c[a](b._strict,b._locale):new RegExp(N(a))}function N(a){return a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function O(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=p(a)}),c=0;c<a.length;c++)ad[a[c]]=d}function P(a,b){O(a,function(a,c,d,e){d._w=d._w||{},b(a,d._w,
d,e)})}function Q(a,b,c){null!=b&&f(ad,a)&&ad[a](b,c._a,c,a)}function R(a,b){return(new Date(Date.UTC(a,b+1,0))).getUTCDate()}function S(a){return this._months[a.month()]}function T(a){return this._monthsShort[a.month()]}function U(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=h([2E3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=
new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function V(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),R(a.year(),b)),a._d["set"+
(a._isUTC?"UTC":"")+"Month"](b,c),a)}function W(b){return null!=b?(V(this,b),a.updateOffset(this,!0),this):C(this,"Month")}function X(){return R(this.year(),this.month())}function Y(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[cd]<0||c[cd]>11?cd:c[dd]<1||c[dd]>R(c[bd],c[cd])?dd:c[ed]<0||c[ed]>24||24===c[ed]&&(0!==c[fd]||0!==c[gd]||0!==c[hd])?ed:c[fd]<0||c[fd]>59?fd:c[gd]<0||c[gd]>59?gd:c[hd]<0||c[hd]>999?hd:-1,j(a)._overflowDayOfYear&&(bd>b||b>dd)&&(b=dd),j(a).overflow=b),a}function Z(b){a.suppressDeprecationWarnings===
!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function $(a,b){var c=!0,d=a+"\n"+(new Error).stack;return g(function(){return c&&(Z(d),c=!1),b.apply(this,arguments)},b)}function _(a,b){kd[a]||(Z(b),kd[a]=!0)}function aa(a){var b,c,d=a._i,e=ld.exec(d);if(e){for(j(a).iso=!0,b=0,c=md.length;c>b;b++)if(md[b][1].exec(d)){a._f=md[b][0]+(e[6]||" ");break}for(b=0,c=nd.length;c>b;b++)if(nd[b][1].exec(d)){a._f+=nd[b][0];break}d.match(Yc)&&(a._f+="Z"),ta(a)}else a._isValid=
!1}function ba(b){var c=od.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(aa(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function ca(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function da(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function ea(a){return fa(a)?366:365}function fa(a){return a%4===0&&a%100!==0||a%400===0}function ga(){return fa(this.year())}function ha(a,b,c){var d,
e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=Aa(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ia(a){return ha(a,this._week.dow,this._week.doy).week}function ja(){return this._week.dow}function ka(){return this._week.doy}function la(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function ma(a){var b=ha(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function na(a,b,c,d,e){var f,g,h=da(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=
c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:ea(a-1)+g}}function oa(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864E5)+1;return null==a?b:this.add(a-b,"d")}function pa(a,b,c){return null!=a?a:null!=b?b:c}function qa(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function ra(a){var b,c,d,e,f=[];if(!a._d){for(d=qa(a),a._w&&null==a._a[dd]&&null==
a._a[cd]&&sa(a),a._dayOfYear&&(e=pa(a._a[bd],d[bd]),a._dayOfYear>ea(e)&&(j(a)._overflowDayOfYear=!0),c=da(e,0,a._dayOfYear),a._a[cd]=c.getUTCMonth(),a._a[dd]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[ed]&&0===a._a[fd]&&0===a._a[gd]&&0===a._a[hd]&&(a._nextDay=!0,a._a[ed]=0),a._d=(a._useUTC?da:ca).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[ed]=24)}}function sa(a){var b,
c,d,e,f,g,h;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=pa(b.GG,a._a[bd],ha(Aa(),1,4).year),d=pa(b.W,1),e=pa(b.E,1)):(f=a._locale._week.dow,g=a._locale._week.doy,c=pa(b.gg,a._a[bd],ha(Aa(),f,g).year),d=pa(b.w,1),null!=b.d?(e=b.d,f>e&&++d):e=null!=b.e?b.e+f:f),h=na(c,d,e,g,f),a._a[bd]=h.year,a._dayOfYear=h.dayOfYear}function ta(b){if(b._f===a.ISO_8601)return void aa(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=K(b._f,b._locale).match(Jc)||[],c=0;c<e.length;c++)f=e[c],
d=(h.match(M(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),Mc[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),Q(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[ed]<=12&&b._a[ed]>0&&(j(b).bigHour=void 0),b._a[ed]=ua(b._locale,b._a[ed],b._meridiem),ra(b),Y(b)}function ua(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,
c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function va(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(0/0));for(e=0;e<a._f.length;e++)f=0,b=m({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._f=a._f[e],ta(b),k(b)&&(f+=j(b).charsLeftOver,f+=10*j(b).unusedTokens.length,j(b).score=f,(null==d||d>f)&&(d=f,c=b));g(a,c||b)}function wa(a){if(!a._d){var b=A(a._i);a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],ra(a)}}function xa(a){var b,
e=a._i,f=a._f;return a._locale=a._locale||x(a._l),null===e||void 0===f&&""===e?l({nullInput:!0}):("string"==typeof e&&(a._i=e=a._locale.preparse(e)),o(e)?new n(Y(e)):(c(f)?va(a):f?ta(a):d(e)?a._d=e:ya(a),b=new n(Y(a)),b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b))}function ya(b){var f=b._i;void 0===f?b._d=new Date:d(f)?b._d=new Date(+f):"string"==typeof f?ba(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),ra(b)):"object"==typeof f?wa(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}
function za(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,xa(f)}function Aa(a,b,c,d){return za(a,b,c,d,!1)}function Ba(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Aa();for(d=b[0],e=1;e<b.length;++e)b[e][a](d)&&(d=b[e]);return d}function Ca(){var a=[].slice.call(arguments,0);return Ba("isBefore",a)}function Da(){var a=[].slice.call(arguments,0);return Ba("isAfter",a)}function Ea(a){var b=
A(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1E3*j+6E4*i+36E5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=x(),this._bubble()}function Fa(a){return a instanceof Ea}function Ga(a,b){G(a,0,0,function(){var a=this.utcOffset(),c="+";return 0>a&&(a=-a,c="-"),c+F(~~(a/60),2)+b+F(~~a%60,2)})}function Ha(a){var b=(a||"").match(Yc)||[],c=b[b.length-1]||[],d=(c+"").match(td)||["-",
0,0],e=+(60*d[1])+p(d[2]);return"+"===d[0]?e:-e}function Ia(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(o(b)||d(b)?+b:+Aa(b))-+e,e._d.setTime(+e._d+f),a.updateOffset(e,!1),e):Aa(b).local();return c._isUTC?Aa(b).zone(c._offset||0):Aa(b).local()}function Ja(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Ka(b,c){var d,e=this._offset||0;return null!=b?("string"==typeof b&&(b=Ha(b)),Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Ja(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,
"m"),e!==b&&(!c||this._changeInProgress?$a(this,Va(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Ja(this)}function La(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Ma(a){return this.utcOffset(0,a)}function Na(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Ja(this),"m")),this}function Oa(){return this._tzm?this.utcOffset(this._tzm):
"string"==typeof this._i&&this.utcOffset(Ha(this._i)),this}function Pa(a){return a=a?Aa(a).utcOffset():0,(this.utcOffset()-a)%60===0}function Qa(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ra(){if(this._a){var a=this._isUTC?h(this._a):Aa(this._a);return this.isValid()&&q(this._a,a.toArray())>0}return!1}function Sa(){return!this._isUTC}function Ta(){return this._isUTC}function Ua(){return this._isUTC&&0===this._offset}function Va(a,
b){var c,d,e,g=a,h=null;return Fa(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=ud.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:p(h[dd])*c,h:p(h[ed])*c,m:p(h[fd])*c,s:p(h[gd])*c,ms:p(h[hd])*c}):(h=vd.exec(a))?(c="-"===h[1]?-1:1,g={y:Wa(h[2],c),M:Wa(h[3],c),d:Wa(h[4],c),h:Wa(h[5],c),m:Wa(h[6],c),s:Wa(h[7],c),w:Wa(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=Ya(Aa(g.from),Aa(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Ea(g),
Fa(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function Wa(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function Xa(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function Ya(a,b){var c;return b=Ia(b,a),a.isBefore(b)?c=Xa(a,b):(c=Xa(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function Za(a,b){return function(c,d){var e,
f;return null===d||isNaN(+d)||(_(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Va(c,d),$a(this,e,a),this}}function $a(b,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;e=null==e?!0:e,f&&b._d.setTime(+b._d+f*d),g&&D(b,"Date",C(b,"Date")+g*d),h&&V(b,C(b,"Month")+h*d),e&&a.updateOffset(b,g||h)}function _a(a){var b=a||Aa(),c=Ia(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>
d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,Aa(b)))}function ab(){return new n(this)}function bb(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Aa(a),+this>+a):(c=o(a)?+a:+Aa(a),c<+this.clone().startOf(b))}function cb(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Aa(a),+a>+this):(c=o(a)?+a:+Aa(a),+this.clone().endOf(b)<c)}function db(a,b,c){return this.isAfter(a,
c)&&this.isBefore(b,c)}function eb(a,b){var c;return b=z(b||"millisecond"),"millisecond"===b?(a=o(a)?a:Aa(a),+this===+a):(c=+Aa(a),+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b))}function fb(a){return 0>a?Math.ceil(a):Math.floor(a)}function gb(a,b,c){var d,e,f=Ia(a,this),g=6E4*(f.utcOffset()-this.utcOffset());return b=z(b),"year"===b||"month"===b||"quarter"===b?(e=hb(this,f),"quarter"===b?e/=3:"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1E3:"minute"===b?d/6E4:"hour"===b?d/36E5:"day"===
b?(d-g)/864E5:"week"===b?(d-g)/6048E5:d),c?e:fb(e)}function hb(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function ib(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function jb(){var a=this.clone().utc();return 0<a.year()&&a.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():J(a,
"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):J(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function kb(b){var c=J(this,b||a.defaultFormat);return this.localeData().postformat(c)}function lb(a,b){return this.isValid()?Va({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function mb(a){return this.from(Aa(),a)}function nb(a,b){return this.isValid()?Va({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function ob(a){return this.to(Aa(),a)}function pb(a){var b;
return void 0===a?this._locale._abbr:(b=x(a),null!=b&&(this._locale=b),this)}function qb(){return this._locale}function rb(a){switch(a=z(a)){case "year":this.month(0);case "quarter":case "month":this.date(1);case "week":case "isoWeek":case "day":this.hours(0);case "hour":this.minutes(0);case "minute":this.seconds(0);case "second":this.milliseconds(0)}return"week"===a&&this.weekday(0),"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this}function sb(a){return a=
z(a),void 0===a||"millisecond"===a?this:this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms")}function tb(){return+this._d-6E4*(this._offset||0)}function ub(){return Math.floor(+this/1E3)}function vb(){return this._offset?new Date(+this):this._d}function wb(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function xb(){return k(this)}function yb(){return g({},j(this))}function zb(){return j(this).overflow}function Ab(a,b){G(0,[a,a.length],0,
b)}function Bb(a,b,c){return ha(Aa([a,11,31+b-c]),b,c).week}function Cb(a){var b=ha(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")}function Db(a){var b=ha(this,1,4).year;return null==a?b:this.add(a-b,"y")}function Eb(){return Bb(this.year(),1,4)}function Fb(){var a=this.localeData()._week;return Bb(this.year(),a.dow,a.doy)}function Gb(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}function Hb(a,b){if("string"==
typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function Ib(a){return this._weekdays[a.day()]}function Jb(a){return this._weekdaysShort[a.day()]}function Kb(a){return this._weekdaysMin[a.day()]}function Lb(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=Aa([2E3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",
""),"i")),this._weekdaysParse[b].test(a))return b}function Mb(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Hb(a,this.localeData()),this.add(a-b,"d")):b}function Nb(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function Ob(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)}function Pb(a,b){G(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function Qb(a,b){return b._meridiemParse}
function Rb(a){return"p"===(a+"").toLowerCase().charAt(0)}function Sb(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Tb(a){G(0,[a,3],0,"millisecond")}function Ub(){return this._isUTC?"UTC":""}function Vb(){return this._isUTC?"Coordinated Universal Time":""}function Wb(a){return Aa(1E3*a)}function Xb(){return Aa.apply(null,arguments).parseZone()}function Yb(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.call(b,c):d}function Zb(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&
(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b}function $b(){return this._invalidDate}function _b(a){return this._ordinal.replace("%d",a)}function ac(a){return a}function bc(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)}function cc(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)}function dc(a){var b,c;for(c in a)b=a[c],
"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function ec(a,b,c,d){var e=x(),f=h().set(d,b);return e[c](f,a)}function fc(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return ec(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=ec(a,f,c,e);return g}function gc(a,b){return fc(a,b,"months",12,"month")}function hc(a,b){return fc(a,b,"monthsShort",12,"month")}function ic(a,b){return fc(a,b,"weekdays",7,"day")}
function jc(a,b){return fc(a,b,"weekdaysShort",7,"day")}function kc(a,b){return fc(a,b,"weekdaysMin",7,"day")}function lc(){var a=this._data;return this._milliseconds=Rd(this._milliseconds),this._days=Rd(this._days),this._months=Rd(this._months),a.milliseconds=Rd(a.milliseconds),a.seconds=Rd(a.seconds),a.minutes=Rd(a.minutes),a.hours=Rd(a.hours),a.months=Rd(a.months),a.years=Rd(a.years),this}function mc(a,b,c,d){var e=Va(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=
d*e._months,a._bubble()}function nc(a,b){return mc(this,a,b,1)}function oc(a,b){return mc(this,a,b,-1)}function pc(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;return g.milliseconds=d%1E3,a=fb(d/1E3),g.seconds=a%60,b=fb(a/60),g.minutes=b%60,c=fb(b/60),g.hours=c%24,e+=fb(c/24),h=fb(qc(e)),e-=fb(rc(h)),f+=fb(e/30),e%=30,h+=fb(f/12),f%=12,g.days=e,g.months=f,g.years=h,this}function qc(a){return 400*a/146097}function rc(a){return 146097*a/400}function sc(a){var b,c,d=
this._milliseconds;if(a=z(a),"month"===a||"year"===a)return b=this._days+d/864E5,c=this._months+12*qc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(rc(this._months/12)),a){case "week":return b/7+d/6048E5;case "day":return b+d/864E5;case "hour":return 24*b+d/36E5;case "minute":return 1440*b+d/6E4;case "second":return 86400*b+d/1E3;case "millisecond":return Math.floor(864E5*b)+d;default:throw new Error("Unknown unit "+a);}}function tc(){return this._milliseconds+864E5*this._days+this._months%
12*2592E6+31536E6*p(this._months/12)}function uc(a){return function(){return this.as(a)}}function vc(a){return a=z(a),this[a+"s"]()}function wc(a){return function(){return this._data[a]}}function xc(){return fb(this.days()/7)}function yc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function zc(a,b,c){var d=Va(a).abs(),e=fe(d.as("s")),f=fe(d.as("m")),g=fe(d.as("h")),h=fe(d.as("d")),i=fe(d.as("M")),j=fe(d.as("y")),k=e<ge.s&&["s",e]||1===f&&["m"]||f<ge.m&&["mm",f]||1===g&&["h"]||g<ge.h&&["hh",g]||
1===h&&["d"]||h<ge.d&&["dd",h]||1===i&&["M"]||i<ge.M&&["MM",i]||1===j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,yc.apply(null,k)}function Ac(a,b){return void 0===ge[a]?!1:void 0===b?ge[a]:(ge[a]=b,!0)}function Bc(a){var b=this.localeData(),c=zc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Cc(){var a=he(this.years()),b=he(this.months()),c=he(this.days()),d=he(this.hours()),e=he(this.minutes()),f=he(this.seconds()+this.milliseconds()/1E3),g=this.asSeconds();return g?
(0>g?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"}var Dc,Ec,Fc=a.momentProperties=[],Gc=!1,Hc={},Ic={},Jc=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Kc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Lc={},Mc={},Nc=/\d/,Oc=/\d\d/,Pc=/\d{3}/,Qc=/\d{4}/,Rc=/[+-]?\d{6}/,Sc=/\d\d?/,Tc=/\d{1,3}/,Uc=/\d{1,4}/,Vc=/[+-]?\d{1,6}/,
Wc=/\d+/,Xc=/[+-]?\d+/,Yc=/Z|[+-]\d\d:?\d\d/gi,Zc=/[+-]?\d+(\.\d{1,3})?/,$c=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,_c={},ad={},bd=0,cd=1,dd=2,ed=3,fd=4,gd=5,hd=6;G("M",["MM",2],"Mo",function(){return this.month()+1}),G("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),G("MMMM",0,0,function(a){return this.localeData().months(this,a)}),y("month","M"),L("M",Sc),L("MM",Sc,Oc),L("MMM",$c),L("MMMM",$c),O(["M",
"MM"],function(a,b){b[cd]=p(a)-1}),O(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[cd]=e:j(c).invalidMonth=a});var id="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),jd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),kd={};a.suppressDeprecationWarnings=!1;var ld=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
md=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],nd=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],od=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=$("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",
function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),G(0,["YY",2],0,function(){return this.year()%100}),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),y("year","y"),L("Y",Xc),L("YY",Sc,Oc),L("YYYY",Uc,Qc),L("YYYYY",Vc,Rc),L("YYYYYY",Vc,Rc),O(["YYYY","YYYYY","YYYYYY"],bd),O("YY",function(b,c){c[bd]=a.parseTwoDigitYear(b)}),a.parseTwoDigitYear=function(a){return p(a)+(p(a)>68?1900:2E3)};var pd=B("FullYear",!1);G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),
y("week","w"),y("isoWeek","W"),L("w",Sc),L("ww",Sc,Oc),L("W",Sc),L("WW",Sc,Oc),P(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=p(a)});var qd={dow:0,doy:6};G("DDD",["DDDD",3],"DDDo","dayOfYear"),y("dayOfYear","DDD"),L("DDD",Tc),L("DDDD",Pc),O(["DDD","DDDD"],function(a,b,c){c._dayOfYear=p(a)}),a.ISO_8601=function(){};var rd=$("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Aa.apply(null,arguments);return this>a?this:a}),sd=
$("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Aa.apply(null,arguments);return a>this?this:a});Ga("Z",":"),Ga("ZZ",""),L("Z",Yc),L("ZZ",Yc),O(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ha(a)});var td=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var ud=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,vd=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;
Va.fn=Ea.prototype;var wd=Za(1,"add"),xd=Za(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var yd=$("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});G(0,["gg",2],0,function(){return this.weekYear()%100}),G(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ab("gggg","weekYear"),Ab("ggggg","weekYear"),Ab("GGGG","isoWeekYear"),
Ab("GGGGG","isoWeekYear"),y("weekYear","gg"),y("isoWeekYear","GG"),L("G",Xc),L("g",Xc),L("GG",Sc,Oc),L("gg",Sc,Oc),L("GGGG",Uc,Qc),L("gggg",Uc,Qc),L("GGGGG",Vc,Rc),L("ggggg",Vc,Rc),P(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=p(a)}),P(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),G("Q",0,0,"quarter"),y("quarter","Q"),L("Q",Nc),O("Q",function(a,b){b[cd]=3*(p(a)-1)}),G("D",["DD",2],"Do","date"),y("date","D"),L("D",Sc),L("DD",Sc,Oc),L("Do",function(a,b){return a?
b._ordinalParse:b._ordinalParseLenient}),O(["D","DD"],dd),O("Do",function(a,b){b[dd]=p(a.match(Sc)[0],10)});var zd=B("Date",!0);G("d",0,"do","day"),G("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),G("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),G("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),y("day","d"),y("weekday","e"),y("isoWeekday","E"),L("d",Sc),L("e",Sc),L("E",Sc),L("dd",$c),L("ddd",
$c),L("dddd",$c),P(["dd","ddd","dddd"],function(a,b,c){var d=c._locale.weekdaysParse(a);null!=d?b.d=d:j(c).invalidWeekday=a}),P(["d","e","E"],function(a,b,c,d){b[d]=p(a)});var Ad="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Bd="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Cd="Su_Mo_Tu_We_Th_Fr_Sa".split("_");G("H",["HH",2],0,"hour"),G("h",["hh",2],0,function(){return this.hours()%12||12}),Pb("a",!0),Pb("A",!1),y("hour","h"),L("a",Qb),L("A",Qb),L("H",Sc),L("h",Sc),L("HH",Sc,Oc),
L("hh",Sc,Oc),O(["H","HH"],ed),O(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),O(["h","hh"],function(a,b,c){b[ed]=p(a),j(c).bigHour=!0});var Dd=/[ap]\.?m?\.?/i,Ed=B("Hours",!0);G("m",["mm",2],0,"minute"),y("minute","m"),L("m",Sc),L("mm",Sc,Oc),O(["m","mm"],fd);var Fd=B("Minutes",!1);G("s",["ss",2],0,"second"),y("second","s"),L("s",Sc),L("ss",Sc,Oc),O(["s","ss"],gd);var Gd=B("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/
10)}),Tb("SSS"),Tb("SSSS"),y("millisecond","ms"),L("S",Tc,Nc),L("SS",Tc,Oc),L("SSS",Tc,Pc),L("SSSS",Wc),O(["S","SS","SSS","SSSS"],function(a,b){b[hd]=p(1E3*("0."+a))});var Hd=B("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var Id=n.prototype;Id.add=wd,Id.calendar=_a,Id.clone=ab,Id.diff=gb,Id.endOf=sb,Id.format=kb,Id.from=lb,Id.fromNow=mb,Id.to=nb,Id.toNow=ob,Id.get=E,Id.invalidAt=zb,Id.isAfter=bb,Id.isBefore=cb,Id.isBetween=db,Id.isSame=eb,Id.isValid=xb,Id.lang=yd,Id.locale=pb,Id.localeData=
qb,Id.max=sd,Id.min=rd,Id.parsingFlags=yb,Id.set=E,Id.startOf=rb,Id.subtract=xd,Id.toArray=wb,Id.toDate=vb,Id.toISOString=jb,Id.toJSON=jb,Id.toString=ib,Id.unix=ub,Id.valueOf=tb,Id.year=pd,Id.isLeapYear=ga,Id.weekYear=Cb,Id.isoWeekYear=Db,Id.quarter=Id.quarters=Gb,Id.month=W,Id.daysInMonth=X,Id.week=Id.weeks=la,Id.isoWeek=Id.isoWeeks=ma,Id.weeksInYear=Fb,Id.isoWeeksInYear=Eb,Id.date=zd,Id.day=Id.days=Mb,Id.weekday=Nb,Id.isoWeekday=Ob,Id.dayOfYear=oa,Id.hour=Id.hours=Ed,Id.minute=Id.minutes=Fd,Id.second=
Id.seconds=Gd,Id.millisecond=Id.milliseconds=Hd,Id.utcOffset=Ka,Id.utc=Ma,Id.local=Na,Id.parseZone=Oa,Id.hasAlignedHourOffset=Pa,Id.isDST=Qa,Id.isDSTShifted=Ra,Id.isLocal=Sa,Id.isUtcOffset=Ta,Id.isUtc=Ua,Id.isUTC=Ua,Id.zoneAbbr=Ub,Id.zoneName=Vb,Id.dates=$("dates accessor is deprecated. Use date instead.",zd),Id.months=$("months accessor is deprecated. Use month instead",W),Id.years=$("years accessor is deprecated. Use year instead",pd),Id.zone=$("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",
La);var Jd=Id,Kd={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ld={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},Md="Invalid date",Nd="%d",Od=/\d{1,2}/,Pd={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},
Qd=r.prototype;Qd._calendar=Kd,Qd.calendar=Yb,Qd._longDateFormat=Ld,Qd.longDateFormat=Zb,Qd._invalidDate=Md,Qd.invalidDate=$b,Qd._ordinal=Nd,Qd.ordinal=_b,Qd._ordinalParse=Od,Qd.preparse=ac,Qd.postformat=ac,Qd._relativeTime=Pd,Qd.relativeTime=bc,Qd.pastFuture=cc,Qd.set=dc,Qd.months=S,Qd._months=id,Qd.monthsShort=T,Qd._monthsShort=jd,Qd.monthsParse=U,Qd.week=ia,Qd._week=qd,Qd.firstDayOfYear=ka,Qd.firstDayOfWeek=ja,Qd.weekdays=Ib,Qd._weekdays=Ad,Qd.weekdaysMin=Kb,Qd._weekdaysMin=Cd,Qd.weekdaysShort=
Jb,Qd._weekdaysShort=Bd,Qd.weekdaysParse=Lb,Qd.isPM=Rb,Qd._meridiemParse=Dd,Qd.meridiem=Sb,v("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===p(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=$("moment.lang is deprecated. Use moment.locale instead.",v),a.langData=$("moment.langData is deprecated. Use moment.localeData instead.",x);var Rd=Math.abs,Sd=uc("ms"),Td=uc("s"),Ud=uc("m"),Vd=uc("h"),Wd=uc("d"),Xd=uc("w"),Yd=uc("M"),Zd=uc("y"),$d=wc("milliseconds"),
_d=wc("seconds"),ae=wc("minutes"),be=wc("hours"),ce=wc("days"),de=wc("months"),ee=wc("years"),fe=Math.round,ge={s:45,m:45,h:22,d:26,M:11},he=Math.abs,ie=Ea.prototype;ie.abs=lc,ie.add=nc,ie.subtract=oc,ie.as=sc,ie.asMilliseconds=Sd,ie.asSeconds=Td,ie.asMinutes=Ud,ie.asHours=Vd,ie.asDays=Wd,ie.asWeeks=Xd,ie.asMonths=Yd,ie.asYears=Zd,ie.valueOf=tc,ie._bubble=pc,ie.get=vc,ie.milliseconds=$d,ie.seconds=_d,ie.minutes=ae,ie.hours=be,ie.days=ce,ie.weeks=xc,ie.months=de,ie.years=ee,ie.humanize=Bc,ie.toISOString=
Cc,ie.toString=Cc,ie.toJSON=Cc,ie.locale=pb,ie.localeData=qb,ie.toIsoString=$("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Cc),ie.lang=yd,G("X",0,0,"unix"),G("x",0,0,"valueOf"),L("x",Xc),L("X",Zc),O("X",function(a,b,c){c._d=new Date(1E3*parseFloat(a,10))}),O("x",function(a,b,c){c._d=new Date(p(a))}),a.version="2.10.3",b(Aa),a.fn=Jd,a.min=Ca,a.max=Da,a.utc=h,a.unix=Wb,a.months=gc,a.isDate=d,a.locale=v,a.invalid=l,a.duration=Va,a.isMoment=o,a.weekdays=ic,a.parseZone=
Xb,a.localeData=x,a.isDuration=Fa,a.monthsShort=hc,a.weekdaysMin=kc,a.defineLocale=w,a.weekdaysShort=jc,a.normalizeUnits=z,a.relativeTimeThreshold=Ac;var je=a;return je});(function(exports){var existingPDFNet=!!exports.PDFNet;exports.PDFNet=exports.PDFNet?exports.PDFNet:{};exports.PDFNet.Convert=exports.PDFNet.Convert?exports.PDFNet.Convert:{};var finishedInitializeCapability;exports.PDFNet.initialize=function(l,pdfBackendType){if(!finishedInitializeCapability){var workerHandlers={pnaclCrashError:function(msg,genericMsg){console.log("PNaClCrashError: "+msg+", "+genericMsg)},pnaclLoadError:function(msg,genericMsg){console.log("PNaClLoadError: "+msg+", "+genericMsg)},
emsWorkerError:function(msg,genericMsg){console.log("EmsWorkerError: "+msg+", "+genericMsg)}};var useEmscriptenWhileLoading=pdfBackendType!=="pnacl"&&!exports.CoreControls.isSubzeroEnabled();finishedInitializeCapability=createPromiseCapability();var finishInit=function(pdfBackendType){exports.CoreControls.preloadPDFWorker(pdfBackendType,workerHandlers,{useEmscriptenWhileLoading:useEmscriptenWhileLoading,autoSwap:false});var workerTransportPromise=exports.CoreControls.initPDFWorkerTransports(pdfBackendType,
workerHandlers,l);workerTransportPromise.then(function(transport){exports.PDFNet.messageHandler=transport;finishedInitializeCapability.resolve()})};if(typeof readerControl!=="undefined"&&typeof readerControl.pdfType!=="undefined")pdfBackendType=readerControl.pdfType;if(!pdfBackendType||pdfBackendType==="auto"){var getBackendeallocPromise=CoreControls.getDefaultPdfBackendType();getBackendeallocPromise.then(finishInit)}else finishInit(pdfBackendType)}return finishedInitializeCapability.promise};exports.PDFNet.Convert.office2PDFBuffer=
function(input,options){return new Promise(function(resolve,reject){var partRetriever=typeof input==="string"?new CoreControls.PartRetrievers.ExternalPdfPartRetriever(input):new CoreControls.PartRetrievers.ArrayBufferPdfPartRetriever(input);var officeDoc=new CoreControls.Document(undefined,"office");var officeDocReady=function(err){if(err)reject(err);officeDoc.getFileData({"downloadType":"pdf"}).then(function(buffer){resolve(buffer)})["catch"](function(e){reject(e)})};officeDoc.loadAsync(partRetriever,
officeDocReady,{workerTransportPromise:CoreControls.initOfficeWorkerTransports(CoreControls.getCurrentPDFBackendType(),{},options["l"])})})};if(!existingPDFNet){exports.PDFNet.hasFullAPI=false;if(window.Proxy)exports.PDFNet=new window.Proxy(exports.PDFNet,{get:function(obj,prop){if(prop in obj)return obj[prop];throw new Error('Full version of PDFNetJS has not been loaded. Please pass the "fullAPI: true" option in your WebViewer constructor to use the PDFNet APIs.');}})}})(typeof window==="undefined"?
this:window);var K=self,S=K.wX;(function(){function a(b){e?e.push(b):setTimeout(b,0)}var f={version:"0.7.2.0",isUndefined:function(b){return void 0===b},isNull:function(b){return null===b},rg:function(b){return null===b||void 0===b},V_:function(b){return null!==b&&void 0!==b}},e=[];K.attachEvent&&K.attachEvent("onload",function(){if(e){var b=e;e=null;for(var d=0,c=b.length;d<c;d++)b[d]()}});S||(K.wX=S={init:a,ready:a});for(var c in f)S[c]=f[c]})();Object.nf="Object";Object.dl=null;Object.PZ=function(a){for(var f in a)delete a[f]};
Object.qr=function(a,f){return void 0!==a[f]};Object.keys?Object.OR=function(a){return Object.keys(a).length}:(Object.keys=function(a){var f=[],e;for(e in a)f.push(e);return f},Object.OR=function(a){var f=0,e;for(e in a)f++;return f});Boolean.nf="Boolean";Boolean.parse=function(a){return"true"==a.toLowerCase()};Number.nf="Number";Number.parse=function(a){return a&&a.length?0<=a.indexOf(".")||0<=a.indexOf("e")||a.endsWith("f")||a.endsWith("F")?parseFloat(a):parseInt(a,10):0};
Number.prototype.format=function(a){return S.rg(a)||0==a.length||"i"==a?this.toString():ca(this,a,!1)};Number.prototype.aJ=function(a){return S.rg(a)||0==a.length||"i"==a?this.toLocaleString():ca(this,a,!0)};
Number.by=function(a,f,e,c){var b=null;e=a.indexOf(e);0<e&&(b=a.substr(e),a=a.substr(0,e));(e=a.startsWith("-"))&&(a=a.substr(1));var d=0,g=f[d];if(a.length<g)return b?a+b:a;for(var k=a.length,h="",l=!1;!l;){var n=g,m=k-n;0>m&&(g+=m,n+=m,m=0,l=!0);if(!n)break;m=a.substr(m,n);h=h.length?m+c+h:m;k-=n;d<f.length-1&&(d++,g=f[d])}e&&(h="-"+h);return b?h+b:h};
function ca(a,f,e){e=e?S.ZL.HY.numberFormat:S.ZL.RY.numberFormat;var c="",b=-1;1<f.length&&(b=parseInt(f.substr(1)));f=f.charAt(0);switch(f){case "d":case "D":c=parseInt(Math.abs(a)).toString();-1!=b&&(c=c.length<b?String.aH(b-c.length)+c:c);0>a&&(c="-"+c);break;case "x":case "X":c=parseInt(Math.abs(a)).toString(16);"X"==f&&(c=c.toUpperCase());-1!=b&&(c=c.length<b?String.aH(b-c.length)+c:c);break;case "e":case "E":c=-1==b?a.toExponential():a.toExponential(b);"E"==f&&(c=c.toUpperCase());break;case "f":case "F":case "n":case "N":-1==
b&&(b=e.e0);c=a.toFixed(b).toString();b&&"."!=e.iJ&&(b=c.indexOf("."),c=c.substr(0,b)+e.iJ+c.substr(b+1));if("n"==f||"N"==f)c=Number.by(c,e.g0,e.iJ,e.f0);break;case "c":case "C":-1==b&&(b=e.$Z);c=Math.abs(a).toFixed(b).toString();b&&"."!=e.cG&&(b=c.indexOf("."),c=c.substr(0,b)+e.cG+c.substr(b+1));c=Number.by(c,e.b_,e.cG,e.a_);c=0>a?String.format(e.c_,c):String.format(e.d_,c);break;case "p":case "P":-1==b&&(b=e.l0),c=(100*Math.abs(a)).toFixed(b).toString(),b&&"."!=e.CJ&&(b=c.indexOf("."),c=c.substr(0,
b)+e.CJ+c.substr(b+1)),c=Number.by(c,e.n0,e.CJ,e.m0),c=0>a?String.format(e.o0,c):String.format(e.p0,c)}return c}String.nf="String";String.bM="";String.compare=function(a,f,e){e&&(a&&(a=a.toUpperCase()),f&&(f=f.toUpperCase()));a=a||"";f=f||"";return a==f?0:a<f?-1:1};String.concat=function(){return 2===arguments.length?arguments[0]+arguments[1]:Array.prototype.join.call(arguments,"")};
String.prototype.endsWith=function(a){return a.length?a.length>this.length?!1:this.substr(this.length-a.length)==a:!0};String.KG=function(a,f,e){return 0==String.compare(a,f,e)};String._format=function(a,f,e){String.oE||(String.oE=/(\{[^\}^\{]+\})/g);return a.replace(String.oE,function(c,b){var d=f[parseInt(b.substr(1))+1];if(S.rg(d))return"";if(d.format){var g=null,a=b.indexOf(":");0<a&&(g=b.substring(a+1,b.length-1));return e?d.aJ(g):d.format(g)}return e?d.toLocaleString():d.toString()})};
String.format=function(a){return String._format(a,arguments,!1)};String.aH=function(a){for(var f="0",e=1;e<a;e++)f+="0";return f};String.prototype.insert=function(a,f){return f?a?this.substr(0,a)+f+this.substr(a):f+this:this};String.Dv=function(a){return!a||!a.length};String.aJ=function(a){return String._format(a,arguments,!0)};String.prototype.remove=function(a,f){return!f||a+f>this.length?this.substr(0,a):this.substr(0,a)+this.substr(a+f)};
String.prototype.startsWith=function(a){return a.length?a.length>this.length?!1:this.substr(0,a.length)==a:!0};String.prototype.trim||(String.prototype.trim=function(){return this.replace(/\s*$/,"").replace(/^\s*/,"")});Array.nf="Array";Array.Ys=[S.Fs];Array.prototype.add=function(a){this.push(a)};Object.defineProperty(Array.prototype,"add",{enumerable:!1,writable:!0});Array.prototype.addRange=function(a){this.push.apply(this,a)};Object.defineProperty(Array.prototype,"addRange",{enumerable:!1,writable:!0});
Object.defineProperty(Array.prototype,"aggregate",{enumerable:!1,writable:!0});Array.prototype.clear=function(){this.length=0};Object.defineProperty(Array.prototype,"clear",{enumerable:!1,writable:!0});Array.prototype.clone=function(){return 1===this.length?[this[0]]:Array.apply(null,this)};Object.defineProperty(Array.prototype,"clone",{enumerable:!1,writable:!0});Array.prototype.contains=function(a){return 0<=this.indexOf(a)};Object.defineProperty(Array.prototype,"contains",{enumerable:!1,writable:!0});
Array.prototype.dequeue=function(){return this.shift()};Object.defineProperty(Array.prototype,"dequeue",{enumerable:!1,writable:!0});Array.prototype.enqueue=function(a){this.oO=!0;this.push(a)};Object.defineProperty(Array.prototype,"enqueue",{enumerable:!1,writable:!0});function ea(a){return a.length?a[a.oO?0:a.length-1]:null}Object.defineProperty(Array.prototype,"peek",{enumerable:!1,writable:!0});
Array.prototype.every||(Array.prototype.every=function(a,f){for(var e=this.length,c=0;c<e;c++)if(c in this&&!a.call(f,this[c],c,this))return!1;return!0},Object.defineProperty(Array.prototype,"every",{enumerable:!1,writable:!0}));Object.defineProperty(Array.prototype,"extract",{enumerable:!1,writable:!0});
Array.prototype.filter||(Array.prototype.filter=function(a,f){for(var e=this.length,c=[],b=0;b<e;b++)if(b in this){var d=this[b];a.call(f,d,b,this)&&c.push(d)}return c},Object.defineProperty(Array.prototype,"filter",{enumerable:!1,writable:!0}));Array.prototype.forEach||(Array.prototype.forEach=function(a,f){for(var e=this.length,c=0;c<e;c++)c in this&&a.call(f,this[c],c,this)},Object.defineProperty(Array.prototype,"forEach",{enumerable:!1,writable:!0}));Array.prototype.getEnumerator=function(){return new S.ts(this)};
Object.defineProperty(Array.prototype,"getEnumerator",{enumerable:!1,writable:!0});Array.prototype.groupBy=function(a,f){for(var e=this.length,c=[],b={},d=0;d<e;d++)if(d in this){var g=a.call(f,this[d],d);if(!String.Dv(g)){var k=b[g];k||(k=[],k.key=g,b[g]=k,c.add(k));k.add(this[d])}}return c};Object.defineProperty(Array.prototype,"groupBy",{enumerable:!1,writable:!0});
Array.prototype.index=function(a,f){for(var e=this.length,c={},b=0;b<e;b++)if(b in this){var d=a.call(f,this[b],b);String.Dv(d)||(c[d]=this[b])}return c};Object.defineProperty(Array.prototype,"index",{enumerable:!1,writable:!0});Array.prototype.indexOf||(Array.prototype.indexOf=function(a,f){var e=this.length;if(e)for(var c=f||0;c<e;c++)if(this[c]===a)return c;return-1},Object.defineProperty(Array.prototype,"indexOf",{enumerable:!1,writable:!0}));
Array.prototype.insert=function(a,f){this.splice(a,0,f)};Object.defineProperty(Array.prototype,"insert",{enumerable:!1,writable:!0});Object.defineProperty(Array.prototype,"insertRange",{enumerable:!1,writable:!0});Array.prototype.map||(Array.prototype.map=function(a,f){for(var e=this.length,c=Array(e),b=0;b<e;b++)b in this&&(c[b]=a.call(f,this[b],b,this));return c},Object.defineProperty(Array.prototype,"map",{enumerable:!1,writable:!0}));
Array.prototype.remove=function(a){a=this.indexOf(a);return 0<=a?(this.splice(a,1),!0):!1};Object.defineProperty(Array.prototype,"remove",{enumerable:!1,writable:!0});Object.defineProperty(Array.prototype,"removeAt",{enumerable:!1,writable:!0});Array.prototype.removeRange=function(a,f){return this.splice(a,f)};Object.defineProperty(Array.prototype,"removeRange",{enumerable:!1,writable:!0});
Array.prototype.some||(Array.prototype.some=function(a,f){for(var e=this.length,c=0;c<e;c++)if(c in this&&a.call(f,this[c],c,this))return!0;return!1},Object.defineProperty(Array.prototype,"some",{enumerable:!1,writable:!0}));Array.toArray=function(a){return Array.prototype.slice.call(a)};RegExp.nf="RegExp";RegExp.parse=function(a){if(a.startsWith("/")){var f=a.lastIndexOf("/");if(1<f)return new RegExp(a.substring(1,f),a.substr(f+1))}return null};Error.nf="Error";
Error.TZ=function(a,f,e){a=Error(a);if(f)for(var c in f)a[c]=f[c];e&&(a.M_=e);if(!(S.rg(a.stack)||S.rg(a.fileName)||S.rg(a.lineNumber))){f=a.stack.split("\n");e=f[0];for(c=a.fileName+":"+a.lineNumber;!S.rg(e)&&-1===e.indexOf(c);)f.shift(),e=f[0];e=f[1];isNullOrUndefined(e)||(e=e.match(/@(.*):(\d+)$/),S.rg(e)||(f.shift(),a.stack=f.join("\n"),a.fileName=e[1],a.lineNumber=parseInt(e[2])))}return a};K.uc=Function;K.uc.nf="Type";K.zD=function(a){this.nf=a};K.zD.prototype={FN:!0,getName:function(){return this.nf}};
K.uc.vw=function(a){K.Xx||(K.Xx={});K.PD||(K.PD=[]);if(!K.Xx[a]){for(var f=self,e=a.split("."),c=0;c<e.length;c++){var b=e[c],d=f[b];d||(f[b]=d=new K.zD(e.slice(0,c+1).join(".")),0==c&&K.PD.add(d));f=d}K.Xx[a]=f}};K.uc.prototype.Oa=function(a,f,e){this.prototype.constructor=this;this.nf=a;this.BD=!0;this.dl=f||Object;f&&(this.Xs=!0);if(e){this.Ys=[];for(var c=2;c<arguments.length;c++)e=arguments[c],this.Ys.add(e)}};function fa(a,f){a.nf=f;a.HD=!0}
K.uc.prototype.uC=function(){if(this.Xs){var a=this.dl;a.Xs&&a.uC();for(var f in a.prototype){var e=a.prototype[f];this.prototype[f]||(this.prototype[f]=e)}delete this.Xs}};K.uc.prototype.HV||(K.uc.prototype.HV=K.uc.prototype.uC);function ga(a,f){return S.rg(f)?!1:a==Object||f instanceof a?!0:ka(a,K.uc.LR(f))}
function ka(a,f){if(a==Object||a==f)return!0;if(a.BD)for(var e=f.dl;e;){if(a==e)return!0;e=e.dl}else if(a.HD){var c=f.Ys;if(c&&c.contains(a))return!0;for(e=f.dl;e;){if((c=e.Ys)&&c.contains(a))return!0;e=e.dl}}return!1}K.uc.P_=function(a){return 1==a.BD};K.uc.Q_=function(a){return 1==a.DN};K.uc.R_=function(a){return 1==a.DN&&1==a.DD};K.uc.S_=function(a){return 1==a.HD};K.uc.T_=function(a){return 1==a.FN};K.uc.MZ=function(a,f){return ga(f,a)};K.uc.w0=function(a,f){return ga(f,a)?a:null};
K.uc.LR=function(a){var f=null;try{f=a.constructor}catch(e){}f&&f.nf||(f=Object);return f};S.lj=function(){};S.lj.Oa("Enum");S.lj.parse=function(a,f){var e=a.prototype;if(a.DD){for(var c=f.split("|"),b=0,d=!0,g=c.length-1;0<=g;g--){var k=c[g].trim(),h=!1;for(l in e)if(l===k){b|=e[l];h=!0;break}if(!h){d=!1;break}}if(d)return b}else for(var l in e)if(l===f)return e[l];throw"Invalid Enumeration Value";};
S.lj.DZ=function(a){var f=this.prototype;if(this.DD&&0!==a){var e=[];for(c in f)f[c]&a&&(e.length&&e.add(" | "),e.add(c));if(!e.length)throw"Invalid Enumeration Value";return e.join("")}for(var c in f)if(f[c]===a)return c;throw"Invalid Enumeration Value";};S.sd=function(){};S.sd.Oa("Delegate");S.sd.empty=function(){};S.sd.MN=function(a,f,e){for(var c=0;c<a.length;c+=2)if(a[c]===f&&a[c+1]===e)return!0;return!1};
S.sd._create=function(a){function f(){if(2==a.length)return a[1].apply(a[0],arguments);for(var e=a.clone(),c=0;c<e.length;c+=2)S.sd.MN(a,e[c],e[c+1])&&e[c+1].apply(e[c],arguments);return null}f.ah=a;return f};S.sd.create=function(a,f){return a?S.sd._create([a,f]):f};S.sd.QZ=function(a,f){return a?f?S.sd._create((a.ah?a.ah:[null,a]).concat(f.ah?f.ah:[null,f])):a.ah?a:S.sd.create(null,a):f.ah?f:S.sd.create(null,f)};
S.sd.remove=function(a,f){if(!a||a===f)return null;if(!f)return a;var e=a.ah,c=null,b;f.ah?(c=f.ah[0],b=f.ah[1]):b=f;for(var d=0;d<e.length;d+=2)if(e[d]===c&&e[d+1]===b){if(2==e.length)return null;e.splice(d,2);return S.sd._create(e)}return a};S.sd.UZ=function(a,f,e){e=e||"__"+(new Date).valueOf();self[e]=f?a:function(){try{delete self[e]}catch(c){self[e]=void 0}a.apply(null,arguments)};return e};S.sd.h_=function(a){delete self[a]};S.sd.OZ=function(a){self[a]=S.sd.empty};S.Re=function(){};
S.Re.prototype={yh:null,reset:null};S.Re.getEnumerator=function(a){return a?a.getEnumerator?a.getEnumerator():new S.ts(a):null};fa(S.Re,"IEnumerator");S.Fs=function(){};S.Fs.prototype={getEnumerator:null};fa(S.Fs,"IEnumerable");S.ts=function(a){this.VD=a;this.xt=-1;this.current=null};S.ts.prototype={yh:function(){this.xt++;this.current=this.VD[this.xt];return this.xt<this.VD.length},reset:function(){this.xt=-1;this.current=null}};S.ts.Oa("ArrayEnumerator",null,S.Re);S.dD=function(){};
S.dD.prototype={ed:null};fa(S.dD,"IDisposable");S.tD=function(a){this.Qt=S.rg(a)?[]:[a];this.isEmpty=0==this.Qt.length};S.tD.prototype={append:function(a){S.rg(a)||(this.Qt.add(a),this.isEmpty=!1);return this},clear:function(){this.Qt=[];this.isEmpty=!0},toString:function(a){return this.Qt.join(a||"")}};S.tD.Oa("StringBuilder");S.Ds=function(){};S.Ds.Oa("EventArgs");S.Ds.bM=new S.Ds;K.XMLHttpRequest||(K.XMLHttpRequest=function(){for(var a=["Msxml2.XMLHTTP","Microsoft.XMLHTTP"],f=0;f<a.length;f++)try{return new ActiveXObject(a[f])}catch(e){}return null});
S.YC=function(){var a=S.YC;a.Xs&&a.uC();a.dl.apply(this);this.cancel=!1};S.YC.Oa("CancelEventArgs",S.Ds);S.sN=function(a,f){this.first=a;this.second=f};S.sN.Oa("Tuple");S.be=function(a){this.Fy=a;this.Vh=null};S.be.prototype={Wa:function(){this.Vh=S.be.YD(this.Vh);return this.Fy},Lb:function(a){this.Fy!==a&&(this.Fy=a,a=this.Vh)&&(this.Vh=null,S.be.wE(a))}};S.be.zy=[];S.be.jO={ed:function(){S.be.zy.pop()}};S.be.u0=function(a){S.be.zy.push(a);return S.be.jO};
S.be.YD=function(a){var f=S.be.zy,e=f.length;if(e){a=a||[];for(var c=0;c<e;c++){var b=f[c];a.contains(b)||a.push(b)}return a}return null};S.be.wE=function(a){for(var f=0,e=a.length;f<e;f++)a[f].O_()};S.be.Oa("Observable");S.gD=function(a){this.Gj=a||[];this.Vh=null};
S.gD.prototype={add:function(a){this.Gj.push(a);la(this)},clear:function(){this.Gj.clear();la(this)},contains:function(a){return this.Gj.contains(a)},getEnumerator:function(){this.Vh=S.be.YD(this.Vh);return this.Gj.getEnumerator()},indexOf:function(a){return this.Gj.indexOf(a)},insert:function(a,f){this.Gj.insert(a,f);la(this)},remove:function(a){return this.Gj.remove(a)?(la(this),!0):!1},toArray:function(){return this.Gj}};function la(a){var f=a.Vh;f&&(a.Vh=null,S.be.wE(f))}
S.gD.Oa("ObservableCollection",null,S.Fs);S.mM=function(){};fa(S.mM,"IApplication");S.nM=function(){};fa(S.nM,"IContainer");S.rM=function(){};fa(S.rM,"IObjectFactory");S.oM=function(){};fa(S.oM,"IEventManager");S.pM=function(){};fa(S.pM,"IInitializable");self.uc.vw("XODText");self.uc.vw("XODTextOld");XODText.fd=function(){};
XODText.Ix=function(a,f){this.DE=a;this.ob=Array(8);this.ob[0]=f[0];this.ob[1]=f[1];this.ob[2]=f[2];this.ob[3]=f[3];this.ob[4]=f[4];this.ob[5]=f[5];this.ob[6]=f[6];this.ob[7]=f[7]};XODText.Ix.prototype={DE:null,ob:null,Uc:function(){for(var a=Array(8),f=0;8>f;f++)a[f]=this.ob[f];return a}};XODText.UI={ff:String.fromCharCode(64256),fi:String.fromCharCode(64257),fl:String.fromCharCode(64258),ffi:String.fromCharCode(64259),ffl:String.fromCharCode(64260),ft:String.fromCharCode(64261),st:String.fromCharCode(64262)};
XODText.rB=function(a){this.uN=this.width=a};XODText.rB.prototype={width:0,uN:0};XODText.Vv=function(){};XODText.Vv.prototype={A:function(){},addColorStop:function(){}};XODText.an=function(a){this.sl=[];this.bE={};var f=new XODText.Matrix2D;f.set(1,0,0,1,0,0);this.sl.push(f);this.pn=a};
$.extend(XODText.an.prototype,{pn:null,ME:0,bq:0,wy:0,canvas:{P0:0,height:0},SR:function(a){return this.bE[a]},EZ:function(a,f){var e=new XODText.Ma;e.sh(a);f.IC(e);return e.width()},qn:function(a){if(Object.qr(this.pn,a))return this.pn[a];a=a.split(" ")[1];console.assert(Object.qr(this.pn,a),"Font "+a+" file not found");return this.pn[a]},dF:function(a,f){var e=new XODText.Matrix2D,c=a.vy,b=a.EE;e.set(b/c,0,0,b/c,0,0);e.IC(f)},font:null,save:function(){var a=new XODText.Matrix2D;a.initMatrix(ea(this.sl));
this.sl.push(a)},restore:function(){this.sl.pop()},transform:function(a,f,e,c,b,d){var g=new XODText.Matrix2D;g.set(a,f,e,c,b,d);ea(this.sl).concat(g)},rotate:function(a){var f=new XODText.Matrix2D,e=Math.cos(a);a=Math.sin(a);f.set(e,a,-a,e,0,0);ea(this.sl).concat(f)},translate:function(a,f){this.bq=a;this.wy=f},setLineDash:function(){},fillRect:function(){},fillText:function(a,f,e){var c=this.qn(this.font);this.ot(a,f,e,c)},ot:function(a,f,e,c){if(!this.mn){this.translate(f,e);f=0;for(e=a.length;f<
e;){var b=a.charCodeAt(f),d=f;55296<=b&&55551>=b?(b=String.fromCodePoint((b-55296<<10)+(a.charCodeAt(f+1)-56320)+65536),f+=2):(b=String.fromCodePoint(b),f++);d=this.Jv&&d in this.Jv?this.Jv[d]:b;b=c.Wz(b);this.dF(c,b);var g=b.y1;b.y1=b.y2;b.y2=g;b.x1+=this.bq;b.x2+=this.bq;b.y1+=this.wy;b.y2+=this.wy;this.bq+=b.width();g=Array(8);g[0]=b.x1;g[1]=b.y1;g[2]=b.x2;g[3]=b.y1;g[4]=b.x2;g[5]=b.y2;g[6]=b.x1;g[7]=b.y2;ea(this.sl).uL(g);this.bE[this.ME]=new XODText.Ix(d,g);this.ME++}this.Jv=null}},measureText:function(a){var f=
this.qn(this.font);return this.IE(a,f)},IE:function(a,f){var e=0;if(!this.mn)for(var c=0,b=a.length;c<b;){var d=a.charCodeAt(c);55296<=d&&55551>=d?(d=f.Wz(String.fromCodePoint((d-55296<<10)+(a.charCodeAt(c+1)-56320)+65536)),c+=2):(d=f.Wz(String.fromCodePoint(d)),c++);this.dF(f,d);e+=d.width()}return new XODText.rB(e)},strokeRect:function(){},lineWidth:0,lineCap:null,strokeStyle:null,fillStyle:null,globalAlpha:0,createLinearGradient:function(){return new XODText.Vv},createRadialGradient:function(){return new XODText.Vv},
createPattern:function(){},addColorStop:function(){},beginPath:function(){},closePath:function(){},fill:function(){},stroke:function(){},clip:function(){},moveTo:function(){},lineTo:function(){},quadraticCurveTo:function(){},bezierCurveTo:function(){},miterLimit:0,lineJoin:null,drawImage:function(){},setTransform:function(){},getImageData:function(){return new XODText.ImageData},putImageData:function(){},scale:function(){},S:function(){this.save()},r:function(){this.restore()},t:function(a,f,e,c,
b,d){this.transform(a,f,e,c,b,d)},ro:function(a){this.rotate(a)},T:function(a,f){this.translate(a,f)},w:0,c:null,s:null,f:null,a:0,L:function(a,f,e,c){return this.createLinearGradient(a,f,e,c)},R:function(a,f,e,c,b,d){return this.createRadialGradient(a,f,e,c,b,d)},P:function(a,f){this.createPattern(a,f)},A:function(){},b:function(){this.beginPath()},z:function(){this.closePath()},F:function(){this.fill()},X:function(){this.stroke()},cr:function(){this.strokeRect()},C:function(){this.clip()},M:function(a,
f){this.moveTo(a,f)},l:function(a,f){this.lineTo(a,f)},q:function(a,f,e,c){this.quadraticCurveTo(a,f,e,c)},B:function(a,f,e,c,b,d){this.bezierCurveTo(a,f,e,c,b,d)},n:null,x:function(a,f,e){var c=this.qn(this.font);this.ot(a,f,e,c)},m:function(a){var f=this.qn(this.font);return this.IE(a,f)},i:0,j:null,I:function(a,f,e){this.drawImage(a,f,e)},Z:function(a,f,e,c,b,d){this.setTransform(a,f,e,c,b,d)},d:function(a,f,e,c){return this.getImageData(a,f,e,c)},D:function(a,f,e){this.putImageData(a,f,e)},e:function(a,
f){this.scale(a,f)},tm:function(a){this.Jv=a},fillTextCustom:function(a,f,e){var c=this.qn(this.font);this.ot(a,f,e,c)},xc:function(a,f,e){var c=this.qn(this.font);this.ot(a,f,e,c)},cgb:function(){console.assert(!this.mn,"Custom Glyphs begin offset is incorrect");this.mn=!0},cge:function(){console.assert(this.mn,"Custom Glyphs end offset is incorrect");this.mn=!1},xw:function(a,f,e){1<a.length&&(a=a.substr(0,a.length-1));this.x(a,f,e)},xcw:function(a,f,e){1<a.length&&(a=a.substr(0,a.length-1));this.xc(a,
f,e)},createCanvas:function(){return{getContext:function(){return new XODText.an(this.pn)}}},mn:!1});Object.defineProperties(XODText.an.prototype,{n:{get:function(){return this.font},set:function(a){this.font=a}}});XODText.ve=function(){this.rf=[];this.Xc=[];this.Ka=[];this.md=!1;this.wn=null};
XODText.ve.prototype={clear:function(){this.Xa="";this.Xc.clear();this.Ka.clear();this.md=!1},Tb:function(){this.Xc=[];this.Ka=[];this.md=!1},WO:function(a){function f(e){for(var c=e.length,b=0;b<c;b+=8){var d=a.W({x:e[b],y:e[b+1]}),g=a.W({x:e[b+2],y:e[b+3]}),k=a.W({x:e[b+4],y:e[b+5]}),f=a.W({x:e[b+6],y:e[b+7]}),l=new XODText.$a;l.YE(d.x,d.y,g.x,g.y,k.x,k.y,f.x,f.y);l=l.rh();e[b]=l.x1;e[b+1]=l.y1;e[b+2]=l.x2;e[b+3]=l.y2;e[b+4]=l.x3;e[b+5]=l.y3;e[b+6]=l.x4;e[b+7]=l.y4}}f(this.Ka);this.rf.forEach(function(a){f(a.ob);
a.Fb.forEach(function(c){f(c.ob);c.Ld.forEach(function(b){f(b)})})})},Lr:function(a){this.Ka=a.m_Quads;this.Xc=a.m_Offsets;this.Xa=a.m_Str;this.md=a.m_Ready;this.rf=function(a,e,c){function b(b,d){return b.slice(d,d+8)}function d(){var d=new XODText.Db;d.hc=a[l+1];d.nb=q;q++;var g=a[l+1];d.ka=c.slice(g,g+a[l+2]);d.Zp=g;for(var g=a[l],k=0;k<g;++k)d.Ld.push(b(e,8*(d.hc+k)));m&&(m.aq=d);return m=d}function g(b){var c=d(),g=a[l],e=a[l+3],k=a[l+4],h;if(e===k){e=Math.min(b.x1,b.x2);k=Math.max(b.x1,b.x2);
h=c.Ld[0];b=c.Ld[g-1];b=[h[1],h[3],h[5],h[7],b[1],b[3],b[5],b[7]];h=Math.min.apply(null,b);b=Math.max.apply(null,b);for(var m=0;m<g;++m)for(var n=c.Ld[m],q=Math.min(n[0],n[2],n[4]),y=0;8>y;y+=2)n[y]=n[y]===q?e:k}else for(h=Math.min(b.y1,b.y2),b=Math.max(b.y1,b.y2),m=0;m<g;++m)for(n=c.Ld[m],q=Math.min(n[1],n[3],n[5]),y=1;8>y;y+=2)n[y]=n[y]===q?b:h;g=c.ob;n=c.Ld[0];m=n[2]-n[0];n=n[3]-n[1];0<m?(g[0]=e,g[1]=b,g[2]=k,g[3]=b,g[4]=k,g[5]=h,g[6]=e,g[7]=h):0>m?(g[0]=e,g[1]=h,g[2]=k,g[3]=h,g[4]=k,g[5]=b,g[6]=
e,g[7]=b):0<n?(g[0]=e,g[1]=h,g[2]=e,g[3]=b,g[4]=k,g[5]=b,g[6]=k,g[7]=h):0>n?(g[0]=k,g[1]=b,g[2]=k,g[3]=h,g[4]=e,g[5]=h,g[6]=e,g[7]=b):(g[0]=e,g[1]=b,g[2]=k,g[3]=b,g[4]=k,g[5]=h,g[6]=e,g[7]=h);l+=5;return c}function k(){var c=d();c.ob=b(a,l+3);l+=11;return c}function h(d){var c=new XODText.Vb;c.nb=d;var e=0<a[l];if(e){var h=6;d=a[l];var w=c.ob,q=a.slice(l+2,l+4),C=a.slice(l+4,l+6);w[0]=q[0];w[1]=q[1];w[2]=C[0];w[3]=q[1];w[4]=C[0];w[5]=C[1];w[6]=q[0];w[7]=C[1]}else h=10,d=-a[l],c.ob=b(a,l+2);e=e?g:
k;w=new XODText.Ma;c.qb(w);l+=h;m=null;for(h=0;h<d;++h)c.Fb.push(e(w));c.ka=c.Fb.map(function(b){return b.ka}).join(" ");c.Zp=c.Fb[0]?c.Fb[0].Zp:0;n&&(n.$p=c);return n=c}var l=0,n=null,m=null,q=0;return function(){var b=[],d=a[l];l++;for(var c=0;c<d;++c)b.push(h(c));return b}()}(a.m_Struct,this.Ka,this.Xa)},ut:function(a){for(var f="",e=0,c,b,d;e<a.length;)c=a.charCodeAt(e),9==c?(f+=String.fromCharCode(10),e++):128>c?(f+=String.fromCharCode(c),e++):191<c&&224>c?(b=a.charCodeAt(e+1),f+=String.fromCharCode((c&
31)<<6|b&63),e+=2):(b=a.charCodeAt(e+1),d=a.charCodeAt(e+2),f+=String.fromCharCode((c&15)<<12|(b&63)<<6|d&63),e+=3);return f},PE:function(a,f){for(var e=new XODText.Db,c=S.Re.getEnumerator(a.split(",")),b=-1;c.yh();){var d=c.current.split(":"),g=parseInt(d[0]),k=0;1<d.length&&(k=parseInt(d[1]));b===g&&(++g,--k);for(b=g+k;g<=b;g++)d=f.SR(g),k=d.DE,1<k.length&&(k=k in XODText.UI?XODText.UI[k]:k.charAt(0)),e.bu(k,d.Uc()),this.Xc.add(g),this.Ka.addRange(d.Uc())}return e},parse:function(a,f){var e=0,c=
0,b=0;do{for(var d;a.advance();)if(d=a.ua(),"F"===d)a.oa();else if("P"===d)a.oa();else if("L"===d){a.oa();d=new XODText.Vb;d.cq(e++);0<this.rf.length&&this.rf[this.rf.length-1].FK(d);this.rf.add(d);for(var g=S.Re.getEnumerator(a.current.textContent.split(" "));g.yh();){var k=g.current;if(0<d.ph()){this.Xa+=" ";this.Xc.add(-1);b++;var h=Array(8);d.hd().Uc(h);this.Ka.addRange(h)}k=this.PE(k,f);k.cq(c++);k.aF(b);d.qF(k);this.Xa+=k.ka;b+=k.fc()}this.Xa+="\n";this.Xc.add(-2);b++;console.assert(0<d.ph(),
"No words in line");0<d.ph()&&(h=Array(8),d.hd().Uc(h),this.Ka.addRange(h))}else console.assert("XML parser has encountered a symbol it can't process.");a.Aa()}while(a.depth)},IP:function(a,f){var e=0,c=0,b=0;this.wn=[];for(var d=0;d<a.length;++d)for(var g=a[d],k=0;k<g.length;++k)for(var h=g[k],l=0;l<h.length;++l){var n=new XODText.Vb;n.cq(e++);0<this.rf.length&&this.rf[this.rf.length-1].FK(n);this.rf.add(n);for(var m=S.Re.getEnumerator(h[l].split(" "));m.yh();){var q=m.current;if(0<n.ph()){this.wn.push(this.Xa.length);
this.Xa+=" ";this.Xc.add(-1);b++;var p=Array(8);n.hd().Uc(p);this.Ka.addRange(p)}q=this.PE(q,f);q.cq(c++);q.aF(b);n.qF(q);this.Xa+=q.ka;b+=q.fc()}this.wn.push(this.Xa.length);this.Xa+="\n";this.Xc.add(-2);b++;console.assert(0<n.ph(),"No words in line");0<n.ph()&&(p=Array(8),n.hd().Uc(p),this.Ka.addRange(p))}this.md=!0},PB:function(a,f){try{var e=new window.Se(a);console.assert("TextData"===e.ua(),"XML parser has encountered a symbol it can't process.");"TextData"===e.ua()&&(e.oa(),this.parse(e,f))}catch(c){console.warn("TextSelection has encountered an error: "+
c.message);return}this.md=!0},ready:function(){return this.md},Tq:function(){return this.rf.length?this.rf[0]:new XODText.Vb},he:function(){return this.Ka},Xa:"",Xc:null,Ka:null,md:!1};XODText.Vb=function(){this.Fb=[];this.nb=-1;this.vc=[];this.ob=Array(8);this.$p=null};
XODText.Vb.prototype={Tb:function(){this.nb=this.Nc=-1;this.vc=[]},ta:function(a){return this.nb===a.nb},ph:function(){return this.Fb.length},Rb:function(){return this.Fb.length?this.Fb[0]:new XODText.Db},hd:function(){return this.Fb.length?this.Fb[this.Fb.length-1]:new XODText.Db},eI:function(a){return 0>a||a>=this.ph()?new XODText.Db:this.Fb[a]},De:function(){return null==this.$p?new XODText.Vb:this.$p},qb:function(a){a.zm(this.ob)},cq:function(a){this.nb=a},lh:function(){if(this.vc.length)return this.vc[0];
var a=new XODText.fa,f=new XODText.fa,e=this.Rb(),c=this.hd(),b=Array(8),d=Array(8);e.zd(0,b);a.x=(b[0]+b[2]+b[4]+b[6])/4;a.y=(b[1]+b[3]+b[5]+b[7])/4;c.zd(c.fc()-1,d);f.x=(d[0]+d[2]+d[4]+d[6])/4;f.y=(d[1]+d[3]+d[5]+d[7])/4;.01>Math.abs(a.x-f.x)&&.01>Math.abs(a.y-f.y)&&this.vc.add(0);a=Math.atan2(f.y-a.y,f.x-a.x);a*=180/3.1415926;0>a&&(a+=360);this.vc.add(a);return 0},ka:"",Da:null,nb:0,vc:null,ob:null,$p:null,FK:function(a){this.$p=a},qF:function(a){0<this.Fb.length&&this.Fb[this.Fb.length-1].EW(a);
this.Fb.add(a);var f=String.Dv(this.ka),e=Array(8);a.Uc(e);if(f)for(f=0;8>f;f++)this.ob[f]=e[f];else this.ka+=" ",XODText.$a.Mt(this.ob,e,!1,0);this.ka+=a.ka}};XODText.Db=function(){this.Ld=[];this.nb=this.hc=-1;this.ob=Array(8);this.aq=null};
XODText.Db.prototype={Tb:function(){this.nb=this.hc=-1},ta:function(a){return this.nb===a.nb},fc:function(){return this.Ld.length},ng:function(){return this.ka.length},Za:function(){return this.Zp},aF:function(a){this.Zp=a},ge:function(){return null==this.aq?new XODText.Db:this.aq},ko:function(a,f){if(this.Ld&&this.Ld[a]){var e=this.Ld[a][0],c=this.Ld[a][2],b=this.Ld[a][1],d=this.Ld[a][5];b<d?(f[1]=d,f[3]=d,f[5]=b,f[7]=b):(f[1]=b,f[3]=b,f[5]=d,f[7]=d);f[0]=e;f[2]=c;f[4]=c;f[6]=e}else exports.utils.warn("default",
"getGlyphQuadInWordQuadFormat: No glyph with index "+a+" found.")},zd:function(a,f){for(var e=0;8>e;e++)f[e]=this.Ld[a][e]},Uc:function(a){for(var f=0;8>f;f++)a[f]=this.ob[f]},qb:function(a){var f=new XODText.Ma;f.zm(this.ob);a[0]=f.x1;a[1]=f.y1;a[2]=f.x2;a[3]=f.y2},cq:function(a){this.nb=this.hc=a},hc:0,ka:"",Da:null,nb:0,Zp:0,ob:null,aq:null,bu:function(a,f){var e=String.Dv(this.ka);this.ka+=a;for(var c=Array(8),b=0;8>b;b++)c[b]=f[b];for(b=0;b<a.length;++b)this.Ld.add(c);if(e)for(b=0;8>b;b++)this.ob[b]=
c[b];else XODText.$a.Mt(this.ob,c,!1,0)},EW:function(a){this.aq=a}};XODTextOld.ve=function(){};
XODTextOld.ve.prototype={clear:function(){this.fb.clear();this.Xa="";this.Xc.clear();this.Ka.clear();this.md=!1},Tb:function(){this.fb=[];this.Xc=[];this.Ka=[];this.md=!1},ut:function(a){for(var f="",e=0,c,b,d;e<a.length;)c=a.charCodeAt(e),9==c?(f+=String.fromCharCode(10),e++):128>c?(f+=String.fromCharCode(c),e++):191<c&&224>c?(b=a.charCodeAt(e+1),f+=String.fromCharCode((c&31)<<6|b&63),e+=2):(b=a.charCodeAt(e+1),d=a.charCodeAt(e+2),f+=String.fromCharCode((c&15)<<12|(b&63)<<6|d&63),e+=3);return f},
tT:function(a){this.fb=[];this.Xc=[];this.Ka=[];this.md=!1;try{var f=new window.Se(a);this.Xa="";f.oa();if(!f.advance())return;var e=f.current.textContent;this.Xa=e=this.ut(e);this.Xc.clear();f.advance();for(var e=f.current.textContent,c=e.split(","),b=S.Re.getEnumerator(c);b.yh();){var d=b.current;try{var g=parseInt(d.trim());this.Xc.add(g)}catch(r){}}this.fb.clear();f.advance();for(var e=f.current.textContent,c=e.split(","),k=S.Re.getEnumerator(c);k.yh();){d=k.current;try{g=parseFloat(d.trim()),
this.fb.add(g)}catch(r){}}this.Ka.clear();f.advance();e=f.current.textContent;c=e.split(",");a=[];for(var f=[],e=0,h=S.Re.getEnumerator(c);h.yh();){d=h.current;switch(d){case "Q":e=1;break;case "R":e=2;break;case "S":e=3;break;default:e=0}if(e)a.add(0),f.add(e);else try{g=parseFloat(d.trim()),a.add(g),f.add(e)}catch(r){return}}for(var e=0,l=a.length,n,m,q,p,h=d=c=0;h<l;){var u=f[h];if(0<u)e=u,++h,3===e&&(c=a[h],d=a[h+1],h+=2);else if(1===e)for(g=0;8>g;++g)this.Ka.add(a[h++]);else 2===e?(n=a[h++],
m=a[h++],q=a[h++],p=a[h++],this.Ka.add(n),this.Ka.add(m),this.Ka.add(q),this.Ka.add(m),this.Ka.add(q),this.Ka.add(p),this.Ka.add(n),this.Ka.add(p)):3===e&&(n=a[h++],m=c,q=a[h++],p=d,this.Ka.add(n),this.Ka.add(m),this.Ka.add(q),this.Ka.add(m),this.Ka.add(q),this.Ka.add(p),this.Ka.add(n),this.Ka.add(p))}}catch(r){return}this.Xa.length&&this.Xa.length===this.Xc.length&&8*this.Xa.length===this.Ka.length&&(this.md=!0)},ready:function(){return this.md},Tq:function(){var a=new XODTextOld.Vb;if(!this.fb.length)return a.$e(this.fb,
-1,this.Xa,this.Ka,0),a;a.$e(this.fb,1,this.Xa,this.Ka,1);return a},he:function(){return this.Ka},fb:null,Xa:null,Xc:null,Ka:null,md:!1};XODTextOld.Vb=function(){};
XODTextOld.Vb.prototype={Tb:function(){this.Nc=-1;this.nb=0;this.vc=[]},$e:function(a,f,e,c,b){this.Nc=f;this.nb=b;this.vc=[];this.Kd=a;this.ka=e;this.Da=c},ta:function(a){return this.Nc===a.Nc},ph:function(){return Math.abs(this.Kd[this.Nc])},Ji:function(){return 0<this.Kd[this.Nc]},Rb:function(){var a=new XODTextOld.Db;a.$e(this.Kd,this.Nc+(this.Ji()?6:10),this.Nc,this.ka,this.Da,1);return a},eI:function(a){if(0>a||a>=this.ph()){var f=new XODTextOld.Db;f.$e(this.Kd,-1,-1,this.ka,this.Da,0)}else{var e=
this.Ji()?6:10,c=this.Ji()?5:11,f=new XODTextOld.Db;f.$e(this.Kd,this.Nc+e+c*a,this.Nc,this.ka,this.Da,1+a)}return f},De:function(){var a=this.Nc+parseInt(this.Kd[this.Nc+1]);if(a>=this.Kd.length){var f=new XODTextOld.Vb;f.$e(this.Kd,-1,this.ka,this.Da,0)}else f=new XODTextOld.Vb,f.$e(this.Kd,a,this.ka,this.Da,this.nb+1);return f},qb:function(a){if(this.Ji())a.x1=this.Kd[this.Nc+2+0],a.y1=this.Kd[this.Nc+2+1],a.x2=this.Kd[this.Nc+2+2],a.y2=this.Kd[this.Nc+2+3];else{for(var f=1.79769E308,e=XODText.fd.oj,
c=1.79769E308,b=XODText.fd.oj,d=0;4>d;++d)var g=this.Kd[this.Nc+2+2*d],k=this.Kd[this.Nc+2+2*d+1],f=Math.min(f,g),e=Math.max(e,g),c=Math.min(c,k),b=Math.max(b,k);a.x1=f;a.y1=c;a.x2=e;a.y2=b}},lh:function(){if(this.vc.length)return this.vc[0];var a=new XODText.fa,f=new XODText.fa,e=new XODTextOld.Db;e.Tb();var c=this.Rb(),b=new XODTextOld.Db;b.Tb();for(var d=this.Rb();!d.ta(e);d=d.ge())b=d;e=Array(8);d=Array(8);c.zd(0,e);a.x=(e[0]+e[2]+e[4]+e[6])/4;a.y=(e[1]+e[3]+e[5]+e[7])/4;b.zd(b.fc()-1,d);f.x=
(d[0]+d[2]+d[4]+d[6])/4;f.y=(d[1]+d[3]+d[5]+d[7])/4;.01>Math.abs(a.x-f.x)&&.01>Math.abs(a.y-f.y)&&this.vc.add(0);a=Math.atan2(f.y-a.y,f.x-a.x);a*=180/3.1415926;0>a&&(a+=360);this.vc.add(a);return 0},Nc:0,Kd:null,ka:null,Da:null,nb:0,vc:null};XODTextOld.Db=function(){};
XODTextOld.Db.prototype={Tb:function(){this.Sh=this.hc=-1;this.nb=0},$e:function(a,f,e,c,b,d){this.hc=f;this.Sh=e;this.fb=a;this.ka=c;this.Da=b;this.nb=d},ta:function(a){return this.hc===a.hc},fc:function(){return parseInt(this.fb[this.hc])},ng:function(){return parseInt(this.fb[this.hc+2])},Za:function(){return parseInt(this.fb[this.hc+1])},Ji:function(){return 0<this.fb[this.Sh]},lS:function(){return Math.abs(this.fb[this.Sh])},ge:function(){var a=this.Ji(),f=a?5:11;this.hc>=this.Sh+(a?6:10)+(this.lS()-
1)*f?(a=new XODTextOld.Db,a.$e(this.fb,-1,-1,this.ka,this.Da,0)):(a=new XODTextOld.Db,a.$e(this.fb,this.hc+f,this.Sh,this.ka,this.Da,this.nb+1));return a},GR:function(a){var f=this.fc();return 0>a||a>=f?-1:parseInt(this.fb[this.hc+1])+a},zd:function(a,f){var e=this.GR(a);if(!(0>e)){var c=new XODTextOld.Vb;c.$e(this.fb,this.Sh,this.ka,this.Da,0);if(c.Ji()){var b=new XODText.Ma;c.qb(b);c=b.y1<b.y2?b.y1:b.y2;b=b.y1>b.y2?b.y1:b.y2;e*=8;f[0]=this.Da[e];f[1]=c;f[2]=this.Da[e+2];f[3]=f[1];f[4]=this.Da[e+
4];f[5]=b;f[6]=this.Da[e+6];f[7]=f[5]}else for(e*=8,c=0;8>c;++c)f[c]=this.Da[e+c]}},Uc:function(a){var f=new XODTextOld.Vb;f.$e(this.fb,this.Sh,this.ka,this.Da,0);if(f.Ji()){var e=this.fb[this.hc+3],c=this.fb[this.hc+4];if(e>c){var b;b=e;e=c;c=b}b=new XODText.Ma;f.qb(b);f=b.y1<b.y2?b.y1:b.y2;b=b.y1>b.y2?b.y1:b.y2;a[0]=e;a[1]=f;a[2]=c;a[3]=f;a[4]=c;a[5]=b;a[6]=e;a[7]=b}else for(e=this.hc+3,c=0;8>c;++c)a[c]=this.fb[e+c]},qb:function(a){var f=new XODTextOld.Vb;f.$e(this.fb,this.Sh,this.ka,this.Da,0);
if(f.Ji()){var e=this.fb[this.hc+3],c=this.fb[this.hc+4];if(e>c){var b;b=e;e=c;c=b}b=new XODText.Ma;f.qb(b);f=b.y1<b.y2?b.y1:b.y2;b=b.y1>b.y2?b.y1:b.y2}else{e=1.79769E308;c=XODText.fd.oj;f=1.79769E308;b=XODText.fd.oj;for(var d=this.hc+3,g=0;4>g;++g){var k=this.fb[d+2*g],h=this.fb[d+2*g+1],e=Math.min(e,k),c=Math.max(c,k),f=Math.min(f,h);b=Math.max(b,h)}}a[0]=e;a[1]=f;a[2]=c;a[3]=b},hc:0,Sh:0,fb:null,ka:null,Da:null,nb:0};XODText.Ma=function(){this.y2=this.x2=this.y1=this.x1=0};
XODText.Ma.prototype={Ea:function(a,f,e,c){this.x1=a;this.y1=f;this.x2=e;this.y2=c},sh:function(a){this.x1=a.x1;this.y1=a.y1;this.x2=a.x2;this.y2=a.y2},normalize:function(){if(this.x1>this.x2){var a;a=this.x1;this.x1=this.x2;this.x2=a}this.y1>this.y2&&(a=this.y1,this.y1=this.y2,this.y2=a)},set:function(a,f,e,c){this.x1=a;this.y1=f;this.x2=e;this.y2=c},Cr:function(a){return this.x2<a.x1||this.x1>a.x2||this.y2<a.y1||this.y1>a.y2},width:function(){var a=this.x2-this.x1;return 0>a?-a:a},height:function(){var a=
this.y2-this.y1;return 0>a?-a:a},zm:function(a){for(var f=1.79769E308,e=XODText.fd.oj,c=1.79769E308,b=XODText.fd.oj,d=0;4>d;++d)var g=a[2*d],k=a[2*d+1],f=Math.min(f,g),e=Math.max(e,g),c=Math.min(c,k),b=Math.max(b,k);this.x1=f;this.y1=c;this.x2=e;this.y2=b},wv:function(a,f){var e,c,b,d,g,k,h,l;a.x1<a.x2?(e=a.x1,c=a.x2):(e=a.x2,c=a.x1);a.y1<a.y2?(b=a.y1,d=a.y2):(b=a.y2,d=a.y1);f.x1<f.x2?(g=f.x1,k=f.x2):(g=f.x2,k=f.x1);f.y1<f.y2?(h=f.y1,l=f.y2):(h=f.y2,l=f.y1);if(c<g||k<e||d<h||l<b)return this.x1=this.x2=
this.y1=this.y2=0,!1;this.x1=e<g?g:e;this.x2=c<k?c:k;this.y1=b<h?h:b;this.y2=d<l?d:l;return this.x1===this.x2||this.y1===this.y2?(this.x1=this.x2=this.y1=this.y2=0,!1):!0},sT:function(a){this.aO(a,a)},aO:function(a,f){this.normalize();this.x1-=a;this.x2+=a;this.y1-=f;this.y2+=f},union:function(a){a.x1<this.x1&&(this.x1=a.x1);a.y1<this.y1&&(this.y1=a.y1);a.x2>this.x2&&(this.x2=a.x2);a.y2>this.y2&&(this.y2=a.y2)},contains:function(a,f){if(this.x1<this.x2){if(a<this.x1||a>this.x2)return!1}else if(a<
this.x2||a>this.x1)return!1;if(this.y1<this.y2){if(f<this.y1||f>this.y2)return!1}else if(f<this.y2||f>this.y1)return!1;return!0},x1:0,y1:0,x2:0,y2:0};XODText.fa=function(a,f){this.x=a;this.y=f};XODText.fa.ta=function(a,f){return a.x===f.x&&a.y===f.y};XODText.fa.d0=function(a,f){return a!==f};XODText.fa.tG=function(a){var f=new XODText.fa;f.x=a.x/2;f.y=a.y/2;return f};XODText.fa.multiply=function(a,f){var e=new XODText.fa;e.init(a.x*f,a.y*f);return e};
XODText.fa.vg=function(a,f){var e=new XODText.fa;e.init(a.x-f.x,a.y-f.y);return e};XODText.fa.Lo=function(a,f){var e=new XODText.fa;e.init(a.x+f.x,a.y+f.y);return e};XODText.fa.distance=function(a,f){var e=a.x-f.x,c=a.y-f.y;return Math.sqrt(e*e+c*c)};
XODText.fa.prototype={x:0,y:0,init:function(a,f){this.x=a;this.y=f},vv:function(a){this.x=a.x;this.y=a.y},add:function(a){this.x+=a.x;this.y+=a.y},sub:function(a){this.x-=a.x;this.y-=a.y},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y);return a?(this.x/=a,this.y/=a,!0):!1},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},cc:function(a){return this.x*a.x+this.y*a.y}};XODText.fd.Oa("XODText.doubleData");XODText.Ix.Oa("XODText.Letter");XODText.rB.Oa("XODText.nsIDOMTextMetrics");
XODText.Vv.Oa("XODText.nsIDOMCanvasGradient");XODText.an.Oa("XODText.SelectionContext");XODText.ve.Oa("XODText.SelectionInfo");XODText.Vb.Oa("XODText.Line");XODText.Db.Oa("XODText.Word");XODText.Ma.Oa("XODText.SelectionRect");XODText.fa.Oa("XODText.SelectionPoint");XODText.fd.Rk=1.79769E308;XODText.fd.oj=-1.79769E308;
(function(){self.uc.vw("XODText");XODText.yt=function(){};XODText.Fd=function(a,e){this.x=a;this.y=e};XODText.Fd.prototype={x:0,y:0};XODText.$a=function(){this.Lm=this.Jm=this.Km=this.Im=this.y2=this.x2=this.y1=this.x1=0};var a=RegExp("[-[\\]{}()*+?.,\\\\^$|#\\s]","g");XODText.Ox=function(f,e){this.II=e&&("r"===e||"w"===e);this.text=e&&"w"===e?f.replace(/(\*+|.)/g,function(c){return"*"===c.charAt(0)?1==c.length?".*?":"*".repeat(c.length/2|0).replace(a,"\\$&"):c.replace(a,"\\$&")}):f};XODText.$a.Mt=
function(a,e,c,b){var d=new XODText.fa;d.init(0,0);var g=new XODText.fa;g.init(0,0);var k=new XODText.fa;k.init(0,0);var h=new XODText.fa;h.init(0,0);for(var l=0;4>l;++l){XODText.$a.WH(d,a,l);if(!d.normalize()&&c)return!1;l?2===l?k=XODText.fa.vg(k,d):1===l?h=XODText.fa.Lo(h,d):3===l&&(h=XODText.fa.vg(h,d)):k=XODText.fa.Lo(k,d);for(var n=Array(8),m=0;1>m;++m){for(var q=0;8>q;++q)n[q]=e[8*m+q];XODText.$a.WH(g,n,l);if(!g.normalize()&&c)return!1;l?2===l?k=XODText.fa.vg(k,g):1===l?h=XODText.fa.Lo(h,g):
3===l&&(h=XODText.fa.vg(h,g)):k=XODText.fa.Lo(k,g)}if(c&&Math.abs(d.cc(g))<XODText.$a.LP)return!1}k=XODText.fa.tG(k);h=XODText.fa.tG(h);if(!k.normalize()&&c||!h.normalize()&&c||c&&!XODText.$a.wU(a,e,k,h,b,b/10))return!1;XODText.$a.inflate(a,e,1,k,h);return!0};XODText.$a.WH=function(a,e,c){var b=(c+1)%4;a.x=e[2*b]-e[2*c];a.y=e[2*b+1]-e[2*c+1]};XODText.$a.wU=function(a,e,c,b,d,g){var k=new XODText.fa;k.init(a[0],a[1]);var h=new XODText.fa;h.init(a[2],a[3]);var l=new XODText.fa;l.init(e[0],e[1]);var n=
new XODText.fa;n.init(e[2],e[3]);var m=k.cc(c),q=h.cc(c),p=l.cc(c);c=n.cc(c);if(m>q)var u=m,m=q,q=u;p>c&&(u=p,p=c,c=u);if(p-q>d||m-c>d)return!1;k.x=a[2];k.y=a[3];h.x=a[4];h.y=a[5];l.x=e[2];l.y=e[3];n.x=e[4];n.y=e[5];m=k.cc(b);q=h.cc(b);p=l.cc(b);c=n.cc(b);m>q&&(u=m,m=q,q=u);p>c&&(u=p,p=c,c=u);return Math.abs(m-p)>g||Math.abs(q-c)>g?!1:!0};XODText.$a.inflate=function(a,e,c,b,d){var g=!1;avx_=new XODText.fa;avx_.init(1,0);avy_=new XODText.fa;avy_.init(0,1);if(1E-4<=Math.abs(b.x-1)||1E-4<=Math.abs(b.y-
0)&&1E-4<=Math.abs(d.x-0)||1E-4<=Math.abs(d.y-1)){var g=!0,k=new XODText.Matrix2D;k.Ea(b.x,d.x,b.y,d.y,0,0);k=k.inverse();avx_.x=k.m_a;avx_.y=k.m_b;avy_.x=k.m_c;avy_.y=k.m_d}for(var k=XODText.fd.Rk,h=XODText.fd.oj,l=XODText.fd.Rk,n=XODText.fd.oj,m,q,p=0,u=0,r=0;4>r;++r){var v=new XODText.fa;v.init(a[2*r],a[2*r+1]);g?(m=v.cc(avx_),q=v.cc(avy_)):(m=v.x,q=v.y);r?(k>m&&(k=m,p=v.x),h<m&&(h=m),l>q&&(l=q,u=v.y),n<q&&(n=q)):(k=h=m,l=n=q,p=v.x,u=v.y);for(v=0;v<c;++v){var w=new XODText.fa;w.init(e[8*v+2*r],
e[8*v+2*r+1]);g?(m=w.cc(avx_),q=w.cc(avy_)):(m=w.x,q=w.y);k>m&&(k=m,p=w.x);h<m&&(h=m);l>q&&(l=q,u=w.y);n<q&&(n=q)}}e=new XODText.fa;e.init(p,u);p=e.cc(d);c=XODText.fa.multiply(b,k-e.cc(b));p=XODText.fa.multiply(d,l-p);e.x+=c.x+p.x;e.y+=c.y+p.y;g?(g=b.x,e=d.x,b=b.y,d=d.y,a[0]=g*k+e*l,a[1]=b*k+d*l,a[2]=g*h+e*l,a[3]=b*h+d*l,a[4]=g*h+e*n,a[5]=b*h+d*n,a[6]=g*k+e*n,a[7]=b*k+d*n):(a[0]=k,a[1]=l,a[2]=h,a[3]=l,a[4]=h,a[5]=n,a[6]=k,a[7]=n)};XODText.$a.prototype={_init:function(a,e,c,b,d,g,k,h){this.x1=a;this.y1=
e;this.x2=c;this.y2=b;this.Im=d;this.Km=g;this.Jm=k;this.Lm=h},YE:function(a,e,c,b,d,g,k,h){this.x1=a;this.y1=e;this.x2=c;this.y2=b;this.Im=d;this.Km=g;this.Jm=k;this.Lm=h},rh:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2,x3:this.Im,y3:this.Km,x4:this.Jm,y4:this.Lm}},XR:function(){var a=this.rh(),e=Math.min(a.x1,a.x2,a.x3,a.x4),c=Math.max(a.x1,a.x2,a.x3,a.x4),b=Math.min(a.y1,a.y2,a.y3,a.y4),d=Math.max(a.y1,a.y2,a.y3,a.y4);a.x1=e;a.x2=c;a.x3=c;a.x4=e;a.y1=b;a.y2=b;a.y3=d;a.y4=d;return a},
x1:0,y1:0,x2:0,y2:0,Im:0,Km:0,Jm:0,Lm:0};XODText.Matrix2D=function(a,e,c,b,d,g){"undefined"!==typeof a&&(this.m_a=a,"undefined"!==typeof e&&(this.m_b=e,"undefined"!==typeof c&&(this.m_c=c,"undefined"!==typeof b&&(this.m_d=b,"undefined"!==typeof d&&(this.m_h=d,"undefined"!==typeof g&&(this.m_v=g))))))};XODText.Matrix2D.rotationMatrix=function(a){var e=Math.cos(a);a=Math.sin(a);1E-7>Math.abs(a)&&(a=0);1E-7>Math.abs(e)&&(e=0);var c=new XODText.Matrix2D;c.Ea(e,-a,a,e,0,0);return c};XODText.Matrix2D.prototype=
{m_a:0,m_b:0,m_c:0,m_d:0,m_h:0,m_v:0,initMatrix:function(a){this.m_a=a.m_a;this.m_b=a.m_b;this.m_c=a.m_c;this.m_d=a.m_d;this.m_h=a.m_h;this.m_v=a.m_v},Ea:function(a,e,c,b,d,g){this.m_a=a;this.m_b=e;this.m_c=c;this.m_d=b;this.m_h=d;this.m_v=g},set:function(a,e,c,b,d,g){this.m_a=a;this.m_b=e;this.m_c=c;this.m_d=b;this.m_h=d;this.m_v=g},inverse:function(){var a=new XODText.Matrix2D,e=this.m_a*this.m_d-this.m_b*this.m_c;if(!e)return a;a.m_a=this.m_d/e;a.m_c=-this.m_c/e;a.m_h=(this.m_c*this.m_v-this.m_h*
this.m_d)/e;a.m_b=-this.m_b/e;a.m_d=this.m_a/e;a.m_v=-(this.m_a*this.m_v-this.m_h*this.m_b)/e;return a},W:function(a){var e=a.x;a.x=a.x*this.m_a+a.y*this.m_c+this.m_h;a.y=e*this.m_b+a.y*this.m_d+this.m_v;return a},concat:function(a){var e=this.m_a,c=this.m_b,b=this.m_c,d=this.m_d;this.m_a=a.m_a*e+a.m_b*b;this.m_b=a.m_a*c+a.m_b*d;this.m_c=a.m_c*e+a.m_d*b;this.m_d=a.m_c*c+a.m_d*d;this.m_h=a.m_h*e+a.m_v*b+this.m_h;this.m_v=a.m_h*c+a.m_v*d+this.m_v;return this},KG:function(a){return this.m_a==a.m_a&&
this.m_b==a.m_b&&this.m_c==a.m_c&&this.m_d==a.m_d&&this.m_h==a.m_h&&this.m_v==a.m_v},uL:function(a){var e=new XODText.Fd(a[0],a[1]),c=new XODText.Fd(a[2],a[3]),b=new XODText.Fd(a[4],a[5]),d=new XODText.Fd(a[6],a[7]),e=this.W(e),c=this.W(c),b=this.W(b),d=this.W(d);a[0]=e.x;a[1]=e.y;a[2]=c.x;a[3]=c.y;a[4]=b.x;a[5]=b.y;a[6]=d.x;a[7]=d.y},IC:function(a){var e=Array(8);e[0]=a.x1;e[1]=a.y1;e[2]=a.x2;e[3]=a.y1;e[4]=a.x2;e[5]=a.y2;e[6]=a.x1;e[7]=a.y2;this.uL(e);a.zm(e)}};XODText.Vp=function(){};XODText.Vp.KN=
function(a,e){return a.bd<e.bd||a.bd===e.bd&&a._position<e._position||a.bd===e.bd&&a._position===e._position&&a.pl<e.pl?-1:a.bd===e.bd&&a._position===e._position&&a.pl===e.pl?0:1};XODText.Vp.prototype={_init:function(){this.Gt=[]},_add:function(a){this.Gt.add(a)},_clear:function(){this.Gt.clear()},LN:function(a,e){e.clear();for(var c=[],b=S.Re.getEnumerator(this.Gt);b.yh();){var d=b.current;c.add(d)}c.sort(XODText.Vp.KN);for(var b="",g,k=[],h=[],l=XODText.yt.yD,n=0;n<c.length;++n)if(d=c[n],!(0>d.bd||
d.bd>=a.length||0>d._position||0>=d.pl)){if(-1!==d.bd){k=a[d.bd].text;if(!k.ready())return!1;b=k.Xa;g=k.Xc;k=k.he();if(!b.length||b.length!==g.length||8*b.length!==k.length)continue;for(var l=XODText.yt.yD,m=S.Re.getEnumerator(g);m.yh();){var q=m.current;q>l&&(l=q)}h.clear();for(var p=0;p<l+1;++p)h.add(-1);for(p=0;p<g.length;++p)m=g[p],0<=m&&(h[m]=p)}g=Array(8);for(m=d._position;m<d._position+d.pl&&!(m>l);++m)if(q=h[m],!(0>q)){for(p=0;8>p;++p)g[p]=k[8*q+p];var u=!1;if(1<=e.length&&(p=e[e.length-1],
p.bd===d.bd)){var r=g[0]-g[2],v=g[1]-g[3];XODText.$a.Mt(p.gg,g,!0,Math.sqrt(r*r+v*v))&&(u=b.charAt(q),p.Dy.insert(p.Dy.length,u),u=!0)}u||(u=b.charAt(q),q=new XODText.ly,q.Xp(d.bd,u,g),e.add(q))}}return 0<e.length},Gt:null};XODText.Up=function(){};XODText.Up.prototype={Xp:function(a,e,c){this.bd=a;this._position=e;this.pl=c},bd:0,_position:0,pl:0};XODText.ly=function(){};XODText.ly.prototype={Xp:function(a,e,c){this.bd=a;this.Dy=e;this.gg=Array(8);for(a=0;8>a;++a)this.gg[a]=c[a]},bd:0,Dy:null,gg:null};
XODText.Ut=function(){this.sf=new XODText.Ma;this.uy=new XODText.Ma};XODText.Ut.prototype={sf:null,uy:null,Th:null,Uh:null};XODText.gb=function(){};XODText.lc=function(){};XODText.we=function(){this.zn={};this.dg=0;this.ab=this.un=this.Ft=this.Hd=-1;this.ty=this.Ij=this.It=this.ql=!1;this.qf=[];this.Mc=[];this.eg=[];this.ib=this.Pa="";this.Jd=[];this.Yg=[];this.vn=[];this.ry=[];this.Na={};this.Na[" "]=null;this.Na["\t"]=null;this.Na["\n"]=null;this.Na["."]=null;this.Na[","]=null;this.Na["?"]=null;
this.Na[":"]=null;this.Na[";"]=null;this.Na['"']=null;this.Na["'"]=null;this.Na["<"]=null;this.Na[">"]=null;this.Na["`"]=null;this.Na["~"]=null;this.Na["!"]=null;this.Na["@"]=null;this.Na["#"]=null;this.Na.$=null;this.Na["%"]=null;this.Na["^"]=null;this.Na["&"]=null;this.Na["("]=null;this.Na[")"]=null;this.Na["["]=null;this.Na["]"]=null;this.Na["{"]=null;this.Na["}"]=null;this.Na["|"]=null;this.Na._=null;this.Na["\\"]=null;this.Na["-"]=null;this.Na["="]=null;this.Na["+"]=null;this.Na["/"]=null;this.Na["*"]=
null};XODText.we.fh=function(a,e){for(var c=0,b=a.length-1,d=Math.floor((c+b)/2);a[d]!==e&&c<b;)e<a[d]?b=d-1:e>a[d]&&(c=d+1),d=Math.floor((c+b)/2);return a[d]!==e?!1:!0};XODText.we.prototype={dP:function(a,e,c,b,d){this.It=!1;this.ze=a.Sb();if(0>this.ze.length||0>e.length||0<=b&&b>d)return!1;this.dg=c;if(!this.$E(e))return!1;a=b;e=this.ze.length;if(0>a)if(0>d)a=0,d=e-1;else return!1;else if(d<a)return!1;console.assert(0<=a&&a<=d);if(a>=e||d>=e)return!1;this.Ft=a;this.un=d;this.Hd=this.uh()?this.un:
this.Ft;++this.un;this.ib=this.Pa="";this.Yg.clear();this.vn.clear();this.qf.clear();this.Mc.clear();this.It=!0;this.ab=-1;this.ql=!1;return!0},run:function(a){var e=-1,c=-1,b=-1,d="",g="",k=new XODText.Vp;k._init();k._clear();if(!this.It||0>=this.rl.text.length)return new XODText.Ph(XODText.lc.Il,b,d,g,e,c);for(var h="",l=-1,n=-1;;){if(this.Hd===this.un)return new XODText.Ph(XODText.lc.Il,b,d,g,e,c);var m=!0;if(!this.Pa.length||this.ab===this.Pa.length){if(!this.uh()){if(this.ab===this.Pa.length){if(this.HI()&&
!this.ql)return this.ql=!0,b=this.Hd,new XODText.Ph(XODText.lc.Hu,b,d,g,e,c);++this.Hd}if(this.Hd===this.un)return new XODText.Ph(XODText.lc.Il,b,d,g,e,c)}else if(this.ab===this.Pa.length){if(this.HI()&&!this.ql)return this.ql=!0,b=this.Hd,new XODText.Ph(XODText.lc.Hu,b,d,g,e,c);if(this.Hd===this.Ft)return new XODText.Ph(XODText.lc.Il,b,d,g,e,c);--this.Hd}(m=this.ey(this.Hd))?this.uh()?(this.ab=this.Pa.length,--this.ab):this.ab=0:this.ab=0}this.ql=!1;m&&(console.assert(this.ab!==this.Pa.length),c=
this.SN(k),h=c.jy,l=c.rt,n=c.qt,g=c.bt,e=c.Tt,c=c.St);if(m&&l!==this.Pa.length){console.assert(0<h.length);d=h;b=this.Hd;this.uh()?(this.ab=l)?--this.ab:this.ab=this.Pa.length:this.ab=n;if(this.mr())for(a.clear(),h=[],k.LN(this.ze,h),k=0;k<h.length;++k)l=new XODText.$a,n=h[k],l.x1=n.gg[0],l.y1=n.gg[1],l.x2=n.gg[2],l.y2=n.gg[3],l.Im=n.gg[4],l.Km=n.gg[5],l.Jm=n.gg[6],l.Lm=n.gg[7],a.add(l);return new XODText.Ph(XODText.lc.Gq,b,d,g,e,c)}this.ab=this.Pa.length}},$E:function(a){if(0>=a.length)return!1;
for(var e="",c=a.length,b=!1,d=0;d<c;++d){var g=this.Pt(a.charAt(d));" "===g?b||(e+=g,b=!0):(b=!1,e+=g)}this.CE=e;this.eg.clear();a="";for(d=0;d<e.length;++d)g=e.charAt(d),this.nl(g)?this.eg.add(a.length-1):a+=g;this.zv()||(a=a.toLowerCase());this.rl=this.NT()?new XODText.Ox(a,"r"):this.YT()?new XODText.Ox(a,"w"):new XODText.Ox(a,"");d=this.Ij;this.rl.text.length?this.Ij=!1:(this.rl.text=e,this.eg.clear(),this.Ij=!0);this.Ij!==d&&0<this.Pa.length&&!this.ey(this.Hd)&&(this.ab=this.Pa.length);return!0},
setMode:function(a){var e=this.mr(),c=this.zv(),b=this.uh();this.dg=a;var d=this.mr();a=this.zv();var g=this.uh(),k=!1;c!==a&&this.$E(this.CE);if(!(0>=this.Pa.length)){e!==d&&d&&!k&&(console.assert(0<=this.ab&&this.ab<=this.Pa.length),this.ey(this.Hd),k=!0);if(c!==a&&!k){console.assert(this.Jd.length===this.Pa.length);console.assert(this.Jd.length<=this.ib.length);e=this.Pa.length;c="";for(d=0;d<e;++d)console.assert(0<=this.Jd[d]&&this.Jd[d]<this.ib.length),c+=this.Pt(this.ib.charAt(this.Jd[d]));
this.Pa=c;a||(this.Pa=this.Pa.toLowerCase())}if(b!==g)if(console.assert(0<=this.ab&&this.ab<=this.Pa.length),this.ab!==this.Pa.length)if(g)for(d=0;2>d;++d)this.ab&&--this.ab;else for(d=0;2>d;++d)this.ab!==this.Pa.length&&++this.ab;else g?(this.ab=this.Pa.length,--this.ab):this.ab=0}},mr:function(){return 0<(this.dg&XODText.gb.CG)},CT:function(){return 0<(this.dg&XODText.gb.AG)},zv:function(){return 0<(this.dg&XODText.gb.BG)},YT:function(){return 0<(this.dg&XODText.gb.GG)},NT:function(){return 0<(this.dg&
XODText.gb.EG)},XT:function(){return 0<(this.dg&XODText.gb.FG)},uh:function(){return 0<(this.dg&XODText.gb.Ez)},HI:function(){return 0<(this.dg&XODText.gb.DG)},SN:function(a){var e,c,b,d=this.CN();c=d.rt;b=d.qt;ambient=d.bt;var g=d.Tt,k=d.St;if(c===this.Pa.length)return d;var h,l;e=this.QN(0,0,c,b,b-c);h=e.WE;l=e.fE;for(var n="",m=h;m<l;++m)n+=this.ib.charAt(m);e=n;n="";if(this.CT()){var q=h,p=l,g=this.ib.length,u=k=0,r=m=!1,v=!1;if(q)for(--q;q;){var w=this.ib.charAt(q);m&&this.Rh(w)&&u++;m||!v||
this.Rh(w)||(m=r=!0);if(30<=k||0<u){q++;break}if(this.Yg.length>q&&-2===this.Yg[q]){var z=this.ib.charAt(q+1);if("A"<=z&&"Z">=z){++q;r=!0;break}}--q;k++;v=v||this.Rh(w)||"\n"===w}r||(q=h);m=p;for(u=0;p!==g;){this.Rh(this.ib.charAt(p))&&(m=p-1,u++);if(10<=u||70<=k){p===g-1||this.Rh(this.ib.charAt(p+1))||(p=m);break}p++}p===g&&--p;for(m=q;m<=p;++m)g=this.ib.charAt(m),n="\n"===g?n+" ":n+g;g=h-q;k=l-q}d.bt=n;if(this.mr()){console.assert(this.ib.length===this.Yg.length);console.assert(l>=h);n=l-h;u=[];
for(m=h;m<l;++m)u.insert(u.length,this.Yg[m]);for(h=0;h<n&&0>u[h];)++h;for(m=l=h;h<n;)if(q=u[h],h===n-1)r=this.Hd,q=u[m],p=u[h],0>p&&(p=u[l]),console.assert(0<=r&&0<=q&&p>=q),v=new XODText.Up,v.Xp(r,q,p-q+1),a._add(v),++h;else if(-1===q)console.assert(0<=u[l]),++h;else if(-2===q){console.assert(0<=u[l]);r=this.Hd;q=u[m];p=u[l];console.assert(0<=r&&0<=q&&p>=q);v=new XODText.Up;v.Xp(r,q,p-q+1);a._add(v);for(++h;h<n&&0>u[h];)++h;m=l=h}else 0<=q&&(console.assert(0<=u[l]),l===h||this.NN(u,l,h)?(l=h,++h):
(r=this.Hd,q=u[m],p=u[l],console.assert(0<=r&&0<=q&&p>=q),v=new XODText.Up,v.Xp(r,q,p-q+1),a._add(v),m=l=h))}d.jy=e;d.rt=c;d.qt=b;d.Tt=g;d.St=k;return d},tn:null,Pb:null,jE:function(f){return f.replace(a,"\\$&")},pO:function(a,e,c){Object.qr(this.zn,a.text)?this.Pb=this.zn[a.text]:(this.Pb=a.II?{re:new RegExp(a.text,"g"),matches:null}:{re:new RegExp(this.jE(a.text),"g"),matches:null},this.zn[a.text]=this.Pb);this.Pb.re.lastIndex=c;this.tn=this.Pb.re.exec(e);return null!=this.tn?{start:this.Pb.re.lastIndex-
this.tn[0].length,length:this.tn[0].length}:{start:-1,length:0}},qO:function(a,e,c){this.Pb=null;Object.qr(this.zn,a.text)&&(this.Pb=this.zn[a.text]);if(null===this.Pb||null==this.Pb.matches)this.Pb=a.II?{re:new RegExp(a.text,"g"),matches:[],aC:null}:{re:new RegExp(this.jE(a.text),"g"),matches:[],aC:null},this.zn[a.text]=this.Pb;if(this.Pb.aC!==e){for(this.Pb.matches=[];null!==(this.tn=this.Pb.re.exec(e));)this.Pb.matches.push({start:this.tn.index,end:this.Pb.re.lastIndex});this.Pb.aC=e}if(0<this.Pb.matches.length)for(a=
this.Pb.matches.length-1;0<=a;a--)if(this.Pb.matches[a].end<c)return{start:this.Pb.matches[a].start,length:this.Pb.matches[a].end-this.Pb.matches[a].start};return{start:-1,length:0}},CN:function(){var a,e,c,b;c=this.ab;for(b=this.Pa.length;;){var d=!1;console.assert(0<this.rl.text.length);if(this.uh()){if(c===b){a=e=b;break}e=this.qO(this.rl,this.Pa,c)}else e=this.pO(this.rl,this.Pa,c);a=e.start;if(0>a){a=e=b;break}e=e.start+e.length;this.uh()?(c=a,0!==c?--c:c=b):c=e;if(!this.Ij)if(0<this.eg.length)if(this.qf.length||
this.Mc.length){for(var g=this.Mc.length,k=this.qf.length,h=a-0,l=S.Re.getEnumerator(this.eg);l.yh();){var n=l.current,n=h+n;if(!XODText.we.fh(this.qf,n)&&!XODText.we.fh(this.Mc,n)){d=!0;break}}if(d)continue;for(var l=a-0,m=e-0-1,q=n=this.qy(this.Mc,l);q!==g;++q){var p=this.Mc[q];if(p>=l&&p<m&&(n=p-h,!XODText.we.fh(this.eg,n))){d=!0;break}if(p>=m)break}if(d)continue;for(q=n=this.qy(this.qf,l);q!==k;++q){p=this.qf[q];if(p>=l&&p<m&&(n=p-h,!XODText.we.fh(this.eg,n))){d=!0;break}if(p>=m)break}if(d)continue}else continue;
else if(this.Mc.length)for(l=a-0,m=e-0-1,g=this.Mc.length,q=n=this.qy(this.Mc,l);q!==g&&(p=this.Mc[q],p>=l&&p<m||!(p>=m));++q);if(this.XT()){if(0!==a&&(p=a-0-1,!(XODText.we.fh(this.qf,p)||XODText.we.fh(this.Mc,p)||this.Rh(this.Pa.charAt(a))||this.Rh(this.Pa.charAt(a-1)))))continue;if(e!==b&&(p=e-0-1,!(XODText.we.fh(this.qf,p)||XODText.we.fh(this.Mc,p)||this.Rh(this.Pa.charAt(e-1))||this.Rh(this.Pa.charAt(e)))))continue}break}return new XODText.Nx("",a,e,"",-1,-1)},Rh:function(a){return Object.qr(this.Na,
a)?!0:this.Dt(a)||this.fO(a)},qy:function(a,e){var c=a.indexOf(e);0>c&&(c=~c);return c},Pt:function(a){a=a.charCodeAt(0);if(39===a||8217===a)a=39;else if(34===a||8220===a||8221===a)a=34;return String.fromCharCode(a)},nl:function(a){var e=a;a=a.charCodeAt(0);return"-"===e||8208===a||8209===a||65293===a||173===a},eO:function(a){var e=a;a=a.charCodeAt(0);return","===e||65292===a||65294===a},fO:function(a){var e=a;a=a.charCodeAt(0);return 32<a&&48>a||57<a&&65>a||90<a&&97>a||122<a&&127>a||this.eO(e)||
this.nl(e)||173===a||1642<=a&&(1645>=a||8210<=a&&8231>=a||8240<=a&&8269>=a||8592<=a&&9215>=a||12441<=a&&12444>=a||65281<=a&&65291>=a||65295===a||65306<=a&&65312>=a||65344===a||65371<=a&&65374>=a)?!0:!1},Dt:function(a){a=a.charCodeAt(0);return 32===a||1<=a&&31>=a||160===a||8192<=a&&(8207>=a||8232<=a&&8239>=a||8298<=a&&8303>=a)?!0:!1},ey:function(a){if(0>a||a>=this.ze.length)return!1;this.ib=this.Pa="";this.Jd.clear();this.qf.clear();this.Mc.clear();var e=this.mr(),c=[],b=[];if(e){var d=this.ze[a].text;
if(!d.ready())return!1;a=d.Xa;c=d.Xc;b=d.he();this.Yg.clear();this.ty&&this.ry.clear()}else{d=this.ze[a].text;if(!d.ready())return!1;a=d.Xa}if(0>=a.length)return!1;for(var d="",g=a.length,k=-1,h=0;h<g;++h){var l=a.charAt(h),n=-1;e&&(n=c[h]);if("\n"===l){for(l=h-1;0<=l&&" "===a.charAt(l);)--l;if(!(0>l||this.nl(a.charAt(l)))){for(l=h+1;l<g&&" "===a.charAt(l);)++l;l>=g||this.nl(a.charAt(l))||(d+=" ",this.Jd.add(this.ib.length),this.ib+=" ",e&&(k=k<n?n:k,this.Yx(n,b,8*h)))}}else if(" "===l)h<g-1&&("\n"===
a.charAt(h+1)||" "===a.charAt(h+1))||(d+=l,this.Jd.add(this.ib.length),this.ib+=l,e&&(k=k<n?n:k,this.Yx(n,b,8*h)));else{if(this.nl(l))if(this.Ij)d+=this.Pt(l),this.Jd.add(this.ib.length);else{var m=d.length-1;h<g-1&&"\n"===a.charAt(h+1)?this.qf.add(m):this.Mc.length&&m===this.Mc[this.Mc.length-1]||this.Mc.add(m)}else d+=this.Pt(l),this.Jd.add(this.ib.length);this.ib+=l;e&&(k=k<n?n:k,this.Yx(n,b,8*h))}}console.assert(d.length===this.Jd.length);this.Pa=d;if(e){g=this.Yg.length;this.vn.clear();for(h=
0;h<k+1;++h)this.vn.add(!0);for(h=0;h<g;++h)n=this.Yg[h],0<=n&&(this.vn[n]=!1)}this.zv()||(this.Pa=this.Pa.toLowerCase());this.qf.sort();this.Mc.sort();this.eg.sort();return!0},Yx:function(a,e,c){this.Yg.add(a);if(this.ty)for(a=c;a<c+8;++a)this.ry.add(e[a])},QN:function(a,e,c,b,d){c?(a=this.Jd[c-1],++a):a=0;b<this.Jd.length?e=this.Jd[b]:(e=this.Jd[b-1],e===this.ib.length-1&&++e);console.assert(a>=c&&e>=b&&e>=a);if(!this.Ij){if(!XODText.we.fh(this.eg,d-1))for(;0<e&&this.nl(this.ib.charAt(e-1));)--e;
c=this.ib.length;if(!XODText.we.fh(this.eg,-1))for(;a<c-1&&this.nl(this.ib.charAt(a));)++a;e<a&&(console.assert(!1),e=a)}return new XODText.Mx(a,e)},NN:function(a,e,c){console.assert(0<=e&&e<=c&&e<a.length&&c<a.length);e=a[e];a=a[c];if(e===a||e+1===a)return!0;for(c=!0;0<=e&&e<a-1;)if(!this.vn[++e]){c=!1;break}return c},It:!1,ze:null,dg:0,Na:null,Hd:0,Ft:0,un:0,ab:0,ql:!1,ib:null,Pa:null,Jd:null,Yg:null,vn:null,rl:null,Ij:!1,CE:null,qf:null,Mc:null,eg:null,ry:null,ty:!1};XODText.uj=function(a){this.ka=
"";this.Ht=-1;this.Da=[];this.Qa="";this.ze=a.Sb();this.Fb=new XODText.ve;this.Fb.Tb();this.mb=[];this.Kt=[];this.Jt=[]};XODText.uj.prototype={he:function(){for(var a=this.Da.length/8,e=[],c=0;c<a;++c){var b=new XODText.$a,d=8*c;b.YE(this.Da[d],this.Da[d+1],this.Da[d+2],this.Da[d+3],this.Da[d+4],this.Da[d+5],this.Da[d+6],this.Da[d+7]);e.add(b)}return e},Dt:function(a){a=a.charCodeAt(0);return 32===a||1<=a&&31>=a||160===a||8192<=a&&(8207>=a||8232<=a&&8239>=a||8298<=a&&8303>=a)?!0:!1},XE:function(a,
e){this.Da.clear();this.Qa="";e.normalize();var c=[],b="",d;for(d=a-1;d<a+2;d++)this.Kj(d)&&(c.push({idx:d,Rf:this.ka}),b+=this.ka);if(0===c.length||0===b.length||!this.Kj(a))return!1;var g=new XODText.Ma,k=Array(8),h,l,n=new XODText.Vb;n.Tb();var m,q=new XODText.Db;q.Tb();var p=[],u=!1;for(l=this.Fb.Tq();!l.ta(n);l=l.De())if(l.qb(g),g.normalize(),!e.Cr(g)){var r=[null,null],v=[null,null],w=-1;h=-1;for(m=l.Rb();!m.ta(q);m=m.ge())if(m.Uc(k),g.zm(k),!e.Cr(g)){h=m.ng();var z=m.Za();-1===w&&(w=z);d=p.length;
if(0<h&&0<d){u&&("\n"!==p[0]&&(this.Dt(p[d-1])?p[d-1]="\n":p.add("\n")),u=!1);for(d=0;d<p.length;++d)this.Qa+=p[d];p.clear()}for(d=0;d<=h;++d)z+d<this.ka.length&&(d<h?this.Qa+=this.ka.charAt(z+d):p.add(this.ka.charAt(z+d)));if(0<h){d=g.x2-g.x1;var C=g.y2-g.y1;this.$g(k,Math.sqrt(d*d+C*C)/h*3)}h=z+h}u=!0;r[0]=w;for(d=m=0;d<c.length;d++)if(c[d].idx===a){m+=r[0];break}else c[d].idx<a&&(m+=c[d].Rf.length);v[0]=b.substring(Math.max(0,m-100),m);if(-1!==h){r[1]=h;for(d=m=0;d<c.length;d++)if(c[d].idx===a){m+=
h;break}else c[d].idx<a&&(m+=c[d].Rf.length);v[1]=b.substr(m+1,100)}null!==r[0]&&null!==r[1]&&this.Jt.push(r);null!==v[0]&&null!==v[1]&&this.Kt.push(v)}return 0<this.Da.length},JN:function(){var a,e=new XODText.Vb;e.Tb();var c=Array(8),b=Array(8),d=.1,g=-100;for(a=this.Fb.Tq();!a.ta(e);a=a.De()){var k=new XODText.fa,h=new XODText.fa,l=new XODText.Db;l.Tb();var n=a.Rb(),m=new XODText.Db;m.Tb();for(var q=a.Rb();!q.ta(l);q=q.ge())m=q;n.zd(0,c);k.x=(c[0]+c[2]+c[4]+c[6])/4;k.y=(c[1]+c[3]+c[5]+c[7])/4;
m.zd(m.fc()-1,b);h.x=(b[0]+b[2]+b[4]+b[6])/4;h.y=(b[1]+b[3]+b[5]+b[7])/4;l=XODText.fa.distance(k,h);l>d&&(g=Math.atan2(h.y-k.y,h.x-k.x),g*=180/3.1415926,g=Math.round(g),0>g&&(g+=360),d=l)}this.vc=g;this.sy=2>Math.abs(this.vc)||2>Math.abs(this.vc-180)},tK:function(a,e){this.Da.clear();this.Qa="";e.normalize();var c=[],b="",d;for(d=a-1;d<a+2;d++)this.Kj(d)&&(c.push({idx:d,Rf:this.ka}),b+=this.ka);if(0===c.length||0===b.length||!this.Kj(a))return!1;var g=new XODText.Ma,k=Array(8),h,l,n,m=new XODText.Vb;
m.Tb();var q,p=new XODText.Db;p.Tb();var u=[],r=!1;for(n=this.Fb.Tq();!n.ta(m);n=n.De())if(n.qb(g),g.normalize(),!e.Cr(g)){var v=[null,null],w=[null,null],z=-1,C=!0;for(q=n.Rb();!q.ta(p);q=q.ge())if(q.Uc(k),g.zm(k),!e.Cr(g)){h=q.ng();var A=q.Za(),x=u.length;if(0<h&&0<x){r&&("\n"!==u[0]&&(this.Dt(u[x-1])?u[x-1]="\n":u.add("\n")),r=!1);for(d=0;d<u.length;++d)this.Qa+=u[d];u.clear()}var x=0,y=Array(8),F=Array(8),L=!1,E=!1;for(l=0;l<h;++l){var H=A+l;if(H<this.ka.length){d=Array(8);var G=new XODText.Ma;
q.zd(l,d);G.zm(d);if(e.Cr(G))0===x?L=!0:E=!0;else{z=H;x++;if(1===x){if(C){v[0]=H;for(d=C=0;d<c.length;d++)if(c[d].idx===a){C+=H;break}else c[d].idx<a&&(C+=c[d].Rf.length);w[0]=b.substring(Math.max(0,C-100),C);C=!1}L&&q.zd(l,y)}q.zd(l,F);l<h?this.Qa+=this.ka.charAt(H):u.add(this.ka.charAt(H))}}}"\n"!=u[h]&&u.push(" ");0<x&&(L&&this.gl(k,y,!0),E&&this.gl(k,F,!1),g.zm(k),h=g.x2-g.x1,A=g.y2-g.y1,this.$g(k,Math.sqrt(h*h+A*A)/x*3))}r=!0;if(-1!==z){v[1]=z;for(d=q=0;d<c.length;d++)if(c[d].idx===a){q+=z;break}else c[d].idx<
a&&(q+=c[d].Rf.length);w[1]=b.substr(q+1,100)}null!==v[0]&&null!==v[1]&&this.Jt.push(v);null!==w[0]&&null!==w[1]&&this.Kt.push(w)}return 0<this.Da.length},qS:function(a,e,c){for(var b=[],d=-1,g="",k=0;k<e.length;k++){var h=this.CS(a,e[k][0],e[k][1]);if(h.status)-1!==d||void 0===h.om||null===h.om||isNaN(h.om)||(d=h.om),h.om===d&&Array.prototype.push.apply(b,h.value),g+=this.Qa;else break}-1===d&&(d=0);return 0===b.length?{status:!1}:g.replace(/( |\n)/gm,"")!==c.replace(/( |\n)/gm,"")?{status:!1}:{status:!0,
value:b,om:d}},CS:function(a,e,c,b){if(20>=e.length||20>=c.length)return{status:!1};var d=[],g="",k=[],h=!0,l=0,n,m;for(n=a-1;n<a+2;n++)if(this.Kj(n))if(d.push({idx:n,Rf:this.ka}),g+=this.ka,null!==this.ze[n].text.wn){for(m=0;m<this.ze[n].text.wn.length;m++)k.push(this.ze[n].text.wn[m]+l);l+=this.ka.length}else h=!1;if(0===d.length||0===g.length)return{status:!1};l=[];n=0;h?(m=g.replace(/( |\n)/gm,""),e=e.replace(/( |\n)/gm,"")):m=g;for(;!(0===m.length||m.length<e.length||(a=m.indexOf(e),0>a));)l.push(n+
a+e.length),m=m.substr(a+1),n+=a+1;if(0===l.length)return{status:!1};e=[];n=l[0]+1;h?(m=g.replace(/( |\n)/gm,"").substring(l[0]+1),c=c.replace(/( |\n)/gm,"")):m=g.substring(l[0]+1);for(;!(0===m.length||m.length<c.length||(a=m.indexOf(c),0>a));)e.push(n+a),m=m.substr(a+1),n+=a+1;if(0===e.length)return{status:!1};c=[];for(n=0;n<l.length;n++)for(m=0;m<e.length;m++)if(l[n]+1<=e[m]&&(a=[],a.push(l[n]),a.push(e[m]),c.push(a)),1<c.length)return{status:!1};if(1!==c.length)return{status:!1};if(h){for(n=0;n<
k.length&&!(c[0][0]<k[n]);n++)c[0][0]++;for(n=0;n<k.length&&!(c[0][1]<k[n]);n++)c[0][1]++}h=[0,0];k=-1;for(n=l=0;n<d.length;n++){e=d[n].Rf;if(c[0][0]>=l&&c[0][0]<l+e.length){k=d[n].idx;h[0]=c[0][0]-l;break}l+=e.length}if(-1===k)return{status:!1};m=-1;for(n=l=0;n<d.length;n++){e=d[n].Rf;if(c[0][1]>=l&&c[0][1]<l+e.length){m=d[n].idx;h[1]=c[0][1]-l;break}l+=e.length}if(-1===m)return{status:!1};if(k===m)d=this.DA(k,h[0],h[1]-1);else{for(n=0;n<d.length&&d[n].idx!==k;n++);d=this.DA(k,h[0],d[n].Rf.length-
1);this.Qa=g.substring(c[0][0],c[0][1])}if(d.status){if(b&&this.Qa.replace(/( |\n)/gm,"")!==b.replace(/( |\n)/gm,""))return{status:!1};d.om=k;return d}return{status:!1}},rS:function(a,e,c){for(var b=[],d="",g=0;g<e.length;g++){var k=Number(e[g][0]),h=Number(e[g][1]);if(isNaN(k)||isNaN(h))return exports.utils.warn("getRectangularSelectionFromTextIndices: could not parse index-based selectors as numbers."),{status:!1};k=this.DA(a,k,h);if(k.status)Array.prototype.push.apply(b,k.value),d+=this.Qa;else return{status:!1}}return 0===
b.length?{status:!1}:d.replace(/( |\n)/gm,"")!==c.replace(/( |\n)/gm,"")?{status:!1}:{status:!0,value:b}},DA:function(a,e,c,b){if(!this.Kj(a))return{status:!1};var d=new XODText.Db;d.Tb();a=new XODText.Vb;a.Tb();this.Qa=this.ka.substring(e,Math.min(c+1,this.ka.length));if(b&&this.Qa.replace(/( |\n)/gm,"")!==b.replace(/( |\n)/gm,""))return{status:!1};b=0;for(var g,k;;){if(b>=this.mb.length)return{status:!1};g=this.mb[b].Th;k=this.mb[b].Uh;if(k.hd().Za()+k.hd().fc()>=e&&g.Rb().Za()<=e)break;b++}for(var h=
this.mb[b],l=h.Th;;){if(l.ta(a))return{status:!1};if(this.Xh(l.lh())){if(l.hd().Za()+l.hd().fc()>=e&&l.Rb().Za()<=e)break;if(l.ta(h.Uh)||l.ta(a))return{status:!1};l=l.De()}}for(var n=l.Rb();;){if(n.ta(d))return{status:!1};if(n.Za()+n.fc()>=e&&n.Za()<=e)break;n=n.ge()}for(var m=0;;){if(m>=this.mb.length)return{status:!1};g=this.mb[m].Th;k=this.mb[m].Uh;if(k.hd().Za()+k.hd().fc()>=c&&g.Rb().Za()<=c)break;m++}for(var q=this.mb[m].Th;;){if(q.ta(a))return{status:!1};if(this.Xh(q.lh())){if(q.hd().Za()+
q.hd().fc()>=c&&q.Rb().Za()<=c)break;if(q.ta(h.Uh))return{status:!1};q=q.De()}}for(h=q.Rb();;){if(h.ta(d))return{status:!1};if(h.Za()+h.fc()>=c&&h.Za()<=c)break;h=h.ge()}for(var d=[],p=Array(4),u=b;u<=m;u++)if(g=this.mb[u].Th,k=this.mb[u].Uh,u===b&&u!==m)for(g=l;!g.ta(a);g=g.De()){if(this.Xh(g.lh())){var r=Array(8);g.ta(l)?n.ko(Math.min(e-n.Za(),n.fc()-1),r):(g.Rb().qb(p),r[0]=p[0],r[1]=p[3],r[6]=p[0],r[7]=p[1]);g.hd().qb(p);r[2]=p[2];r[3]=p[3];r[4]=p[2];r[5]=p[1];d.push(r);if(g.ta(k))break}}else if(u!==
b&&u===m)for(;;g=g.De()){if(g.ta(a))return{status:!1};if(this.Xh(g.lh())&&(r=Array(8),g.ta(q)?h.ko(Math.min(c-h.Za(),h.fc()-1),r):(g.hd().qb(p),r[2]=p[2],r[3]=p[3],r[4]=p[2],r[5]=p[1]),g.Rb().qb(p),r[0]=p[0],r[1]=p[3],r[6]=p[0],r[7]=p[1],d.push(r),g.ta(q)))break}else if(u===b&&u===m)for(g=l;;g=g.De()){if(g.ta(a))return{status:!1};if(this.Xh(g.lh())&&(r=Array(8),g.ta(l)&&!g.ta(q)?(n.ko(Math.min(e-n.Za(),n.fc()-1),r),g.hd().qb(p),r[2]=p[2],r[3]=p[3],r[4]=p[2],r[5]=p[1]):!g.ta(l)&&g.ta(q)?(h.ko(Math.min(c-
h.Za(),h.fc()-1),r),g.Rb().qb(p),r[0]=p[0],r[1]=p[3],r[6]=p[0],r[7]=p[1]):g.ta(l)&&g.ta(q)?(n.ko(Math.min(e-n.Za(),n.fc()-1),r),p[0]=r[6],p[1]=r[7],p[2]=r[2],p[3]=r[3],h.ko(Math.min(c-h.Za(),h.fc()-1),r),r[0]=p[0],r[1]=p[3],r[6]=p[0],r[7]=p[1]):(g.Rb().qb(p),r[0]=p[0],r[1]=p[3],r[6]=p[0],r[7]=p[1],g.hd().qb(p),r[2]=p[2],r[3]=p[3],r[4]=p[2],r[5]=p[1]),d.push(r),g.ta(q)))break}else for(;!(g.ta(a)||this.Xh(g.lh())&&(r=Array(8),g.Rb().qb(p),r[0]=p[0],r[1]=p[3],r[6]=p[0],r[7]=p[1],g.hd().qb(p),r[2]=p[2],
r[3]=p[3],r[4]=p[2],r[5]=p[1],d.push(r),g.ta(k)));g=g.De());return{status:!0,value:d}},rK:function(a,e){this.Da.clear();this.Qa="";var c=[],b="",d;for(d=a-1;d<a+2;d++)this.Kj(d)&&(c.push({idx:d,Rf:this.ka}),b+=this.ka);if(0===c.length||0===b.length||!this.Kj(a))return!1;var g,k,h,l,n=Array(8),m=Array(8),q=new XODText.Ma,p=new XODText.Vb,u=new XODText.Vb;p.Tb();u.Tb();var r=this.sy,v=this.sy,w,z=new XODText.Vb;z.Tb();var C=new XODText.Db;C.Tb();var A=new XODText.fa;A.init(e.x1,e.y1);var x=new XODText.fa;
x.init(e.x2,e.y2);u=this.RN(A,x,p,u);p=u.nE;u=u.zE;if(p.ta(z)||u.ta(z))return!1;x=new XODText.Db;A=new XODText.Db;x.Tb();A.Tb();k=g=XODText.fd.Rk;for(var y=p.Rb();!y.ta(C);y=y.ge())y.qb(n),r?(d=e.x1,w=e.y1):(w=n[0],n[0]=n[1],n[1]=w,w=n[2],n[2]=n[3],n[3]=w,d=e.y1,w=e.x1),h=(n[3]+n[1])/2,n[2]<=d?(l=n[2]-d,h-=w,h=l*l+h*h):n[0]>=d?(l=n[0]-d,h-=w,h=l*l+h*h):(h-=w,h*=h),h<g&&(g=h,x=y);for(y=u.Rb();!y.ta(C);y=y.ge())y.qb(n),v?(d=e.x2,w=e.y2):(w=n[0],n[0]=n[1],n[1]=w,w=n[2],n[2]=n[3],n[3]=w,d=e.y2,w=e.x2),
h=(n[3]+n[1])/2,n[2]<=d?(l=n[2]-d,h-=w,h=l*l+h*h):n[0]>=d?(l=n[0]-d,h-=w,h=l*l+h*h):(h-=w,h*=h),h<k&&(k=h,A=y);if(x.ta(C)||A.ta(C))return!1;w=y=0;k=g=XODText.fd.Rk;var F=x.fc();for(d=0;d<F;++d)x.zd(d,n),l=(n[0]+n[2]+n[4]+n[6])/4,h=(n[1]+n[3]+n[5]+n[7])/4,l-=e.x1,h-=e.y1,h=l*l+h*h,h<g&&(g=h,y=d);F=A.fc();for(d=0;d<F;++d)A.zd(d,n),l=(n[0]+n[2]+n[4]+n[6])/4,h=(n[1]+n[3]+n[5]+n[7])/4,l-=e.x2,h-=e.y2,h=l*l+h*h,h<k&&(k=h,w=d);g=y+x.Za();k=w+A.Za();k<g&&(d=g,g=k,k=d);this.Jt.push([g,k]);h=[null,null];for(d=
l=0;d<c.length;d++)if(c[d].idx===a){l+=g;break}else c[d].idx<a&&(l+=c[d].Rf.length);h[0]=b.substring(Math.max(0,l-100),l);for(d=g=0;d<c.length;d++)if(c[d].idx===a){g+=k;break}else c[d].idx<a&&(g+=c[d].Rf.length);h[1]=b.substr(g+1,100);null!==h[0]&&null!==h[1]&&this.Kt.push(h);k=p.nb;d=u.nb;c=x.nb;b=A.nb;if(k===d){c>b&&(k=x,x=A,A=k,k=y,y=w,w=k);p.qb(q);if(c===b&&y===w&&(k=new XODText.Ma,!k.wv(q,e)))return!1;c===b?(w<y&&(k=y,y=w,w=k),k=w):k=x.ng();x.zd(y,n);console.assert(r===v);r=x.Za();console.assert(y<=
k);for(v=y;v<=k;++v)r+v<this.ka.length&&(this.Qa+=this.ka.charAt(r+v));0<=k&&(x.Uc(m),r=m[0]-m[2],v=m[1]-m[3],r=Math.sqrt(r*r+v*v),r=r/(k+1)*3,this.gl(m,n,!0),c===b&&(q=Array(8),A.zd(w,q),this.gl(m,q,!1)),this.$g(m,r));for(y=x=x.ge();!y.ta(C)&&y.nb<A.nb;y=y.ge()){k=y.ng();r=y.Za();for(v=0;v<=k;++v)r+v<this.ka.length&&(this.Qa+=this.ka.charAt(r+v));0<k&&(y.Uc(m),r=m[0]-m[2],v=m[1]-m[3],r=Math.sqrt(r*r+v*v),r=r/k*3,this.$g(m,r))}A.zd(w,n);k=A.ng();if(c!==b){r=A.Za();console.assert(w<=k);for(v=0;v<=
w;++v)r+v<this.ka.length&&(this.Qa+=this.ka.charAt(r+v));0<k&&(A.Uc(m),r=m[0]-m[2],v=m[1]-m[3],r=Math.sqrt(r*r+v*v),r=r/k*3,this.gl(m,n,!1),this.$g(m,r))}}else{k>d&&(r=p,p=u,u=r,k=x,x=A,A=k,k=y,y=w,w=k);p.qb(q);k=new XODText.Ma;k.wv(q,e)||(x=p.Rb(),y=0);x.zd(y,n);k=x.ng();r=x.Za();console.assert(y<=k);for(v=y;v<=k;++v)r+v<this.ka.length&&(this.Qa+=this.ka.charAt(r+v));0<k&&(x.Uc(m),r=m[0]-m[2],v=m[1]-m[3],r=Math.sqrt(r*r+v*v),r=r/k*3,this.gl(m,n,!0),this.$g(m,r));for(y=x=x.ge();!y.ta(C);y=y.ge()){k=
y.ng();r=y.Za();for(v=0;v<=k;++v)r+v<this.ka.length&&(this.Qa+=this.ka.charAt(r+v));0<k&&(y.Uc(m),r=m[0]-m[2],v=m[1]-m[3],r=Math.sqrt(r*r+v*v),r=r/k*3,this.$g(m,r))}for(p=p.De();!p.ta(u)&&!p.ta(z);p=p.De())if(this.Xh(p.lh()))for(p.qb(q),y=p.Rb();!y.ta(C);y=y.ge()){k=y.ng();r=y.Za();for(v=0;v<=k;++v)r+v<this.ka.length&&(this.Qa+=this.ka.charAt(r+v));0<k&&(y.Uc(m),r=m[0]-m[2],v=m[1]-m[3],r=Math.sqrt(r*r+v*v),r=r/k*3,this.$g(m,r))}u.qb(q);k=new XODText.Ma;k.wv(q,e)||(A=u.eI(u.ph()-1),w=A.fc()-1);for(y=
u.Rb();!y.ta(C)&&!y.ta(A);y=y.ge()){k=y.ng();r=y.Za();for(v=0;v<=k;++v)r+v<this.ka.length&&(this.Qa+=this.ka.charAt(r+v));0<k&&(y.Uc(m),r=m[0]-m[2],v=m[1]-m[3],r=Math.sqrt(r*r+v*v),r=r/k*3,this.$g(m,r))}A.zd(w,n);k=A.ng();r=A.Za();console.assert(w<=k);for(v=0;v<=w;++v)r+v<this.ka.length&&(this.Qa+=this.ka.charAt(r+v));0<k&&(A.Uc(m),r=m[0]-m[2],v=m[1]-m[3],r=Math.sqrt(r*r+v*v),r=r/k*3,this.gl(m,n,!1),this.$g(m,r))}return 0<this.Da.length},Kj:function(a){if(0>a||a>=this.ze.length)return!1;if(0>=this.Ht||
this.Ht!==a){var e=this.ze[a].text;if(null==e||!e.ready())return!1;this.Fb=e;this.ka=this.Fb.Xa;this.JN();this.IN();this.Ht=a}return!0},$g:function(a,e){var c=this.Da.length/8;if(c){for(var b=Array(8),c=8*(c-1),d=0;8>d;++d)b[d]=this.Da[c+d];if(XODText.$a.Mt(b,a,!0,e))for(d=0;8>d;++d)this.Da[c+d]=b[d];else for(d=0;8>d;++d)this.Da.add(a[d])}else for(var d=0;8>d;++d)this.Da.add(a[d])},gl:function(a,e,c){var b=new XODText.fa;b.init(a[0],a[1]);var d=new XODText.fa;d.init(a[2],a[3]);var g=XODText.fa.vg(d,
b);g.normalize()&&(c?(d=new XODText.fa,d.init(e[0],e[1]),e=XODText.fa.vg(d,b).cc(g),g=XODText.fa.multiply(g,e),a[0]+=g.x,a[1]+=g.y,a[6]+=g.x,a[7]+=g.y):(b=new XODText.fa,b.init(e[2],e[3]),e=XODText.fa.vg(b,d).cc(g),g=XODText.fa.multiply(g,e),a[2]+=g.x,a[3]+=g.y,a[4]+=g.x,a[5]+=g.y))},tE:function(a){var e=XODText.Matrix2D.rotationMatrix(0),c=XODText.Matrix2D.rotationMatrix(1.570796325),b=XODText.Matrix2D.rotationMatrix(3.14159265),d=XODText.Matrix2D.rotationMatrix(3.14159265*1.5);switch(parseInt(a/
90+.1)){case 0:return e;case 1:return c;case 2:return b;case 3:return d;case 4:return e;default:return e}},Xh:function(){return!0},eF:function(a,e){var c=this.tE(e),b=new XODText.Fd(a.x1,a.y1),b=c.W(b);a.x1=b.x;a.y1=b.y;b=new XODText.Fd(a.x2,a.y2);b=c.W(b);a.x2=b.x;a.y2=b.y;a.normalize()},IN:function(){this.mb.clear();var a,e=new XODText.Vb;e.Tb();var c=new XODText.Ma,b=new XODText.Ut,d=!1;for(a=this.Fb.Tq();!a.ta(e);a=a.De())if(this.Xh(a.lh())){a.qb(c);c.normalize();var g=new XODText.Ma;g.sh(c);
this.eF(c,this.vc);d?(this.mb.add(b),b=new XODText.Ut,b.uy.sh(g),b.sf.sh(c),b.Th=a,b.Uh=a):(b.uy.sh(g),b.sf.sh(c),b.Th=a,b.Uh=a,d=!0)}d&&this.mb.add(b)},kE:function(a,e){for(var c=XODText.fd.Rk,b=new XODText.Ma,d=a.Th,g=a.Th;;g=g.De()){if(!this.Xh(g.lh()))if(g.ta(a.Uh))break;else continue;g.qb(b);this.eF(b,this.vc);var k=(b.y1+b.y2)/2;Math.abs(k-e.y)<c&&(d=g,c=Math.abs(k-e.y));if(g.ta(a.Uh))break}return d},As:function(a,e,c){var b=XODText.fa.vg(e,a),d=XODText.fa.vg(c,a),g=d.cc(b);if(0>=g)return d.cc(d);
d=b.cc(b);if(d<=g)return c=XODText.fa.vg(c,e),c.cc(c);a=XODText.fa.Lo(a,XODText.fa.multiply(b,g/d));c=XODText.fa.vg(c,a);return c.cc(c)},zx:function(a,e){var c=this.As(new XODText.fa(e.x1,e.y1),new XODText.fa(e.x2,e.y1),a),b=this.As(new XODText.fa(e.x2,e.y1),new XODText.fa(e.x2,e.y2),a),d=this.As(new XODText.fa(e.x2,e.y2),new XODText.fa(e.x1,e.y2),a),g=this.As(new XODText.fa(e.x1,e.y2),new XODText.fa(e.x1,e.y1),a);return Math.min(c,b,d,g)},RN:function(a,e,c,b){var d=-1,g=-1,k=!1,h=!1,l=this.tE(this.vc),
n=new XODText.fa,m=new XODText.fa;n.vv(a);m.vv(e);a=new XODText.Fd(n.x,n.y);a=l.W(a);n.x=a.x;n.y=a.y;a=new XODText.Fd(m.x,m.y);a=l.W(a);m.x=a.x;m.y=a.y;e=0;for(var q=this.mb.length;e<q;++e)l=this.mb[e],0>d&&l.sf.contains(n.x,n.y)&&(d=e,h=!0),0>g&&l.sf.contains(m.x,m.y)&&(g=e,k=!0);if(!h||!k){a=[];for(l=0;l<this.mb.length;++l)a.add(0);var l=Math.max(d,g),p=new XODText.Ma;p.Ea(n.x,n.y,m.x,m.y);p.sT(.1);0<=l&&p.union(this.mb[l].sf);var u=new XODText.Ma;e=0;for(q=this.mb.length;e<q;++e){var r=new XODText.Ma;
r.sh(this.mb[e].sf);u.wv(r,p)&&(a[e]=1)}e=a.indexOf(1);for(p=q=a.indexOf(1);-1!==q;){p=q;q++;if(q>=a.length)break;q=a.indexOf(1,q)}q=p;if(0>e)return new XODText.Qs(c,b);0>l?(d=e,g=q,h=new XODText.Ma,h.sh(this.mb[d].sf),k=(n.x-h.x1)*(n.x-h.x2),k=0<k?Math.min(Math.abs(n.x-h.x1),Math.abs(n.x-h.x2)):0,l=(n.y-h.y1)*(n.y-h.y2),l=0<l?Math.min(Math.abs(n.y-h.y1),Math.abs(n.y-h.y2)):0,a=(m.x-h.x1)*(m.x-h.x2),a=0<a?Math.min(Math.abs(m.x-h.x1),Math.abs(m.x-h.x2)):0,e=(m.y-h.y1)*(m.y-h.y2),e=0<e?Math.min(Math.abs(m.y-
h.y1),Math.abs(m.y-h.y2)):0,k*k+l*l>a*a+e*e&&(h=d,d=g,g=h)):(p=new XODText.Ma,p.sh(this.mb[l].sf),a=new XODText.fa,h?a.vv(m):a.vv(n),console.assert(!(h&&k)&&!(!h&&!k)),console.assert(!p.contains(a.x,a.y)),l-e>Math.max(q-l,0)?(k=Math.min(l,e),p=q):(k=Math.max(l,q),p=e),k!=l&&(e=Array(3),q=Array(3),e[0]=this.zx(a,this.mb[p].sf),e[1]=this.zx(a,this.mb[k].sf),e[2]=this.zx(a,this.mb[l].sf),q[0]=p,q[1]=k,q[2]=l,k=1,e[0]<e[1]&&(k=0),e[2]<e[k]&&(k=2),k=q[k]),h?g=k:d=k)}0<=d&&0<=g&&(c=this.kE(this.mb[d],n,
c),b=this.kE(this.mb[g],m,b));return new XODText.Qs(c,b)},Da:null,Qa:null,ze:null,Fb:null,Ht:0,vc:0,sy:!1,mb:null};XODText.Ph=function(a,e,c,b,d,g){this.Fw=a;this.DB=e;this.WB=c;this.sF=b;this.jK=d;this.iK=g};XODText.Ph.prototype={Fw:0,DB:0,WB:null,sF:null,jK:0,iK:0};XODText.Qs=function(a,e){this.nE=a;this.zE=e};XODText.Qs.prototype={nE:null,zE:null};XODText.Mx=function(a,e){this.WE=a;this.fE=e};XODText.Mx.prototype={WE:0,fE:0};XODText.Nx=function(a,e,c,b,d,g){this.jy=a;this.rt=e;this.qt=c;this.bt=
b;this.Tt=d;this.St=g};XODText.Nx.prototype={jy:null,rt:0,qt:0,bt:null,Tt:0,St:0};XODText.yt.Oa("XODText._intData");XODText.Fd.Oa("XODText.Point2D");XODText.$a.Oa("XODText.Quad");XODText.Matrix2D.Oa("XODText.Matrix2D");XODText.Vp.Oa("XODText._highlights");XODText.Up.Oa("XODText._highlight");XODText.ly.Oa("XODText._highlightDocInfo");XODText.Ut.Oa("XODText._selectionTextBlock");XODText.gb.Oa("XODText.SearchMode");XODText.lc.Oa("XODText.ResultCode");XODText.we.Oa("XODText.TextSearchLowlevel");XODText.uj.Oa("XODText.TextLocator");
XODText.Ph.Oa("XODText.ResultRun");XODText.Qs.Oa("XODText.ResultFindStructuralBounds");XODText.Mx.Oa("XODText.ResultDetermineOriRange");XODText.Nx.Oa("XODText.ResultFindTexts");XODText.yt.yD=-2147483648;XODText.$a.LP=Math.cos(3.14159265/180*2);XODText.gb.BG=1;XODText.gb.FG=2;XODText.gb.Ez=4;XODText.gb.DG=8;XODText.gb.CG=16;XODText.gb.AG=32;XODText.gb.EG=64;XODText.gb.GG=128;XODText.lc.Il=0;XODText.lc.Hu=1;XODText.lc.Gq=2})();self.uc.vw("XODText");
XODText.Pg=function(){this.ZD={};this.vy=1E3;this.EE=200};XODText.Pg.prototype={FE:0,GE:0,vy:0,EE:0,Wz:function(a){var f=new XODText.Ma,e=this.ZD[a];"undefined"!=typeof e?f.sh(e):window.utils.warn("Character "+a+" does not have bounding box.");return f},bu:function(a,f,e){var c=new XODText.Ma;c.set(f,this.FE,e,this.GE);this.ZD[a]=c},Wo:function(a,f){this.FE=a;this.GE=f},SK:function(a){this.vy=a}};XODText.Hx=function(a){this.Qz={};this.md=!1;this.ma=a};
$.extend(XODText.Hx.prototype,{md:!1,isReady:function(){return this.md},u_:function(){return this.Qz},PB:function(a){try{var f=new window.Se(a);console.assert("FontInfo"===f.ua(),"Root element is incorrect.");"FontInfo"===f.ua()&&(f.oa(),this._parse(f))}catch(e){console.warn("Font Parser has encountered an error: "+e.message);return}this.md=!0},ut:function(a){var f="",e=0,c,b,d;for(2<=a.length&&"{"===a.charAt(0)&&"}"===a.charAt(1)&&(a=a.substr(2));e<a.length;)c=a.charCodeAt(e),128>c?(f+=String.fromCharCode(c),
e++):191<c&&224>c?(b=a.charCodeAt(e+1),f+=String.fromCharCode((c&31)<<6|b&63),e+=2):(b=a.charCodeAt(e+1),d=a.charCodeAt(e+2),f+=String.fromCharCode((c&15)<<12|(b&63)<<6|d&63),e+=3);return f},mO:function(a){a=a.K("name");console.assert(42===a.length,"Font file name is incorrect.");console.assert(null!=a,"Font file name is incorrect.");return window.ef.gA(this.ma,parseInt("0x"+a.substr(28,8)))},lO:function(a,f){console.assert(null!=f,"Font bbox file is corrupted.");var e=a.K("height");console.assert(null!=
e,"Height attribute is missing.");e=e.split(":");f.Wo(parseFloat(e[0]),parseFloat(e[1]))},nO:function(a,f){var e=a.K("units_per_em");null!=e&&f.SK(parseInt(e))},kO:function(a,f){console.assert(null!=f,"Font bbox file is corrupted.");var e=a.K("bbox");console.assert(null!=e,"Character width is missing.");var c=e.split(":"),e=parseFloat(c[0]),c=parseFloat(c[1]),b=this.ut(a.current.textContent);console.assert(0<b.length,"Char value is empty.");f.bu(b,e,c)},_parse:function(a){do{for(var f=null;a.advance();){var e=
a.ua();"Font"===e?(f=new XODText.Pg,e=this.mO(a),this.lO(a,f),this.nO(a,f),this.Qz[e]=f,a.oa()):"c"===e?this.kO(a,f):console.warn("Font XML parser has encountered a tag it can't process.")}a.Aa()}while(a.depth)}});XODText.Pg.Oa("XODText.Font");XODText.Hx.Oa("XODText.FontParser");
(function(a){function f(b){this.done=!1;this.worker=new Worker(a.o.mA()+"CoreWorker.js");var c=null,e=null,h=this;this.index=b;this.worker.addEventListener("message",function(b){switch(b.data.command){case "done":h.done=!0;e=null;break;case "nextChunk":c=b.data.resources;e=b.data.dataString;break;default:throw Error("Unknown message command "+b.data.command+" from worker");}h.done?(h.ru(null,[]),h.finish()):c&&e&&(h.ru(e,c),e=c=null)},!1);this.rY()}var e=[],c=[],b="../core/";f.prototype={setData:function(b,
a,c){this.ru=a;this.done=!1;this.worker.postMessage({command:"data",dataString:b,docId:c})},cancel:function(){this.worker.postMessage({command:"cancel"})},rY:function(){this.worker.postMessage({command:"options",imageScaling:a.o.My,specialBlendSupported:a.utils.specialBlendSupported,continueWithoutPrompt:0<a.Sm})},Uv:function(){this.worker.postMessage({command:"nextChunk"})},finish:function(){this.done=!0;if(c.length){var b=c[0];c.shift();this.setData(b.data,b.ru,b.ma);b.vT(this)}}};a.SS=function(b,
a,k,h){for(var l=e.length,n,m=0;m<l;++m)e[m].done&&(n=e[m]);n||4>l&&(n=e[l]=new f(l));n?(n.setData(b,h,a),k(n)):c.push({vT:k,data:b,ma:a,ru:h})};a.o=a.o||{};a.o.My=!1;a.o.yi=function(){return b};a.o.jX=function(d){d.lastIndexOf("/")!==d.length-1&&(d+="/");b=d}})(window);
(function(a){function f(){q.oB||(q.oB=createPromiseCapability());return q.oB}function e(b,d){var a=Error.apply(this,arguments);a.name=this.name="WorkerError";this.stack=a.stack;this.message=a.message;this.userMessage=d}function c(b){u.push(b);for(var d=0;d<r.length;++d)b(r[d])}function b(b,h,f){if(_.isUndefined(b))return null;var l,v=new Promise(function(d,g){c(function(){g(new e("The worker has encountered an error",a.utils.ie?"error.EmsWorkerErrorIE":"error.EmsWorkerError"))});var f={};k&&(f.workerHeapSize=
k);n&&(f.pdfResourcePath=n);m&&(f.pdfAsmPath=m);var v=window.location.href,u=v.lastIndexOf("/",v.lastIndexOf("#"));-1!==u&&(f.parentUrl=v.substring(0,u+1));l=new window.vN(b,h,f);l.tq=w.$z();l.PC.then(function(){d()},function(b){g(b)})}),u=new Promise(function(b,d){if(a.utils.isJSWorker&&a.jsworker&&a.jsworker.utils)"android"!==a.jsworker.platform&&"ios"!==a.jsworker.platform||!a.jsworker.utils.getResourcesDir?a.jsworker.utils.getHTMLContentPath?a.jsworker.utils.getHTMLContentPath(function(a){a?(a.endsWith("/")||
(a+="/"),b(a+"js/html5/pdf/")):d(new e("Couldn't fetch resource file path."))}):d(new e("Some functions required for fetching resources are not defined.")):a.jsworker.utils.getResourcesDir(function(a,c){a?d(a):b(c)});else{var c=new XMLHttpRequest;c.open("GET",window.o.gv()+"pdfnet.res",!0);c.responseType="arraybuffer";c.onload=function(){200===c.status?b(c.response):d(new e("Couldn't fetch resource file.","error.ResourceLoadError"))};c.onerror=function(){d(new e("Network error","error.ResourceLoadError"))};
c.send(null)}});return Promise.all([v,u]).then(function(b){var d=/(ENTERP|ENTCPU|WEBCPU|OEM):/;f&&!d.test(f)&&(f=void 0,console.warn("WebViewer is currently running in demo mode, please provide a commercial license key to remove demo stamps"));return a.utils.isJSWorker&&a.jsworker&&a.jsworker.utils?l.mU(b[1],f):l.lU(b[1],f)}).then(function(){"undefined"!==typeof d&&l.hC(d);"undefined"!==typeof g&&l.Mw(g);return l})["catch"](function(b){b.message&&-1!==b.message.indexOf("Bad License Key")&&(b.userMessage=
"error.InvalidLicenseKey");throw b;})}var d,g,k,h;a.Vw=a.utils.chromeHasSubzero;var l,n,m,q={},p,u=[],r=[],v=_.throttle(function(b){var d=u.length;r.push(b);for(var a=0;a<d;++a)u[a](b)},100,{trailing:!1});e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,configurable:!0}});a.o=a.o||{};var w=a.o,z;w.Yu=function(){return z};w.EK=function(b){z=b};w.kS=function(){return new Promise(function(b){var d;try{d=window.parent&&window.parent.WebViewer?window.parent.WebViewer.l(window.frameElement):
void 0,b(d)}catch(a){window.parent.postMessage("requestl","*"),$(window).on("message.l",function(d){d=d.originalEvent;"object"===typeof d.data&&"responsel"===d.data.type&&(b(d.data.value),$(window).off("message.l"))})}})};w.BH=function(b){return b?Promise.resolve(b):a._trnDebugMode?Promise.resolve():(""+location).split("").reverse().join("").match(/(moc\.nortfdp\.[^.]+\/\/|moc\.nortfdp\/\/)/)||a.jsworker?Promise.resolve(""):w.kS().then(function(b){return b?b:null})};w.AI=function(b){return!b||50>
b.length||"demo:"!==b.slice(0,5)?!1:0<b.slice(5,b.lastIndexOf(":")).match(/^[a-zA-Z0-9.!#$%&\u2019*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/).length};var C={};w.Tw=function(b){b.pdf&&(C.Qi=b.pdf);b.office&&(C.Fr=b.office)};w.Ff=function(){return C};w.hC=function(b){d=b;w.Ff().Qi&&w.Ff().Qi.then(function(d){d.hC(b)})};w.Mw=function(b){g=b;w.Ff().Qi&&w.Ff().Qi.then(function(b){b.Mw(g)})};w.KQ=function(b){a.utils.chromeHasSubzero&&(a.Vw=b)};w.KI=function(){return a.Vw};var A=a.PDFNet&&a.PDFNet.hasFullAPI;
w.IQ=function(b){A=b};w.Hi=function(){return A};w.JW=function(b){b.lastIndexOf("/")!==b.length-1&&(b+="/");l=b};w.aS=function(){return m||w.yi()+"pdf/"+(w.Hi()?"full/":"lean/")};w.HW=function(b){b.lastIndexOf("/")!==b.length-1&&(b+="/");m=b};w.qA=function(){return l||w.yi()+"pdf/"+(w.Hi()?"full/":"lean/")};w.IW=function(b){b.lastIndexOf("/")!==b.length-1&&(b+="/");n=b};w.gv=function(){return n||w.yi()+"pdf/"};w.aR=function(b){p=b};var x;w.lW=function(b){b.lastIndexOf("/")!==b.length-1&&(b+="/");x=
b};w.dA=function(){return x};var y;w.yW=function(b,d){d||b.lastIndexOf("/")===b.length-1||(b+="/");y=b};w.mA=function(){return y||w.yi()};w.hW=function(b){k=b};var F,L,E;w.pS=function(){return L};w.aA=function(){E||(E=new Promise(function(b){if(p)b(p);else if(a.utils.isJSWorker&&a.jsworker)b("jsworker");else if(a.utils.isPdfjs)b(void 0);else if(a.utils.isChrome){var d=!0,c=$('<embed name="simple_module" id="simple_module" width=0 height=0 src="'+window.o.gv()+'SimpleWorker.nmf" type="application/x-pnacl" style="position:absolute" />'),
g=c[0];g.addEventListener("error",function(){d&&(console.log("PNaClError: PNaCl failed to load. Falling back to Emscripten."),d=!1);b("ems")},!0);$(document.body).prepend(c);var e=!1,k=function(d){e||(b(d),clearTimeout(h),c.remove(),e=!0)};if("undefined"===typeof g.postMessage)d&&(console.log("PNaClError: PNaCl seems to be disabled. Falling back to Emscripten."),d=!1),k("ems");else{var h,f=function(){d&&(console.log("PNaClError: PNaCl Timed out. Falling back to Emscripten."),d=!1);k("ems")};g.addEventListener("progress",
function(){clearTimeout(h);h=setTimeout(f,5E3)});g.addEventListener("message",function(b){clearTimeout(h);"T"===b.data?k("pnacl"):(console.log("PNaClError: PNaCl responded incorrectly. Falling back to Emscripten."),k("ems"))});g.postMessage("T");h=setTimeout(f,5E3)}}else b("ems")}));return E};w.$z=function(){return q.tq};w.UR=function(){return f().promise};w.IJ=function(b,d,c){w.Ff().Qi&&b===w.$z()||(f().resolve(b),_.isUndefined(c)&&(c={}),c.workerId="pdf_pnacl_module",c.pnaclWorkerPath=window.o.qA()+
(a.Vw?"PDFWorkerSubzero.nmf":"PDFWorker.nmf"),c.emsWorkerPath=window.o.gv()+(k||n||m?"ResizableWorker.js":"PDFworker.js"),c.externalPath=window.o.dA(),c.QC=q,l&&(c.pdfWorkerPath=l),F=w.JJ(b,d,c))};w.JJ=function(b,d,g){g=g||{};var k;return new Promise(function(h,f){function l(b){function d(a){"object"===typeof a.data&&"action"in a.data&&"workerLoaded"===a.data.action&&(b.workerLoadingProgress&&b.workerLoadingProgress(1),k.removeEventListener("message",d))}var k;c(function(){f(new e("The worker has encountered an error",
a.utils.ie?"error.EmsWorkerErrorIE":"error.EmsWorkerError"))});var h=g.externalPath?"&externalPath="+encodeURIComponent(g.externalPath):"";k=g.emsWorkerPath.toLowerCase().startsWith("http")?new Worker(window.o.mA()+"CORSWorker.js#isfull="+w.Hi()+"&file="+encodeURIComponent(g.emsWorkerPath)+"&path="+encodeURIComponent(window.o.qA().slice(0,-9))):g.pdfWorkerPath?new Worker(g.emsWorkerPath+"?isfull="+w.Hi()+"&pdfWorkerPath="+encodeURIComponent(g.pdfWorkerPath)+h):new Worker(g.emsWorkerPath+"?isfull="+
w.Hi()+h);k.onerror=v;L=!0;k.addEventListener("message",d,!1);h=w.iM();w.MK(h?18E3/h:0);return k}function n(b,d){h(b);g.QC.tq=d}if("jsworker"===b)console.log("Attempting to load JSWorker"),a.utils.isJSWorker&&(k=a.jsworker.loadWorker(),console.log("JSWorker loaded!"),k&&k.getProcessId(function(b){console.log("Loaded worker in process: "+b)})),L=!1,n(k,"jsworker");else if("pnacl"===b){_.isUndefined(g.useEmscriptenWhileLoading)&&(g.useEmscriptenWhileLoading=!w.KI());L=!1;var m=$('<embed name="'+g.workerId+
'" id="'+g.workerId+'" width=0 height=0 src="'+g.pnaclWorkerPath+'" type="application/x-pnacl" style="position:absolute" />');$(document.body).prepend(m);var u=function(b){b.lengthComputable&&(g.useEmscriptenWhileLoading?(k.removeEventListener("progress",u,!0),k.removeEventListener("loadend",r,!0),k.removeEventListener("crash",p,!0),k.removeEventListener("error",q,!0),n(l(d),"ems"),k.addEventListener("loadend",function(){L=!1;g.QC.tq="pnacl";d.pnaclComplete&&d.pnaclComplete(k)})):d.workerLoadingProgress&&
d.workerLoadingProgress(b.loaded/b.total))},r=function(){d.workerLoadingProgress&&d.workerLoadingProgress(1);w.MK(1E3);n(k,"pnacl")},p=function(){f(new e("The Worker has Crashed.","error.PNaClCrashError"))},q=function(){console.log("PNaClError: Main worker encountered an error. Falling back to Emscripten.");n(l(d),"ems")};k=m[0];k.addEventListener("progress",u,!0);k.addEventListener("loadend",r,!0);k.addEventListener("crash",p,!0);k.addEventListener("error",q,!0)}else"ems"===b&&n(l(d),"ems")})};w.FV=
function(){F=null;C.Qi=null;C.Fr=null;q.oB=null};w.BI=function(){return h};w.uv=function(d,a,c){F||w.Ff().Qi||w.IJ(d,a);w.Yu()||w.EK(c);c=c||w.Yu();if(w.Ff().Qi){if(h&&c&&!w.AI(c))throw Error("PDFNet was already initialized in demo mode. For solution see pdftron.com/kb_demo_init. Note that calling initPDFWorkerTransports or creating WebViewer object will also call PDFNet.initialize so your license key should be used in all of these calls.");}else h=!c,d=Promise.all([w.BH(c),F]).then(function(d){h=
!d[0]||w.AI(d[0]);return b(d[1],L,d[0])}),w.Tw({pdf:d});return w.Ff().Qi};a.cl=e;w.aP=c})(window);(function(a){a.B_=function(){return 24}})("undefined"===typeof window?this:window);
(function(a){var f=a._trnDebugMode||a.GZ,e=a.hO?a.hO:{};a.utils=a.utils?a.utils:{};a.utils.warn=function(a,b){b||(b=a,a="default");f&&e[a]&&console.warn(a+": "+b)};a.utils.log=function(a,b){b||(b=a,a="default");f&&e[a]&&console.log(a+": "+b)};a.utils.error=function(a){f&&console.error(a);throw Error(a);};a.info=function(){};a.warn=function(c,b){a.utils.warn(c,b)};a.error=function(c){a.utils.error(c)}})("undefined"===typeof window?this:window);
(function(a){function f(b,d,a,g,k,h){this.Lk=16;this.AM=288;this.status=0;this.root=null;this.m=0;var f=Array(this.Lk+1),l,z,C,A,x,y,F,L=Array(this.Lk+1),E,H,G,J=new e,O=Array(this.Lk);A=Array(this.AM);var M,N=Array(this.Lk+1),I,D,B;B=this.root=null;for(x=0;x<f.length;x++)f[x]=0;for(x=0;x<L.length;x++)L[x]=0;for(x=0;x<O.length;x++)O[x]=null;for(x=0;x<A.length;x++)A[x]=0;for(x=0;x<N.length;x++)N[x]=0;l=256<d?b[256]:this.Lk;E=b;H=0;x=d;do f[E[H]]++,H++;while(0<--x);if(f[0]==d)this.root=null,this.status=
this.m=0;else{for(y=1;y<=this.Lk&&0==f[y];y++);F=y;h<y&&(h=y);for(x=this.Lk;0!=x&&0==f[x];x--);C=x;h>x&&(h=x);for(I=1<<y;y<x;y++,I<<=1)if(0>(I-=f[y])){this.status=2;this.m=h;return}if(0>(I-=f[x]))this.status=2,this.m=h;else{f[x]+=I;N[1]=y=0;E=f;H=1;for(G=2;0<--x;)N[G++]=y+=E[H++];E=b;x=H=0;do 0!=(y=E[H++])&&(A[N[y]++]=x);while(++x<d);d=N[C];N[0]=x=0;E=A;H=0;A=-1;M=L[0]=0;G=null;for(D=0;F<=C;F++)for(b=f[F];0<b--;){for(;F>M+L[1+A];){M+=L[1+A];A++;D=(D=C-M)>h?h:D;if((z=1<<(y=F-M))>b+1)for(z-=b+1,G=F;++y<
D&&!((z<<=1)<=f[++G]);)z-=f[G];M+y>l&&M<l&&(y=l-M);D=1<<y;L[1+A]=y;G=Array(D);for(z=0;z<D;z++)G[z]=new e;B=null==B?this.root=new c:B.next=new c;B.next=null;B.list=G;O[A]=G;0<A&&(N[A]=x,J.b=L[A],J.e=16+y,J.t=G,y=(x&(1<<M)-1)>>M-L[A],O[A-1][y].e=J.e,O[A-1][y].b=J.b,O[A-1][y].n=J.n,O[A-1][y].t=J.t)}J.b=F-M;H>=d?J.e=99:E[H]<a?(J.e=256>E[H]?16:15,J.n=E[H++]):(J.e=k[E[H]-a],J.n=g[E[H++]-a]);z=1<<F-M;for(y=x>>M;y<D;y+=z)G[y].e=J.e,G[y].b=J.b,G[y].n=J.n,G[y].t=J.t;for(y=1<<F-1;0!=(x&y);y>>=1)x^=y;for(x^=
y;(x&(1<<M)-1)!=N[A];)M-=L[A],A--}this.m=L[1];this.status=0!=I&&1!=C?1:0}}}function e(){this.n=this.b=this.e=0;this.t=null}function c(){this.list=this.next=null}var b=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,99,99],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,
16385,24577],h=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];a.Zm||(a.Zm={});a.Zm.rD=function(b){this.BY();this.mx=b;this.nx=0};a.Zm.rD.prototype={getBytes:function(b){for(var d,a=Array(1024),c=[],g=0;g<b&&0<(d=this.AY(a,0,a.length));)c[c.length]=String.fromCharCode.apply(null,a.slice(0,d)),g+=d;return g?(this.mx=this.mx.slice(this.nx),this.nx=0,c.join("")):""},wY:function(){return this.mx.length==this.nx?-1:this.mx.charCodeAt(this.nx++)&
255},Hc:function(b){for(;this.Mm<b;)this.np|=this.wY()<<this.Mm,this.Mm+=8},ad:function(d){return this.np&b[d]},qc:function(b){this.np>>=b;this.Mm-=b},lx:function(b,d,a){var c,g,e;if(0==a)return 0;for(e=0;;){this.Hc(this.Ig);g=this.Ik.list[this.ad(this.Ig)];for(c=g.e;16<c;){if(99==c)return-1;this.qc(g.b);c-=16;this.Hc(c);g=g.t[this.ad(c)];c=g.e}this.qc(g.b);if(16==c)this.$d&=32767,b[d+e++]=this.Hk[this.$d++]=g.n;else{if(15==c)break;this.Hc(c);this.Pe=g.n+this.ad(c);this.qc(c);this.Hc(this.mp);g=this.RL.list[this.ad(this.mp)];
for(c=g.e;16<c;){if(99==c)return-1;this.qc(g.b);c-=16;this.Hc(c);g=g.t[this.ad(c)];c=g.e}this.qc(g.b);this.Hc(c);this.Nm=this.$d-g.n-this.ad(c);for(this.qc(c);0<this.Pe&&e<a;)this.Pe--,this.Nm&=32767,this.$d&=32767,b[d+e++]=this.Hk[this.$d++]=this.Hk[this.Nm++]}if(e==a)return a}this.Gk=-1;return e},CY:function(b,d,a){var c;c=this.Mm&7;this.qc(c);this.Hc(16);c=this.ad(16);this.qc(16);this.Hc(16);if(c!=(~this.np&65535))return-1;this.qc(16);this.Pe=c;for(c=0;0<this.Pe&&c<a;)this.Pe--,this.$d&=32767,
this.Hc(8),b[d+c++]=this.Hk[this.$d++]=this.ad(8),this.qc(8);0==this.Pe&&(this.Gk=-1);return c},zY:function(b,a,c){if(null==this.kx){var e,l=Array(288);for(e=0;144>e;e++)l[e]=8;for(;256>e;e++)l[e]=9;for(;280>e;e++)l[e]=7;for(;288>e;e++)l[e]=8;this.UC=7;e=new f(l,288,257,d,g,this.UC);if(0!=e.status)return alert("HufBuild error: "+e.status),-1;this.kx=e.root;this.UC=e.m;for(e=0;30>e;e++)l[e]=5;this.TC=5;e=new f(l,30,0,k,h,this.TC);if(1<e.status)return this.kx=null,alert("HufBuild error: "+e.status),
-1;this.xY=e.root;this.TC=e.m}this.Ik=this.kx;this.RL=this.xY;this.Ig=this.UC;this.mp=this.TC;return this.lx(b,a,c)},yY:function(b,a,c){var e,u,r,v,w,z,C,A=Array(316);for(e=0;e<A.length;e++)A[e]=0;this.Hc(5);z=257+this.ad(5);this.qc(5);this.Hc(5);C=1+this.ad(5);this.qc(5);this.Hc(4);e=4+this.ad(4);this.qc(4);if(286<z||30<C)return-1;for(u=0;u<e;u++)this.Hc(3),A[l[u]]=this.ad(3),this.qc(3);for(;19>u;u++)A[l[u]]=0;this.Ig=7;u=new f(A,19,19,null,null,this.Ig);if(0!=u.status)return-1;this.Ik=u.root;this.Ig=
u.m;v=z+C;for(e=r=0;e<v;)if(this.Hc(this.Ig),w=this.Ik.list[this.ad(this.Ig)],u=w.b,this.qc(u),u=w.n,16>u)A[e++]=r=u;else if(16==u){this.Hc(2);u=3+this.ad(2);this.qc(2);if(e+u>v)return-1;for(;0<u--;)A[e++]=r}else{17==u?(this.Hc(3),u=3+this.ad(3),this.qc(3)):(this.Hc(7),u=11+this.ad(7),this.qc(7));if(e+u>v)return-1;for(;0<u--;)A[e++]=0;r=0}this.Ig=9;u=new f(A,z,257,d,g,this.Ig);0==this.Ig&&(u.status=1);if(0!=u.status)return-1;this.Ik=u.root;this.Ig=u.m;for(e=0;e<C;e++)A[e]=A[e+z];this.mp=6;u=new f(A,
C,0,k,h,this.mp);this.RL=u.root;this.mp=u.m;return 0==this.mp&&257<z||0!=u.status?-1:this.lx(b,a,c)},BY:function(){null==this.Hk&&(this.Hk=Array(65536));this.Mm=this.np=this.$d=0;this.Gk=-1;this.jx=!1;this.Pe=this.Nm=0;this.kx=this.Ik=null},AY:function(b,d,a){var c,g;for(c=0;c<a&&(!this.jx||-1!=this.Gk);){if(0<this.Pe){if(0!=this.Gk)for(;0<this.Pe&&c<a;)this.Pe--,this.Nm&=32767,this.$d&=32767,b[d+c++]=this.Hk[this.$d++]=this.Hk[this.Nm++];else{for(;0<this.Pe&&c<a;)this.Pe--,this.$d&=32767,this.Hc(8),
b[d+c++]=this.Hk[this.$d++]=this.ad(8),this.qc(8);0==this.Pe&&(this.Gk=-1)}if(c==a)break}if(-1==this.Gk){if(this.jx)break;this.Hc(1);0!=this.ad(1)&&(this.jx=!0);this.qc(1);this.Hc(2);this.Gk=this.ad(2);this.qc(2);this.Ik=null;this.Pe=0}switch(this.Gk){case 0:g=this.CY(b,d+c,a-c);break;case 1:g=null!=this.Ik?this.lx(b,d+c,a-c):this.zY(b,d+c,a-c);break;case 2:g=null!=this.Ik?this.lx(b,d+c,a-c):this.yY(b,d+c,a-c);break;default:g=-1}if(-1==g)return this.jx?0:-1;c+=g}return c}};a.Zm.inflate=function(b){return(new a.Zm.rD(b)).getBytes(4E9)}})(self);
!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).TU=a()}(function(){return function f(e,c,b){function d(k,l){if(!c[k]){if(!e[k]){var n="function"==typeof require&&require;if(!l&&n)return n(k,!0);if(g)return g(k,!0);n=Error("Cannot find module '"+k+"'");throw n.code="MODULE_NOT_FOUND",n;}n=c[k]={exports:{}};e[k][0].call(n.exports,
function(b){var c=e[k][1][b];return d(c?c:b)},n,n.exports,f,e,c,b)}return c[k].exports}for(var g="function"==typeof require&&require,k=0;k<b.length;k++)d(b[k]);return d}({1:[function(f,e,c){f="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(b){for(var d=Array.prototype.slice.call(arguments,1);d.length;){var c=d.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var e in c)c.hasOwnProperty(e)&&(b[e]=c[e])}}return b};
c.fL=function(b,d){return b.length===d?b:b.subarray?b.subarray(0,d):(b.length=d,b)};var b={yl:function(b,d,c,e,f){if(d.subarray&&b.subarray)return void b.set(d.subarray(c,c+e),f);for(var m=0;m<e;m++)b[f+m]=d[c+m]},VG:function(b){var d,c,e,f,m;d=e=0;for(c=b.length;d<c;d++)e+=b[d].length;m=new Uint8Array(e);d=e=0;for(c=b.length;d<c;d++)f=b[d],m.set(f,e),e+=f.length;return m}},d={yl:function(b,d,c,e,f){for(var m=0;m<e;m++)b[f+m]=d[c+m]},VG:function(b){return[].concat.apply([],b)}};c.iX=function(g){g?
(c.Nk=Uint8Array,c.qp=Uint16Array,c.rp=Int32Array,c.assign(c,b)):(c.Nk=Array,c.qp=Array,c.rp=Array,c.assign(c,d))};c.iX(f)},{}],2:[function(f,e,c){function b(b,c){if(65537>c&&(b.subarray&&k||!b.subarray&&g))return String.fromCharCode.apply(null,d.fL(b,c));for(var e="",h=0;h<c;h++)e+=String.fromCharCode(b[h]);return e}var d=f("./common"),g=!0,k=!0,h=new d.Nk(256);for(f=0;256>f;f++)h[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;h[254]=h[254]=1;c.DX=function(b){var c,g,e,k,h,f=b.length,v=0;for(k=
0;k<f;k++)g=b.charCodeAt(k),55296===(64512&g)&&k+1<f&&(e=b.charCodeAt(k+1),56320===(64512&e)&&(g=65536+(g-55296<<10)+(e-56320),k++)),v+=128>g?1:2048>g?2:65536>g?3:4;c=new d.Nk(v);for(k=h=0;h<v;k++)g=b.charCodeAt(k),55296===(64512&g)&&k+1<f&&(e=b.charCodeAt(k+1),56320===(64512&e)&&(g=65536+(g-55296<<10)+(e-56320),k++)),128>g?c[h++]=g:2048>g?(c[h++]=192|g>>>6,c[h++]=128|63&g):65536>g?(c[h++]=224|g>>>12,c[h++]=128|g>>>6&63,c[h++]=128|63&g):(c[h++]=240|g>>>18,c[h++]=128|g>>>12&63,c[h++]=128|g>>>6&63,
c[h++]=128|63&g);return c};c.KZ=function(d){return b(d,d.length)};c.fP=function(b){for(var c=new d.Nk(b.length),g=0,e=c.length;g<e;g++)c[g]=b.charCodeAt(g);return c};c.hP=function(d,c){var g,e,k,f,r=c||d.length,v=Array(2*r);for(g=e=0;g<r;)if(k=d[g++],128>k)v[e++]=k;else if(f=h[k],4<f)v[e++]=65533,g+=f-1;else{for(k&=2===f?31:3===f?15:7;1<f&&g<r;)k=k<<6|63&d[g++],f--;1<f?v[e++]=65533:65536>k?v[e++]=k:(k-=65536,v[e++]=55296|k>>10&1023,v[e++]=56320|1023&k)}return b(v,e)};c.jY=function(b,d){var c;d=d||
b.length;d>b.length&&(d=b.length);for(c=d-1;0<=c&&128===(192&b[c]);)c--;return 0>c?d:0===c?d:c+h[b[c]]>d?c:d}},{"./common":1}],3:[function(f,e){e.exports=function(c,b,d,g){var e=65535&c|0;c=c>>>16&65535|0;for(var h;0!==d;){h=2E3<d?2E3:d;d-=h;do e=e+b[g++]|0,c=c+e|0;while(--h);e%=65521;c%=65521}return e|c<<16|0}},{}],4:[function(f,e){e.exports={wD:0,wZ:1,xD:2,tZ:3,Vs:4,lZ:5,AZ:6,gn:0,Ws:1,BN:2,qZ:-1,yZ:-2,mZ:-3,AN:-5,vZ:0,jZ:1,iZ:9,nZ:-1,rZ:1,uZ:2,xZ:3,sZ:4,oZ:0,kZ:0,zZ:1,BZ:2,pZ:8}},{}],5:[function(f,
e){var c=function(){for(var b,d=[],c=0;256>c;c++){b=c;for(var e=0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();e.exports=function(b,d,g,e){g=e+g;for(b^=-1;e<g;e++)b=b>>>8^c[255&(b^d[e])];return b^-1}},{}],6:[function(f,e){e.exports=function(){this.QU=this.uY=this.time=this.text=0;this.Sc=null;this.Iz=0;this.ez=this.name="";this.fT=0;this.done=!1}},{}],7:[function(f,e){e.exports=function(c,b){var d,g,e,h,f,n,m,q,p,u,r,v,w,z,C,A,x,y,F,L,E,H,G,J;d=c.state;g=c.qk;G=c.input;e=g+(c.Ve-5);h=c.Wd;
J=c.output;f=h-(b-c.Qc);n=h+(c.Qc-257);m=d.Du;q=d.Oe;p=d.hj;u=d.Ne;r=d.window;v=d.hk;w=d.yc;z=d.Ki;C=d.Hl;A=(1<<d.vh)-1;x=(1<<d.Wn)-1;a:do b:for(15>w&&(v+=G[g++]<<w,w+=8,v+=G[g++]<<w,w+=8),y=z[v&A];;){if(F=y>>>24,v>>>=F,w-=F,F=y>>>16&255,0===F)J[h++]=65535&y;else{if(!(16&F)){if(0===(64&F)){y=z[(65535&y)+(v&(1<<F)-1)];continue b}if(32&F){d.mode=12;break a}c.cb="invalid literal/length code";d.mode=30;break a}L=65535&y;(F&=15)&&(w<F&&(v+=G[g++]<<w,w+=8),L+=v&(1<<F)-1,v>>>=F,w-=F);15>w&&(v+=G[g++]<<w,
w+=8,v+=G[g++]<<w,w+=8);y=C[v&x];c:for(;;){if(F=y>>>24,v>>>=F,w-=F,F=y>>>16&255,!(16&F)){if(0===(64&F)){y=C[(65535&y)+(v&(1<<F)-1)];continue c}c.cb="invalid distance code";d.mode=30;break a}if(E=65535&y,F&=15,w<F&&(v+=G[g++]<<w,w+=8,w<F&&(v+=G[g++]<<w,w+=8)),E+=v&(1<<F)-1,E>m){c.cb="invalid distance too far back";d.mode=30;break a}if(v>>>=F,w-=F,F=h-f,E>F){if(F=E-F,F>p&&d.XB){c.cb="invalid distance too far back";d.mode=30;break a}if(y=0,H=r,0===u){if(y+=q-F,F<L){L-=F;do J[h++]=r[y++];while(--F);y=
h-E;H=J}}else if(u<F){if(y+=q+u-F,F-=u,F<L){L-=F;do J[h++]=r[y++];while(--F);if(y=0,u<L){F=u;L-=F;do J[h++]=r[y++];while(--F);y=h-E;H=J}}}else if(y+=u-F,F<L){L-=F;do J[h++]=r[y++];while(--F);y=h-E;H=J}for(;2<L;)J[h++]=H[y++],J[h++]=H[y++],J[h++]=H[y++],L-=3;L&&(J[h++]=H[y++],1<L&&(J[h++]=H[y++]))}else{y=h-E;do J[h++]=J[y++],J[h++]=J[y++],J[h++]=J[y++],L-=3;while(2<L);L&&(J[h++]=J[y++],1<L&&(J[h++]=J[y++]))}break}}break}while(g<e&&h<n);L=w>>3;g-=L;w-=L<<3;c.qk=g;c.Wd=h;c.Ve=g<e?5+(e-g):5-(g-e);c.Qc=
h<n?257+(n-h):257-(h-n);d.hk=v&(1<<w)-1;d.yc=w}},{}],8:[function(f,e,c){function b(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function d(){this.mode=0;this.last=!1;this.wrap=0;this.PA=!1;this.total=this.check=this.Du=this.dc=0;this.head=null;this.Ne=this.hj=this.Oe=this.kp=0;this.window=null;this.Sc=this.offset=this.length=this.yc=this.hk=0;this.Hl=this.Ki=null;this.Hf=this.Br=this.Eo=this.dJ=this.Wn=this.vh=0;this.next=null;this.Ud=new p.qp(320);this.ps=new p.qp(288);this.sG=
this.TI=null;this.nY=this.back=this.XB=0}function g(b){var d;return b&&b.state?(d=b.state,b.HC=b.fs=d.total=0,b.cb="",d.wrap&&(b.xl=1&d.wrap),d.mode=A,d.last=0,d.PA=0,d.Du=32768,d.head=null,d.hk=0,d.yc=0,d.Ki=d.TI=new p.rp(x),d.Hl=d.sG=new p.rp(y),d.XB=1,d.back=-1,z):C}function k(b){var d;return b&&b.state?(d=b.state,d.Oe=0,d.hj=0,d.Ne=0,g(b)):C}function h(b,d){var c,g;return b&&b.state?(g=b.state,0>d?(c=0,d=-d):(c=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15<d)?C:(null!==g.window&&g.kp!==d&&(g.window=null),
g.wrap=c,g.kp=d,k(b))):C}function l(b,c){var g,e;return b?(e=new d,b.state=e,e.window=null,g=h(b,c),g!==z&&(b.state=null),g):C}function n(b,d,c,g){var e;b=b.state;return null===b.window&&(b.Oe=1<<b.kp,b.Ne=0,b.hj=0,b.window=new p.Nk(b.Oe)),g>=b.Oe?(p.yl(b.window,d,c-b.Oe,b.Oe,0),b.Ne=0,b.hj=b.Oe):(e=b.Oe-b.Ne,e>g&&(e=g),p.yl(b.window,d,c-g,e,b.Ne),g-=e,g?(p.yl(b.window,d,c-g,g,0),b.Ne=g,b.hj=b.Oe):(b.Ne+=e,b.Ne===b.Oe&&(b.Ne=0),b.hj<b.Oe&&(b.hj+=e))),0}var m,q,p=f("../utils/common"),u=f("./adler32"),
r=f("./crc32"),v=f("./inffast"),w=f("./inftrees"),z=0,C=-2,A=1,x=852,y=592,F=!0;c.J_=k;c.K_=h;c.L_=g;c.H_=function(b){return l(b,15)};c.qT=l;c.inflate=function(d,c){var g,e,k,h,f,l,y,x,B,Q,T,P,ia,R,U,V,Z,ha,ja,W,aa,da,X=0,Y=new p.Nk(4),ma=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!d||!d.state||!d.output||!d.input&&0!==d.Ve)return C;g=d.state;12===g.mode&&(g.mode=13);f=d.Wd;k=d.output;y=d.Qc;h=d.qk;e=d.input;l=d.Ve;x=g.hk;B=g.yc;Q=l;T=y;aa=z;a:for(;;)switch(g.mode){case A:if(0===g.wrap){g.mode=
13;break}for(;16>B;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}if(2&g.wrap&&35615===x){g.check=0;Y[0]=255&x;Y[1]=x>>>8&255;g.check=r(g.check,Y,2,0);B=x=0;g.mode=2;break}if(g.dc=0,g.head&&(g.head.done=!1),!(1&g.wrap)||(((255&x)<<8)+(x>>8))%31){d.cb="incorrect header check";g.mode=30;break}if(8!==(15&x)){d.cb="unknown compression method";g.mode=30;break}if(x>>>=4,B-=4,W=(15&x)+8,0===g.kp)g.kp=W;else if(W>g.kp){d.cb="invalid window size";g.mode=30;break}g.Du=1<<W;d.xl=g.check=1;g.mode=512&x?10:12;B=x=0;
break;case 2:for(;16>B;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}if(g.dc=x,8!==(255&g.dc)){d.cb="unknown compression method";g.mode=30;break}if(57344&g.dc){d.cb="unknown header flags set";g.mode=30;break}g.head&&(g.head.text=x>>8&1);512&g.dc&&(Y[0]=255&x,Y[1]=x>>>8&255,g.check=r(g.check,Y,2,0));B=x=0;g.mode=3;case 3:for(;32>B;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}g.head&&(g.head.time=x);512&g.dc&&(Y[0]=255&x,Y[1]=x>>>8&255,Y[2]=x>>>16&255,Y[3]=x>>>24&255,g.check=r(g.check,Y,4,0));B=x=0;g.mode=4;
case 4:for(;16>B;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}g.head&&(g.head.uY=255&x,g.head.QU=x>>8);512&g.dc&&(Y[0]=255&x,Y[1]=x>>>8&255,g.check=r(g.check,Y,2,0));B=x=0;g.mode=5;case 5:if(1024&g.dc){for(;16>B;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}g.length=x;g.head&&(g.head.Iz=x);512&g.dc&&(Y[0]=255&x,Y[1]=x>>>8&255,g.check=r(g.check,Y,2,0));B=x=0}else g.head&&(g.head.Sc=null);g.mode=6;case 6:if(1024&g.dc&&(P=g.length,P>l&&(P=l),P&&(g.head&&(W=g.head.Iz-g.length,g.head.Sc||(g.head.Sc=Array(g.head.Iz)),
p.yl(g.head.Sc,e,h,P,W)),512&g.dc&&(g.check=r(g.check,e,P,h)),l-=P,h+=P,g.length-=P),g.length))break a;g.length=0;g.mode=7;case 7:if(2048&g.dc){if(0===l)break a;P=0;do W=e[h+P++],g.head&&W&&65536>g.length&&(g.head.name+=String.fromCharCode(W));while(W&&P<l);if(512&g.dc&&(g.check=r(g.check,e,P,h)),l-=P,h+=P,W)break a}else g.head&&(g.head.name=null);g.length=0;g.mode=8;case 8:if(4096&g.dc){if(0===l)break a;P=0;do W=e[h+P++],g.head&&W&&65536>g.length&&(g.head.ez+=String.fromCharCode(W));while(W&&P<l);
if(512&g.dc&&(g.check=r(g.check,e,P,h)),l-=P,h+=P,W)break a}else g.head&&(g.head.ez=null);g.mode=9;case 9:if(512&g.dc){for(;16>B;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}if(x!==(65535&g.check)){d.cb="header crc mismatch";g.mode=30;break}B=x=0}g.head&&(g.head.fT=g.dc>>9&1,g.head.done=!0);d.xl=g.check=0;g.mode=12;break;case 10:for(;32>B;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}d.xl=g.check=b(x);B=x=0;g.mode=11;case 11:if(0===g.PA)return d.Wd=f,d.Qc=y,d.qk=h,d.Ve=l,g.hk=x,g.yc=B,2;d.xl=g.check=1;g.mode=
12;case 12:if(5===c||6===c)break a;case 13:if(g.last){x>>>=7&B;B-=7&B;g.mode=27;break}for(;3>B;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}switch(g.last=1&x,x>>>=1,--B,3&x){case 0:g.mode=14;break;case 1:R=g;if(F){m=new p.rp(512);q=new p.rp(32);for(V=0;144>V;)R.Ud[V++]=8;for(;256>V;)R.Ud[V++]=9;for(;280>V;)R.Ud[V++]=7;for(;288>V;)R.Ud[V++]=8;w(1,R.Ud,0,288,m,0,R.ps,{yc:9});for(V=0;32>V;)R.Ud[V++]=5;w(2,R.Ud,0,32,q,0,R.ps,{yc:5});F=!1}R.Ki=m;R.vh=9;R.Hl=q;R.Wn=5;if(g.mode=20,6===c){x>>>=2;B-=2;break a}break;
case 2:g.mode=17;break;case 3:d.cb="invalid block type",g.mode=30}x>>>=2;B-=2;break;case 14:x>>>=7&B;for(B-=7&B;32>B;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}if((65535&x)!==(x>>>16^65535)){d.cb="invalid stored block lengths";g.mode=30;break}if(g.length=65535&x,x=0,B=0,g.mode=15,6===c)break a;case 15:g.mode=16;case 16:if(P=g.length){if(P>l&&(P=l),P>y&&(P=y),0===P)break a;p.yl(k,e,h,P,f);l-=P;h+=P;y-=P;f+=P;g.length-=P;break}g.mode=12;break;case 17:for(;14>B;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}if(g.Eo=
(31&x)+257,x>>>=5,B-=5,g.Br=(31&x)+1,x>>>=5,B-=5,g.dJ=(15&x)+4,x>>>=4,B-=4,286<g.Eo||30<g.Br){d.cb="too many length or distance symbols";g.mode=30;break}g.Hf=0;g.mode=18;case 18:for(;g.Hf<g.dJ;){for(;3>B;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}g.Ud[ma[g.Hf++]]=7&x;x>>>=3;B-=3}for(;19>g.Hf;)g.Ud[ma[g.Hf++]]=0;if(g.Ki=g.TI,g.vh=7,da={yc:g.vh},aa=w(0,g.Ud,0,19,g.Ki,0,g.ps,da),g.vh=da.yc,aa){d.cb="invalid code lengths set";g.mode=30;break}g.Hf=0;g.mode=19;case 19:for(;g.Hf<g.Eo+g.Br;){for(;X=g.Ki[x&
(1<<g.vh)-1],U=X>>>24,V=65535&X,!(U<=B);){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}if(16>V)x>>>=U,B-=U,g.Ud[g.Hf++]=V;else{if(16===V){for(R=U+2;B<R;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}if(x>>>=U,B-=U,0===g.Hf){d.cb="invalid bit length repeat";g.mode=30;break}W=g.Ud[g.Hf-1];P=3+(3&x);x>>>=2;B-=2}else if(17===V){for(R=U+3;B<R;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}x>>>=U;B-=U;W=0;P=3+(7&x);x>>>=3;B-=3}else{for(R=U+7;B<R;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}x>>>=U;B-=U;W=0;P=11+(127&x);x>>>=
7;B-=7}if(g.Hf+P>g.Eo+g.Br){d.cb="invalid bit length repeat";g.mode=30;break}for(;P--;)g.Ud[g.Hf++]=W}}if(30===g.mode)break;if(0===g.Ud[256]){d.cb="invalid code -- missing end-of-block";g.mode=30;break}if(g.vh=9,da={yc:g.vh},aa=w(1,g.Ud,0,g.Eo,g.Ki,0,g.ps,da),g.vh=da.yc,aa){d.cb="invalid literal/lengths set";g.mode=30;break}if(g.Wn=6,g.Hl=g.sG,da={yc:g.Wn},aa=w(2,g.Ud,g.Eo,g.Br,g.Hl,0,g.ps,da),g.Wn=da.yc,aa){d.cb="invalid distances set";g.mode=30;break}if(g.mode=20,6===c)break a;case 20:g.mode=21;
case 21:if(6<=l&&258<=y){d.Wd=f;d.Qc=y;d.qk=h;d.Ve=l;g.hk=x;g.yc=B;v(d,T);f=d.Wd;k=d.output;y=d.Qc;h=d.qk;e=d.input;l=d.Ve;x=g.hk;B=g.yc;12===g.mode&&(g.back=-1);break}for(g.back=0;X=g.Ki[x&(1<<g.vh)-1],U=X>>>24,R=X>>>16&255,V=65535&X,!(U<=B);){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}if(R&&0===(240&R)){Z=U;ha=R;for(ja=V;X=g.Ki[ja+((x&(1<<Z+ha)-1)>>Z)],U=X>>>24,R=X>>>16&255,V=65535&X,!(Z+U<=B);){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}x>>>=Z;B-=Z;g.back+=Z}if(x>>>=U,B-=U,g.back+=U,g.length=V,0===R){g.mode=
26;break}if(32&R){g.back=-1;g.mode=12;break}if(64&R){d.cb="invalid literal/length code";g.mode=30;break}g.Sc=15&R;g.mode=22;case 22:if(g.Sc){for(R=g.Sc;B<R;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}g.length+=x&(1<<g.Sc)-1;x>>>=g.Sc;B-=g.Sc;g.back+=g.Sc}g.nY=g.length;g.mode=23;case 23:for(;X=g.Hl[x&(1<<g.Wn)-1],U=X>>>24,R=X>>>16&255,V=65535&X,!(U<=B);){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}if(0===(240&R)){Z=U;ha=R;for(ja=V;X=g.Hl[ja+((x&(1<<Z+ha)-1)>>Z)],U=X>>>24,R=X>>>16&255,V=65535&X,!(Z+U<=B);){if(0===
l)break a;l--;x+=e[h++]<<B;B+=8}x>>>=Z;B-=Z;g.back+=Z}if(x>>>=U,B-=U,g.back+=U,64&R){d.cb="invalid distance code";g.mode=30;break}g.offset=V;g.Sc=15&R;g.mode=24;case 24:if(g.Sc){for(R=g.Sc;B<R;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}g.offset+=x&(1<<g.Sc)-1;x>>>=g.Sc;B-=g.Sc;g.back+=g.Sc}if(g.offset>g.Du){d.cb="invalid distance too far back";g.mode=30;break}g.mode=25;case 25:if(0===y)break a;if(P=T-y,g.offset>P){if(P=g.offset-P,P>g.hj&&g.XB){d.cb="invalid distance too far back";g.mode=30;break}P>
g.Ne?(P-=g.Ne,ia=g.Oe-P):ia=g.Ne-P;P>g.length&&(P=g.length);R=g.window}else R=k,ia=f-g.offset,P=g.length;P>y&&(P=y);y-=P;g.length-=P;do k[f++]=R[ia++];while(--P);0===g.length&&(g.mode=21);break;case 26:if(0===y)break a;k[f++]=g.length;y--;g.mode=21;break;case 27:if(g.wrap){for(;32>B;){if(0===l)break a;l--;x|=e[h++]<<B;B+=8}if(T-=y,d.fs+=T,g.total+=T,T&&(d.xl=g.check=g.dc?r(g.check,k,T,f-T):u(g.check,k,T,f-T)),T=y,(g.dc?x:b(x))!==g.check){d.cb="incorrect data check";g.mode=30;break}B=x=0}g.mode=28;
case 28:if(g.wrap&&g.dc){for(;32>B;){if(0===l)break a;l--;x+=e[h++]<<B;B+=8}if(x!==(4294967295&g.total)){d.cb="incorrect length check";g.mode=30;break}B=x=0}g.mode=29;case 29:aa=1;break a;case 30:aa=-3;break a;case 31:return-4;default:return C}return d.Wd=f,d.Qc=y,d.qk=h,d.Ve=l,g.hk=x,g.yc=B,(g.Oe||T!==d.Qc&&30>g.mode&&(27>g.mode||4!==c))&&n(d,d.output,d.Wd,T-d.Qc)?(g.mode=31,-4):(Q-=d.Ve,T-=d.Qc,d.HC+=Q,d.fs+=T,g.total+=T,g.wrap&&T&&(d.xl=g.check=g.dc?r(g.check,k,T,d.Wd-T):u(g.check,k,T,d.Wd-T)),
d.ZP=g.yc+(g.last?64:0)+(12===g.mode?128:0)+(20===g.mode||15===g.mode?256:0),(0===Q&&0===T||4===c)&&aa===z&&(aa=-5),aa)};c.oT=function(b){if(!b||!b.state)return C;var d=b.state;return d.window&&(d.window=null),b.state=null,z};c.pT=function(b,d){var c;b&&b.state&&(c=b.state,0===(2&c.wrap)||(c.head=d,d.done=!1))};c.rT=function(b,d){var c,g,e=d.length;return b&&b.state?(c=b.state,0!==c.wrap&&11!==c.mode?C:11===c.mode&&(g=1,g=u(g,d,e,0),g!==c.check)?-3:n(b,d,e,e)?(c.mode=31,-4):(c.PA=1,z)):C};c.G_="pako inflate (from Nodeca project)"},
{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(f,e){var c=f("../utils/common"),b=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],k=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,
26,26,27,27,28,28,29,29,64,64];e.exports=function(e,f,n,m,q,p,u,r){var v,w,z,C,A,x,y,F,L=r.yc,E,H,G,J,O,M,N=0,I,D=null,B=0,Q=new c.qp(16);C=new c.qp(16);var T=null,P=0;for(E=0;15>=E;E++)Q[E]=0;for(H=0;H<m;H++)Q[f[n+H]]++;J=L;for(G=15;1<=G&&0===Q[G];G--);if(J>G&&(J=G),0===G)return q[p++]=20971520,q[p++]=20971520,r.yc=1,0;for(L=1;L<G&&0===Q[L];L++);J<L&&(J=L);for(E=v=1;15>=E;E++)if(v<<=1,v-=Q[E],0>v)return-1;if(0<v&&(0===e||1!==G))return-1;C[1]=0;for(E=1;15>E;E++)C[E+1]=C[E]+Q[E];for(H=0;H<m;H++)0!==
f[n+H]&&(u[C[f[n+H]]++]=H);if(0===e?(D=T=u,A=19):1===e?(D=b,B-=257,T=d,P-=257,A=256):(D=g,T=k,A=-1),I=0,H=0,E=L,C=p,O=J,M=0,z=-1,N=1<<J,m=N-1,1===e&&852<N||2===e&&592<N)return 1;for(;;){x=E-M;u[H]<A?(y=0,F=u[H]):u[H]>A?(y=T[P+u[H]],F=D[B+u[H]]):(y=96,F=0);v=1<<E-M;L=w=1<<O;do w-=v,q[C+(I>>M)+w]=x<<24|y<<16|F|0;while(0!==w);for(v=1<<E-1;I&v;)v>>=1;if(0!==v?(I&=v-1,I+=v):I=0,H++,0===--Q[E]){if(E===G)break;E=f[n+u[H]]}if(E>J&&(I&m)!==z){0===M&&(M=J);C+=L;O=E-M;for(v=1<<O;O+M<G&&(v-=Q[O+M],!(0>=v));)O++,
v<<=1;if(N+=1<<O,1===e&&852<N||2===e&&592<N)return 1;z=I&m;q[z]=J<<24|O<<16|C-p|0}}return 0!==I&&(q[C+I]=E-M<<24|4194304),r.yc=J,0}},{"../utils/common":1}],10:[function(f,e){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(f,e){e.exports=function(){this.input=null;this.HC=this.Ve=this.qk=0;this.output=null;this.fs=this.Qc=this.Wd=0;this.cb="";this.state=
null;this.ZP=2;this.xl=0}},{}],"/lib/inflate.js":[function(f,e,c){function b(d){if(!(this instanceof b))return new b(d);var c=this.options=k.assign({tP:16384,qd:0,to:""},d||{});c.raw&&0<=c.qd&&16>c.qd&&(c.qd=-c.qd,0===c.qd&&(c.qd=-15));!(0<=c.qd&&16>c.qd)||d&&d.qd||(c.qd+=32);15<c.qd&&48>c.qd&&0===(15&c.qd)&&(c.qd|=15);this.Gz=0;this.cb="";this.ended=!1;this.su=[];this.Fm=new m;this.Fm.Qc=0;d=g.qT(this.Fm,c.qd);if(d!==l.gn)throw Error(n[d]);this.header=new q;g.pT(this.Fm,this.header)}function d(d,
c){var g=new b(c);if(g.push(d,!0),g.Gz)throw g.cb||n[g.Gz];return g.result}var g=f("./zlib/inflate"),k=f("./utils/common"),h=f("./utils/strings"),l=f("./zlib/constants"),n=f("./zlib/messages"),m=f("./zlib/zstream"),q=f("./zlib/gzheader"),p=Object.prototype.toString;b.prototype.push=function(b,d){var c,e,f,n,m,q,y=this.Fm,F=this.options.tP,L=this.options.Eq,E=!1;if(this.ended)return!1;e=d===~~d?d:!0===d?l.Vs:l.wD;"string"==typeof b?y.input=h.fP(b):"[object ArrayBuffer]"===p.call(b)?y.input=new Uint8Array(b):
y.input=b;y.qk=0;y.Ve=y.input.length;do{if(0===y.Qc&&(y.output=new k.Nk(F),y.Wd=0,y.Qc=F),c=g.inflate(y,l.wD),c===l.BN&&L&&(q="string"==typeof L?h.DX(L):"[object ArrayBuffer]"===p.call(L)?new Uint8Array(L):L,c=g.rT(this.Fm,q)),c===l.AN&&!0===E&&(c=l.gn,E=!1),c!==l.Ws&&c!==l.gn)return this.vB(c),this.ended=!0,!1;y.Wd&&(0!==y.Qc&&c!==l.Ws&&(0!==y.Ve||e!==l.Vs&&e!==l.xD)||("string"===this.options.to?(f=h.jY(y.output,y.Wd),n=y.Wd-f,m=h.hP(y.output,f),y.Wd=n,y.Qc=F-n,n&&k.yl(y.output,y.output,f,n,0),this.kJ(m)):
this.kJ(k.fL(y.output,y.Wd))));0===y.Ve&&0===y.Qc&&(E=!0)}while((0<y.Ve||0===y.Qc)&&c!==l.Ws);return c===l.Ws&&(e=l.Vs),e===l.Vs?(c=g.oT(this.Fm),this.vB(c),this.ended=!0,c===l.gn):e!==l.xD||(this.vB(l.gn),y.Qc=0,!0)};b.prototype.kJ=function(b){this.su.push(b)};b.prototype.vB=function(b){b===l.gn&&("string"===this.options.to?this.result=this.su.join(""):this.result=k.VG(this.su));this.su=[];this.Gz=b;this.cb=this.Fm.cb};c.QY=b;c.inflate=d;c.I_=function(b,c){return c=c||{},c.raw=!0,d(b,c)};c.K0=d},
{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")});
(function(a){a.Jg={Hj:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(f){for(var e="",c,b,d,g,k,h,l=0;l<f.length;)c=f.charCodeAt(l++),b=f.charCodeAt(l++),d=f.charCodeAt(l++),g=c>>2,c=(c&3)<<4|b>>4,k=(b&15)<<2|d>>6,h=d&63,isNaN(b)?k=h=64:isNaN(d)&&(h=64),e=e+a.Jg.Hj.charAt(g)+a.Jg.Hj.charAt(c)+a.Jg.Hj.charAt(k)+a.Jg.Hj.charAt(h);return e},decode:function(f){var e="",c,b,d,g,k,h=0;for(f=f.replace(/[^A-Za-z0-9\+\/\=]/g,"");h<f.length;)c=a.Jg.Hj.indexOf(f.charAt(h++)),
b=a.Jg.Hj.indexOf(f.charAt(h++)),g=a.Jg.Hj.indexOf(f.charAt(h++)),k=a.Jg.Hj.indexOf(f.charAt(h++)),c=c<<2|b>>4,b=(b&15)<<4|g>>2,d=(g&3)<<6|k,e+=String.fromCharCode(c),64!==g&&(e+=String.fromCharCode(b)),64!==k&&(e+=String.fromCharCode(d));return e}};"undefined"===typeof window.btoa&&(window.btoa=a.Jg.encode);"undefined"===typeof window.atob&&(window.atob=a.Jg.decode)})(window);
(function(a){function f(a){var c;"string"!==typeof a?a={documentElement:a}:(c=new DOMParser,a=c.parseFromString(a,"text/xml"));this.current=a.documentElement;this.next=this.current.nextSibling;this.diff=this.depth=0}f.prototype={RD:function(){for(;this.next&&this.next.nodeType!==Node.ELEMENT_NODE;)this.next=this.next.nextSibling},advance:function(){this.RD();return this.next?(this.current=this.next,this.next=this.current.nextSibling,!0):!1},ua:function(){return this.current.tagName},oa:function(){++this.depth;
this.next=this.current.firstChild;this.RD();this.next||++this.diff},Aa:function(){--this.depth;0<this.diff?--this.diff:this.current=this.current.parentNode;this.current&&(this.next=this.current.nextSibling)},K:function(a){return this.current.getAttribute(a)}};a.Se=f})(window);
(function(a){function f(a){this.depth=this.index=0;this.qe=a;this.location={start:0,Hv:1,Iv:1,end:a.length,empty:!0};this.xr=[this.location];this.SA=!1;"?"===this.qe.charAt(1)&&this.EH();this.location.empty=!1}a.Ts=a.Ts?a.Ts:{};a.Ts.QX=function(a){if(a)return a.replace(/&[^;]*;/g,function(c){switch(c.charAt(1)){case "q":return'"';case "a":return"&";case "l":return"<";case "g":return">";case "#":return"x"===c.charAt(2)?String.fromCharCode(parseInt(c.substring(3,c.length-1),16)):String.fromCharCode(parseInt(c.substring(2,
c.length-1),10))}return c})};f.prototype={advance:function(){this.Rj=null;this.EH();var a=this.location.start;++a;this.location.empty=!1;if("/"!==this.qe.charAt(a))return this.location.empty="/"===this.qe.charAt(this.qe.indexOf(">",a)-1),!0;this.location.end=!0;return!1},VI:function(){var a=this.location.start+1,c=this.qe.indexOf(">",a);this.location.empty&&--c;a=this.qe.substring(a,c);this.Rj={};c=a.indexOf(" ");if(-1!==c){this.HG=a.substring(0,c);for(var a=a.slice(c),a=a.split('"'),c=a.length-1,
b=0;b<c;++b){var d=a[b],g=a[++b];this.Rj[d.substring(1,d.length-1)]=g}}else this.HG=a},EH:function(){if(this.SA)this.SA=!1,this.location.start=this.qe.indexOf("<",this.location.start+1);else{var a=this.location.Hv;if(!this.location.empty)for(var c=this.location.Iv;0<c;)a=this.qe.indexOf("<",a),"/"===this.qe.charAt(++a)?--c:(a=this.qe.indexOf(">",a),"/"!==this.qe.charAt(a-1)&&++c);this.location.start=this.qe.indexOf("<",a)}this.location.Hv=this.location.start+1;this.location.Iv=1},mark:function(){this.qe.mark&&
this.qe.mark(this.location.start)},ua:function(){null!==this.Rj&&"undefined"!==typeof this.Rj||this.VI();return this.HG},oa:function(){++this.depth;this.location={start:this.location.start};this.xr[this.xr.length]=this.location;this.SA=!0},Aa:function(){--this.depth;this.Rj=null;var a=this.location.Hv,c=this.location.Iv,b=this.location.empty,d=this.location.end;this.xr.pop();this.location=this.xr[this.xr.length-1];this.location.Hv=a;this.location.Iv=d?0:b?c:c+1},K:function(e){null!==this.Rj&&"undefined"!==
typeof this.Rj||this.VI();return a.Ts.QX(this.Rj[e])}};a.hZ=f})(self);
(function(a){function f(b){if(b){if(b.length!==this.Rm)throw Error("Data is wrong size for zip header!");this.Jq=b=this.kV(b);if(b.zk!==this.MQ)throw Error("Invalid XOD file, signature is wrong!");this.ZT=4294967295===b.Cu;this.jg={};this.names=[]}}function e(b,c,e){this.source=b;this.pu=this.Yy=!1;this.Mf={};this.Kl=function(){};this.decrypt=c;this.El=e;this.gG=a.o.Nh&&c!==a.o.Nh.decrypt}function c(b){this.nm=b;this.started=!1;this.Wi=1}c.prototype={cancel:function(){}};a.ek=function(b){if("string"!==
typeof b){for(var a="",c=0,e=b.length,f;c<e;)f=b.subarray(c,c+1024),c+=1024,a+=String.fromCharCode.apply(null,f);return a}return b};a.ZH=function(b){if("string"===typeof b){for(var a=new Uint8Array(b.length),c=b.length,e=0;e<c;e++)a[e]=b.charCodeAt(e);return a}return b};e.prototype={Vf:"Document/FixedDocument.fdoc",Kg:"Document/DocProps/core.xml",Uf:"Document/Structure/DocStruct.struct",jW:function(b){this.Kl=b},sm:function(b){var c=this;this.Co(function(e){if(e){a.utils.warn("Error loading document: "+
e);c.Kl(e);if(b){b(e);return}throw e;}return c.request([c.Vf,c.Kg,c.Uf])})},$i:function(){return!1},request:function(b,c){var a=this;if(!a.Yy)throw Error("Document must be loaded before requesting parts");_(b).each(function(b){a.SQ(b,function(b,d,e,h){return b?(d!==a.Uf&&0!==d.indexOf("Annot/Appearances")&&a.Kl(b),a.trigger("partReady",{ra:d,xf:!1,cd:!!b.Gy,error:b})):a.trigger("partReady",{ra:d,data:e,xf:!1,cd:!1,error:null,Gb:h,hJ:c})})})},ym:function(b){this.yf=b},$r:function(b){this.withCredentials=
b},Wy:function(b){var a=this;_(b).each(function(b){var d=a.Mf[b];d&&(d.Wi--,0===d.Wi&&(delete a.Mf[b],d.cancel()))})},SQ:function(b,a){if(this.Mf[b])this.Mf[b].Wi++;else return this.Mf[b]=new c(b),this.NJ(b,a)}};_(e.prototype).extend(Backbone.Events);f.prototype={qH:function(){return{start:this.Jq.Cu,stop:this.Jq.Cu+this.Jq.rG}},Sq:function(b){var a=this.jg[b],c=a.offset+this.Dp+a.Ah+a.Ll;return{start:c,stop:c+a.lu,nm:b}},$u:function(b){b=this.Sq(b);var a=Math.floor(b.start/102400),c=b.stop-b.start;
return Math.min(c,102400*(a+1)-b.start)>c/2?a:a+1},nU:function(b){if(b&&(this.Jq=b=this.nV(b),b.zk!==this.vY))throw Error("Invalid XOD file, signature is wrong!");},BR:function(b){var a=this.$u(b),c=this.names.indexOf(b),e;b=[];var f;for(f=c-1;0<=f&&this.$u(this.names[f])===a;--f);e=f+1;var n=this.Sq(this.names[e]).start;for(f=c+1;f<this.names.length&&this.$u(this.names[f])===a;++f);a=f-1;c=this.Sq(this.names[a]).stop;for(f=e;f<=a;++f)e=this.Sq(this.names[f]),e.start-=n,e.stop-=n,b.push(e);return{start:n,
stop:c,KJ:b}},WF:function(b){return!!this.jg[b]},zI:function(b){return 0!==this.jg[b].tu},LJ:function(b){for(var a=10,c=this.dM,e=this.Jq.tL,f=0;f<e;f++){var n=this.lV(b,a),a=a+c,m=b.substr(a,n.Ah),a=a+(n.Ah+n.Ll+n.UF+10);this.jg[m]=n;this.names[this.names.length]=m}},yN:56,zN:20,Rm:22,dM:36,Dp:30,rw:function(b,a,c){for(var e="",f=0;f<a;f++)var n=b.charCodeAt(f+c).toString(16),e=1===n.length?"0"+n+e:n+e;return parseInt(e,16)},lV:function(b,a){var c={},e=this.rw;c.tu=e(b,2,a);c.lu=e(b,4,a+10);c.OX=
e(b,4,a+14);c.Ah=e(b,2,a+18);c.Ll=e(b,2,a+20);c.UF=e(b,2,a+22);c.offset=e(b,4,a+32);return c},nV:function(b){var a={},c=this.rw;a.zk=c(b,4,0);a.D_=c(b,8,4);a.M0=c(b,2,12);a.N0=c(b,2,14);a.lQ=c(b,4,16);a.rP=c(b,4,20);a.IU=c(b,8,24);a.tL=c(b,8,32);a.rG=c(b,8,40);a.Cu=c(b,8,48);return a},kV:function(b){var a={},c=this.rw;a.zk=c(b,4,0);a.lQ=c(b,2,4);a.rP=c(b,2,6);a.IU=c(b,2,8);a.tL=c(b,2,10);a.rG=c(b,4,12);a.Cu=c(b,4,16);a.UF=c(b,2,20);return a},MJ:function(b){var a={},c=this.rw;a.zk=c(b,4,0);a.L0=c(b,
2,4);a.dc=c(b,2,6);a.tu=c(b,2,8);a.a0=c(b,2,10);a.$_=c(b,2,12);a.SZ=c(b,4,14);a.lu=c(b,4,18);a.OX=c(b,4,22);a.Ah=c(b,2,26);a.Ll=c(b,2,28);return a},MQ:101010256,vY:101075792,ZI:67324752,$I:"PK\u0003\u0004"};f.inflate=function(b){return"string"===typeof b?a.Zm.inflate(b):a.TU.inflate(b,{qd:-15})};a.o=a.o||{};a.o.V=a.o.V||{};var b=a.o.V;b.lf=e;b.yj=f;b.Qy=Array(1024);a.zA=function(d,c,e,h){c=c||0;e=e||!1;var f="",n;n=!(_.isNull(d.responseBody)||_.isUndefined(d.responseBody));if(10===a.utils.ie&&n||
!a.Uint8Array&&n){n=d.responseBody;h=_.isArray(n)?n:(new a.VBArray(n)).toArray();c=h.length;d=Array(c);for(e=0;e<c;e++)d[e]=h[e]&255;e=c/1024+1;for(c=0;c<e;c++)f+=String.fromCharCode.apply(null,d.slice(1024*c,1024*c+1024))}else if(!a.Uint8Array||e||_.isUndefined(d.response))for(n=d.responseText,d=b.Qy,e=c;e<h;){for(c=0;1024>c&&e<h;++c)d[c]=n.charCodeAt(e)&255,++e;f+=String.fromCharCode.apply(null,d.slice(0,c))}else{n=d.response;h=new a.Uint8Array(n);n=h.length;e=c;if(a.utils.typedArrayApply)return h.subarray(c);
for(d=b.Qy;e<n;){c=0;for(var m=Math.min(e+1024,n);e<m;c++,e++)d[c]=h[e];f+=String.fromCharCode.apply(null,1024>c?d.slice(0,c):d)}}return f};a.o.V.kj={Is:0,XC:1,zM:2}})(window);
(function(a){function f(b,d,c){e.apply(this,arguments);if("xod"!==b.name.split(".").pop())throw Error("Not an XOD file");if(!a.FileReader||!a.File||!a.Blob)throw Error("File API is not supported in this browser");this.file=b;this.qu=[];this.jz=0}var e=a.o.V.lf,c=a.o.V.yj;f.prototype=new e;f.prototype=_(f.prototype).extend({kB:function(b,d,c){var a=this,e=new FileReader;e.onloadend=function(b,f){if(0<a.qu.length){var m=a.qu.shift();m.oV.readAsBinaryString(m.file)}else a.jz--;if(e.error){m=e.error;
if(m.code===m.ABORT_ERR){console.warn("Request for chunk "+d.start+"-"+d.stop+" was aborted");return}return c(m)}if(m=f||e.content||b.target.result)return c(!1,m);console.warn("No data was returned from FileReader.")};d&&(b=(b.slice||b.webkitSlice||b.mozSlice||b.Kz).call(b,d.start,d.stop));0===a.qu.length&&50>a.jz?(e.readAsBinaryString(b),a.jz++):a.qu.push({oV:e,file:b});return function(){e.abort()}},Co:function(b){var d=this;d.pu=!0;var a=c.prototype.Rm;d.kB(d.file,{start:-a,stop:d.file.size},function(e,
h){if(e)return console.warn("Error loading end header: %s",e),b(e);if(h.length!==a)throw Error("Zip end header data is wrong size!");d.Nb=new c(h);var f=d.Nb.qH();d.kB(d.file,f,function(a,c){if(a)return console.warn("Error loading central directory: %s",a),b(a);if(c.length!==f.stop-f.start)throw Error("Zip central directory data is wrong size!");d.Nb.LJ(c);d.Yy=!0;d.pu=!1;return b(!1)})})},NJ:function(b,d){var a=this,c=a.Mf[b];if(!a.Nb.WF(b))return d(Error('File not found: "'+b+'"'),b);var e=a.Nb.Sq(b),
f=a.kB(a.file,e,function(c,k){delete a.Mf[b];if(c)return console.warn('Error loading part "%s": %s',b,c),d(c);if(k.length!==e.stop-e.start)throw Error("Part data is wrong size!");var f=a.Nb.zI(b);d(!1,b,k,f)});c.started=!0;c.cancel=f}});"FileReader"in window&&!FileReader.prototype.readAsBinaryString&&(FileReader.prototype.readAsBinaryString=function(b){var d="",a=this;a.content="";var c=new FileReader;c.onload=function(){for(var b=new Uint8Array(c.result),e=b.byteLength,f=0;f<e;f++)d+=String.fromCharCode(b[f]);
a.content+=d;$(a).trigger("onload");c.onloadend=function(){$(a).trigger("onloadend")}};c.readAsArrayBuffer(b)});a.o.V.eD=f;a.hf=a.hf||{};a.hf.KY=function(b){return{name:b.value.split(/[/\\]/).pop(),size:null,data:null,waiting:[],RA:!1,Kz:function(b,a){return{mJ:this,Kz:this.Kz,start:b,stop:a}}}};a.hf.LY=function(){return{error:!1,onloadend:function(){},result:null,readAsBinaryString:function(b){var d=b.mJ||b,a=this,c=encodeURI(d.name);if(d.data)return this.LA(b);if(d.RA)return d.waiting.push(function(){a.LA(b)});
d.RA=!0;new JSIO.FY(c,function(c){d.RA=!1;if(c)return console.error('Failed to load file "%s"',d.name),console.warn("File must be in same directory as this page for FakeFileReader to work"),a.error=Error('Failed to load file "%s"',d.name),a.onloadend(a.error);d.size=this.fileSize;d.data=this.read(this.fileSize);a.LA.call(a,b);for(c=0;c<d.waiting.length;c++)d.waiting[c]();d.waiting=[]})},LA:function(b){var d=b.mJ||b,a=b.start||0;b=b.stop||d.size;null===a&&(a=d.size);null===b&&(b=d.size);0>a&&(a=d.size+
a);0>b&&(b=d.size+b);d=d.data.slice(a,b);a="";for(b=0;b<d.length/1E3;b++)a+=String.fromCharCode.apply(null,d.slice(1E3*b,1E3*b+1E3));this.result=a;this.onloadend({},a)}}}})(window);
(function(a){function f(a){this.file=a}f.prototype=$.extend({getFileData:function(a){var c=this,b=new FileReader;b.onload=function(b){c.trigger("documentLoadingProgress",[b.loaded,b.loaded]);a(new Uint8Array(b.target.result))};b.onprogress=function(b){b.lengthComputable&&c.trigger("documentLoadingProgress",[b.loaded,0<b.total?b.total:0])};b.readAsArrayBuffer(this.file)},getFile:function(){return a.utils.isJSWorker?this.file.path:this.file}},a.utils.eventHandler);a.o.V.wM=f})(window);
(function(a){function f(a){this.buffer=a}f.prototype=$.extend({getFileData:function(a){a(new Uint8Array(this.buffer))},getFile:function(){return null}},a.utils.eventHandler);a.o.V.UL=f})(window);
(function(a){function f(b,d,a){for(var c in b)this[c]=b[c];this.startOffset=d;this.endOffset=a;this.bG=function(d,a,c,g){_.isUndefined(a.stop)?(a.start+=this.endOffset,a.stop=this.endOffset):(a.start+=this.startOffset,a.stop+=this.startOffset);d=this.Cq(this.url,a,this.Kn);return new b.Or(d,a,c,g)}}function e(b,d,a,c){k.apply(this,[b,a,c]);this.Zi={};this.Kn=d;this.url=b}function c(){this.Wi=1}function b(b){var d=b.request,c=b.range;return function(g,e){if(g){if(g.code===d.Ob.Jk){a.utils.warn("Request for range "+
c.start+"-"+c.stop+" was aborted");return}return b.We.forEach(function(b){b("Error retrieving file: "+d.url+". Received return status "+g.status+".")})}return b.We.forEach(function(b){b(!1,e,d)})}}function d(b,d,c,g){this.url=b;this.range=d;this.yf=c;this.request=new XMLHttpRequest;this.request.open("GET",this.url,!0);a.Uint8Array&&(this.request.responseType="arraybuffer");g&&(this.request.withCredentials=g);e.DISABLE_RANGE_HEADER||(_.isUndefined(d.stop)?this.request.setRequestHeader("Range","bytes="+
d.start):this.request.setRequestHeader("Range",["bytes=",d.start,"-",d.stop-1].join("")));this.request.setRequestHeader("X-Requested-With","XMLHttpRequest");if(c)for(var k in c)this.request.setRequestHeader(k,c[k]);this.request.overrideMimeType?this.request.overrideMimeType("text/plain; charset=x-user-defined"):this.request.setRequestHeader("Accept-Charset","x-user-defined");this.status=this.Ob.pj}function g(b,d,c){for(var g=-1,e=0;e<c.length;e++)_.isEqual(c[e].range,d)&&_.isEqual(c[e].url,b)&&(g=
e);-1===g&&a.utils.warn(d+" not found in queue");return g}var k=a.o.V.lf,h=a.o.V.yj,l=[],n=[];d.prototype={constructor:d,start:function(b){var d=this,c=this.request;c.onreadystatechange=function(){if(d.Gy)return d.status=d.Ob.Jk,b({code:d.Ob.Jk});if(this.readyState===d.wN.DONE){d.fv();var g=0===window.document.URL.indexOf("file:///");200===c.status||206===c.status||g&&0===c.status?(g=a.zA(this),d.success(g,b)):(d.status=d.Ob.ERROR,b({code:d.status,status:this.status}))}};this.request.send(null);this.status=
this.Ob.Wk},success:function(b,d){this.status=this.Ob.bN;if(d)return d(!1,b)},abort:function(){this.fv();this.Gy=!0;this.request.abort()},fv:function(){var d=g(this.url,this.range,n);-1!==d&&n.splice(d,1);if(0<l.length){var d=l.shift(),a=new this.constructor(d.url,d.range,this.yf,this.withCredentials);d.request=a;n.push(d);a.start(b(d))}},wN:{fZ:0,DONE:4},Ob:{pj:0,Wk:1,bN:2,ERROR:3,Jk:4},extend:function(b){var d=$.extend({},this,b.prototype);d.constructor=b;return d}};a.Q0=[];e.DISABLE_RANGE_HEADER=
!1;e.prototype={Or:d,xM:3,Cq:function(b,d,c){var g=-1===b.indexOf("?")?"?":"&";switch(c){case !1:case a.o.V.kj.Is:b=b+g+"_="+_.uniqueId();break;case !0:case a.o.V.kj.XC:b=b+g+"_="+d.start+","+(_.isUndefined(d.stop)?"":d.stop)}return b},bG:function(b,d,a,c){return new this.Or(b,d,a,c)},OQ:function(b,d,a,c,g){for(var e=0;e<l.length;e++)if(_.isEqual(l[e].range,d)&&_.isEqual(l[e].url,b))return l[e].We.push(c),l[e].Wv++,null;for(e=0;e<n.length;e++)if(_.isEqual(n[e].range,d)&&_.isEqual(n[e].url,b))return n[e].We.push(c),
n[e].Wv++,null;a={url:b,range:d,Kn:a,We:[c],Wv:1,request:{}};if(0===l.length&&n.length<this.xM)return n.push(a),a.request=this.bG(b,d,g,this.withCredentials),a;l.push(a);return null},fm:function(d,a,c){var e=this.Cq(d,a,this.Kn);(d=this.OQ(e,a,this.Kn,c,this.yf))&&d.request.start(b(d));return function(){var b=g(e,a,n),d;-1!==b?(d=--n[b].Wv,0===d&&n[b].request.abort()):(b=g(e,a,l),-1!==b&&(d=--l[b].Wv,0===d&&l.splice(b,1)))}},tH:function(){return{start:-h.prototype.Rm}},TS:function(){var b=-(h.prototype.Rm+
h.prototype.zN);return{start:b-h.prototype.yN,end:b}},Co:function(b){var d=this;d.pu=!0;var c=h.prototype.Rm;d.fm(d.url,d.tH(),function(g,e){function k(){var c=d.Nb.qH();d.fm(d.url,c,function(g,e){if(g)return a.utils.warn("Error loading central directory: "+g),b(g);e=a.ek(e);if(e.length!==c.stop-c.start)return b("Invalid XOD file: Zip central directory data is wrong size! Should be "+(c.stop-c.start)+" but is "+e.length);d.Nb.LJ(e);d.Yy=!0;d.pu=!1;return b(!1)})}if(g)return a.utils.warn("Error loading end header: "+
g),b(g);e=a.ek(e);if(e.length!==c)return b("Invalid XOD file: Zip end header data is wrong size!");try{d.Nb=new h(e)}catch(f){return b(f)}d.Nb.ZT?d.fm(d.url,d.TS(),function(c,g){if(c)return a.utils.warn("Error loading zip64 header: "+c),b(c);g=a.ek(g);d.Nb.nU(g);k()}):k()})},wA:function(b){b(Object.keys(this.Nb.jg))},NJ:function(b,d){var g=this;if(!g.Nb.WF(b))return delete g.Mf[b],d(Error('File not found: "'+b+'"'),b);var e=g.Nb.$u(b);if(e in g.Zi){var k=g.Mf[b];k.On=g.Zi[e];k.On.Wi++;k.cancel=k.On.cancel}else{var h=
g.Nb.BR(b),f=g.fm(g.url,h,function(c,k){c?(a.utils.warn('Error loading part "'+b+'": '+c),g.fm(g.url,h,function(a,c){if(a)return d(a,b);g.OJ(c,h,e,b,d)})):g.OJ(k,h,e,b,d)}),l=g.Mf[b];l&&(l.started=!0,l.cancel=function(){l.On.Wi--;0===l.On.Wi&&(f(),delete g.Zi[e])},g.Zi[e]=new c,l.On=g.Zi[e],l.On.cancel=l.cancel)}},OJ:function(b,d,a,c,g){if(b.length!==d.stop-d.start)return g(Error("Part data is wrong size!"),c);do{if(!this.Zi[a])return;c=this.Zi[a].Wi;for(var e=d.KJ.length,k=0;k<e;++k){var h=d.KJ[k];
g(!1,h.nm,b["string"===typeof b?"substring":"subarray"](h.start,h.stop),this.Nb.zI(h.nm));h.nm in this.Mf&&delete this.Mf[h.nm]}}while(c!==this.Zi[a].Wi);delete this.Zi[a]}};e.prototype=$.extend(new k,e.prototype);f.prototype=$.extend(new e,f.prototype);a.o.V.Pk=e;a.o.V.tx=d})(window);
(function(a){function f(a,b){e.apply(this,[a]);this.url=a;-1===b.indexOf("/",b.length-1)&&(b+="/");this.path=b}var e=a.o.V.lf;f.prototype=new e;f.prototype=_(f.prototype).extend({request:function(c){var b=this;_(c).each(function(d){var c=-1!==d.indexOf("Thumbs/"),k=-1!==d.indexOf("Fonts/");if(-1!==d.indexOf("Images/")||c||k)return b.trigger("partReady",{ra:d,data:d,xf:!0,cd:!1,error:null,Gb:!1});$.ajax({url:b.path+d,mimeType:"text/plain; charset=x-user-defined",xhrFields:{withCredentials:e.withCredentials},
xhr:function(){var b=$.ajaxSettings.xhr();b&&(this.yS=function(){return b.responseBody});return b},success:function(c){var g=a.utils.ie?this.yS():c;c="";var e,k,f;if(a.utils.ie){g=(new a.VBArray(g)).toArray();f=g.length;e=Array(f);for(k=0;k<f;k++)e[k]=g[k]&255;g=f/1024+1;for(k=0;k<g;k++)c+=String.fromCharCode.apply(null,e.slice(1024*k,1024*k+1024))}else for(e=a.o.V.Qy,k=0;k<g.length;){for(f=0;1024>f&&k<g.length;++f)e[f]=g.charCodeAt(k)&255,++k;c+=String.fromCharCode.apply(null,e.slice(0,f))}return b.trigger("partReady",
{ra:d,data:c,xf:!1,cd:!1,error:null,Gb:!0})},error:function(a,c,g){a=Error(c+" "+g);return b.trigger("partReady",{ra:d,xf:!1,cd:!!a.Gy,error:a})}})})},Co:function(a){a()}});a.o.V.Dx=f})(window);
(function(a){function f(a,c){c=c||{};this.url=a;this.filename=c.filename||a;this.yf=null;this.hY=!!c.useDownloader;this.withCredentials=!!c.withCredentials}f.prototype=$.extend({ym:function(a){this.yf=a},getFileData:function(a){var c=new XMLHttpRequest,b=0===this.url.indexOf("blob:")?"blob":"arraybuffer";c.open("GET",this.url,!0);c.withCredentials=this.withCredentials;c.responseType=b;var d=this;if(this.yf)for(var g in this.yf)c.setRequestHeader(g,this.yf[g]);var k=/^https?:/i.test(this.url);c.addEventListener("load",
function(b){if(200===this.status||!k&&0===this.status)if(d.trigger("documentLoadingProgress",[b.loaded,b.loaded]),"blob"===this.responseType){b=this.response;var c=new FileReader;c.onload=function(b){a(new Uint8Array(b.target.result))};c.readAsArrayBuffer(b)}else try{c=new Uint8Array(this.response),a(c)}catch(g){d.trigger("error",["pdfLoad","Out of memory"])}else d.trigger("error",["pdfLoad",this.status+" "+b.currentTarget.statusText])},!1);c.onprogress=function(b){d.trigger("documentLoadingProgress",
[b.loaded,0<b.total?b.total:0])};c.addEventListener("error",function(){d.trigger("error",["pdfLoad","Network failure"])},!1);c.send();this.xhr=c},getFile:function(){if(a.utils.isJSWorker)return this.url;if(this.hY){var e={url:this.url};this.yf&&(e.customHeaders=this.yf);return e}return null},abort:function(){this.xhr&&this.xhr.abort()}},a.utils.eventHandler);a.o.V.Es=f})(window);
(function(a){function f(d,a,h,f){b.apply(this,[d,h,f]);this.url=d;this.stream=new c(d,a);this.Nb=new e;this.Mr=createPromiseCapability();this.QJ={}}function e(){this.buffer="";this.state=0;this.Em=4;this.Wc=null;this.af=d.prototype.Dp;this.jg={}}function c(b,d){var c=-1===b.indexOf("?")?"?":"&";switch(d){case !1:case a.o.V.kj.Is:this.url=b+c+"_="+_.uniqueId();break;default:this.url=b}this.request=new XMLHttpRequest;this.request.open("GET",this.url,!0);this.request.setRequestHeader("X-Requested-With",
"XMLHttpRequest");this.request.overrideMimeType?this.request.overrideMimeType("text/plain; charset=x-user-defined"):this.request.setRequestHeader("Accept-Charset","x-user-defined");this.status=this.Ob.pj}var b=a.o.V.lf,d=a.o.V.yj;c.prototype={start:function(b,d){var a=this,c=this.request,e;a.ug=0;if(b)for(var f in b)this.request.setRequestHeader(f,b[f]);d&&(this.request.withCredentials=d);this.Ti=setInterval(function(){var b=0===window.document.URL.indexOf("file:///"),b=200===c.status||b&&0===c.status;
if(4!==c.readyState||b){try{c.responseText}catch(d){return}a.ug<c.responseText.length&&(e=a.MB())&&a.trigger("data",e);0===c.readyState&&(clearInterval(a.Ti),a.trigger("done"))}else clearInterval(a.Ti),a.trigger("done","Error received return status "+c.status)},1E3);this.request.send(null);this.status=this.Ob.Wk},MB:function(){var b=this.request,d=b.responseText;if(0!==d.length)if(this.ug===d.length)clearInterval(this.Ti),this.trigger("done");else return d=Math.min(this.ug+3E6,d.length),b=a.zA(b,
this.ug,!0,d),this.ug=d,b},abort:function(){clearInterval(this.Ti);var b=this;this.request.onreadystatechange=function(){a.utils.warn("StreamingRequest aborted");b.status=b.Ob.Jk;return b.trigger("aborted")};this.request.abort()},finish:function(){var b=this;this.request.onreadystatechange=function(){b.status=b.Ob.Ex;return b.trigger("done")};this.request.abort()},Ob:{pj:0,Wk:1,Ex:2,ERROR:3,Jk:4}};_(c.prototype).extend(Backbone.Events);e.prototype=new d;e.prototype=_(e.prototype).extend({processData:function(b){var a;
for(b=this.buffer+b;b.length>=this.af;)switch(this.state){case 0:this.Wc=a=this.MJ(b.slice(0,this.af));if(a.zk!==this.ZI)throw Error("Wrong signature in local header: "+a.zk);b=b.slice(this.af);this.state=1;this.af=a.lu+a.Ah+a.Ll+this.Em;this.trigger("header",a);break;case 1:if(this.Wc.name=b.slice(0,this.Wc.Ah),this.jg[this.Wc.name]=this.Wc,a=this.af-this.Em,this.trigger("file",this.Wc.name,b.slice(this.Wc.Ah+this.Wc.Ll,a),this.Wc.tu),b=b.slice(a),b.slice(0,this.Em)===this.$I)this.state=0,this.af=
d.prototype.Dp;else return this.state=2,!0}this.buffer=b;return!1}});_(e.prototype).extend(Backbone.Events);f.prototype=new b;f.prototype=_(f.prototype).extend({sm:function(b){var d=this;this.request([this.Vf,this.Kg,this.Uf]);this.stream.bind("data",function(a){try{if(d.Nb.processData(a))return d.stream.finish()}catch(c){throw d.stream.abort(),d.Kl(c),b(c),c;}});this.stream.bind("done",function(a){d.ZU=!0;d.Mr.resolve();a&&(d.Kl(a),b(a))});this.Nb.bind("header",_(this.tw).bind(this));this.Nb.bind("file",
_(this.OB).bind(this));return this.stream.start(this.yf,this.withCredentials)},wA:function(b){var d=this;this.Mr.promise.then(function(){b(Object.keys(d.Nb.jg))})},$i:function(){return!0},request:function(b){var d=this;this.ZU&&b.forEach(function(b){d.QJ[b]||d.NX(b)})},tw:function(){},abort:function(){this.stream&&this.stream.abort()},NX:function(b){this.trigger("partReady",{ra:b,error:"Requested part not found",xf:!1,cd:!1})},OB:function(b,d,a){this.QJ[b]=!0;this.trigger("partReady",{ra:b,data:d,
xf:!1,cd:!1,error:null,Gb:a})}});a.o.V.sD=f;a.o.V.bZ=c})(window);
(function(a){function f(d,a,h,f){b.apply(this,[d,h,f]);this.url=d;this.stream=new c(d,a);this.Nb=new e(a,h,f,d.slice(0,d.lastIndexOf("/")+1));this.Mr=createPromiseCapability();this.iQ={};this.eK=null;this.timeStamp=0}function e(b,a,c,e){this.Kn=b;this.decrypt=a;this.El=c;this.buffer="";this.state=0;this.Em=4;this.Wc=null;this.af=d.prototype.Dp;this.Ko=[];this.Dw=[];this.Er=this.sB=0;this.jg={};this.JV=e;this.Pv="";this.qw=null;this.hB="";this.UB=0;this.uU=5}function c(b,d){var c=-1===b.indexOf("?")?
"?":"&";switch(d){case !1:case a.o.V.kj.Is:this.url=b+c+"_="+_.uniqueId();break;default:this.url=b}this.request=new XMLHttpRequest;this.request.open("GET",this.url,!0);this.request.setRequestHeader("X-Requested-With","XMLHttpRequest");this.request.overrideMimeType?this.request.overrideMimeType("text/plain; charset=x-user-defined"):this.request.setRequestHeader("Accept-Charset","x-user-defined");this.status=this.Ob.pj}var b=a.o.V.lf,d=a.o.V.yj;c.prototype={start:function(b,d){var a=this,c=this.request,
e;a.ug=0;if(b)for(var f in b)this.request.setRequestHeader(f,b[f]);d&&(this.request.withCredentials=d);this.Ti=setInterval(function(){var b=0===window.document.URL.indexOf("file:///"),b=200===c.status||b&&0===c.status;if(4!==c.readyState||b){try{c.responseText}catch(d){return}a.ug<c.responseText.length&&(e=a.MB())&&a.trigger("data",e);0===c.readyState&&(clearInterval(a.Ti),a.trigger("done"))}else clearInterval(a.Ti),a.trigger("done","Error received return status "+c.status)},300);this.request.send(null);
this.status=this.Ob.Wk},MB:function(){var b=this.request,d=b.responseText;if(0!==d.length)if(this.ug===d.length)clearInterval(this.Ti),this.trigger("done");else return d=Math.min(this.ug+3E6,d.length),b=a.zA(b,this.ug,!0,d),this.ug=d,b},abort:function(){clearInterval(this.Ti);var b=this;this.request.onreadystatechange=function(){a.utils.warn("RangeStreamingRequest aborted");b.status=b.Ob.Jk;return b.trigger("aborted")};this.request.abort()},finish:function(){var b=this;this.request.onreadystatechange=
function(){b.status=b.Ob.Ex;return b.trigger("done")};this.request.abort()},Ob:{pj:0,Wk:1,Ex:2,ERROR:3,Jk:4}};_(c.prototype).extend(Backbone.Events);e.prototype=new d;e.prototype=_(e.prototype).extend({YP:function(b){b=a.utils.utf8_decode(b).split("\n");this.hB&&(b[0]=this.hB+b[0]);var d=b[b.length-1];d&&(this.hB=d,b.pop());0<b.length&&3>b[b.length-1].length&&b.pop();0<b.length&&3>b[0].length&&b.shift();return b},jV:function(b){if(!b)return!1;b=this.YP(b);for(var d=0,a=0,c,e=this.Pv,f=!1,q=0;q<b.length;++q)if(c=
b[q].trim().replace(/(^[[,]*|[\],]*$)/g,""),!(4>c.length)){c=JSON.parse(c)||{};c.url&&(this.Pv=this.JV+c.url,e!==this.Pv&&(d=0,f=!0),e=this.Pv);c.size&&(0===d&&(a=c.pos),d+=c.size,f||1048576<d||0===this.sB||b.length===q+1)&&(this.lB({start:a,stop:a+d,url:e}),d=0);if(c.end||0===c.size)return 0<d&&this.lB({start:a,stop:a+d,url:e}),!0;f=!1}return!1},lB:function(b){var d=this;if(0<this.sB&&0===this.Er)this.Dw.push(b);else{var c=this.sB++;this.qw&&this.qw.url===b.url||(this.qw=new a.o.V.Pk(b.url,this.Kn,
this.decrypt,this.El));var e=this.qw;++d.UB;e.fm(b.url,b,function(a,e){--d.UB;d.LU(e,c,b)})}},XQ:function(){if(0<this.Er)for(;0<this.Dw.length&&this.UB<this.uU;)this.lB(this.Dw.shift())},LU:function(b,d,c){this.Ko[d-this.Er]={data:b,range:c};for(b=d;this.Er===b;b++)0<this.Ko.length&&this.Ko[0]&&(this.processData(a.ek(this.Ko[0].data),this.Ko[0].range),this.Ko.shift(),++this.Er,this.XQ())},processData:function(b){var a;if(2===this.state)return!1;for(b=this.buffer+b;b.length>=this.af;)switch(this.state){case 0:this.Wc=
a=this.MJ(b.slice(0,this.af));if(a.zk!==this.ZI)throw Error("Wrong signature in local header: "+a.zk);b=b.slice(this.af);this.state=1;this.af=a.lu+a.Ah+a.Ll+this.Em;this.trigger("header",a);break;case 1:if(this.Wc.name=b.slice(0,this.Wc.Ah),this.jg[this.Wc.name]=this.Wc,a=this.af-this.Em,this.trigger("file",this.Wc.name,b.slice(this.Wc.Ah+this.Wc.Ll,a),this.Wc.tu),b=b.slice(a),b.slice(0,this.Em)===this.$I)this.state=0,this.af=d.prototype.Dp;else return this.state=2,!0}this.buffer=b;return!1}});_(e.prototype).extend(Backbone.Events);
f.prototype=new b;f.prototype=_(f.prototype).extend({sm:function(b){var d=this;this.request([this.Vf,this.Kg,this.Uf]);this.stream.bind("data",function(a){try{if(d.Nb.jV(a))return d.stream.finish()}catch(c){throw d.stream.abort(),d.Kl(c),b(c),c;}});this.stream.bind("done",function(a){d.Mr.resolve();d.eK={};a&&(d.Kl(a),b(a))});this.Nb.bind("header",_(this.tw).bind(this));this.Nb.bind("file",_(this.OB).bind(this));this.timeStamp=Date.now();return this.stream.start(this.yf,this.withCredentials)},wA:function(b){var d=
this;this.Mr.promise.then(function(){b(Object.keys(d.Nb.jg))})},$i:function(){return!0},request:function(){},tw:function(){},abort:function(){this.stream&&this.stream.abort()},OB:function(b,d,a){this.trigger("partReady",{ra:b,data:d,xf:!1,cd:!1,error:null,Gb:a});this.iQ[b]={ra:b,data:null,Gb:a}}});a.o.V.XM=f;a.o.V.$Y=c})(window);
(function(a){function f(a){e.apply(this,arguments);this.db=a}var e=a.o.V.lf;f.prototype=new e;f.prototype=_(f.prototype).extend({request:function(a){var b=this;_(a).each(function(d){b.db.get(d,function(a,c,e){return a?b.trigger("partReady",{ra:d,error:a}):b.trigger("partReady",{ra:d,data:c,xf:!1,cd:!1,error:null,Gb:e})})})},Co:function(a){a()}});a.o.V.Mp=f})(window);
(function(a){function f(b,d,a,e){c.apply(this,arguments)}function e(b,d){this.url=b;this.range=d;this.request=new XMLHttpRequest;this.request.open("GET",this.url,!0);a.Uint8Array&&(this.request.responseType="arraybuffer");this.request.setRequestHeader("X-Requested-With","XMLHttpRequest");this.status=this.Ob.pj}var c=a.o.V.Pk;e.prototype=a.o.V.tx.prototype.extend(e);f.prototype={Or:e,Cq:function(b,d){return b+"/bytes="+d.start+","+(d.stop?d.stop:"")}};f.prototype=$.extend(new c,f.prototype);a.o.V.TL=
f;a.o.V.EY=e})(window);
(function(a){a.o.WC=function(a,e,c){function b(b,a){function c(b){f().then(function(d){v&&!w?setTimeout(function(){c(b)},1):d.send(JSON.stringify(b))})}function e(b,d,a){var g=createPromiseCapability(),f=!1,h=g;p=b;u=d;r=a;m=null;try{var l=new WebSocket(z?q+"/"+z:q+"/ws");l.onopen=function(){g.resolve();f=!0;g=null;v=!1;n.resolve(l);u&&u()};l.onerror=function(b){v=w=!0;g&&g.reject(b);m&&m.reject()};l.onclose=function(){n=createPromiseCapability();v=!0;m||(m=createPromiseCapability());m.resolve();
r&&r();p&&f&&p({t:"health",data:{unhealthy:!0}})};l.onmessage=function(b){b&&b.data&&(b=JSON.parse(b.data),b.hb?c({hb:!0}):b.end?close():p(b))}}catch(H){g.reject(H),g=null}return h.promise}function f(){v&&p&&e(p);return n.promise}var n=createPromiseCapability(),m=null,q=function(b){var d=b.indexOf("://"),a="ws://";0>d?d=0:(5===d&&(a="wss://"),d+=3);var c=b.lastIndexOf("/");0>c&&(c=b.length);return a+b.slice(d,c)}(b),p=null,u=null,r=null,v=!1,w=!1,z=a;return{send:c,xC:e,Fz:function(){return m?m.promise:
f().then(function(b){m=createPromiseCapability();p=null;b.close();return m.promise})}}}return window.WebSocket&&!c?b(a,e):function(b,a){function c(b){(u?u.promise:Promise.resolve(p)).then(function(d){var a=new XMLHttpRequest;d=q?m+"/"+q+"pf?id="+d:m+"/pf?id="+d;var c=new FormData;c.append("data",JSON.stringify(b));a.open("POST",d);a.withCredentials=!0;a.send(c)})}function e(){p=0;u||(u=createPromiseCapability())}function f(){n=new XMLHttpRequest;var b=m+"/pf",b=0!==p?b+("?id="+p+"&uc="+z):b+("?uc="+
z);z++;n.open("GET",b,!0);n.withCredentials=!0;n.setRequestHeader("Cache-Control","no-cache");n.setRequestHeader("X-Requested-With","XMLHttpRequest");var d=n,a=!1;n.onreadystatechange=function(){a:{var b;if(3<=d.readyState&&!a){try{b=d.responseText.length}catch(g){console.log("caught exception");break a}if(0<b)try{var n=d.responseText.split("\n");for(n[n.length-1]&&n.pop();0<n.length&&3>n[n.length-1].length;)"]"===n.pop()&&e();0<n.length&&3>n[0].length&&n.shift();for(b=0;b<n.length;++b)n[b].endsWith(",")&&
(n[b]=n[b].substr(0,n[b].length-1));0===p&&0<n.length&&(p=JSON.parse(n.shift()).id,b=u,u=null,b.resolve(p));var v;for(b=0;b<n.length;++b)(v=JSON.parse(n[b]))&&v.end?close():v&&v.hb&&v.id===p?c({hb:!0}):w(v)}catch(g){}r||(a=!0,f())}}};n.send()}var n,m=function(b){var d=b.lastIndexOf("/");0>d&&(d=b.length);return b.slice(0,d)}(b),q=a,p=0,u=createPromiseCapability(),r=!1,v=null,w=null,z=0;return{send:c,xC:function(b,d,a){w=b;v=a;r=!1;e();f();d&&d();return Promise.resolve()},Fz:function(){e();w=null;
r=!0;v&&v();n.abort();return Promise.resolve()}}}(a,e)}})(window);
(function(a){function f(b,d,f){d.endsWith("/")||(d+="/");f=f||{};var l=f.disableWebsockets||!1;d.endsWith("blackbox/")||(d+="blackbox/");this.Dk=f.uploadData||null;this.ks=f.uriData||null;this.EF=f.cacheKey||null;this.hz=a.o.WC(d,null,l);this.Yw=null;this.Je=d;this.xz=b;this.me=null;this.lm=e();this.Xj=e();this.gz=!1;this.Ue=this.$c=this.rd=this.Xd=null;this.ue=[];this.Su=[];this.cache={};this.eK=null;this.Dw=[];this.timeStamp=0;this.Ge=[];this.Lf=[];this.Mz=null;this.kz=!1;this.fC=this.id=null;this.iB=
this.mI=c;this.Wr=0;this.MA=!1;this.FU=1;this.Lv={};this.$r(!0)}function e(){var b={promise:null,resolve:null,reject:null,state:0,result:null,request:null,or:function(){return 1===(b.state&1)},OT:function(){return 2===(b.state&2)},sg:function(){return!b.OT()&&!b.or()},GT:function(){return 4===(b.state&4)},BK:function(){b.state|=4}};b.promise=new Promise(function(d,a){b.resolve=function(){if(0===b.state||4===b.state)b.state=1,b.result=arguments[0],d.apply(null,arguments)};b.reject=function(){if(0===
b.state||4===b.state)b.state=2,a.apply(null,arguments)}});return b}function c(){return!1}function b(b,a,c){if(!(a in d))return!0;a=d[a];for(var e=0;e<a.length;e++){var f;var m=b;f=a[e];var q=c;if(f.name in m){var p="",u=!1,m=m[f.name];switch(f.type){case "s":p="String";u=_.isString(m);break;case "a":p="Array";u=_.isArray(m);break;case "n":p="Number";u=_.isNumber(m)&&_.isFinite(m);break;case "o":p="Object",u=_.isObject(m)&&!_.isArray(m)}u||q.reject('Expected response field "'+f.name+'" to have type '+
p);f=u}else q.reject('Response missing field "'+f.name+'"'),f=!1;if(!f)return!1}return!0}var d={pages:[{name:"pages",type:"a"}],pdf:[{name:"url",type:"s"}],docmod:[{name:"url",type:"s"},{name:"rID",type:"s"}],health:[],tiles:[{name:"z",type:"n"},{name:"rID",type:"n"},{name:"tiles",type:"a"},{name:"size",type:"n"}],annots:[{name:"url",type:"s"},{name:"name",type:"s"}],image:[{name:"url",type:"s"},{name:"name",type:"s"},{name:"p",type:"n"}],text:[{name:"url",type:"s"},{name:"name",type:"s"},{name:"p",
type:"n"}]};f.prototype=_(f.prototype).extend({dQ:function(){var b=createPromiseCapability();if(this.Yw){var d=!1,a=new XMLHttpRequest;a.open("GET",this.Je+"ck?c="+this.Yw);a.withCredentials=this.vo();a.onreadystatechange=function(){3<=a.readyState&&!d&&(d=!0,200===a.status?b.resolve():b.reject())};a.send()}else b.resolve();return b.promise},wW:function(b,d){this.mI=b||c;this.iB=d||c},SF:function(){var b=this;b.Xj=e();b.lm=e();return this.hz.Fz().then(function(){function d(){b.gz=!1;b.id=null;b.kz=
!1;return Promise.resolve()}return b.dQ().then(d,d)})},gK:function(){this.mI();this.TA();this.Xd&&(this.Xd.sg()?this.Ie(this.Xd.request):this.Xd.or()&&this.iB(this.Xd.result.url,"pdf")&&(this.Xd=null,this.fK()));this.Ue&&this.Ue.sg()&&this.Ie(this.Ue.request);this.rd&&this.rd.sg()?this.Ie(this.rd.request):this.$c&&this.$c.sg()&&this.fI(this.$c.request);var b;for(b=0;b<this.Ge.length;b++)this.Ge[b]&&this.Ge[b]&&(this.Ge[b].sg()?this.Ie(this.Ge[b].request):this.Ge[b].or()&&this.iB(this.Ge[b].result.url,
"image")&&(this.Ge[b]=null,this.Cw(b)));for(b=0;b<this.Lf.length;b++)this.Lf[b]&&this.Lf[b]&&this.Lf[b].sg()&&!this.Lf[b].GT()&&this.Ie(this.Lf[b].request);for(b=0;b<this.ue.length;b++)this.ue[b]&&this.ue[b].sg()&&this.Ie(this.ue[b].request)},TA:function(){var b=this;this.gz||(this.timeStamp=Date.now(),this.hz.xC(function(d){b.MU(d)}).then(function(){},function(d){console.log("Connection Failed: "+d);b.kz=!0;b.Wr=0;b.fC=0;b.Xj.resolve({unhealthy:!0,id:0,serverID:"0",hasPDF:!0,hasXOD:!1});b.lm.resolve()}),
this.gz=!0)},fY:function(){var b,d,c,e,f=this,m=createPromiseCapability(),q=!1,p=!1;if(this.Dk)b=new FormData,b.append("file",this.Dk.fileHandle,this.Dk.fileHandle.name),d=this.Dk.loadCallback,e="upload",c=this.Dk.extension;else if(this.ks)b={uri:this.ks.uri,share:this.ks.shareId},q=!0,p=void 0,d=this.ks.loadCallback,e="url",c=this.ks.extension;else return Promise.resolve();$.ajax({type:"POST",url:a.joinPaths(f.Je,"AuxUpload?ext="+c+"&type="+e),contentType:p,xhrFields:{withCredentials:this.vo()},
data:b,processData:q,dataType:"json",success:function(b){f.xz=b.uri;d(b);m.resolve(b)},error:function(b){console.log(b);m.reject(b)},xhr:function(){var b=$.ajaxSettings.xhr();f.Dk&&null!=f.Dk.onProgress&&(b.upload.onprogress=function(b){f.Dk.onProgress(b)});return b}});return m.promise},sm:function(b){this.Mz=b||null;this.lm.or()||(this.TA(),this.Ie({t:"pages"}));return this.lm.promise},VF:function(b){b=$.extend(b,{uri:encodeURIComponent(this.xz)});this.Mz&&(b.ext=this.Mz);this.me&&(b.c=this.me);
this.EF&&(b.cacheKey=this.EF);return b},Ie:function(b){b=this.VF(b);this.hz.send(b)},hi:function(b){return b},MU:function(d){var a=this,c,f=d.data,n=d.err,m=d.t;switch(m){case "upload":n?a.gY.reject(n):a.gY.resolve("Success");break;case "pages":n?a.lm.reject(n):b(f,m,a.lm)&&a.lm.resolve(f);break;case "config":n?a.Xj.reject(n):b(f,m,a.Xj)&&(f.id&&(a.id=f.id),f.sCookieName&&(a.Yw=f.sCookieName),f.serverID?(a.Wr=f.serverID===a.fC&&a.MA?a.Wr+1:0,a.fC=f.serverID):a.Wr=0,a.MA=!1,a.Xj.resolve(f));break;
case "health":n?a.Xj.reject(n):b(f,m,a.Xj)&&!a.l_&&f.unhealthy&&a.Yw&&1>=a.Wr&&(a.MA=!0,a.SF().then(function(){a.gK()},function(){a.gK()}));break;case "pdf":f.url=a.Je+"../"+encodeURI(f.url);n?a.Xd.reject(n):b(f,m,a.Xd)&&a.Xd.resolve(f);break;case "docmod":f.url=a.Je+"../"+encodeURI(f.url);n?a.Lv[f.rID].reject(n):b(f,m,a.Xd)&&a.Lv[f.rID].resolve(f);break;case "xod":if(n)this.rd&&this.rd.sg()&&this.rd.reject(n),this.$c&&this.$c.sg()&&this.$c.reject(n);else if(f.notFound)f.noCreate||this.rd&&this.rd.sg()&&
this.rd.resolve(f),this.$c&&this.$c.sg()&&this.$c.resolve(f);else{f.url&&(f.url=a.Je+"../"+encodeURI(f.url));if(!this.$c||this.$c.or())this.$c=e(),this.$c.request={t:"xod",noCreate:!0};this.rd||(this.rd=e(),this.rd.request={t:"xod"});this.$c.resolve(f);this.rd.resolve(f)}break;case "annots":n?a.Ue.reject(n):b(f,m,a.Ue)&&(a.Ue.BK(),$.ajax({dataType:"text",url:a.Je+"../"+encodeURI(f.url),xhrFields:{withCredentials:this.vo()},success:function(b){a.Ue.resolve(b)},error:function(b,d,c){a.Ue.reject(d+(c?
": "+JSON.stringify(c):""))}}));break;case "image":c=this.Ge[f.p];n?c.promise.reject(n):b(f,m,c)&&(c.result=f,c.result.url=a.Je+"../"+encodeURI(c.result.url),c.resolve(c.result));break;case "tiles":c=f.rID;d=this.ue[c];this.ue[c]=null;this.Su.push(c);if(n)d.reject(n);else if(b(f,m,d)){for(n=0;n<f.tiles.length;n++)f.tiles[n]=a.Je+"../"+encodeURI(f.tiles[n]);d.resolve(f)}break;case "text":c=this.Lf[f.p];n?c.reject(n):b(f,m,c)&&(c.BK(),$.ajax({dataType:"json",xhrFields:{withCredentials:this.vo()},url:a.Je+
"../"+encodeURI(f.url),success:function(b){c.result=b;c.resolve(c.result)},error:function(b,d,a){c.reject(d+(a?": "+JSON.stringify(a):""))}}));break;case "progress":"loading"===f.t&&a.trigger("documentLoadingProgress",[f.bytes,f.total])}},nH:function(){this.TA();return this.Xj.promise},fH:function(){this.Ue||(this.Ue=e(),this.Ue.request={t:"annots"},this.Ie(this.Ue.request));return this.Ue.promise},Cw:function(b){this.Ge[b]||(this.Ge[b]=e(),this.Ge[b].request={t:"image",p:b},this.Ie(this.Ge[b].request));
return this.Ge[b].promise},AV:function(b){this.Lf[b]||(this.Lf[b]=e(),this.Lf[b].request={t:"text",p:b},this.Ie(this.Lf[b].request));return this.Lf[b].promise},BV:function(b,d,a,c){var f=this.ue.length;this.Su.length&&(f=this.Su.pop());this.ue[f]=e();this.ue[f].request={t:"tiles",p:b,z:d,r:a,size:c,rID:f};this.Ie(this.ue[f].request);return this.ue[f].promise},fK:function(){this.Xd||(this.Xd=e(),this.Xd.request={t:"pdf"},this.kz?this.Xd.resolve({url:this.xz}):this.Ie(this.Xd.request));return this.Xd.promise},
CH:function(b){var d=new XMLHttpRequest,a=this.Je+"aul?id="+this.id,c=new FormData,f={};b.annots&&(f.annots="xfdf");b.watermark&&(f.watermark="png");b.redactions&&(f.redactions="redact");f={t:"docmod",reqID:this.FU++,parts:f};b.print&&(f.print=!0);f=this.VF(f);c.append("msg",JSON.stringify(f));b.annots&&c.append("annots",b.annots);b.watermark&&c.append("watermark",b.watermark);b.redactions&&c.append("redactions",b.redactions);this.Lv[f.reqID]=e();d.open("POST",a);d.withCredentials=this.vo;d.send(c);
return this.Lv[f.reqID].promise},fI:function(){this.$c||(this.$c=e(),this.$c.request={t:"xod",noCreate:!0},this.Ie(this.$c.request));return this.$c.promise},CV:function(){this.rd||(this.rd=e(),this.rd.request={t:"xod"},this.Ie(this.rd.request));return this.rd.promise},$i:function(){return!0},request:function(){},tw:function(){},abort:function(){for(var b=0;b<this.ue.length;b++)this.ue[b]&&(this.ue[b].resolve(null),this.ue[b]=null,this.Su.push(b));this.close()},ym:function(b){this.me=this.me||{};this.me.headers=
b},wR:function(){return this.me?_.omit(this.me.headers,["Cookie","cookie"]):null},$r:function(b){this.me=this.me||{};this.me.internal=this.me.internal||{};this.me.internal.withCredentials=b},vo:function(){return this.me&&this.me.internal?this.me.internal.withCredentials:null},getFileData:function(){return Promise.reject()}},a.utils.eventHandler);a.o.V.vs=f})(window);
(function(a){function f(b,d,a,e){c.apply(this,arguments)}function e(b,d){this.url=b;this.range=d;this.status=this.Ob.pj}var c=a.o.V.Pk,b=a.o.V.tx,d={};e.prototype={start:function(b){var c=this;d[this.range.start]={success:function(d){var e=atob(d),f,h=e.length;d=new Uint8Array(h);for(f=0;f<h;++f)d[f]=e.charCodeAt(f);e=d.length;f="";var p=0;if(a.utils.typedArrayApply)for(;p<e;)h=d.subarray(p,p+1024),p+=1024,f+=String.fromCharCode.apply(null,h);else for(h=Array(1024);p<e;){for(var u=0,r=Math.min(p+
1024,e);p<r;u++,p++)h[u]=d[p];f+=String.fromCharCode.apply(null,1024>u?h.slice(0,u):h)}c.success(f,b)},fail:function(){c.status=c.Ob.ERROR;b({code:c.status})}};var e=document.createElement("IFRAME");e.setAttribute("src",this.url);document.documentElement.appendChild(e);e.parentNode.removeChild(e);e=null;this.status=this.Ob.Wk;c.fv()}};e.prototype=b.prototype.extend(e);f.prototype={Or:e,Cq:function(b,d){return b+"#"+d.start+"&"+(d.stop?d.stop:"")}};f.prototype=$.extend(new c,f.prototype);a.o.V.Ap=
f;a.o.V.OY=e;a.o.V.Ap.HB=function(b,a){var c=d[a];delete d[a];c.success(b)};a.o.V.Ap.GB=function(b,a){var c=d[a];delete d[a];c.fail()}})(window);
(function(a){function f(b,d,a,e){c.apply(this,arguments)}function e(b,d){this.url=b;this.range=d;this.status=this.Ob.pj}var c=a.o.V.Pk,b=a.o.V.tx,d={};e.prototype={start:function(b){function a(){e.status=e.Ob.ERROR;b({code:e.status})}function c(d){var a=atob(d),k,f=a.length;d=new Uint8Array(f);for(k=0;k<f;++k)d[k]=a.charCodeAt(k);a=d.length;k="";for(var h=0;h<a;)f=d.subarray(h,h+1024),h+=1024,k+=String.fromCharCode.apply(null,f);e.success(k,b)}var e=this;"undefined"===typeof d[this.range.start]&&
(d[this.range.start]={success:c,fail:a},window.external.notify(this.url),this.status=this.Ob.Wk);e.fv()}};e.prototype=b.prototype.extend(e);f.prototype={Or:e,Cq:function(b,d){return b+"?"+d.start+"&"+(d.stop?d.stop:"")}};f.prototype=$.extend(new c,f.prototype);a.o.V.Np=f;a.o.V.gZ=e;a.o.V.Np.HB=function(b,a){var c=d[a];delete d[a];c.success(b)};a.o.V.Np.GB=function(b,a){var c=d[a];delete d[a];c.fail()}})(window);
(function(a){function f(){e.apply(this,arguments)}var e=a.o.V.Pk;f.prototype=$.extend(new e,{tH:function(){return{start:this.PG-a.o.V.yj.prototype.Rm,stop:this.PG}},Co:function(a){var b=this;this.fm(this.url,{start:0,stop:1},function(d,g,k){if(d)return a(d);d=k.request.getResponseHeader("Content-Range");b.PG=d.split("/")[1];e.prototype.Co.call(b,a)})}});a.o.V.XL=f})(window);
(function(a){function f(b,d,g,e){this.Zd=b;this.Zv=!1;this.cache=new c(a.wx,b.$i());b.decrypt&&b.$i()&&(this.Jl=new c(a.wx,b.$i()));this.J=d;this.ma=e;this.Pi={};this.ds={};this.ju={};this.xu={};this.Tu=[];this.Ml={};this.He=g;this.bw=_.bind(this.bw,this);b.bind("partReady",this.bw)}function e(b){window._indexedDB=window._indexedDB||window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;window._IDBTransaction=window._IDBTransaction||window.IDBTransaction||window.webkitIDBTransaction;
window._IDBTransaction&&!window._IDBTransaction.READ_WRITE&&(window._IDBTransaction.READ_WRITE="readwrite");this.name=b;this.db=null;this.jG="1";this.Fu=this.cd=!1}function c(b,d){this.vU=this.Rr=b;this.queue=[];this.bR=d}function b(b,d){this.Kf=b;this.BJ=d;this.We={};this.xh={};this.cd=!1;for(var a=0;a<d.length;a++)this.xh[d[a]]=!0}function d(){this.index=0;this.data={functions:[],We:[],done:!1};this.oc=[]}function g(b){this.data=b;this.oc=[];this.Sf=[]}function k(b,d){this.Kf=b;this.Ta={};this.pb=
null;this.Ja=d}var h=a.o.V.Dx;a.Oz=!1;a.o.oA=function(b,d){if(a.utils.hasObjectURL){"string"===typeof d&&(d=a.ZH(d));var c;try{c=new Blob([d],{type:b})}catch(g){window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.VY||window.UY,window.BlobBuilder&&(c=new window.BlobBuilder,c.append(d),c=c.getBlob(b))}if(c)return URL.createObjectURL(c)}else return"data:"+b+";base64,"+btoa(d)};a.o.zH=function(b,d){return a.o.oA("image/"+("jpg"===b?"jpeg":b),d)};g.prototype={init:function(b){if(this.data){var d=
this;a.SS(this.data,this.ma,function(a){d.worker=a;d.qs();d.v0=[];d.hx=!1;d.data=null;b()},function(b,a){b?d.Sf.push(b):d.hx=!0;d.e_=a;var c=d.callback;d.callback=null;c&&c()})}else b()},cancel:function(){for(var b=0;b<this.oc.length;b++){for(var d=0;d<this.oc[b].saves;d++)this.oc[b].restore();this.oc[b].saves=0}this.oc=[];this.worker&&this.worker.cancel()},clone:function(){return new g(this.data)},run:function(b,d,a){if(this.Sf.length){-1===this.oc.indexOf(b)&&this.oc.push(b);a=Date.now()+a;do this.qs(),
runEval(this.Sf.shift(),b,d);while(this.Sf.length&&a>Date.now());return!1}return!0},Hr:function(){var b=this;this.worker||this.init(function(){b.qs()});return new Promise(function(d){b.hx||b.Sf.length?d():b.callback=d})},qs:function(){if(this.hx)return!1;this.worker.Uv()},iz:function(b){return new Function("c","t",b)},Rz:function(b){var d=this;this.init(function(){function a(){if(d.Sf.length){d.qs();var c=d.Sf.map(function(b){return d.iz(b)});d.Sf=[];b(c)}else b()}d.hx||d.Sf.length?a():d.callback=
a})}};d.prototype={clone:function(){var b=new d;b.data=this.data;b.index=0;return b},cancel:function(){for(var b=0;b<this.oc.length;b++){for(var d=0;d<this.oc[b].saves;d++)this.oc[b].restore();this.oc[b].saves=0}this.oc=[];this.Uu&&this.Uu.cancel()},ZF:function(b){return new g(b)},Rz:function(b,d){function c(){g.Uu.Rz(function(b){b?(g.data.functions=g.data.functions.concat(b),a.setImmediate(c,0)):(g.data.done=!0,g.Uu=null,d());b=g.data.We.length;if(0<b){for(var e=0;e<b;++e)g.data.We[e]();g.data.We=
[]}})}this.data.done=!1;var g=this;this.Uu=this.ZF(b);g.data.functions=[];c();this.index=0},Hr:function(){var b=this;return new Promise(function(d){b.data.done||b.index<b.data.functions.length?d():b.data.We.push(d)})},run:function(b,d,a){-1===this.oc.indexOf(b)&&this.oc.push(b);if(this.index<this.data.functions.length){a=Date.now()+a;var c=this.data.functions[this.index];do++this.index,c(b,d),c=this.data.functions[this.index];while(c&&a>Date.now());return!1}return!0},OV:g.prototype.OV};b.prototype=
{ET:function(){return 0===_(this.xh).keys().length}};c.prototype={getItem:function(b){return this[b]||null},setItem:function(b,d,a){if(b in this)this.queue.splice(this.queue.indexOf(b),1),this.queue.push(b);else if(this.bR)this[b]={data:d,Gb:a},this.queue.push(b);else if(d.length<this.vU/2){for(;this.Rr<d.length;){var c=this.queue[0];this.Rr+=this[c].data.length;delete this[c];this.queue.shift()}this.Rr-=d.length;this[b]={data:d,Gb:a};this.queue.push(b)}}};e.prototype={open:function(b,d){var a=this,
c=window._indexedDB.open(a.name);if(_.isUndefined(c))d("User declined to increase space");else{c.onsuccess=function(){a.db=c.result;if(a.db.setVersion&&a.db.version!==a.jG){var b=a.db.setVersion(a.jG);b.onsuccess=function(){a.db.objectStoreNames.contains(a.name)&&a.db.deleteObjectStore(a.name);a.db.createObjectStore(a.name,{keyPath:"partName"});b.result.oncomplete=g}}else g()};c.onupgradeneeded=function(b){a.db=b.target.result;a.db.objectStoreNames.contains(a.name)&&a.db.deleteObjectStore(a.name);
a.db.createObjectStore(a.name,{keyPath:"partName"})};c.onerror=function(){d("Error opening database for offline mode")};var g=function(){a.get("NumParts",function(c,g){if(c)a.Fu=!1,b();else{var e=a.db.transaction([a.name]).objectStore(a.name).count();e.onsuccess=function(){a.Fu=e.result===g;b()};e.onerror=function(){d("Error opening database for offline mode")}}})}}},jL:function(b,d,a,c){var g=this.db.transaction([this.name],window._IDBTransaction.READ_WRITE);g.oncomplete=function(){c&&c()};g.onerror=
function(){c&&c();throw Error("Error adding "+b+" to the offline database");};g.objectStore(this.name).put({partName:b,partData:d,compressed:a})},AX:function(b,d,a,c,g,e){function k(e){b.Ef(e,function(b){var a=d.indexOf(b.ra);-1<a&&delete d[a];f()||h.jL(b.ra,b.data,b.Gb,function(){f()||(z++,g(z/C),z===C&&(h.Fu=!0,c()))})},!0,a)}function f(){h.cd&&!A&&(A=!0,e(d),c());return A}var h=this;h.cd=!1;c=c||function(){};g=g||function(){};e=e||function(){};var z=0,C=d.length,A=!1;h.jL("NumParts",C+1,!1,function(){for(var b=
0;b<C;b++)k(d[b])})},oP:function(){this.cd=!0},get:function(b,d){var a=this.db.transaction([this.name]).objectStore(this.name).get(b);a.onsuccess=function(){a.result?d(!1,a.result.partData,a.result.compressed):d("Part "+b+" not found in the offline database")};a.onerror=function(){d("Error getting "+b+" from offline database")}},jk:function(){return this.Fu}};f.prototype={Ef:function(b,d,c,g){function e(b){b=$.extend({},b);h.Jl&&g&&(b.data=h.Jl.getItem(b.ra).data);d(b)}var k=this.cache.getItem(b);
if(!g&&null!==k){var f=k.Gb;k.Gb&&!c?(c=a.o.V.yj.inflate(k.data),f=!1):c=k.data;d({ra:b,data:c,xf:!0,cd:!1,error:null,Gb:f});return d}if(this.Jl&&g&&(f=this.Jl.getItem(b)))return d({ra:b,data:f.data,xf:!0,cd:!1,error:null,Gb:f.Gb}),d;var h=this;this.bind(b,e);this.ju[b]=!0;this.xu[b]=!c;this.Zd.request([b],g);return e},bw:function(b){if(b.error)console.error("Error reading part "+b.ra+": "+b.error),this.trigger(b.ra,{ra:b.ra,error:b.error}),this.unbind(b.ra);else{var d=this,c=function(c){var g=b.ra.match(/\.([a-zA-Z]+)$/)[1].toLowerCase();
"jpg"!==g&&"png"!==g&&(c=a.ek(c));b.hJ||(d.cache.setItem(b.ra,c,b.Gb),d.Jl&&d.Jl.setItem(b.ra,b.data,b.Gb));d.ju[b.ra]&&((g=b.Gb)&&d.xu[b.ra]&&(c=a.o.V.yj.inflate(c),g=!1),delete d.ju[b.ra],delete d.xu[b.ra],d.trigger(b.ra,{ra:b.ra,data:c,xf:!1,cd:!1,error:null,Gb:g}),d.unbind(b.ra),delete d._callbacks[b.ra])};this.Zd.decrypt&&!b.hJ?this.Zd.gG?c(this.Zd.decrypt(b.data,this.Zd.El,b.ra)):this.Zd.decrypt(b.data,this.Zd.El,b.ra,c):c(b.data)}},GA:function(b){return this.eB?"Thumbs/"+(b+1)+".jpg":"Thumbs/"+
(b+1)+".png"},FA:function(b,d,a){var c=this,g=!1,e=this.Ef(this.GA(b),function(b){g=b.xf;c.aK(d);a(b)});g||(this.ds[d]={qP:e,Jb:b})},JH:function(b,d){var c=this,g=this.J[b].Vr[0];if(b in c.Ml)d(c.Ml[b].clone());else return c.Ef(g,function(g){if(g.error)return console.error("Failed to load part for page "+b+": "+g.error);c.cR(g.data,function(g){if(a.Sm){if(c.Tu.length>=a.Sm){var e=c.Tu.shift();delete c.Ml[e]}c.Tu.push(b);c.Ml[b]=g}d(g.clone())})},!0)},tA:function(d,c,g){function e(b){if(b.error)return console.error("Failed to load part for page "+
d+": "+b.error);delete A.xh[z];v.Oj&&0!==v.oq.length||(v.oq=h.UU(b.ra,b.data).map(function(b){b.PageNumber=d+1;return b}));f()}function f(){if(A.ET()){if(null===F.pb)throw Error("Functions have not been generated yet");A.cd||y||(delete h.Pi[d],h.trigger(d,!1,F),g(!1,F),y=!0,h.unbind(d+""),h._callbacks&&delete h._callbacks[d+""])}}var h=this;this.Pi[d]=this.Pi[d]||{Po:{}};var r=0<Object.keys(this.Pi[d].Po).length;this.Pi[d].Po[c]=null;if(r)return a.utils.warn("Duplicate request for page "+d),r=function(b,
d){var a=$.extend({},d);a.pb=d.pb.clone();a.Ta=$.extend(!0,{},a.Ta);g(b,a)},this.Pi[d].Po[c]=r,this.bind(d,r);var v=h.J[d],w=v.Vr[2],z=v.Vr[1],C=v.Vr[0],A;A=this.Zv?new b(d,[C,z,w]):new b(d,[C,w]);this.Pi[d].request=A;var x=A.We,y=!1,F=new k(d,h);x[w]=h.Ef(w,function(b){if(b.error)return console.error("Failed to load part for page "+d+": "+b.error);b=h.XU(b.ra,b.data);delete A.xh[w];_(b).each(function(b){A.xh[b.slice(1)]=!0});_(b).each(function(b){b=b.slice(1);var c=-1!==b.indexOf(".odttf")||-1!==
b.indexOf(".otf"),g=-1!==b.indexOf(".png")||-1!==b.indexOf(".jpg");a.Oz&&c?(delete A.xh[b],F.Ta[b]=h.hi(b)):c&&!h.He.Bv(h.hi(b).name)?(A.BJ.push(b),x[b]=h.Ef(b,function(a){if(a.error)return console.error("Failed to load part for page "+d+": "+a.error);delete A.xh[b];F.Ta[b]=h.hi(a.ra,a.data);f()})):g&&a.Oz?(delete A.xh[b],setTimeout(function(){h.Ef(b,function(b){b=h.hi(b.ra,b.data);var a=new Image;a.src=b.data;$(a).css({position:"absolute","z-index":8,height:"100%",width:"100%"}).prependTo("#pageContainer"+
d)})},0)):(delete A.xh[b],F.Ta[b]=h.hi(b),f())});f()});this.Zv&&(x[z]=h.Ef(z,e));x[C]=this.JH(d,function(b){F.pb=b;delete A.xh[C];f()})},Mb:function(){var b=this;Object.keys(this.Ml).forEach(function(d){b.Ml[d].cancel()})},cR:function(b,d){if(a.Sm){var c=new a.o.WL(this.ma);c.Rz(b,function(){});d(c)}else d(new a.o.VL(this.ma,b))},xq:function(b,d){var a=this.Pi[b];if(a){this.Zd.Wy(a.request.BJ);var c=a.Po[d];c&&this.unbind(b+"",c);delete a.Po[d];if(0===Object.keys(a.Po).length){a.cd=!0;var a=a.We,
g;for(g in a)a.hasOwnProperty(g)&&this.unbind(g,a[g]);delete this._callbacks[b+""];delete this.Pi[b]}}},pP:function(b){var d=this.ds[b];d&&(this.Zd.Wy([this.GA(d.Jb)]),this.aK(b))},aK:function(b){var d=this.ds[b];d&&(this.unbind(this.GA(d.Jb),d.qP),delete this.ds[b])},hi:function(b,d){var c,g=b,e=b.match(/\.([a-zA-Z]+)$/)[1].toLowerCase();switch(e){case "png":case "jpg":b="i"+this.ma+"-"+b.match(/Images\/(\d+)/)[1];if(d){c=h&&this.Zd instanceof h?this.Zd.path+d:a.o.zH(e,d);break}break;case "odttf":var k;
d&&(k=this.eQ(b,d));b=a.ef.gA(this.ma,parseInt(b.substr(34,8),16));d&&(c=new a.ef.FontFace(b,k,"opentype"),this.He.$A(b)||c.insert());e="font";break;case "otf":b=b.substr(0,b.length-4);b=a.ef.gA(this.ma,parseInt(b.substr(6),10));if(d){if(h&&this.Zd instanceof h)e=this.Zd.path;else throw Error("Use an external part retriever for documents with external fonts");c=new a.ef.FontFace(b,null,"opentype",e+d);this.He.$A(b)||c.insert()}e="font";break;default:c=d}return{name:b,type:e,data:c,ra:g}},XU:function(b,
d){var c=[],g=new a.Se(d);for(g.oa();g.advance();){var e=g.K("Target");null!==e?c.push(e):a.utils.warn("Corrupt rels part: %s",b)}0<c.length&&_(c).last().match(/Thumbs/)&&c.pop();return c},UU:function(b,d){var c=[],g=new a.Se(d);for(g.oa();g.advance();){for(var e=g.ua(),k=g.K("BBox"),k=k.split(","),f=0;4>f;++f)k[f]=parseFloat(k[f]);"Hyperlink"===e?c.push(new a.Annotations.vd({actions:{U:[{name:"URI",uri:g.K("Target")}]},rect:k})):"Link"===e&&c.push(new a.Annotations.vd({actions:{U:[{name:"GoTo",dest:{page:g.K("ID"),
fit:"XYZ",top:g.K("Vpos"),left:g.K("Hpos")}}]},rect:k}))}return c},eQ:function(b,d){b=b.split("/")[1].split(".")[0];for(var a=b.split("-"),c=[],g=16,e=0;e<a.length;++e)for(var k=a[e],f=0;f<k.length;f+=2)c[--g]=parseInt(k.slice(f,f+2),16);for(a=0;16>a;++a)g=c[a],c[a]=String.fromCharCode(d.charCodeAt(a)^g),c[a+16]=String.fromCharCode(d.charCodeAt(a+16)^g);return d=c.join("")+d.slice(32)}};_(f.prototype).extend(Backbone.Events);a.o.V.EM=f;a.o.IM=e;a.o.fM=g;a.o.gM=d})(window);
(function(a){function f(b){this.index=0;this.data={functions:[],We:[],done:!1};this.oc=[];this.Hz=new c(b);this.ma=b}function e(b,d){this.data=d;this.oc=[];this.Sf=[];this.Hz=new c(b);this.ma=b}function c(b){this.ma=b;this.Li=0;this.Ta=[];this.Mi=[0,0]}c.prototype={Xr:function(b,d,c){this.m_c=d;this.Fc=c;d=b.operators;b=b.data;var e=d.length;this.BC=a.asc(c);this.FX=1/this.BC;for(var f=0;f<e;++f)c=d[f],this[c].apply(this,b[f]);this.Kv=null},save:function(){this.m_c.save()},restore:function(){this.m_c.restore()},
transform:function(b,d,a,c,e,f){this.m_c.transform(b,d,a,c,e,f)},translate:function(b,d){this.m_c.translate(b,d)},vW:function(b,d){this.m_c.lineWidth=Math.max(b,this.FX/d)},tW:function(b){this.m_c.lineCap=b},iH:function(b){var d=b.type;if(d)switch(d){case 1:b=this.createPattern(b);break;case 2:b=this.createLinearGradient(b);break;case 3:b=this.createRadialGradient(b);break;case 4:b=this.NP(b)}return b},bX:function(b){this.m_c.strokeStyle=this.iH(b)},nW:function(b){this.m_c.fillStyle=this.iH(b)},IV:function(b){var d=
this.xS(b);b=d.qU;for(var d=d.pU,a,c=b.length,e=0;e<c;++e)a=b[e],this[a].apply(this,d[e])},oW:function(b){this.m_c.globalAlpha=b},$F:function(b,d){for(var a=d.length,c=0;c<a;++c){var e=d[c],f=d[++c];b.addColorStop(e,f)}},QP:function(b){var d=this.m_c,a=this.Fc,c=b.operators,e=this.BC*b.scale,f=b.w*e,n=b.h*e;2>e*b.minwh&&(e=2/b.minwh,f=b.w*e,n=b.h*e);var m=this.m_c.createCanvas();m.width=f;m.height=n;var f=m.getContext("2d"),n=b.x||b.y,q={};n&&(q.x=b.x,q.y=b.y);q.s=1/e;f.scale(e,e);n&&f.translate(-b.x,
-b.y);b.strokeAdjust&&(this.m_c.lineWidth=e*b.strokeAdjust);this.Xr(c,f,this.Fc);this.m_c=d;this.Fc=a;return{canvas:m,transform:q}},createPattern:function(b){var d;this.Kv&&b===this.Kv.style?d=this.Kv:(d=this.QP(b),d.style=b,d.pattern=this.m_c.createPattern(d.canvas,b.tm),this.Kv=d);b=d.transform;b.x&&this.m_c.translate(b.x,b.y);this.m_c.scale(b.s,b.s);return d.pattern},createLinearGradient:function(b){var d=this.m_c.createLinearGradient(b.x0,b.y0,b.x1,b.y1);this.$F(d,b.stops);return d},createRadialGradient:function(b){var d=
this.m_c.createRadialGradient(b.x0,b.y0,0,b.x1,b.y1,b.r);this.$F(d,b.stops);return d},NP:function(b){return this.m_c.createPattern(a.ci[b.name],b.tm)},IO:function(b){this.Li+=b},fX:function(b){this.Li=b},addColorStop:function(b,d){this.Y_.addColorStop(b,d)},beginPath:function(){this.m_c.beginPath()},closePath:function(){this.m_c.closePath()},fill:function(b){b?this.m_c.fill(b):this.m_c.fill()},stroke:function(){this.m_c.stroke()},clip:function(b){b?this.m_c.clip(b):this.m_c.clip()},moveTo:function(b,
d){this.m_c.moveTo(b,d)},lineTo:function(b,d){this.m_c.lineTo(b,d)},quadraticCurveTo:function(b,d,a,c){this.m_c.quadraticCurveTo(b,d,a,c)},bezierCurveTo:function(b,d,a,c,e,f){this.m_c.bezierCurveTo(b,d,a,c,e,f)},font:function(b){var d=b;1!==window.utils.canvasFontMultiplier&&(d=parseFloat(b),d/=window.utils.canvasFontMultiplier,d=b.replace(/\d+/,d));this.m_c.font=d},fillText:function(b,d,a){this.m_c.fillText(b,this.Li+d,a)},measureText:function(b){this.Li+=this.m_c.measureText(b).width},drawImage:function(b){window.ci[b]&&
this.m_c.drawImage(window.ci[b],0,0)},wQ:function(b,d){for(var c=window.ci[b],e=Math.log(1/(this.BC*d))*a.o.My,f=1,l=1;l<e;++l){var n=this.m_c.createCanvas();n.width=.5*c.width;n.height=.5*c.height;n.getContext("2d").drawImage(c,0,0,n.width,n.height);c=n;f*=2}this.m_c.scale(f,f);this.m_c.drawImage(c,0,0)},uW:function(b){this.m_c.lineJoin=b},pW:function(b){this.m_c.globalCompositeOperation=b},HO:function(b,d,a){this.Ta.push({qU:d,pU:a,name:b})},xS:function(b){var d=this.Ta.length-1;do{var a=this.Ta[d];
if(a.name===b)return a}while(0<=--d)},vV:function(){this.Ta.pop()},xV:function(b,d,c,e){var f=this.Fc.W({x:d.x1,y:d.y1}),l=f.x,f=f.y;d=this.Fc.W({x:d.x2,y:d.y2});var n=d.x,m=d.y;d=[];var q=this.Mi[0],p=this.Mi[1],u=q+this.m_c.canvas.width,r=p+this.m_c.canvas.height;l<n?(l<q&&(l=q),n>u&&(n=u),d[0]=Math.floor(l),d[2]=Math.ceil(n-l)):(n<q&&(n=q),l>u&&(l=u),d[2]=Math.ceil(l-n),d[0]=Math.floor(n));f<m?(f<p&&(f=p),m>r&&(m=r),d[1]=Math.floor(f),d[3]=Math.ceil(m-f)):(m<p&&(m=p),f>r&&(f=r),d[3]=Math.ceil(f-
m),d[1]=Math.floor(m));0<d[2]&&0<d[3]&&(l=this.m_c,f=this.m_c.createCanvas(),f.width=d[2],f.height=d[3],n=this.Mi,this.Mi=d,m=f.getContext("2d"),m.globalAlpha=l.globalAlpha,m.translate(-d[0],-d[1]),m.transform(this.Fc.m_a,this.Fc.m_b,this.Fc.m_c,this.Fc.m_d,this.Fc.m_h,this.Fc.m_v),m.transform.apply(m,b.mtx),this.Xr(b,m,this.Fc),e&&(b=this.m_c.createCanvas(),b.width=d[2],b.height=d[3],m=b.getContext("2d"),m.beginPath(),m.moveTo(0,0),m.lineTo(d[2],0),m.lineTo(d[2],d[3]),m.lineTo(0,d[3]),m.closePath(),
m.translate(-d[0],-d[1]),m.transform(this.Fc.m_a,this.Fc.m_b,this.Fc.m_c,this.Fc.m_d,this.Fc.m_h,this.Fc.m_v),m.transform.apply(m,e.mtx),this.Xr(e,m,this.Fc),m.globalCompositeOperation="source-in",m.setTransform(1,0,0,1,0,0),m.drawImage(f,0,0),f=b),this.Mi=n,"source-over"===c||a.utils.specialBlendSupported?(l.save(),l.globalCompositeOperation=c,l.setTransform(1,0,0,1,d[0]-this.Mi[0],d[1]-this.Mi[1]),l.drawImage(f,0,0),l.restore()):m.bO(l,c,{x:d[0]-this.Mi[0],y:d[1]-this.Mi[1]}),this.m_c=l)},IX:function(b){this.m_c.tm(b)},
miterLimit:function(b){this.m_c.miterLimit=b},WP:function(){this.m_c.cgb()},XP:function(){this.m_c.cge()},setTransform:function(b,d,a,c,e,f){this.m_c.setTransform(b,d,a,c,e,f)},scale:function(b,d){this.m_c.scale(b,d)},TQ:function(b,d,a){this.m_c.xw(b+" ",this.Li+d,a)},fillRect:function(b,d,a,c){this.m_c.fillRect(b,d,a,c)},UQ:function(b,d,a){this.m_c.xcw(b+" ",this.Li+d,a)},fillTextCustom:function(b,d,a){this.m_c.xc(b,this.Li+d,a)}};c.prototype[0]=c.prototype.save;c.prototype[1]=c.prototype.restore;
c.prototype[2]=c.prototype.transform;c.prototype[3]=c.prototype.translate;c.prototype[4]=c.prototype.vW;c.prototype[5]=c.prototype.tW;c.prototype[6]=c.prototype.bX;c.prototype[7]=c.prototype.nW;c.prototype[8]=c.prototype.oW;c.prototype[9]=c.prototype.HO;c.prototype[10]=c.prototype.vV;c.prototype[11]=c.prototype.IO;c.prototype[12]=c.prototype.IV;c.prototype[13]=c.prototype.beginPath;c.prototype[14]=c.prototype.closePath;c.prototype[15]=c.prototype.fill;c.prototype[16]=c.prototype.stroke;c.prototype[17]=
c.prototype.clip;c.prototype[18]=c.prototype.moveTo;c.prototype[19]=c.prototype.lineTo;c.prototype[20]=c.prototype.quadraticCurveTo;c.prototype[21]=c.prototype.bezierCurveTo;c.prototype[22]=c.prototype.font;c.prototype[23]=c.prototype.fillText;c.prototype[24]=c.prototype.measureText;c.prototype[25]=c.prototype.fX;c.prototype[26]=c.prototype.miterLimit;c.prototype[27]=c.prototype.uW;c.prototype[28]=c.prototype.drawImage;c.prototype[29]=c.prototype.setTransform;c.prototype[30]=c.prototype.scale;c.prototype[31]=
c.prototype.TQ;c.prototype[32]=c.prototype.WP;c.prototype[33]=c.prototype.XP;c.prototype[34]=c.prototype.pW;c.prototype[35]=c.prototype.IX;c.prototype[36]=c.prototype.xV;c.prototype[37]=c.prototype.fillRect;c.prototype[39]=c.prototype.UQ;c.prototype[38]=c.prototype.fillTextCustom;e.prototype={clone:function(){return new e(this.ma,this.data)},run:function(b,d){return this.Sf.length?(this.qs(),-1===this.oc.indexOf(b)&&this.oc.push(b),this.m_c=b,this.Fc=d,this.Hz.Xr(this.Sf.shift(),b,d),!1):this.Nz=
!0},iz:function(b){return b}};e.prototype=$.extend(Object.create(a.o.fM.prototype),e.prototype);f.prototype={ZF:function(b){return new e(this.ma,b)},clone:function(){var b=new f(this.ma);b.data=this.data;b.index=0;return b},run:function(b,d){var a=this.data.functions[this.index];this.index++;-1===this.oc.indexOf(b)&&this.oc.push(b);return a?(this.Hz.Xr(a,b,d),!1):!0}};f.prototype=$.extend(Object.create(a.o.gM.prototype),f.prototype);a.o.$V=function(b){!0===b&&(b=1.4);a.o.My=b;c.prototype[28]=b?c.prototype.wQ:
c.prototype.drawImage};a.o.VL=e;a.o.WL=f})(window);
(function(a){var f=window.o;f.Om=function(){this.init()};f.Om.prototype={init:function(){this.GP=!1;this.Je=this.di=this.Rn=null;this.In={};this.da=this.ex=null},VX:function(a){for(var c=0;c<a.length;++c){var b=a[c],d;switch(b.at){case "create":this.In[b.author]||(this.In[b.author]=b.aName);d=this.da.zo(b.xfdf)[0];d["authorId "]=b.author;this.da.Kb(d);this.da.trigger("updateAnnotationPermission",[d]);break;case "modify":d=this.da.zo(b.xfdf)[0];this.da.Kb(d);break;case "delete":this.da.zo("<delete><id>"+
b.aId+"</id></delete>")}}},RS:function(a,c,b){this.di&&this.di(a,c,b)},fV:function(a){this.one("blackBoxAnnotationsEnabled",this.RS.bind(this,{imported:!1},a,"add"))},wT:function(e,c,b){var d=this;if(e){d.Je=c;d.da=b.Ba();b.on("documentUnloaded",function(){d.uz()});d.oY(e);var g=new XMLHttpRequest;g.addEventListener("load",function(){if(200===g.status&&0<g.responseText.length)try{var b=JSON.parse(g.responseText);d.Rn=a.o.WC(a.joinPaths(d.Je,"blackbox/"),"annot");d.ex=b.id;d.In[b.id]=b.user_name;d.da.iC(b.id);
d.Rn.xC(function(b){b.t&&b.t.startsWith("a_")&&b.data&&d.VX(b.data)},function(){d.Rn.send({t:"a_retrieve",dId:e});d.trigger("blackBoxAnnotationsEnabled",[d.In[b.id],d.ex])},function(){d.uz()})}catch(c){console.error(c.message)}});g.open("GET",a.joinPaths(this.Je,"demo/SessionInfo.jsp"));g.withCredentials=!0;g.send();d.GP=!0;d.da.vK(function(b){return d.In[b.Author]||b.Author})}else console.error("Document ID required for collaboration")},uz:function(){this.di&&(this.da.off("annotationChanged",this.di),
this.di=null);this.Rn&&this.Rn.Fz();this.da&&this.da.iC("Guest");this.init();this.trigger("blackBoxAnnotationsDisabled")},oY:function(a){var c=this;this.di&&this.da.off("annotationChanged",this.di);this.di=function(b,d,g){if(!b.imported){b={t:"a_"+g,dId:a,annots:[]};var k=c.da.Vu(),f,l;"delete"!==g&&(f=(new DOMParser).parseFromString(k,"text/xml"),l=new XMLSerializer);for(k=0;k<d.length;k++){var n=d[k],m;if("add"===g){m=f.querySelector('[name="'+n.Id+'"]');m=l.serializeToString(m);var q=null;n.InReplyTo&&
(q=c.da.Bf(n.InReplyTo).authorId||"default");b.annots.push({at:"create",aId:n.Id,author:c.ex,aName:c.In[c.ex],parent:q,xfdf:"<add>"+m+"</add>"})}else"modify"===g?(m=f.querySelector('[name="'+n.Id+'"]'),m=l.serializeToString(m),b.annots.push({at:"modify",aId:n.Id,xfdf:"<modify>"+m+"</modify>"})):"delete"===g&&b.annots.push({at:"delete",aId:n.Id})}0<b.annots.length&&c.Rn.send(b)}}.bind(c);this.da.on("annotationChanged",this.di)}};$.extend(f.Om.prototype,a.utils.eventHandler)})(window);
(function(a){function f(b){return g[b]||"Unknown"}a.Annotations=a.Annotations||{};var e=a.Annotations,c;if(!(c=!Object.defineProperty)){var b;try{Object.defineProperty({},"x",{}),b=!0}catch(k){b=!1}c=!b}c&&(Object.defineProperty=function(b,d,a){if(b!==Object(b))throw new TypeError("Object.defineProperty called on non-object");Object.prototype.__defineGetter__&&"get"in a&&Object.prototype.__defineGetter__.call(b,d,a.get);Object.prototype.__defineSetter__&&"set"in a&&Object.prototype.__defineSetter__.call(b,
d,a.set);"value"in a&&(b[d]=a.value);return b});"function"!==typeof Object.defineProperties&&(Object.defineProperties=function(b,d){if(b!==Object(b))throw new TypeError("Object.defineProperties called on non-object");for(var a in d)Object.prototype.hasOwnProperty.call(d,a)&&Object.defineProperty(b,a,d[a]);return b});var d,g={arrow:"Arrow",callout:"Callout",caret:"Caret",ellipse:"Ellipse",freehand:"Free Hand",freetext:"FreeText",highlight:"Highlight",line:"Line",polygon:"Polygon",polyline:"Polyline",
rectangle:"Rectangle",redact:"Redaction",signature:"Signature",squiggly:"Squiggly",stamp:"Stamp",stickyNote:"Comment",strikeout:"Strikeout",underline:"Underline",custom:"Custom"};a.vD=function(b){this.Iu=[b]};a.vD.prototype={writeStartElement:function(b){b=document.createElementNS("",b);this.Iu.push(b)},writeAttributeString:function(b,d){this.top().setAttribute(b,d)},writeEndElement:function(){var b=this.Iu.pop();this.top().appendChild(b)},top:function(){return this.Iu[this.Iu.length-1]}};e.ja={Qk:1,
extraSelectorsEnabled:!1,Ac:function(b){return f(b)},dW:function(b){f=b},qG:function(b,d){for(var a=[],c=Math.min(b+1,d-1),g=Math.max(0,b-1);g<=c;++g)a.push(g);return a},iG:function(b){return null===b?"":0<b.length?b.replace(/&[^;]*;/g,function(b){switch(b.charAt(1)){case "q":return'"';case "a":return"&";case "l":return"<";case "g":return">";case "#":return"x"===b.charAt(2)?String.fromCharCode(parseInt(b.substring(3,b.length-1),16)):String.fromCharCode(parseInt(b.substring(2,b.length-1),10))}return b}):
""},gQ:function(b,d,c){var g=c.u.getDocument(),f=d.getAttribute("page"),f=parseInt(f,10),q=[],p=[];if(d.hasAttribute("selidxs"))var u=d.getAttribute("selidxs"),q=e.ca.hQ(u);else a.utils.warn("annot_extra_selectors","deserializeExtraSelectors: No index-based selector in XFDF.");if(d.hasAttribute("surrtxts_0_0"))for(u=0;;){if(d.hasAttribute("surrtxts_"+u+"_0")&&d.hasAttribute("surrtxts_"+u+"_1")){var r=d.getAttribute("surrtxts_"+u+"_0");if(null===r)break;var v=d.getAttribute("surrtxts_"+u+"_1");if(null===
v)break;var w=[];w.push(e.ja.iG(r));w.push(e.ja.iG(v));p.push(w)}else break;u++}else a.utils.warn("annot_extra_selectors","deserializeExtraSelectors: No surrounding-text-based selector in XFDF.");if(0>=q.length&&0>=p.length)a.utils.warn("annot_extra_selectors","deserializeExtraSelectors: No extra selector data deserialized."),b.ag=!1;else{b.ag=!0;b.Xg=null;b.vf=null;b.RE=!1;b.Sp=!1;b.Ot=!0;var z=function(){var d=c.u.getDocument();if(d!==g)b.ag=!1;else{var d=new XODText.uj(d),a;0<q.length&&(a=d.rS(f,
q,b.kh()),a.status&&(b.Xg=a.value));0<p.length&&(a=d.qS(f,p,b.kh()),a.status&&(b.vf=a.value,b.PageNumber=a.om+1));b.trigger("quadsCalculatedFromExtraSelectors");b.RE=!0}},C=function(){var d=c.u.getDocument();if(d!==g)b.ag=!1;else{var a=d.wb()-1,e=[];0===f&&1<=a?(e.push(f+1),e.push(f),b.Ot=!1,d.wr(e).then(z)):0<f&&a>=f+1&&(e.push(f+1),e.push(f-1),e.push(f),b.Ot=!1,d.wr(e).then(z))}};0===p.length?(b.Ot=!1,g.wr(f).then(z)):(b.OE||(c.u.off("layoutChanged",C),c.u.on("layoutChanged",C),c.u.one("documentUnloaded",
function(){c.u.off("layoutChanged",C)}),b.OE=!0),g.bc().then(function(){c.u.off("layoutChanged",C);b.OE=!1;var d=c.u.getDocument();if(d===g&&b.Ot){var a=e.ja.qG(f,d.wb());d.wr(a).then(z)}else c.u.off("layoutChanged",C),b.ag=!1}))}},mW:function(b){this.extraSelectorsEnabled=b},pH:function(b){return!b||b instanceof Date?b:new Date(b)},VS:function(){function b(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return b()+b()+"-"+b()+"-"+b()+"-"+b()+"-"+b()+b()+b()},measureText:function(b,
d,a,c){var g=document.getElementById("text-width-tester");"number"===typeof d&&(d+="px");b=b.split("\n").join("<br>&nbsp;").split(" ").join("&nbsp;");if(g)g.style.fontFamily=a,g.style.fontSize=d,g.style.fontWeight=c,g.innerHTML=b;else{var e="display:none;";_.isString(a)&&(e+="font-family:"+a+";");_.isUndefined(d)||(e+="font-size:"+d+";");_.isUndefined(c)||(e+="font-weight:"+c+";");g=document.createElement("span");g.id="text-width-tester";g.cssText=e;g.innerHTML=b;document.getElementsByTagName("body")[0].appendChild(g)}b=
$(g);b.show();d={width:b.width(),height:b.height()};b.hide();return d},IS:function(b,a){var c=(d||(d=document.createElement("canvas"))).getContext("2d");c.font=a;return c.measureText(b).width},nA:function(b,d){if(!Array.isArray(d)||!d.length)return console.warn("Number format array for measurement should have at least one number format dictionary in it"),"";var a=Array(d.length),c=a.length;a[0]=b;for(var g=1;g<c;g++){var e=a[g-1],f=e%1;a[g-1]=Math.trunc(e);a[g]=f*d[g].factor}var u=this;return a.map(function(b,
a){var g=d[a],e=g.unit;return a===c-1?u.AU(b,g)+" "+e:u.pF(b.toString(),g.thousandsSymbol)+" "+e}).join(" ")},AU:function(b,d){var a,c,g=d.display;"D"===g?(c=d.precision,0!==c%10&&console.warn("precision for decimal display must be a multiple of 10"),c=b.toFixed((c/10).toString().length).split("."),a=c[0],c=d.decimalSymbol+c[1]):"F"===g?(a=Math.trunc(b).toString(),c=d.precision,c=" "+Math.round(b%1*c)+"/"+c):"R"===g?(a=Math.round(b).toString(),c=""):"T"===g&&(a=Math.trunc(b).toString(),c="");return this.pF(a,
d.thousandsSymbol)+c},pF:function(b,d){for(var a=b.length-3;0<a;a-=3)b=b.slice(0,a)+d+b.slice(a);return b},PK:function(b,d,a){var c=e.ja.ev(b);b=c.pw;if((c=c.Eq)&&b)if(Array.isArray(d)&&Array.isArray(a)){var g={mm:.1,cm:1,m:100,km:1E5,mi:160394,yd:91.44,ft:30.48,"in":2.54,pt:.0352778},f=c[b],p=d[0],u=d[1],r=a[0],v=a[1];c.scale=d.join(" ")+" = "+a.join(" ");f[f.length-1].unit="area"===b?"sq "+v:v;c.axis[0].factor=r/p*(g.pt/g[u])}else console.warn("Both arguments for setting scale must be array");else console.warn("Unable to set scale to an annotation or a tool which has incorrect IT or no measure dictionary")},
LK:function(b,d){var a=e.ja.ev(b),c=a.pw;(a=a.Eq)&&c?"number"!==typeof d?console.warn("The argument for setting precision must be a number"):a[c].forEach(function(b){b.precision&&(b.precision=1/d)}):console.warn("Unable to set precision to an annotation or a tool which has incorrect IT or no measure dictionary")},UH:function(b){var d=e.ja.ev(b);b=d.Eq;d=d.pw;if(b&&d){var a=b.scale.match(/(\d*(?:.\d+)?\s\w+)\s=\s(\d*(?:.\d+)?\s\w+)/);if(a){var d=a[1],a=a[2],c;d&&a?(c=[d.split(" "),a.split(" ")],c[0][0]=
Number(c[0][0]),c[1][0]=Number(c[1][0])):console.warn("Unable to convert scale from: ",b.scale," to format [[value, unit], [value, unit]]");return c}console.warn("Invalid scale: ",b.scale)}},NH:function(b){var d=e.ja.ev(b);b=d.pw;if((d=d.Eq)&&b)return b=d[b],(b=b[b.length-1].precision)?b=1/b:console.warn("Unable to get precision from: ",b),b},ev:function(b){var d=b.IT,a;if("LineDimension"===d||"PolyLineDimension"===d)a="distance";"PolygonDimension"===d&&(a="area");return{pw:a,Eq:b.Measure}},UG:function(b,
d,a,c){if(d){d.style.fontSize=a+"px";b=0;for(var g;b<=a;)g=Math.floor((b+a)/2),d.style.overflow="hidden",d.offsetHeight,d.style.fontSize=g+"px",c&&(d.style.lineHeight=c(g)),d.style.overflow="auto",d.scrollHeight>Math.ceil($(d).outerHeight())?a=g-1:b=g+1;d.scrollHeight>Math.ceil($(d).outerHeight())&&(d.style.fontSize=parseFloat(d.style.fontSize)-1+"px");return parseFloat(d.style.fontSize)}return a/2},HQ:function(b,d){if(a.utils.disableFormCharacterProcessing)$(b).on("change",function(){d({change:this.value,
DI:!0})});else $(b).on("input",function(b){b.change=this.value;d(b)})},uQ:function(b,d,c,g){b.save();b.translate(d.x,d.y);b.rotate(a.ce.Math.Nl(d,c));b.moveTo(0,0);c=5*g+2;d=Math.cos(.2*Math.PI)*c;c*=Math.sin(.2*Math.PI);b.moveTo(d,-c);b.lineTo(0,0);b.lineTo(d,c);b.stroke();b.restore()},rq:function(b,d){var a=b.W({x:0,y:0}),c=b.W({x:Number(d),y:0}),g=a.x-c.x,a=a.y-c.y;return Math.sqrt(g*g+a*a)},wG:function(b,d,c){d.beginPath();var g=a.ce.Math.FP(c);a.ce.Math.EJ(c)&&(g[g.length]={x:g[0].x,y:g[0].y});
if(!(2>=g.length)){var f=b.Intensity;f||(f=2);var q=1/8092,p=a.ce.Math.oS(g);b=1!==Math.round(p);c=0;for(var u=6.5*f,r=g[0],v=u,w=u,z={x:g[1].x-g[0].x,y:g[1].y-g[0].y},C={x:g[0].x-g[g.length-2].x,y:g[0].y-g[g.length-2].y},f=!0,A=!1,x=0,y,F,L,E=0;E<g.length-1;++E){var H=g[E],G=g[E+1],G={x:G.x-H.x,y:G.y-H.y},J=Math.sqrt(G.x*G.x+G.y*G.y);if(!(J<=q)){var O={x:G.x/J,y:G.y/J},M=Math.max(Math.floor(J/u),1),J=J/M;c=a.ce.Math.fR(O.x,O.y);if(0===E&&3>=g.length){var N=Math.sqrt(z.x*z.x+z.y*z.y);if(N<u){d.arc(g[0].x,
g[0].y,N,0,2*Math.PI);return}if(N<2*J){y=N/2;d.arc(g[0].x,g[0].y,y,0,2*Math.PI);d.moveTo(g[1].x+y,g[1].y);d.arc(g[1].x,g[1].y,y,0,2*Math.PI);d.moveTo(g[0].x+y,g[0].y);return}d.arc(g[0].x,g[0].y,J/2,0,2*Math.PI);d.moveTo(g[1].x+J/2,g[1].y);d.arc(g[1].x,g[1].y,J/2,0,2*Math.PI);d.moveTo(g[0].x+J/2,g[0].y)}0===E&&(x=J,y={x:O.x,y:O.y});H.x-=O.x*J*.5;H.y-=O.y*J*.5;C=a.ce.Math.crossProduct(C,G);N=0;A||(++N,w=J,f=0>C*p,H.x+=O.x*J,H.y+=O.y*J,r=H,d.moveTo(r.x,r.y),F=r.x,L=r.y,A=!0);for(v=.25*(v+J);N<M;++N)H.x+=
O.x*J,H.y+=O.y*J,L=e.ja.arcTo(F,L,d,v,v,c,0===N&&0>C*p,b,H.x,H.y),F=L.yX,L=L.zX;C=G;v=J}}A||(d.moveTo(r.x,r.y),F=r.x,L=r.y);y&&(q=.25*(w+v),e.ja.arcTo(F,L,d,q,q,c,f,b,g[g.length-1].x+.5*x*y.x,g[g.length-1].y+.5*x*y.y))}},arcTo:function(b,d,c,g,e,f,p,u,r,v){var w=[],z=[];a.ce.Math.YO(b,d,w,z,g,e,f,p,u,r,v);for(e=g=0;e<z.length;++e)"c"===z[e]?(c.bezierCurveTo(w[g],w[g+1],w[g+2],w[g+3],w[g+4],w[g+5]),b=w[g+4],d=w[g+5],g+=6):(c.lineTo(w[g],w[g+1]),b=w[g],d=w[g+1],g+=2);return{yX:b,zX:d}}}})(window);
(function(a){a.Annotations=a.Annotations||{};var f=a.Annotations;f.Wg={dH:function(a,c){var b=c.Ba(),d=c.getDocument(),g=[];if(!a||d&&d.tg())g=b.Bc().filter(function(b){return b instanceof f.Gd});else if(_.isArray(a))g=a.filter(function(b){return b instanceof f.Gd});else if(a instanceof f.Gd)g=[a];else{console.warn("The selected annotation can`t be redacted");return}0===g.length&&console.warn("No redaction annotations selected");return g},AS:function(a,c){var b=c.Ba(),d=b.Bc().filter(function(b){return!(b instanceof
f.Gd)});return{redactions:f.Wg.tS(a,c),annots:b.Nu({annotList:d})}},tS:function(a,c){var b=c.Ba(),d=[];f.Wg.dH(a,c).forEach(function(b){1===b.ar().length?d.push(b):b.ar().forEach(function(a){var c=_.extend(new f.Gd,b);c.Quads=[{x1:a.x1,x2:a.x2,x3:a.x2,x4:a.x1,y1:a.y2,y2:a.y2,y3:a.y1,y4:a.y1}];d.push(c)})});return b.Nu({annotList:d})},Py:function(e,c){var b=c.getDocument();if(!c.Ba().XA())return console.warn("Applying redactions is not enabled"),Promise.reject("Applying Redaction is not enabled");
if(b.tg())return b.bs(e,c);var d=f.Wg.dH(e,c),g=null;return a.PDFNet.initialize().then(function(){return b.mg()}).then(function(b){g=b;return f.Wg.DV(b,d)}).then(function(){return a.PDFNet.runWithCleanup(function(){return Promise.all(d.map(function(b){return f.Wg.qV(g,c,b)}))})})},DV:function(a,c){var b=[];c.forEach(function(d){d=d.rb();-1===b.indexOf(d)&&b.push(d)});return Promise.all(b.map(function(b){return a.requirePage(b)}))},qV:function(e,c,b){a.PDFNet.startDeallocateStack();e.lock();var d=
c.Ba(),g=f.Wg.sS(b),k=f.Wg.gR(b,c);return Promise.all([k,g]).then(function(g){return a.PDFNet.Redactor.redact(e,g[0],g[1],!0,!1).then(function(){try{var g=b.rb();b.ar().forEach(function(a){f.Wg.cQ(a,d,b)});d.Od(b,null,!0);c.SJ(g);c.Ck();c.getDocument().VJ()}finally{a.PDFNet.endDeallocateStack()}})})["catch"](function(b){a.PDFNet.endDeallocateStack();console.error(b)})},sS:function(e){var c=e.FillColor;return new Promise(function(b){a.PDFNet.ColorPt.init(c.R/255,c.G/255,c.B/255,c.A).then(function(d){b({text_color:d,
positive_overlay_color:d,border:!1})})})},gR:function(e,c){var b=[],d=e.ar(),g=c.v,f=e.rb();d.forEach(function(d){var c=g.Ul(f-1,d.x1,d.y1);d=g.Ul(f-1,d.x2,d.y2);c=a.PDFNet.Rect.init(c.x,c.y,d.x,d.y).then(function(b){return a.PDFNet.Redactor.redactionCreate(f,b,!1,"").then(function(b){return b})});b.push(c)});return Promise.all(b).then(function(b){return b})},cQ:function(a,c,b){var d=c.Bc();b=b.rb();for(var g=d.length-1;0<=g;g--){var k=d[g],h=k.X,l=k.Y,l=a.y1>k.Y+k.Height||a.y2<l,h=a.x1>k.X+k.Width||
a.x2<h,n=b!==k.PageNumber;k instanceof f.Gd||n||l||h||c.Od(k,null,!0)}}}})(window);
(function(a){function f(){this.fonts=[]}function e(b,d,a,c){this.url=_.isUndefined(c)?["data:",this.yU[a],";base64,",btoa(d)].join(""):"'"+c+"'";this.url=["url(",this.url,")"].join("");this.NV=["@font-face { font-family:'",b,"';src:",this.url,"}"].join("");this.name=b}document.head||(document.head=document.getElementsByTagName("head")[0]);a.Qg={};var c=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent),b=c&&14<=c[1],d=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");
e.prototype={yC:null,styleSheet:null,yU:{woff:"application/x-font-woff",opentype:"font/opentype",sfnt:"application/font-sfnt"},insert:function(){if(!a.Qg[this.name]){if(!this.styleSheet){var b=document.createElement("style");document.head.appendChild(b);e.prototype.styleSheet=b.sheet;e.prototype.yC=b}b=this.styleSheet.cssRules.length;this.styleSheet.insertRule(this.NV,b);a.Qg[this.name]=this.styleSheet.cssRules[b]}},remove:function(){if(!a.utils.ie){var b=a.Qg[this.name];if(!b)throw Error("CSS @font-face rule is not in use");
var d,c=this.styleSheet.cssRules.length,g=this.styleSheet.cssRules;for(d=0;d<c;d++)if(g[d]===b){this.styleSheet.deleteRule(d);delete a.Qg[this.name];return}throw Error("CSS @font-face stylesheet has been altered externally");}}};if("undefined"!==typeof document&&document.fonts)try{var g=new e("lt"+Date.now()+"0",d,"opentype");"error"===(new window.FontFace(g.name,g.url,{})).status?a.Nq=!1:a.Nq=!0}catch(h){a.Nq=!1}else a.Nq=!1;f.prototype={GX:1,CO:function(b){this.fonts.push(b)},ZS:function(){return 0!==
this.fonts.length},XI:function(c){function g(b,d){return b.charCodeAt(d)<<24|b.charCodeAt(d+1)<<16|b.charCodeAt(d+2)<<8|b.charCodeAt(d+3)&255}function e(b,d){r++;30<r?(console.warn("Load test font never loaded."),d()):(u.font="30px "+b,u.fillText(".",0,20),0<u.getImageData(0,0,1,1).data[3]?d():setTimeout(_.bind(e,null,b,d)))}var f=this,k;if(_.isEmpty(a.Qg)||b){for(k=0;k<f.fonts.length;k++)setTimeout(c,0,f.fonts[k].name);f.fonts=[]}else{var p;k=document.createElement("canvas");k.width=1;k.height=1;
var u=k.getContext("2d"),r=0,v="lt"+Date.now()+this.GX++,w=d,w=w.substr(0,976)+v+w.substr(976+v.length),z=g(w,16);k=0;for(p=v.length-3;k<p;k+=4)z=z-1482184792+g(v,k)|0;k<v.length&&(z=z-1482184792+g(v+"XXX",k)|0);var w=w.substr(0,16)+(String.fromCharCode(z>>24&255)+String.fromCharCode(z>>16&255)+String.fromCharCode(z>>8&255)+String.fromCharCode(z&255))+w.substr(20),C=new a.ef.FontFace(v,w,"opentype");C.insert();w=[];k=0;for(p=this.fonts.length;k<p;k++)w.push(this.fonts[k].name);w.push(v);var A=document.createElement("div");
A.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;");k=0;for(p=w.length;k<p;++k)z=document.createElement("span"),z.textContent="Hi",z.style.fontFamily=w[k],A.appendChild(z);document.body.appendChild(A);e(v,function(){document.body.removeChild(A);C.remove();for(var b=0;b<f.fonts.length;b++)if(c(f.fonts[b].name),!f.fonts[b].url.startsWith("url(data")){var d=f.fonts[b].url;if(d.startsWith("url('")){if(8>d.length){console.warn("Invalid font ObjectURL.");
return}d=d.substring(5,d.length-2)}URL.revokeObjectURL(d);f.fonts[b].url=null}f.fonts=[]})}},iU:function(b,d,a){var c=document.createElement("div");c.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;");c.innerHTML=""+('<span style="font-family:'+b+'">" + testString +"</span>');document.body.appendChild(c);$.get(d,function(){setTimeout(function(){a();document.body.removeChild(c)},300)})}};if(a.Nq){var k=e,e=function(){k.apply(this,arguments);
this.Pz=new window.FontFace(this.name,this.url,{})};e.prototype=k.prototype;$.extend(e.prototype,{insert:function(){document.fonts.add(this.Pz);a.Qg[this.name]=this},remove:function(){document.fonts["delete"](this.Pz)}});$.extend(f.prototype,{XI:function(b){this.fonts.forEach(function(d){d.Pz.load().then(function(){b(d.name);if(!d.url.startsWith("url(data")){var a=d.url;if(a.startsWith("url('")){if(8>a.length){console.warn("Invalid font ObjectURL.");return}a=a.substring(5,a.length-2)}URL.revokeObjectURL(a);
d.url=null}})["catch"](function(a){b(d.name);console.warn("loadFonts: font failed to load: "+d.name);a&&console.warn("loadFonts: exception is: "+a.message)})})}})}a.ef={FontFace:e,eM:f,gA:function(b,d){return"f"+b+"-"+d}}})(window);
(function(a){function f(a,b,d){this.page=a;this.tb=b;this.He=d;this.NG=b.Ja.Zd?b.Ja.Zd.path:void 0;this.hm=this.paused=!1}var e={ni:0,Ce:1,ao:2,zf:3};a.asc=function(a){var b=.707106781*a.m_a+.707106781*a.m_b;a=.707106781*a.m_c+.707106781*a.m_d;return Math.sqrt(b*b+a*a)};f.prototype={pause:function(){this.paused=!0;this.az()},az:function(){this.Nv=!1;a.clearImmediate(this.YI)},yG:function(c,b,d,g,e){function f(){z=!0;m&&m.Hr().then(function(){if(l.abort){if(w)return n&&(n=!1,g(r)),m=l.resume=null,
l.az(),l.abort&&l.abort(),d(r);l.abort&&((q=5<++u)&&p&&n&&e&&(n=!1,g(r)),w=m.run(c,b,50),!w&&m.mT&&g(r),z=!1,l.Nv=!1,l.paused||l.Ow())}})}var l=this,n=void 0!==g;d=d||function(){};var m=this.tb.pb,q=!1,p=!1,u=0,r=c.canvas,v=setTimeout(function(){p=!0;q&&n&&e&&(n=!1,g(r))},3E3);l.abort=function(){z=!1;l.az();l.YI=null;l.resume=null;m&&(m.cancel(),m=null);l.tb.pb=null;clearTimeout(v);l.Ow=null;_(l.tb.Ta).each(function(b){switch(b.type){case "png":case "jpg":b&&b.data&&!b.data.startsWith("url(data")&&
(URL.revokeObjectURL(b.data),b.data=null);break;case "font":if(b&&b.data&&b.data.url&&!b.data.url.startsWith("url(data")){var d=b.data.url;if(d.startsWith("url('")){if(8>d.length){console.warn("Invalid font ObjectURL.");break}d=d.substring(5,d.length-2)}URL.revokeObjectURL(d);b.data.url=null}}});l.abort=null};var w=!1;l.resume=function(){!1!==z||l.Nv||l.Ow();l.paused=!1};l.Ow=function(){l.Nv=!0;l.YI=a.setImmediate(f,0)};var z=!1;l.Nv=!1;l.paused||l.Ow()},HP:function(c,b,d,g,f,h,l,n,m){b=b||e.ni;f&&
0<f&&(f=Math.round(f));c=a.o.za.Zo(this.page,c||1,b,h,f,l,m);this.yG(c.ctx,c.t,d,g,n)},RH:function(a){var b=[];if(a){for(var d=0;d<a.length;++d)b[d]=this.tb.Ja.hi(a[d]);return b}_(this.tb.Ta).each(function(d){b.push(d)});return b},mB:function(c,b,d){function g(b){var d=l.He.Bv(b.name);e(b);switch(b.type){case "png":case "jpg":if(a.ci[b.name]){b.data.startsWith("data")||URL.revokeObjectURL(b.data);if(d){f(b.name);break}a.ci[b.name].yq.push(function(){f(b.name)});break}var c=new Image;c.setAttribute("crossOrigin",
"use-credentials");c.onload=function(){c.src.startsWith("data")||URL.revokeObjectURL(c.src);for(var b=0;b<this.yq.length;++b)this.yq[b]();c.yq=[];c=c.onload=c.onerror=null};c.onerror=function(){a.utils.warn("img error "+b.name);"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAMSURBVBhXY6ivrwcAAv4BfhD/txkAAAAASUVORK5CYII="!==c.src&&(c.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAMSURBVBhXY6ivrwcAAv4BfhD/txkAAAAASUVORK5CYII=")};
c.hres=b.hres;c.vres=b.vres;a.ci[b.name]=c;c.yq=[];c.yq[0]=function(){f(b.name)};c.Jb=l.tb.Kf;c.src=b.data;break;case "font":_.isUndefined(l.NG)?m.CO(b.data):m.iU(b.name,l.NG+b.ra,function(){f(b.name)});break;default:a.utils.warn("unknown resource type: "+b.type),f(b.name)}}function e(b){d&&l.He.vO(b.name)}function f(d){l.He.loaded(d);if(l.hm&&1>--n)return l.hm=!1,c(b[0])}if(this.hm)throw Error("Multiple calls to loadResource");var l=this;b=this.RH(b);var n=b.length;this.hm=!0;var m=new a.ef.eM,q=
!0;_(b).each(function(b){q=!1;l.He.Bv(b.name)?(e(b),f(b.name)):b.data?g(b):l.tb.Ja.Ef(b.ra,function(d){l.He.Bv(b.name)?(e(b),f(b.name)):g(l.tb.Ja.hi(d.ra,d.data))})});m.ZS()&&m.XI(_(f).bind(this));q&&(c(),this.hm=!1)},HF:function(){this.hm&&(this.hm=!1)},Mb:function(c){var b=this;b.HF();c=this.RH(c);_(c).each(function(d){if("font"!==d.type&&b.He.release(d.name))switch(d.type){case "png":case "jpg":delete a.ci[d.name];break;case "font":d.data&&d.data.remove()}})}};a.hf=a.hf||{};a.hf.$M=f;a.hf.Ps=function(){var a=
{};return{vO:function(b){b in a?a[b].c++:a[b]={c:1,l:!1}},loaded:function(b){b in a&&(a[b].l=!0)},$A:function(b){return b in a?!0:!1},Bv:function(b){return b in a?a[b].l:!1},release:function(b){if(!(b in a))return!1;--a[b].c;return a[b].c?!1:(delete a[b],!0)}}};a.o.La=e;a.Dd=function(c,b,d,g,f,h){g=g||{x:0,y:0};d.width?(d.x1=0,d.y1=0,d.x2=d.width,d.y2=d.height):(d.width=d.x2-d.x1,d.height=d.y2-d.y1);var l=new XODText.Matrix2D;_.isUndefined(f)&&(f=!0);f&&(f=h||a.utils.getCanvasMultiplier(),c*=f,g.x*=
f,g.y*=f);l.Ea(c,0,0,c,g.x,g.y);c=new XODText.Matrix2D;b===e.ni?c.Ea(1,0,0,1,-d.x1,-d.y1):b===e.Ce?c.Ea(1,0,0,1,d.y2,-d.x1):b===e.ao?c.Ea(1,0,0,1,d.x2,d.y2):b===e.zf&&c.Ea(1,0,0,1,-d.y1,d.x2);l.concat(c);l.concat(XODText.Matrix2D.rotationMatrix(Math.PI/2*(4-b)));return l}})(window);
(function(a){a.Actions||(a.Actions={});var f=a.Actions;f.Action=function(a){_.isObject(a)&&_.isString(a.name)&&(this.wc=a.name)};f.Action.prototype={elementName:null,onTriggered:function(){},serialize:function(){return document.createElementNS("",this.elementName)},deserialize:function(){}};Object.defineProperties(f.Action.prototype,{name:{get:function(){return this.elementName}}});f.gf=function(a){f.Action.call(this,a);this.$f=new f.gf.wp;_.isObject(a)&&this.$f.set(a.dest)};f.gf.prototype={elementName:"GoTo",
onTriggered:function(a,b,d){f.Action.prototype.onTriggered.call(this,a,b,d);this.$f.AF(d)},serialize:function(a){var b=f.Action.prototype.serialize.call(this,a);$(b).append(this.$f.serialize(a));return b},deserialize:function(a,b,d){f.Action.prototype.deserialize(a,b);this.$f.deserialize(a,b,d)}};f.gf.prototype=$.extend(Object.create(f.Action.prototype),f.gf.prototype);Object.defineProperties(f.gf.prototype,{dest:{get:function(){return this.$f}}});f.Um=function(a){f.Action.call(this,a);this.$f=new f.gf.wp;
_.isObject(a)&&(this.$f.set(a.dest),this.mt=a.filename,this.xy=a.newWindow)};f.Um.prototype={elementName:"GoToR",onTriggered:function(a,b,d){f.Action.prototype.onTriggered.call(this,a,b,d);this.$f.AF(d)},serialize:function(a){var b=f.Action.prototype.serialize.call(this,a);this.xy||b.setAttribute("NewWindow","false");var d=document.createElementNS("","File");this.mt&&d.setAttribute("OriginalName",this.mt);var g=$(b);g.append(d);g.append(this.$f.serialize(a));return b},deserialize:function(a,b,d){f.Action.prototype.deserialize(a,
b);this.$f.deserialize(a,b,d,!0);a=a.getElementsByTagName("GoToR")[0];this.xy="false"!==a.getAttribute("NewWindow");a=a.getElementsByTagName("File");1===a.length&&(this.mt=a[0].getAttribute("OriginalName"))}};f.Um.prototype=$.extend(Object.create(f.Action.prototype),f.Um.prototype);Object.defineProperties(f.Um.prototype,{dest:{get:function(){return this.$f}},filename:{get:function(){return this.mt}},newWindow:{get:function(){return this.xy}}});f.gf.wp=function(a){this.yn=1;this.Tp="Fit";this.wc=this.Mj=
this.Zf=this.hg=this.Be=this.ye=null;this.set(a)};f.gf.wp.prototype={set:function(a){if(_.isObject(a)){_.isUndefined(a.page)||(this.yn=Number(a.page));var b=a.fit;_.isString(b)&&(this.Tp=b);switch(b){case "XYZ":_.isUndefined(a.left)||(this.ye=Number(a.left));_.isUndefined(a.top)||(this.Be=Number(a.top));_.isUndefined(a.zoom)||(this.Mj=Number(a.zoom));break;case "FitBH":case "FitH":_.isUndefined(a.top)||(this.Be=Number(a.top));break;case "FitBV":case "FitV":_.isUndefined(a.left)||(this.ye=Number(a.left));
break;case "FitR":_.isUndefined(a.left)||(this.ye=Number(a.left));_.isUndefined(a.top)||(this.Be=Number(a.top));_.isUndefined(a.right)||(this.hg=Number(a.right));_.isUndefined(a.bottom)||(this.Zf=Number(a.bottom));var b=_.min([this.ye,this.hg]),d=_.min([this.Be,this.Zf]),g=_.max([this.ye,this.hg]),e=_.max([this.Be,this.Zf]);this.Be=d;this.ye=b;this.Zf=e;this.hg=g}a=a.name;_.isString(a)&&(this.wc=a,this.yn=null)}},serialize:function(a){var b=document.createElementNS("","Dest"),d=document.createElementNS("",
this.Tp||"Named"),g=this.Be||0,e=this.ye||0,f=this.Zf||0,l=this.hg||0;a=a.inverse();e=a.W({x:e,y:g});f=a.W({x:l,y:f});g=_.isNull(this.Be)?null:e.y;e=_.isNull(this.ye)?null:e.x;l=_.isNull(this.hg)?null:f.x;f=_.isNull(this.Zf)?null:f.y;_.isNull(this.yn)||d.setAttribute("Page",this.yn);_.isNull(this.Mj)||d.setAttribute("Zoom",this.Mj);g&&d.setAttribute("Top",g);e&&d.setAttribute("Left",e);l&&d.setAttribute("Right",l);f&&d.setAttribute("Bottom",f);switch(this.Tp){case "XYZ":_.isNull(e)&&d.setAttribute("Left",
"");_.isNull(g)&&d.setAttribute("Top","");_.isNull(this.Mj)&&d.setAttribute("Zoom","");break;case "FitBH":case "FitH":_.isNull(g)&&d.setAttribute("Top","");break;case "FitBV":case "FitV":_.isNull(e)&&d.setAttribute("Left","");break;case "FitR":_.isNull(e)&&d.setAttribute("Left",""),_.isNull(g)&&d.setAttribute("Top",""),_.isNull(l)&&d.setAttribute("Right",""),_.isNull(f)&&d.setAttribute("Bottom","")}this.wc&&d.setAttribute("Name",this.wc);$(b).append(d);return b},deserialize:function(a,b,d,g){var e=
Annotations.ca;b=e.getAttribute(a,"PageNum");var f,l,n,m,q,p,u;l=e.getAttribute(a,"Hpos");f=e.getAttribute(a,"Vpos");a=a.getElementsByTagName("Dest");if(!b||0<a.length)if(a=a[0],a=e.fA(a))b=e.getAttribute(a,"Page"),p=e.cv(a),f=e.getAttribute(a,"Top"),l=e.getAttribute(a,"Left"),n=e.getAttribute(a,"Right"),m=e.getAttribute(a,"Bottom"),q=e.getAttribute(a,"Zoom"),"Named"===e.cv(a)&&(u=e.getAttribute(a,"Name"));u||g?g&&(f=_.isNull(f)?void 0:f,l=_.isNull(l)?void 0:l,n=_.isNull(n)?void 0:n,m=_.isNull(m)?
void 0:m):(g=d.u.Dc(b-1),d=g.W({x:l||0,y:f||0}),g=g.W({x:n||0,y:m||0}),f=_.isNull(f)?void 0:d.y,l=_.isNull(l)?void 0:d.x,n=_.isNull(n)?void 0:g.x,m=_.isNull(m)?void 0:g.y);this.set({page:_.isNull(b)?void 0:b,fit:_.isNull(p)?void 0:p,top:f,left:l,right:n,bottom:m,zoom:_.isNull(q)?void 0:q,name:u})},AF:function(a){var b=this.Be||0,d=this.ye||0,g=this.yn||1;switch(this.Tp){case "XYZ":this.Mj&&a.ox(this.Mj);a.Un(g,d,b);break;case "Fit":case "FitB":case "FitV":case "FitBV":a.Ke(g);a.jC(a.Og.Gx);break;
case "FitH":case "FitBH":a.Ke(g);a.jC(a.Og.cD);a.Un(g,0,b);break;case "FitR":var e=_.isUndefined(this.hg)||_.isNull(this.hg)||_.isUndefined(this.ye)||_.isNull(this.ye)?null:Math.abs(this.hg-this.ye),f=_.isUndefined(this.Zf)||_.isNull(this.Zf)||_.isUndefined(this.Be)||_.isNull(this.Be)?null:Math.abs(this.Zf-this.Be),e=e?a.yb().innerWidth()/e:Infinity,f=f?a.yb().innerHeight()/f:Infinity,f=Math.min(e,f);Infinity!==f&&a.ox(f);a.Un(g,d,b);break;default:a.Ke(g)}}};Object.defineProperties(f.gf.wp.prototype,
{page:{get:function(){return this.yn},set:function(a){this.set({page:a})}},fit:{get:function(){return this.Tp}},top:{get:function(){return _.isNull(this.Be)?void 0:this.Be}},left:{get:function(){return _.isNull(this.ye)?void 0:this.ye}},bottom:{get:function(){return _.isNull(this.Zf)?void 0:this.Zf}},right:{get:function(){return _.isNull(this.hg)?void 0:this.hg}},zoom:{get:function(){return _.isNull(this.Mj)?void 0:this.Mj}},name:{get:function(){return this.wc}}});f.wj=function(a){f.Action.call(this,
a);this.gq="";_.isObject(a)&&_.isString(a.uri)&&(this.gq=a.uri)};f.wj.prototype={elementName:"URI",onTriggered:function(a,b,d){f.Action.prototype.onTriggered.call(this,a,b,d);a=this.gq;0!==a.indexOf("http://")&&0!==a.indexOf("https://")&&0!==a.indexOf("ftp://")&&0!==a.indexOf("mailto:")&&0!==a.indexOf("tel:")&&-1===a.indexOf("://")&&(a=-1!==a.indexOf("@")?"mailto:"+a:"http://"+a);window.open(a)},deserialize:function(a,b){f.Action.prototype.deserialize.call(this,a,b);var d=Annotations.ca,g=d.getAttribute(a,
"Target");_.isNull(g)&&(g=d.fA(a),g=d.getAttribute(g,"Name"));this.gq=g},serialize:function(a){a=f.Action.prototype.serialize.call(this,a);a.setAttribute("Name",this.gq);return a}};f.wj.prototype=$.extend(Object.create(f.Action.prototype),f.wj.prototype);Object.defineProperties(f.wj.prototype,{uri:{get:function(){return this.gq}}});f.Xm=function(a){f.Action.call(this,a);this.jn="";_.isObject(a)&&_.isString(a.action)&&(this.jn=a.action)};f.Xm.prototype={elementName:"Named",onTriggered:function(a,b,
d){f.Action.prototype.onTriggered.call(this,a,b,d);switch(this.jn){case "NextPage":d.Ke(a.rb()+1);break;case "PrevPage":d.Ke(a.rb()-1);break;case "FirstPage":d.Ke(1);break;case "LastPage":d.Ke(d.wb());break;default:console.warn("Invalid named action name: "+this.jn)}},deserialize:function(a,b){f.Action.prototype.deserialize.call(this,a,b);var d=Annotations.ca,g=d.getAttribute(a,"N");_.isNull(g)&&0<a.getElementsByTagName("Named").length&&(g=d.getAttribute(a.getElementsByTagName("Named")[0],"Name"));
this.jn=g},serialize:function(a){a=f.Action.prototype.serialize.call(this,a);a.setAttribute("Name",this.jn);return a}};f.Xm.prototype=$.extend(Object.create(f.Action.prototype),f.Xm.prototype);Object.defineProperties(f.Xm.prototype,{action:{get:function(){return this.jn}}});f.Wm=function(a){f.Action.call(this,a);this.cy=this.Et=null;this.set(a)};f.Wm.prototype={elementName:"JavaScript",set:function(a){_.isObject(a)&&_.isString(a.javascript)&&(this.Et=a.javascript)},onTriggered:function(a,b,d){f.Action.prototype.onTriggered.call(this,
a,b,d);a=d.getDocument().Yp;this.cy||(this.cy=a.Qn(this.Et,d));a.Qo(this.cy,b,d)},deserialize:function(a,b){f.Action.prototype.deserialize.call(this,a,b);var d=Annotations.ca.getAttribute(a,"JavaScript");d||(d=a.getElementsByTagName("JavaScript")[0].textContent);this.set({javascript:d})},serialize:function(a){a=f.Action.prototype.serialize.call(this,a);$(a).text(this.Et);return a}};f.Wm.prototype=$.extend(!0,new f.Action,f.Wm.prototype);Object.defineProperties(f.Wm.prototype,{javascript:{get:function(){return this.Et||
""}}});f.Vk=function(a){f.Action.call(this,a);this.Dj=!1;this.lb=null;_.isObject(a)&&(_.isArray(a.fields)&&(this.lb=a.fields.slice()),_.isUndefined(a.exclude)||(this.Dj=!!a.exclude))};f.Vk.prototype={elementName:"ResetForm",onTriggered:function(a,b,d){f.Action.prototype.onTriggered.call(this,a,b,d);var g=this,e=d.Ba().fe();a=e.ap;e.ap=!1;this.Dj||_.isNull(this.lb)?e.ns({Ir:function(b,d,a){g.lb&&-1!==g.lb.indexOf(b)||a.hK()}}):this.lb.forEach(function(b){var d=e.Hb(b);d?d.hK():console.warn("Missing field during reset:",
b)});e.ap=a;e.uq(null,0)},deserialize:function(a,b){f.Action.prototype.deserialize.call(this,a,b);var d=Annotations.ca,g=[],e=!0;_.isNull(d.getAttribute(a,"ResetFields"))?_.isNull(d.getAttribute(a,"ResetExcludedFields"))?0<a.getElementsByTagName("ResetForm").length&&(a=a.getElementsByTagName("ResetForm")[0],(g=d.getAttribute(a,"Fields"))&&(g=g.split(",")),d=parseInt(d.getAttribute(a,"Flags"),10),_.isNull(g)||_.isUndefined(g)?(g=[],e=!0):e=1===d?!0:!1):(g=d.getAttribute(a,"ResetExcludedFields").split(","),
e=!0):(g=d.getAttribute(a,"ResetFields").split(","),e=!1);this.lb=g;this.Dj=!!e},serialize:function(a){a=f.Action.prototype.serialize.call(this,a);this.lb&&a.setAttribute("Fields",this.lb.join(","));a.setAttribute("Flags",this.Dj?1:0);return a}};f.Vk.prototype=$.extend(Object.create(f.Action.prototype),f.Vk.prototype);Object.defineProperties(f.Vk.prototype,{fields:{get:function(){return this.lb}},exclude:{get:function(){return this.Dj}}});f.$k=function(c){f.Action.call(this,c);this.Zt="";this.lb=
[];this._format="xfdf";this.wt=!1;this._method="POST";this.Dj=!1;this.mc=new a.Annotations.xj({mask:"IncludeNoValueFields IncludeAppendSaves IncludeAnnotations CanonicalFormat WxclNonUserAnnots ExclFKey EmbedForm".split(" ")});this.set(c)};f.$k.prototype={elementName:"SubmitForm",set:function(a){_.isObject(a)&&(a.url&&(this.Zt=String(a.url)),_.isArray(a.fields)&&(this.lb=a.fields.slice()),a.format&&(this._format=a.format.toLowerCase()),a.includeEmpty&&(this.wt=!!a.includeEmpty),a.flags&&this.mc.set(a.flags),
a.method&&(this._method=String(a.method)),a.exclude&&(this.Dj=!!a.exclude))},onTriggered:function(a,b,d){f.Action.prototype.onTriggered.call(this,a,b,d);var g=this,e=[],h=d.Ba(),l=h.fe();0<this.lb.length?this.lb.forEach(function(b){e.push(l.Hb(b))}):l.ho(function(b){_.isNull(b.value)&&!g.wt||e.push(b)});a="";"xfdf"===this._format?a=h.wl.jN(e):("fdf"===this._format&&console.warn("FDF Export is not supported. Defaulting to export as HTML Forms"),a=h.wl.kN(e));$.ajax({type:"POST",url:this.Zt,data:a,
success:function(b){if(h.lL)h.lL(b);else{var d=window.open();_.isNull(d)||_.isUndefined(d)?console.warn("Form popup blocked"):d.document.write(b)}},error:function(){console.warn("Failed to submit form data to server.")}})},deserialize:function(a,b){f.Action.prototype.deserialize.call(this,a,b);var d=Annotations.ca,g=a.getElementsByTagName("SubmitForm"),e="SubmitURL",h="SubmitFields",l="SubmitFlag";0<g.length&&(a=g[0],e="URL",h="Fields",l="Flags");g=d.getAttribute(a,e);e=null;_.isNull(d.getAttribute(a,
h))||(e=d.getAttribute(a,h).split(","));h=0;_.isNull(d.getAttribute(a,l))||(h=parseInt(d.getAttribute(a,l),10));d="fdf";h&4&&(d="html");h&32&&(d="xfdf");this.set({url:g,fields:e||void 0,format:d,flags:0!==(h&2)?["IncludeNoValueFields"]:[]})},serialize:function(a){a=f.Action.prototype.serialize.call(this,a);a.setAttribute("Fields",this.lb.join(","));a.setAttribute("Flags",("xfdf"===this._format?32:0)|("html"===this._format?4:0)|(this.wt?2:0));a.setAttribute("URL",this.Zt);return a}};f.$k.prototype=
$.extend(Object.create(f.Action.prototype),f.$k.prototype);Object.defineProperties(f.$k.prototype,{url:{get:function(){return this.Zt}},fields:{get:function(){return this.lb}},format:{get:function(){return this._format}},includeEmpty:{get:function(){return this.wt}},flags:{get:function(){return this.mc},set:function(a){this.mc.set(a)}},method:{get:function(){return this._method}},exclude:{get:function(){return this.Dj}}});f.Vm=function(a){f.Action.call(this,a);this.lb=[];this._hide=!0;this.set(a)};
f.Vm.prototype={elementName:"Hide",set:function(a){_.isObject(a)&&(_.isArray(a.fields)&&(this.lb=a.fields.slice()),_.isUndefined(a.hide)||(this._hide=!!a.hide))},onTriggered:function(a,b,d){f.Action.prototype.onTriggered.call(this,a,b,d);var g=d.Ba().fe(),e=this;this.lb.forEach(function(b){g.Hb(b).Pf(!e.hide)})},deserialize:function(a,b){f.Action.prototype.deserialize.call(this,a,b);var d=Annotations.ca,g=!0,e;_.isNull(d.getAttribute(a,"HideField"))?0<a.getElementsByTagName("Hide").length?(a=a.getElementsByTagName("Hide")[0],
e=d.getAttribute(a,"Fields").split(","),g="false"!==d.getAttribute(a,"Hide")):(e=[d.getAttribute(a,"ShowField")],g=!1):e=[d.getAttribute(a,"HideField")];this._hide=g;this.lb=e},serialize:function(a){a=f.Action.prototype.serialize.call(this,a);a.setAttribute("Fields",this.o_.join(","));a.setAttribute("Hide",this.hide?"true":"false");return a}};f.Vm.prototype=$.extend(Object.create(f.Action.prototype),f.Vm.prototype);Object.defineProperties(f.Vm.prototype,{fields:{get:function(){return this.lb}},hide:{get:function(){return this._hide}}});
f.bD=function(){this.SE={GoTo:f.gf,GoToR:f.Um,URI:f.wj,Named:f.Xm,JavaScript:f.Wm,ResetForm:f.Vk,SubmitForm:f.$k,Hide:f.Vm}};f.bD.prototype={UA:function(a){if(_.isObject(a)){var b=this.SE[a.name];return b?new b(a):null}},yT:function(a,b,d){var g=Annotations.ca.eR(a);return(g=this.SE[g])?(g=new g,g.deserialize(a,b,d),g):null}};var e=new f.bD;f.t_=function(){return e};f.Mh=function(a){this.Bj={};this.iy=null;_.isObject(a)&&_.isObject(a.actions)&&this.au(a.actions)};f.Mh.prototype={au:function(a,b){b&&
(this.Bj={});if(_.isObject(a))for(var d in a)if(a.hasOwnProperty(d))for(var g=a[d].length,e=0;e<g;++e)this.Nj(d,a[d][e])},Nj:function(a,b){var d=this.Bj[a]||[];if(b instanceof f.Action)-1===d.indexOf(b)&&d.push(b);else if(_.isObject(b)){var g=e.UA(b);g&&d.push(g)}this.Bj[a]=d},ck:function(){return this.Bj},Me:function(a,b){var d=this.Bj[a];if(d)for(var g=d.length,e=0;e<g;++e)d[e].onTriggered(this,b,this.iy)},zg:function(a){this.iy=a},mh:function(){return this.iy},PV:function(a,b,d){function g(a,d){d.forEach(function(d){var c=
document.createElementNS("","Action");c.setAttribute("Trigger",a);var g=$(c);if(d=d.serialize(b))g.append(d),f=!0;$(e).append(c)})}var e;e=d?d:document.createElementNS("","OnActivation");var f=!1,l;for(l in this.Bj)this.Bj.hasOwnProperty(l)&&g(l,this.Bj[l]);f&&!d&&$(a).append(e)},hF:function(a,b,d){var g=Annotations.ca;a=g.dR(a);for(var f=a.length,h=0;h<f;++h){var l=a[h],n=g.getAttribute(l,"Trigger")||"U";(l=e.yT(l,b,d))&&this.Nj(n,l)}}}})(window);
(function(a){function f(b,a){return b-a}function e(b){b=new Blob([b]);b.name="AP.xod";var a=new k.V.eD(b),d=new k.Te;return new Promise(function(b,c){d.loadAsync(a,function(a){a?c(a):b(d)})})}function c(b,d){a.Actions.Mh.call(this);this.width=b;this.height=d;this.text=null;this.Vr=[];this.links=[];this.bb=null}function b(b,d,c,g,e,f){var k={getZoom:function(){return 1},getPageRotation:function(){return a.o.La.ni},finishedLoading:function(){return!0},acquireResources:function(){return!0},resourcesLoaded:function(){return!0},
getPageTransform:function(){},drawProgressive:function(){},drawComplete:function(){},onError:function(){}};_.isObject(b)?(k=$.extend(k,b),k.zoom&&(k.getZoom=function(){return k.zoom}),k.pageRotation&&(k.getPageRotation=function(){return k.pageRotation})):k=$.extend(k,{pageIndex:b,getZoom:function(){return d},getPageRotation:function(){return c},drawProgressive:e,drawComplete:g,canvasNum:f});return k}function d(){}function g(b){b in this.Di?(clearImmediate(this.Di[b]),delete this.Di[b]):this.ya.nu(b)}
var k=window.o,h=a.o.V.yj,l=a.o.V.Dx;a.ci=a.ci||{};var n={};a.o.Ep={BM:0,DM:1,VM:2,aN:10};a.o.Xk={qM:1,WM:2,lM:4,CM:8,vM:16,YL:32};c.prototype=$.extend({DK:function(b){this.height=b.height;this.width=b.width;this.bb=b.matrix;this.rotation=b.rotation;this.id=b.id;this.Sa=b.pageNum}},Object.create(a.Actions.Mh.prototype));var m=null,q=null;a.o.TW=function(b){m=b};a.o.MK=function(b){q=b};a.o.OH=function(){return m||q};var p=6;a.o.iM=function(){return p};a.o.Px=function(b){p=b;a.Pm=524288*b*b;a.wx=524288*
b*b;a.Sm=3*b;a.$L=50+30*b;a.o.za&&a.o.za.wK(b);switch(b){case 0:a.Sm=0;a.Pm=0;a.wx=0;break;case 1:a.Sm=0,a.Pm=0}};a.o.oD=function(b){a.Qv=1+2*(b-1);a.Rv=b-1;0>a.Qv&&(a.Qv=0);0>a.Rv&&(a.Rv=0)};a.o.Px(6);a.o.oD(5);k.df=function(b,a,d,c,g,e,f){this.children=b;this.name=a;this.Kf=d;this.parent=c;this.jp=g||0;this.yo=e||0;this.url=f};k.df.prototype={mH:function(){return this.children},getName:function(){return this.name},rb:function(){return this.Kf},OS:function(){return this.url},getParent:function(){return this.parent},
PS:function(){return this.jp},HR:function(){return this.yo},isValid:function(){return!!this.url||_.isNumber(this.Kf)}};k.Ax=function(b,a){this.sU=b;this.tU=a;this.zU=2;this.Fq={};this.Xn=[];this.Dl=0;this.RB=!1};k.Ax.prototype={DF:function(b,a){var d=this;d.Fq[b]=a;var c=d.Xn.indexOf(b);0<=c&&d.Xn.splice(c,1);d.Xn.push(b);d.SB();a.then(function(b){b=b.J.length;d.Dl+=b;a.numPages=b;d.SB()})["catch"](function(b){console.warn(b)})},XJ:function(){var b=this,a=b.Xn.shift(),d=b.Fq[a];delete b.Fq[a];(a=
d.numPages)?b.Dl-=a:(b.RB=!0,d=d.then(function(a){b.Dl-=a.J.length;b.RB=!1;b.SB()}));d.then(function(b){b.Mb()});return!!a},SB:function(){if(!this.RB){for(;this.Xn.length>this.sU;)if(!this.XJ())return;for(;this.Dl>this.tU&&!(this.Xn.length<=this.zU)&&this.XJ(););}},nR:function(b){return this.Fq[b]},Mb:function(){this.Fq.forEach(function(b){b.Mb()})}};k.Document=function(b,d){a.Actions.Mh.call(this);this.Yp=a.Annotations.O.ub.OP();this.v=k.Document.zR(d)(b);var c=this;this.v.kW(function(b){c.trigger(b.type,
[b.data])});this.type=d||"xod";this.pN=20;this.Io=[];this.Zw={}};var u=Object.create({});k.Document.zR=function(b){_.isUndefined(b)&&(b="xod");if(!u.hasOwnProperty(b))throw Error('Document type "'+b+'" is not registered with CoreControls.Document');return function(a){return new u[b](a)}};k.Document.Qr=function(b,a){if(_.isUndefined(b)||_.isUndefined(a))return!1;u[b]=a;return!0};k.Document.SX=function(b){return u.hasOwnProperty(b)?(delete u[b],!0):!1};k.Document.prototype={HA:function(){return this.type},
tg:function(){return"blackbox"!==this.type?!1:this.v.tg.apply(this.v,arguments)},Tj:function(b){return this.v.Tj.apply(this.v,arguments)},KU:function(b){this.Yp.lY(b)},bi:function(b){return this.v.bi.apply(this.v,arguments)},gp:function(b){return this.v.gp.apply(this.v,arguments)},Mn:function(){return this.v.Mn.apply(this.v,arguments)},gH:function(){return this.v.getBookmarks.apply(this.v,arguments)},lo:function(b){this.v.lo.apply(this.v,arguments)},mo:function(){return this.v.mo.apply(this.v,arguments)},
wb:function(){return this.v.wb.apply(this.v,arguments)},gc:function(){return this.v.gc.apply(this.v,arguments)},Ul:function(b,a,d){return this.v.Ul.apply(this.v,arguments)},GS:function(b,a,d,c){return d<=a?console.error("End index must be greater than start index"):this.wh(b,function(b){b=b.he();var g=8*a,e=8*d;if(g>b.length||e>b.length)return console.error("Index out of bounds");for(var f=[];g<e;g+=8)f.push({x1:b[g],y1:b[g+1],x2:b[g+2],y2:b[g+3],x3:b[g+4],y3:b[g+5],x4:b[g+6],y4:b[g+7]});c(f)})},
sv:function(b,a,d){return this.v.sv.apply(this.v,arguments)},rv:function(b,a,d){return this.v.rv.apply(this.v,arguments)},getMetadata:function(){return{title:this.v.le.title,creator:this.v.le.creator,subject:this.v.le.subject,keywords:this.v.le.keywords,created:this.v.le.created,modified:this.v.le.modified,description:this.v.le.description,producer:this.v.le.producer}},ik:function(){return this.v.ik.apply(this.v,arguments)},Xl:function(b){return this.v.Xl.apply(this.v,arguments)},jk:function(){return this.v.jk()},
$n:function(){return this.v.$n.apply(this.v,arguments)},ur:function(b,a,d){var c=this;return this.v.loadAsync.call(this.v,b,function(b){if(!b)for(var d=c.Sb(),g=d.length,e=c.mh(),f=0;f<g;++f)d[f].zg(e);a(b);return c},d)},Mv:function(b,a,d,c,g,e){return this.v.loadCanvasAsync.apply(this.v,arguments)},kU:function(b,a){this.wh(b,function(b){a(b.Xa)})},Jz:function(b){return this.v.extractXFDF.apply(this.v,arguments)},zr:function(b){return this.v.zr.apply(this.v,arguments)},nB:function(b,a){return this.v.loadThumbnailAsync.apply(this.v,
arguments)},kw:function(b){return this.v.kw.apply(this.v,arguments)},Gw:function(b){return this.v.Gw.apply(this.v,arguments)},mg:function(){return this.v.mg.apply(this.v,arguments)},Yo:function(b){return this.v.Yo.apply(this.v,arguments)},ep:function(b,a){return this.v.ep.apply(this.v,arguments)},Mb:function(){this.Yp.ed();this.Hn in this.v&&this.Hn.Mb();return this.v.Mb.apply(this.v,arguments)},Do:function(b,a){return this.v.Do.apply(this.v,arguments)},vr:function(b,a){return this.v.vr.apply(this.v,
arguments)},am:function(){return this.v.am.apply(this.v,arguments)},Uj:function(b){return this.v.Uj.apply(this.v,arguments)},YJ:function(){var b=this.Io.shift();this.v.J[b].text=null;delete this.Zw[b]},VJ:function(){for(var b=this.Io.length-1;0<=b;--b)this.YJ()},wh:function(b,a){this.Zw[b]?this.Io.splice(this.Io.indexOf(b),1):(this.Io.length===this.pN&&this.YJ(),this.Zw[b]=!0);this.Io.push(b);var d=this;return this.v.loadTextData.call(this.v,b,function(c){a(c);d.Zw[b]||(d.v.J[b].text=null)})},wr:function(b){function a(b,
d){return new Promise(function(a){b.loadTextData(d,function(){a()})})}var d=this;b=b.map(function(b){return a(d,b)});return Promise.all(b)},getFileData:function(b){return this.v.getFileData.apply(this.v,arguments)},qo:function(){return this.v.qo?this.v.qo.apply(this.v):null},bs:function(b,a){return this.v.bs?this.v.bs.apply(this.v,arguments):null},Qq:function(b){return this.v.Qq?this.v.Qq.apply(this.v,arguments):null},Fi:function(b,a,d){return this.v.Fi.apply(this.v,arguments)},mk:function(b,a){return this.v.mk.apply(this.v,
arguments)},Xi:function(b){return this.v.Xi.apply(this.v,arguments)},oi:function(){return this.v.oi.apply(this.v,arguments)},aj:function(b,a){return this.v.aj.apply(this.v,arguments)},ih:function(b,a){return this.v.ih.apply(this.v,arguments)},ii:function(b,a,d,c,g){return this.v.ii.apply(this.v,arguments)},si:function(){return this.v.si.apply(this.v,arguments)},Am:function(b){return this.v.Am.apply(this.v,arguments)},Pw:function(b){return this.v.Pw.apply(this.v,arguments)},um:function(){return this.v.um.apply(this,
arguments)},get numPages(){return this.v.J.length},kd:function(b){return this.v.J[b].width},jd:function(b){return this.v.J[b].height},Dc:function(b){return b>=this.wb()?(console.warn("Attempting to get page matrix for page "+(b+1)+" that doesn't exist."),null):this.v.J[b].bb},Zq:function(b){return this.v.Zq.apply(this.v,arguments)},oo:function(){return this.v.oo.apply(this.v,arguments)},$q:function(b){return this.v.J[b].rotation},uA:function(b){return this.v.J[b].text},NW:function(b,a){this.v.J[b].text=
a},bS:function(b){return this.v.J[b].oq},LH:function(b){return this.v.J[b].links},Sb:function(){var b=this;this.v.J.forEach(function(a){a.zg(b.mh())});return this.v.J},bc:function(){return this.v.bc},ir:function(b,a,d){return this.v.ir.apply(this.v,arguments)},xm:function(b){this.v.xm.apply(this.v,arguments)},KT:function(){return this.v.Ci},Dm:function(b){this.v.Dm.apply(this.v,arguments)},Ak:function(){return this.v.Ak.apply(this.v,arguments)},Ju:function(b){return this.v.Ju.apply(this.v,arguments)},
Xu:function(){return this.v.Xu.apply(this.v,arguments)},Ku:function(b,a){return this.v.Ku.apply(this.v,arguments)},Ol:function(b,a){return 0===b.length?[]:this.v.Ol.apply(this.v,arguments)},bp:function(){return this.v.bp()}};$.extend(k.Document.prototype,Object.create(a.Actions.Mh.prototype),a.utils.eventHandler);k.jj=function(){throw Error("Cannot initialize BaseDocument");};k.jj.prototype={tg:d,Ju:d,Xu:d,Ku:d,Tj:d,bi:d,gp:d,Mn:d,gH:d,lo:d,mo:d,wb:d,gc:function(b){var a={};a.width=this.J[b].width;
a.height=this.J[b].height;return a},bp:function(){return!0},Ak:function(){return!1},kW:function(b){this.Mu=b},bk:function(b){this.Mu&&this.Mu(b)},Ul:function(b,a,d){a={x:a,y:d};return this.J[b].bb.inverse().W(a)},sv:d,rv:function(b,a,d){return this.J[b].bb.W({x:a,y:d})},ik:d,Xl:d,jk:d,ur:d,Mv:d,Jz:d,zr:d,nB:d,kw:d,Gw:d,Yo:d,ep:d,Mb:d,Do:d,vr:d,Uj:d,am:function(){return!1},correctQuadsForPageRotation:function(b,d){var c=this.J[b],g=(4-c.rotation/90)%4;0!==g&&(c=a.Dd(1,g,c,{x:0,y:0},!1),d.WO(c))},wh:d,
qo:function(){return null},getFileData:d,Fi:d,Xi:d,aj:d,oi:d,Zr:d,ih:d,ii:d,xm:function(){},print:function(){},Zq:function(b){return String(b)},oo:function(){return _.range(0,this.J.length).map(String)},mg:d,si:d,Am:d,Pw:d,vq:function(){for(var b=1,d=this.J.length,c=a.utils.getCanvasMultiplier(),c=c*c,g=0;g<d;++g)var e=this.J[g],b=Math.max(b,e.width*e.height*c);return Math.sqrt(43E5/b)},Sj:function(b){return 0===b.m_b&&0===b.m_c?0<b.m_a?0:180:0>b.m_b?270:90},Ln:function(b,a){var d=this.Sj(b),c=a.w,
g=a.Gf;if(90===d||270===d)var e=c,c=g,g=e;switch(d){case 0:return d=-b.m_h,e=b.m_v,{x1:d,y1:e-g,x2:e-g,y2:e};case 90:return e=-b.m_h,d=-b.m_v,{x1:d,y1:e,x2:d+c,y2:e+g};case 180:return d=b.m_h,e=-b.m_v,{x1:d-c,y1:e,x2:d,y2:e+g};case 270:return e=b.m_h,d=b.m_v,{x1:d-c,y1:e-g,x2:d,y2:e}}return null},Dm:function(b){this.Ra=b},$n:function(b,a,d,c){if(this.Ra&&this.Ra.shouldDrawOverAnnotations===d){var g,e,f=this.J[a].width,k=this.J[a].height,h=b.getContext("2d");h.save();h.textAlign="center";h.textBaseline=
"top";b=(4-c)%4;if(d&&0!==b){switch(b){case 1:h.translate(0,f);break;case 2:h.translate(f,k);break;case 3:h.translate(k,0)}h.rotate(90*c*Math.PI/180)}c=function(b){var a=b.fontSize||20,d=b.fontFamily||"sans-serif";e=1.5*a;h.font=a+"pt "+d;h.fillStyle=b.color||"black";h.globalAlpha=(b.opacity||100)/100};d=function(b){var a=[""],d=0;b.split(" ").forEach(function(b){b.split("\n").forEach(function(b,c,g){b&&(h.measureText(a[d]+b).width>=f/3&&(a[++d]=""),a[d]+=b+" ");c<g.length-1&&(a[++d]="")})});return a};
this.Ra.diagonal&&(h.save(),c.call(this,this.Ra.diagonal),h.translate(f/2,k/2),h.rotate(-Math.atan(k/f)),this.Ra.diagonal.text&&(g=this.Ra.diagonal.text.split("\n"),g.forEach(function(b,a){h.fillText(b,0,(a-g.length/2)*e)})),h.restore());this.Ra.header&&(h.save(),c.call(this,this.Ra.header),b=function(b){b.forEach(function(b,a){h.fillText(b,0,a*e)})},h.translate(f/6,0),this.Ra.header.left&&b(d(this.Ra.header.left)),h.translate(f/3,0),this.Ra.header.center&&b(d(this.Ra.header.center)),h.translate(f/
3,0),this.Ra.header.right&&b(d(this.Ra.header.right)),h.restore());this.Ra.footer&&(h.save(),c.call(this,this.Ra.footer),c=function(b){b.forEach(function(a,d){h.fillText(a,0,(d-b.length)*e)})},h.translate(f/6,k),this.Ra.footer.left&&c(d(this.Ra.footer.left)),h.translate(f/3,0),this.Ra.footer.center&&c(d(this.Ra.footer.center)),h.translate(f/3,0),this.Ra.footer.right&&c(d(this.Ra.footer.right)),h.restore());this.Ra.custom&&(h.save(),this.Ra.custom(h,a,f,k),h.restore());h.restore()}},bI:function(b){b=
b||0;var a=this.gc(b),d=document.createElement("canvas");d.width=a.width;d.height=a.height;var c=d.getContext("2d");c.rect(0,0,a.width,a.height);c.fillStyle="rgba(255, 255, 255, 0.0)";c.fill();this.$n(d,b);return d},um:function(){return Promise.resolve()},Uz:function(b,a){var d=this.Hn.nR(this.Wu(a));return!d||d.numPages<b.length?this.DH(b,a):Promise.resolve(d)},Ol:function(d,c){for(var g=this,e=d.length,f=[],k=this.Uz(d,c),h=0;h<e;++h){var n=d[h],m=n.objnum+"-"+n.gennum;n.QO&&(m+="_"+n.QO);n.TO&&
(m+="-"+n.TO);f.push(Promise.all([m,n.blendMode,k]).then(function(d){var e=d[0],f=d[1],k=d[2];if(e in k.QA){var h=k.QA[e];return new Promise(function(d,e){var v=g.J[c-1],n=b(h,1,0,function(){}),m=_.uniqueId(),l={};l[m]={Jf:null,paused:!1,Jb:n.pageIndex};k.vr(n.pageIndex,m,function(b,c){b&&e(Error("Error loading page "+n.pageIndex+": "+b));_.isUndefined(l[m])||(l[m].Jf=c,l[m].paused&&c.pause(),n.finishedLoading(b,c)&&c.mB(function(){d({draw:function(b,d){var c=this;return new Promise(function(g){var e=
b.getTransform(),k=new XODText.Matrix2D,h=a.asc(v.bb)/1.33333;k.Ea(h,0,0,h,d.x,d.y);e.concat(k);b.translate(d.x,d.y);b.scale(h,h);"multiply"===f&&(b.globalAlpha=.5);c.Jf.yG(b,e,g)})},Jf:c})},void 0,!0))})})}throw Error("No matching annotation in appearance document.");}))}return f},EO:function(b){this.J||(this.J=[]);this.J.push(b)},no:function(b){return this.J[b]}};var r=0;k.Te=function(b){this.kn=this.Va=null;this.An=new a.hf.Ps;this.id=b;this.Xv=!1;this.bf=null;this.Md={};this.uB=_.bind(this.uB,
this);this.Qu=null;this.Tf=1;this.te={};this.Ra=null;this.bc=Promise.resolve();this.QA={};this.Hn=new k.Ax(10,400);this.ma=(++r).toString(16)};k.Te.prototype=Object.create(k.jj.prototype);k.Te.prototype.constructor=k.Te;k.Document.Qr("xod",k.Te);$.extend(k.Te.prototype,{Vf:"Document/FixedDocument.fdoc",Kg:"Document/DocProps/core.xml",Uf:"Document/Structure/DocStruct.struct",cM:"Struct/font.xml",rN:"Struct/",qN:"Text/",loadAsync:function(b,d){this.Va=b;this.wf=[];this.le={};this.J=[];this.Ad={};this.Ad[this.Vf]=
0;this.Ad[this.Kg]=0;this.Ad[this.Uf]=0;this.Va.$i()&&(this.vk={});var c=this;b.bind("partReady",this.uB);this.bind("documentReady",function(b){1.5>c.Tf&&c.gO();d(b)});b instanceof a.o.V.Mp?(this.Xv=!0,this.Xl(function(){b.db=c.bf;b.sm(d)})):b.sm(d)},extractXFDF:function(b){if(1!==b.length)throw Error("XOD Document does not support extracting XFDF for multiple input pages");var d=this,c=b[0]-1;return new Promise(function(b){function g(b){var d="",a=0,c,e,f,k=-1;for(2<=b.length&&"{"===b.charAt(0)&&
"}"===b.charAt(1)&&(b=b.substr(2));a<b.length;)c=b.charCodeAt(a),128>c?(0>k&&(k=a),a++):(0<=k&&(d+=b.substring(k,a),k=-1),191<c&&224>c?(e=b.charCodeAt(a+1),d+=String.fromCharCode((c&31)<<6|e&63),a+=2):(e=b.charCodeAt(a+1),f=b.charCodeAt(a+2),d+=String.fromCharCode((c&15)<<12|(e&63)<<6|f&63),a+=3));0===k?d=b:0<=k&&(d+=b.substring(k,a));return d}if(1.5<=d.Tf){var e=d.J[c].OL;d.Ja.Ef("Annot/Annots"+(e.index?e.index:"")+".xfdf",function(a){a=g(a.data);d.J[0].oq=a;b({xfdfString:a,pages:_.range(e.start,
e.end)})})}else d.Ja.Ef("Annots.xfdf",function(c){c=g(c.data);d.J[0].oq=c;var e=a.Annotations.ca.fr(c);d.BE(e);b({xfdfString:c,parsedData:e,pages:_.range(1,d.J.length+1)})})})},vr:function(b,d,c){var g=this;if(!this.Ja)throw Error("Document is not initialized!");1.2===this.Tf&&(this.Ja.Zv=!0);this.Ja.tA(b,d,function(d,e){var f=g.J[b],k=null;e&&(k=new a.hf.$M(f,e,g.An));c(d,k)})},Do:function(b,d){if(!this.Ja)throw Error("Document is not initialized!");return this.Ja.Ef(b,d)},jU:function(b){var d=this;
null===d.Qu?d.Do(d.cM,function(a){if(a.error)throw Error("SELECT: Error getting part "+a.ra+": "+a.error);var c=new XODText.Hx(d.ma);c.PB(a.data);d.Qu=c.Qz;b(d.Qu)}):b(d.Qu)},loadTextData:function(b,d){var a=this;null!==a.J[b].text?d(a.J[b].text):b in a.te?a.te[b].push(d):(a.te[b]=[d],1.4>a.Tf?a.Do(a.qN+(b+1)+".xml",function(d){if(d.error)throw Error("SELECT: Error getting part "+d.ra+": "+d.error);var c=new XODTextOld.ve;c.tT(d.data);d=new XODText.ve;d.Lr({m_Struct:c.fb,m_Str:c.Xa,m_Offsets:c.Xc,
m_Quads:c.Ka,m_Ready:c.md});a.correctQuadsForPageRotation(b,d);a.J[b].text=d;a.te[b].forEach(function(b){b(c)});delete a.te[b]}):a.jU(function(d){a.Do(a.rN+(b+1)+".xml",function(c){var g=new XODText.ve,e=new XODText.Matrix2D;e.Ea(1,0,0,1,0,0);var f=new XODText.an(d);a.Ja.JH(b,function(d){function k(){return d.Hr().then(function(){if(!d.run(f,e))return k()})}k().then(function(){g.PB(c.data,f);a.correctQuadsForPageRotation(b,g);a.J[b].text=g;a.te[b].forEach(function(b){b(g)});delete a.te[b]})["catch"](function(b){console.warn("Custom Canvas has encountered an error: "+
b.message)})})})}))},am:function(){return 1.2>=this.Tf},ik:function(){return this.wo||0<this.Dr},loadCanvasAsync:function(d,a,c,g,e,f){var k=this,h=b(d,a,c,g,e,f),n=_.uniqueId();k.Md[n]={Jf:null,paused:!1,Jb:h.pageIndex};k.vr(h.pageIndex,n,function(b,d){if(b)throw Error("Error loading page "+h.pageIndex+": "+b);_.isUndefined(k.Md[n])||(k.Md[n].Jf=d,k.Md[n].paused&&d.pause(),h.finishedLoading(b,d)&&d.mB(function(){h.resourcesLoaded()&&d.HP(h.getZoom(),h.getPageRotation(),function(b){h.drawComplete(b,
h.pageIndex)},function(b){k.$n(b,h.pageIndex);h.drawProgressive(b,h.pageIndex)},h.canvasNum,h.getPageTransform(),h.renderRect,h.useProgress,h.pageCanvas)},void 0,h.acquireResources()))});return n},kw:function(b){if(b=this.Md[b])b.paused=!0,b.Jf&&b.Jf.pause()},Gw:function(b){if(b=this.Md[b])b.paused=!1,b.Jf&&b.Jf.resume&&b.Jf.resume()},gp:function(b){this.bi(b)},bi:function(b){var d=this.Md[b];d&&(this.nu(d.Jb,b),d=d.Jf)&&(d.Mb(),d.abort&&d.abort());this.Uj(b)},Uj:function(b){delete this.Md[b]},aG:function(){return"t"+
_.uniqueId()},VT:function(b){return _.isString(b)&&0<b.length&&"t"===b[0]},loadThumbnailAsync:function(b,d){if(!this.Ja)throw Error("Document is not initialized!");var c=this,g;if(this.wo||this.Dr>b)g=c.aG(),this.Ja.FA(b,g,function(b){var g=new Image,e;e=b.data;l&&c.Va instanceof l?e=c.Va.path+e:(b=b.ra.match(/\.([a-zA-Z]+)$/)[1].toLowerCase(),e=a.o.zH(b,e));g.onload=function(){g.src.startsWith("data")||URL.revokeObjectURL(g.src);d(g);g=g.onload=null};g.src=e},name);else{var e=this.J[b];g=this.loadCanvasAsync({pageIndex:b,
zoom:e.width>e.height?150/e.width:150/e.height,drawComplete:function(b){b.style.backgroundColor="white";c.gp(g);d(b)},pageCanvas:!0})}return g},Xl:function(b){if(null===this.bf){if(_.isUndefined(this.id)||_.isNull(this.id)){this.id=a.top.location.href;for(var d=a.top.location.hash.substring(1).split("&"),c=0;c<d.length;c++){var g=d[c].split("=");if("d"===g[0]){this.id=g[1];break}}}var e=this;this.bf=new a.o.IM(this.id);this.bf.open(b,function(b){e.bf=null;console.error(b)})}else console.warn("Offline DB is already initialized!"),
b()},ep:function(b,d){function c(b){g.Va.Wy(b)}if(!this.Ja)throw b(),Error("Document is not initialized!");if(!this.bf)throw b(),Error("Offline DB is not initialized!");if(this.Va instanceof a.o.V.Mp)throw b(),Error("Can't download file while in offline mode!");var g=this;g.Va.wA(function(a){g.bf.AX(g.Ja,a,!!g.Va.decrypt,b,d,c)})},jk:function(){if(!this.bf)throw Error("Offline DB is not initialized!");return this.bf.jk()},Mn:function(){if(!this.bf)throw Error("Offline DB is not initialized!");this.bf.oP()},
mo:function(){return this.Xv},Yo:function(b){if(!this.bf)throw Error("Offline DB is not initialized!");this.Xv!==b&&(!(this.Xv=b)||this.kn instanceof a.o.V.Mp||(this.kn=new a.o.V.Mp(this.bf,this.Va.decrypt,this.Va.El),this.kn.bind("partReady",this.Ja.bw)),this.zC())},zC:function(){if(null!==this.kn){var b=this.kn;this.kn=this.Va;this.Va=b;this.Ja.Zd=this.Va}},nu:function(b,d){if(!this.Ja)throw Error("Document is not initialized!");this.Ja.xq(b,d)},Tj:function(b){this.VT(b)?this.Ja.pP(b):this.bi(b)},
uB:function(b){if(b.error)return this.Ad[b.ra]=3,this.$D();var d;d=this.Va.decrypt?this.Va.gG?this.Va.decrypt(b.data,this.Va.El,b.ra):a.o.Nh.lG(b.data,this.Va.El,b.ra):b.data;d=a.ek(d);this.Va.$i()&&(this.vk[b.ra]={data:d,Gb:b.Gb},this.Va.decrypt&&(this.vk[b.ra].LQ=b.data));b.Gb&&(d=h.inflate(d));switch(b.ra){case this.Vf:d=new a.Se(d);d.oa();d.advance();b=d.K("JPGThumbs");this.eB="true"===b;b=d.K("IncludesThumbs");this.wo=null===b||"false"!==b;!this.wo&&(b=d.K("NumLeadingThumbs"))&&(b=parseInt(b,
10),b=isNaN(b)?0:b,this.Dr=Math.max(b,0));b=d.K("Version");this.Tf=parseFloat(b);if(1.2>this.Tf)throw this.Ad[this.Vf]=null,Error("The XOD version is out of date. Please re-convert the file with the most recent version of PDFNet or the command line converter.");if(1.5<this.Tf)throw Error("The XOD file version is too new for this client. Please update the WebViewer client version.");b=1.5<=this.Tf;var c,g;b&&(g=d.K("DefaultMatrix").split(","),c=new XODText.Matrix2D,c.Ea(parseFloat(g[0]),parseFloat(g[1]),
parseFloat(g[2]),parseFloat(g[3]),parseFloat(g[4]),parseFloat(g[5])),g=this.Sj(c));this.Ad[this.Vf]=1;for(var e={index:0,start:1},f=1;d.advance();){var k=d.ua();if("PageContent"===k){k=new a.Sk(parseFloat(d.K("Width")),parseFloat(d.K("Height")));k.Vr=["Pages/"+f+".xaml","Annot/"+f+".xml","Pages/_rels/"+f+".xaml.rels"];k.OL=e;var n=d.K("trn:Id");n&&(k.offsetX=parseFloat(d.K("trn:X")),k.offsetY=parseFloat(d.K("trn:Y")),this.QA[n]=this.J.length);this.J.push(k);if(b){(k=d.K("trn:Matrix"))?(n=k.split(","),
k=new XODText.Matrix2D,k.Ea(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2]),parseFloat(n[3]),parseFloat(n[4]),parseFloat(n[5])),n=this.Sj(k)):(k=c,n=g);var m=f-1,l=this.Ln(k,{w:this.J[m].width,Gf:this.J[m].height});k.Ea(4/3,0,0,-4/3,-l.x1,l.y2);this.J[m].bb=k;this.J[m].rotation=n}++f}else if("trn:AnnotRef"===k)e.end=f,e={index:e.index+1,start:f};else throw Error("Unsupported XOD document element type: "+k);}e.end=f;this.wo&&(this.Dr=this.J.length);this.yr=this.vq();break;case this.Kg:this.Ad[this.Kg]=
1;d=new a.Se(d);d.oa();for(this.le={};d.advance();)c=d.ua().split(":"),this.le[1===c.length?c[0]:c[1]]=d.current.textContent;break;case this.Uf:this.Ad[this.Uf]=1;this.wf=[];d=new a.Se(d);d.oa();d.advance();d.oa();d.advance();d.oa();e=0;for(f=null;d.advance();){c=parseInt(d.K("OutlineLevel"),10);g=new a.CoreControls.Bookmark;g.children=[];g.name=b.Gb?a.utils.utf8_decode(d.K("Description")):d.K("Description");if(e<c)g.parent=f;else for(g.parent=f.parent;e>c;)g.parent=g.parent.parent,--e;g.jp=d.K("trn:Vpos");
g.jp=null===g.jp?0:parseFloat(g.jp);g.yo=d.K("trn:Hpos");g.yo=null===g.yo?0:parseFloat(g.yo);e=d.K("OutlineTarget").split("#");1===e.length||0===e[1].length?g.url=e[0]:g.Kf=parseInt(e[1],10);null!==g.parent?g.parent.children[g.parent.children.length]=g:this.wf[this.wf.length]=g;e=c;f=g}break;default:if(this.Ad[this.Vf])return this.Ad[this.Kg]=this.Ad[this.Kg]||2,this.Ad[this.Uf]=this.Ad[this.Uf]||2,this.eE(b)}this.$D()},getBookmarks:function(){return Promise.resolve(this.wf)},lo:function(b){return 1.2===
this.Tf?this.J[b].oq:this.J[b].links},wb:function(){return this.J.length},Ul:function(b,d,a){d={x:d,y:a};return this.J[b].bb.inverse().W(d)},sv:function(b,d,a){return this.J[b].bb.W({x:d,y:a})},Mb:function(){var b="i"+this.ma+"-",d="f"+this.ma+"-";if(document.fonts)for(var c in a.Qg)c.startsWith(d)&&(a.Qg[c].remove(),delete a.Qg[c]);for(var g in a.ci)g.startsWith(b)&&delete a.ci[g];_.isEmpty(a.Qg)&&(b=a.ef.FontFace.prototype.yC,null!==b&&(document.head.removeChild(b),a.ef.FontFace.prototype.styleSheet=
null,a.ef.FontFace.prototype.yC=null));this.An=new a.hf.Ps;this.Va instanceof a.o.V.sD&&this.Va.abort();this.it()},it:function(){this.Va.unbind("partReady");this.Ja&&this.Ja.Mb();this.Ja=new a.o.V.EM(this.Va,this.J,this.An,this.ma);this.Ja.eB=this.eB},$D:function(){this.Ad[this.Vf]&&this.Ad[this.Kg]&&this.Ad[this.Uf]&&this.eE()},eE:function(b){this.it();if(this.Va.$i()){for(var d in this.vk)this.Ja.cache.setItem(d,this.vk[d].data,this.vk[d].Gb),this.Va.decrypt&&this.Ja.Jl.setItem(d,this.vk[d].LQ,
this.vk[d].Gb);delete this.vk}this.trigger("documentReady",3===this.Ad[this.Vf]);b&&this.Va.trigger("partReady",b)},gO:function(){var b=new XODText.Matrix2D;b.Ea(4/3,0,0,-4/3,0,this.J[0].height);for(var d=this.J.length,a=0;a<d;++a)this.J[a].bb=b,this.J[a].rotation=0},BE:function(b){for(var d=this.J.length,a=0;a<d;++a)this.J[a].bb=null;if(b&&b.querySelector("xfdf > pages")){b=b.querySelector("xfdf > pages");for(var c,g,e,a=0;a<b.childNodes.length;++a){var f=b.childNodes[a].localName;if(f&&(e=b.childNodes[a],
"defmtx"===f&&(g=e.getAttribute("matrix").split(","),c=new XODText.Matrix2D,c.Ea(parseFloat(g[0]),parseFloat(g[1]),parseFloat(g[2]),parseFloat(g[3]),parseFloat(g[4]),parseFloat(g[5])),g=this.Sj(c)),"pgmtx"===f)){f=parseInt(e.getAttribute("page"),10);e=e.getAttribute("matrix").split(",");var k=new XODText.Matrix2D;k.Ea(parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5]));var h=this.Sj(k);e=this.Ln(k,{w:this.J[f].width,Gf:this.J[f].height});this.J[f].rotation=
h;k.Ea(4/3,0,0,-4/3,-e.x1,e.y2);this.J[f].bb=k}}for(a=0;a<d;++a)null===this.J[a].bb&&(b=new XODText.Matrix2D,e=this.Ln(c,{w:this.J[a].width,Gf:this.J[a].height}),b.Ea(4/3,0,0,-4/3,-e.x1,e.y2),this.J[a].bb=b,this.J[a].rotation=g)}},Wu:function(b){return this.J[b-1].OL.index},DH:function(b,d){if(1.5>this.Tf)return Promise.reject("getAppearanceReferences: XOD with version less than 1.5 has no appearances");var c=this,g=this.Wu(d);new k.Te;var f="Annot/Appearances"+(g||"")+".xod",h;h=new Promise(function(b,
d){a.FileReader||d("This browser does not support FileReader");c.Ja.Ef(f,function(c){c.error?d(c.error):b(e(a.ZH(c.data)))})});this.Hn.DF(g,h);return h},bp:function(){return!this.am()}});k.Oh=function(){this.wf=[];this.le={};this.J=[];this.hw={};this.wo=!1;this.Dr=0;this.Di={};this.te={};this.ma=null;this.sJ=2;this.uK=!1;this.oe=[];this.Ra=null;this.Hn=new k.Ax(10,400)};k.Oh.prototype=Object.create(k.jj.prototype);k.Oh.prototype.constructor=k.Oh;k.Document.Qr("pdf",k.Oh);$.extend(k.Oh.prototype,{vx:function(b){var d=
new a.Sk(b.width,b.height);d.bb=new XODText.Matrix2D;b=b.matrix;d.bb.Ea(b[0],b[1],b[2],b[3],b[4],b[5]);b=this.Sj(d.bb);d.bb=this.YB({w:d.width,Gf:d.height});d.rotation=b;return d},YB:function(b,d){var a=new XODText.Matrix2D;a.Ea.apply(a,b);var c=this.Ln(a,d);a.Ea(1,0,0,-1,-c.x1,c.y2);return a},SG:function(b,d){var a=this;a.SU||a.zF({pageDimensions:b});a.bc=new Promise(function(b){a.bind("documentComplete",function(){a.unbind("documentComplete");b()})});a.yr=a.vq();a.Ci||a.trigger("documentComplete");
d();setTimeout(this.bP.bind(this),0)},bP:function(){var b=this;b.ya.addEventListener(b.ma,function(d){b.KB(d)})},TR:function(b,d){var a=createPromiseCapability(),c=new XMLHttpRequest;c.open("GET",b.url);c.withCredentials=d;var g=b.customHeaders;if(g)for(var e in g)c.setRequestHeader(e,g[e]);c.setRequestHeader("Range","bytes=1-150");c.responseType="arraybuffer";c.onreadystatechange=function(){if(this.readyState===this.DONE)if(c.response){var b=c.response.byteLength;206!==c.status&&200!==c.status?a.reject({message:"Received http error code "+
c.status}):150!==b&&a.reject({message:"Byte ranges are not supported by the server.",data:new Uint8Array(c.response)});var b=new Uint8Array(c.response),d=[76,105,110,101,97,114,105,122,101,100],g=c.getResponseHeader("Content-Range")||c.getResponseHeader("content-range");if(g){var g=g.split("/")[1],e=0;do{a:{for(var f=b.length;e<f;++e)if(b[e]===d[0])break a;e=-1}e+=1;if(!e)break;for(f=1;10>f;++f)if(b[e]===d[f])++e;else break;if(10===f){a.resolve(parseInt(g,10));return}}while(0!==e);a.reject({message:"The file is not linearized."})}else a.reject({message:"Could not retrieve Content-Range header."})}else a.reject({message:"No response data"})};
c.onerror=function(){a.reject({message:"Network or Cross Domain Access Error."})};c.send();return a.promise},loadAsync:function(b,d,c){function g(b){p.wf=[];p.le={};p.J=[];p.wo=!1;p.Dr=0;p.Ci=!1;p.bind("documentReady",d);var a,c;r.then(function(d){p.ya=d;d="object"===typeof b&&"url"in b;var g;if(g=q){g=q;var e=Object.prototype.toString.call(g);g="object"===typeof g&&null!==g&&("[object File]"===e||"[object Blob]"===e)}g&&p.ya&&"ems"===p.ya.getWorkerType()?(a="file",c=q):d?(a="url",c=b,p.Ci=!0):"string"===
typeof b?(a="filepath",c=b):"object"===typeof b&&null!==b&&void 0!==b.byteLength?(a="array",c=b.buffer):"object"===typeof b&&"type"in b&&"id"===b.type?(a="id",c=b.id):console.warn("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object");h({type:a,value:c,extension:m,defaultPageSize:l,pageSizes:u})})}function e(b,d){console.warn("Could not use incremental download for url "+b+". Reason: "+d)}function f(b){I=b;p.ya.bY(p.ma,b).then(function(b){b.success?k(b.pageDimensions):
n(f)})}function k(a){p.Ci?p.ya.JT(p.ma).then(function(c){c?(p.SG(a,d),b.trigger("documentLoadingProgress",[1,1])):(e(q.url,"Linearization data is invalid."),p.Mb(),b.getFileData(g))}):p.SG(a,d)}function h(b){p.ya.RQ(b).then(function(b){p.ma=b.docId;k(b.pageDimensions)},function(b){"NeedsPassword"===b.type&&n?(p.ma=b.docId,I?f(I):n(f)):(p.bc=Promise.reject(b),d(b))})}this.Va=b;var n=c.getPassword,m=c.extension,l=c.defaultPageSize,u=c.pageSizes,r=c.workerTransportPromise,p=this,q=b.getFile();if(a.utils.isJSWorker&&
a.jsworker)q=a.jsworker.worker.getPlatformFormatFilePath(q),g(q);else if(q&&q.url)this.TR(q,b.withCredentials).then(function(d){q.size=d;q.withCredentials=-1===q.url.indexOf(window.location.hostname)?b.withCredentials:!0;g(q)},function(d){e(q.url,d.message);var a;try{a=window.parent.cordova}catch(c){a=!1}d.data&&!a?g(d.data):b.getFileData(g)});else if(q){c=r.then(function(b){return b.tq});var N=a.o.UR();Promise.race([c,N]).then(function(d){"pnacl"===d?b.getFileData(g):g(q)})}else b.getFileData(g);
var I=null},zF:function(b){var d=this;d.SU=!0;b=b.pageDimensions;for(var a=Object.keys(b),g=this.J,e=Array(g.length),f=0;f<g.length;++f){var k=g[f];k.text&&(e[f]=k.text)}this.J.length=0;var h=this.hw,n=[],m={};a.forEach(function(a){var f=b[a],k=!!f.contentChanged,f={width:Math.round(f.width),height:Math.round(f.height),matrix:d.YB(f.matrix,{w:f.width,Gf:f.height}),rotation:90*f.rotation,id:f.id,pageNum:a,contentChanged:k};h[f.id]&&n.push({before:h[f.id],after:f});h[f.id]=new c(f.width,f.height);var l=
h[f.id];l.DK(f);!k&&(k=e[a-1])&&(l.text=k);g[a-1]=l;m[f.id]=!0});this.yr=this.vq();Object.keys(h).forEach(function(b){b in m||delete h[b]});return n},KB:function(b){switch(b.type){case "pagesUpdated":b=this.zF(b.data);this.bk({type:"pagesDiff",data:b});this.bk({type:"pagesUpdated",data:b.map(function(b){return b.after})});break;case "bookmarksUpdated":this.bk({type:"bookmarksUpdated",data:b.data});break;case "documentComplete":this.trigger("documentComplete");this.bk({type:"documentComplete",data:b.data});
break;default:console.warn("Unknown event type: ",b.type)}},getBookmarks:function(){function b(d){var a=[];d.children.forEach(function(c){c.parent=d;a.push(b(c))});return new k.df(a,d.name,d.pageNumber,d.parent,d.verticalOffset,d.horizontalOffset,d.url)}return this.ya.gU(this.ma).then(function(d){var a=[];d.bookmarks.forEach(function(d){a.push(b(d))});return a})},loadTextData:function(b,d){var a=this;null!==a.J[b].text?d(a.J[b].text):b in a.te?a.te[b].push(d):(this.um(b+1).then(function(){a.ya.wh(a.ma,
b).then(function(d){var c=new XODText.ve;c.Lr({m_Struct:d.struct,m_Str:d.str,m_Offsets:d.offsets,m_Quads:d.quads,m_Ready:!0});a.correctQuadsForPageRotation(b,c);a.J[b].text=c;a.te[b].forEach(function(b){b(c)});delete a.te[b]},function(b){console.warn("Text generation failed: "+(b&&b.message?b.message:b))})}),a.te[b]=[d])},extractXFDF:function(b){return this.ya.eU(this.ma,b).then(function(d){d.pages=b;return d})},zr:function(b){return this.ya.zr(this.ma,b)},OC:function(b){var d=this;return new Promise(function(a){var c=
d.bI(b),g=new FileReader;g.onload=function(b){a(b.target.result)};c.toBlob(function(b){g.readAsArrayBuffer(b)})})},PQ:function(b,d){if(b.byteLength!==d.byteLength)return!1;for(var a=new Int8Array(b),c=new Int8Array(d),g=0;g!==b.byteLength;g++)if(a[g]!==c[g])return!1;return!0},cI:function(b){var d=this;return new Promise(function(a,c){d.Ra||c("no watermark for this doc");var g=b.length,e=[];if(d.Ra.hasOwnProperty("custom")){for(var f=0;f<g;f++)e.push(d.OC(b[f]));Promise.all(e).then(function(b){var c=
{},e=b[0];c["default"]=e;for(var f=1;f<g;f++){var k=b[f];d.PQ(k,e)||(c[f.toString()]=k)}a(c)})}else{var k=b[0],f=d.gc(k),h=f.width,n=f.height;e.push(d.OC(k));for(var m=["default"],f=1;f<g;f++){var k=b[f],l=d.gc(k);if(h!==l.width||n!==l.height)m.push(f.toString()),e.push(d.OC(k))}Promise.all(e).then(function(b){for(var d={},c=0;c<m.length;c++)d[m[c]]=b[c];a(d)})}})},getFileData:function(b){var d=this;b=b||{};"finishedWithDocument"in b||(b.finishedWithDocument=!1);"printDocument"in b||(b.printDocument=
!1);b.docId=d.ma;if("filePath"in b)return d.bc.then(function(){return d.ya.SV(b)});var a=_.range(0,this.wb()),c=d.cI(a);return d.bc.then(function(){return c}).then(function(a){b.watermarks=a;return d.ya.mK(b)},function(){return d.ya.mK(b)}).then(function(b){return b.fileData})},wb:function(){return this.J.length},rI:function(b,d,c,g,e,f,k,h){var n=this,m=a.o.Qm===a.o.Qm.Us;if(m){d=a.innerWidth;c=a.innerHeight;var l=a.utils.getCanvasMultiplier(),u={x:k.x,y:k.y};a.Dd(g.gw,g.fw,{x1:g.page.x1,x2:g.page.x2,
y1:g.page.y1,y2:g.page.y2,width:g.page.width,height:g.page.height},u,!0,l);u.x=u?Math.round(u.x):0;u.y=u?Math.round(u.y):0;l=a.o.za.Bh;a.o.za.Bn(l,d,c);var r=u.x>=l.width/2;console.log("imagePathReceived for: "+b);console.log("tCanvas.width: "+l.width);console.log("translation.x: "+u.x);console.log("isRightPage: "+r);"undefined"===typeof n.rr&&(n.rr=!1);if(r&&!n.rr){n.Bz=function(){var d=a.o.za.Zo(g.page,g.gw,g.fw,k,f,h).canvas,c=k?Math.round(k.x):0,n=k?Math.round(k.y):0;console.log("Drawing: "+b);
var m=new Image;$(m).css("width",g.vJ);$(m).css("height",g.tJ);var l=b;0!==l.indexOf("file://")&&(l="file://"+l);m.onload=function(){var b=d.getContext("2d");b.setTransform(1,0,0,1,0,0);b.drawImage(m,c,n);e||$(d).addClass("progressive");g.Az(d);e&&g.zz(d);m=null;a.utils.isJSWorker&&(console.log("[WebViewer|JSWorker]: Deleting file: "+l),a.jsworker.worker.deleteGeneratedImageRenderFile(l))};m.src=l};return}}var p=a.o.za.Zo(g.page,g.gw,g.fw,k,f,g.Yd,h).canvas,q=k?Math.round(k.x):0,N=k?Math.round(k.y):
0;console.log("Drawing: "+b);var I=new Image;$(I).css("width",g.vJ);$(I).css("height",g.tJ);var D=b;0!==D.indexOf("file://")&&(D="file://"+D);I.onload=function(){var b=p.getContext("2d");b.setTransform(1,0,0,1,0,0);b.drawImage(I,q,N);e||$(p).addClass("progressive");g.Az(p);e&&g.zz(p);I=null;a.utils.isJSWorker&&(console.log("[WebViewer|JSWorker]: Deleting file: "+D),a.jsworker.worker.deleteGeneratedImageRenderFile(D));m&&(r?n.rr=!1:(n.rr=!0,"function"===typeof n.Bz&&(n.Bz(),n.Bz=void 0,n.rr=!1)))};
I.src=D},RT:function(b){if("Alpha"===b.name)return!0;for(var d=0;d<this.oe.length;++d)if(this.oe[d].name===b.name)return this.oe[d].enabled;d=Array(3);this.rL(b.color,d);b={color:b.color,name:b.name,rgb:d,enabled:!0};this.oe.push(b);this.bk({type:"colorSeparationAdded",data:b});return!0},va:function(b,d){var a=b*d+128;return(a>>8)+a>>8},jb:function(b,d,a){b=b*d+128;b=((b>>8)+b>>8)+a;return 255>b?b:255},rL:function(b,d){var a=b[0],c=b[1],g=b[2],e=b[3],f=a<<24|c<<16|g<<8|e,k=n[f];if(k)d[0]=k[0],d[1]=
k[1],d[2]=k[2];else{var k=255-a,h=255-c,m=255-g,l=255-e,u=this.va(this.va(this.va(k,h),m),l),r=u,p=u,q=u,u=this.va(this.va(this.va(k,h),m),e),r=this.jb(35,u,r),p=this.jb(31,u,p),q=this.jb(32,u,q),u=this.va(this.va(this.va(k,h),g),l),r=this.jb(255,u,r),p=this.jb(242,u,p),u=this.va(this.va(this.va(k,h),g),e),r=this.jb(28,u,r),p=this.jb(26,u,p),u=this.va(this.va(this.va(k,c),m),l),r=this.jb(236,u,r),q=this.jb(140,u,q),u=this.va(this.va(this.va(k,c),m),e),r=this.jb(36,u,r),u=this.va(this.va(this.va(k,
c),g),l),r=this.jb(237,u,r),p=this.jb(28,u,p),q=this.jb(36,u,q),u=this.va(this.va(this.va(k,c),g),e),r=this.jb(34,u,r),u=this.va(this.va(this.va(a,h),m),l),p=this.jb(173,u,p),q=this.jb(239,u,q),u=this.va(this.va(this.va(a,h),m),e),p=this.jb(15,u,p),q=this.jb(36,u,q),u=this.va(this.va(this.va(a,h),g),l),p=this.jb(166,u,p),q=this.jb(80,u,q),u=this.va(this.va(this.va(a,h),g),e),p=this.jb(19,u,p),u=this.va(this.va(this.va(a,c),m),l),r=this.jb(46,u,r),p=this.jb(49,u,p),q=this.jb(146,u,q),u=this.va(this.va(this.va(a,
c),m),e),q=this.jb(2,u,q),u=this.va(this.va(this.va(a,c),g),l);d[0]=this.jb(54,u,r);d[1]=this.jb(54,u,p);d[2]=this.jb(57,u,q);n[f]=[d[0],d[1],d[2]]}},mN:function(b,d,a){b[0]=Math.min(this.va(d[0],a)+b[0],255);b[1]=Math.min(this.va(d[1],a)+b[1],255);b[2]=Math.min(this.va(d[2],a)+b[2],255);b[3]=Math.min(this.va(d[3],a)+b[3],255)},YM:function(b,d,a,c){var g=this;return new Promise(function(e){for(var f,k=[],h=[],n=new Uint8ClampedArray(d*a*4),m=0,l=0;l<b.length;++l)"Alpha"!==b[l].name?(h.push(b[l].color),
k.push(new Uint8Array(b[l].data)),++m):f=new Uint8Array(b[l].data);g.Uv(0,d,a,Math.ceil(1E5/d),[0,0,0,0],m,Array(3),h,k,n,f,c,e)})},Uv:function(b,d,a,c,g,e,f,k,h,n,m,l,u){for(var r=Math.min(b+c,a);b<r;++b)for(var p=b*d,q=4*p,I=0;I<d;++I){g[0]=0;g[1]=0;g[2]=0;for(var D=g[3]=0;D<e;++D)this.mN(g,k[D],h[D][p+I]);this.rL(g,f);D=q+4*I;n[D]=f[0];n[D+1]=f[1];n[D+2]=f[2];n[D+3]=m[p+I]}b<a?(b=setImmediate(this.Uv.bind(this,b,d,a,c,g,e,f,k,h,n,m,l,u)),l&&(this.Di[l.id]=b)):u(n)},gP:function(b,d,a,c){for(var g=
b.length-1;0<=g;--g)this.RT(b[g])||b.splice(g,1);return this.YM(b,d,a,c)},JF:function(b,d,c,g,e,f,k,h){function n(f){function k(){e||$(l).addClass("progressive");g.page&&m.$n(l,g.page.Sa-1);g.Az(l);e&&g.zz(l,{data:b,width:d,height:c});e&&delete m.Di[g.id]}if(a.utils.supportsImageDataConstructor){var h=new a.ImageData(f,d,c);p.putImageData(h,u,r,0,0,d,c);k()}else{var q=Math.ceil(1E6/d),x=c,y=p.createImageData(d,Math.min(q,c)),F=0,P=function(){var b=Math.min(q,x),a=c-x,h=b*d*4;y.data.set(f.subarray(F,
F+h));F+=h;p.putImageData(y,u,r+a,0,0,d,b);x-=b;0===x?k():(b=setImmediate(P),e&&(m.Di[g.id]=b))};P()}}var m=this,l=g.FQ?g.FQ:a.o.za.Zo(g.page,g.gw,g.fw,k,f,g.Yd,h).canvas,u=k&&0<k.x?Math.round(k.x):0,r=k&&0<k.y?Math.round(k.y):0,p=l.getContext("2d");b.length?this.gP(b,d,c,e?g:null).then(n):n(new Uint8ClampedArray(b))},loadCanvasAsync:function(d,c,g,e,f,k){var h=this,n=b(d,c,g,e,f,k),m=n.pageIndex;d=n.getZoom();g=n.getPageRotation();c=n.renderRect;f=g===a.o.La.Ce||g===a.o.La.zf;var l=a.utils.getCanvasMultiplier(),
u=n.getPageTransform();"undefined"===typeof c?(e=(f?h.J[m].height:h.J[m].width)*d,f=(f?h.J[m].width:h.J[m].height)*d):(e=(f?c.y2-c.y1:c.x2-c.x1)*d,f=(f?c.x2-c.x1:c.y2-c.y1)*d);e=Math.round(e);f=Math.round(f);var r=Math.floor(e*l),p=Math.floor(f*l);if(!r||!p)return g=h.ya.Xq(),this.Di[g]=setImmediate(function(){var b=document.createElement("canvas");b.width=r||1;b.height=p||1;n.drawComplete(b)}),g;var q,l=h.uK?a.o.Ep.aN:h.sJ;a.utils.isJSWorker&&a.jsworker.worker.useFilePathForImageRenders()?(q=a.jsworker.worker.generateImageRenderFilePath(m),
q=a.jsworker.worker.getPlatformFormatFilePath(q),console.log("imageRenderFilePath for page "+m+' is: "'+q+'".'),l=h.ya.pR(h.ma,m,r,p,g,h.gB,l,c,q)):l=h.ya.oR(h.ma,m,r,p,g,h.gB,l,c);var M=l.lP,N={Az:n.drawProgressive,zz:function(b,d){n.drawComplete(b,m,d)},vJ:e,tJ:f,gw:d,fw:g,page:h.J[m],Yd:c,id:M},I=1,D;n.useProgress&&(D=setInterval(function(){var b;a.utils.isJSWorker&&a.jsworker.worker.useFilePathForImageRenders?(b=a.jsworker.worker.generateNextImageRenderFilePath(q,I++),b=a.jsworker.worker.getPlatformFormatFilePath(b),
b=h.ya.kH(M,b)):b=h.ya.kH(M);b.then(function(b){"undefined"!==typeof b.filePath?h.rI(b.filePath,b.pageWidth,b.pageHeight,N,!1,k,u,n.pageCanvas):h.JF(b.pageBuf,b.pageWidth,b.pageHeight,N,!1,k,u,n.pageCanvas)},function(b){"type"in b&&"Queued"===b.type||clearInterval(D)})},a.o.OH()));l.promise.then(function(b){clearInterval(D);"undefined"!==typeof b.filePath?h.rI(b.filePath,b.pageWidth,b.pageHeight,N,!0,k,u,n.pageCanvas):h.JF(b.pageBuf,b.pageWidth,b.pageHeight,N,!0,k,u,n.pageCanvas)},function(b){clearInterval(D);
n.onError(b)});return M},Uj:function(){},Mb:function(){this.ma&&(this.ya.vP(this.ma),this.ya.nz(this.ma),this.ma=null);this.Va&&this.Va.abort&&this.Va.abort()},ir:function(b,d,a){if(this.Ci)return Promise.reject('insertBlankPages requires downloader to be disabled. Please pass "useDownloader: false" to your WebViewer constructor https://www.pdftron.com/documentation/web/guides/usedownloader-option/#disabling-downloader');var c=this;return this.bc.then(function(){return c.ya.ir(c.ma,b,d||612,a||792)})},
Fi:function(b,d,a){if(this.Ci)return Promise.reject('insertPages requires downloader to be disabled. Please pass "useDownloader: false" to your WebViewer constructor https://www.pdftron.com/documentation/web/guides/usedownloader-option/#disabling-downloader');var c=this;b instanceof k.Document&&(b=b.v.ma);return this.bc.then(function(){return c.ya.Fi(c.ma,b,d,a,!0)})},mk:function(b,d){var a=this;return this.bc.then(function(){return a.ya.mk(a.ma,b,d)})},Xi:function(b){var d=this;b.sort(f);return this.bc.then(function(){return d.ya.Xi(d.ma,
b)})},oi:function(){return this.ya.oi(this.ma,this.gB)},aj:function(b,d){var a=this;b.sort(f);return this.bc.then(function(){return a.ya.aj(a.ma,b,d)})},ih:function(b,d){var a=this,c=b.map(function(b){return b-1}),g=a.cI(c);return this.bc.then(function(){return g}).then(function(c){return a.ya.ih(a.ma,b,d,c)},function(){return a.ya.ih(a.ma,b,d)}).then(function(b){return b.fileData})},ii:function(b,d,a,c,g){var e=this;b.sort(f);return this.bc.then(function(){return e.ya.ii(e.ma,b,d,a,c,g)})},Zq:function(b){return this.J[b].id},
oo:function(){return Object.keys(this.hw)},mg:function(){var b=this;if(!a.o.Hi())throw Error("getPDFDoc called without PDFNet being loaded. Are you running a lean version of PDFNetJS?");return b.ya.mg(b.ma).then(function(d){d=new a.PDFNet.PDFDoc(d);d.documentCompletePromise=b.bc;return d})},si:function(){var b=this;return this.bc.then(function(){return b.ya.si(b.ma)})},Am:function(b){this.gB=b},Pw:function(b){this.sJ=b},um:function(b){if(1!==arguments.length)throw new RangeError(arguments.length+
" arguments passed into function 'requirePage'. Expected 1 argument. Function Signature: requirePage(number)");if(b instanceof Promise)throw new TypeError("Received a Promise object in 1st input argument 'requirePage'. Promises require a 'yield' statement before being accessed.");if("number"!==typeof b)throw new TypeError("1st input argument '"+b+"' in function 'requirePage' is of type '"+typeof b+"'. Expected type 'number'. Function Signature: requirePage(number).");if(0>=b)throw Error("1st input argument '"+
b+"' in function 'requirePage' is invalid. Expected number between 1 and number of pages in the document.");return this.Ci?this.ya.um(this.ma,b):Promise.resolve()},loadThumbnailAsync:function(b,d,c){var g="page"===c;c=this.J[b];var e=a.utils.getCanvasMultiplier(),g=g?2E3:150*e,f=c.width>c.height?g/c.width:g/c.height,f=f/e;return this.loadCanvasAsync({pageIndex:b,getZoom:function(){return f},getPageRotation:function(){return a.o.La.ni},drawComplete:function(b){d(b)},drawProgressive:function(){},useProgress:!1,
pageCanvas:!0})},Tj:g,bi:g,ik:function(){return!1},xm:function(b){this.Ci&&this.ya.xm(this.ma,b)},Ju:function(b){this.uK=b},Xu:function(){return this.oe},Ku:function(b,d){for(var a=0;a<this.oe.length;++a)if(this.oe[a].name===b){this.oe[a].enabled=d;break}},bp:function(){return!this.Ci},Wu:function(b){return b},DH:function(b,d){var a=this.Wu(d),c=this.ya.Uz(this.ma,b).then(function(b){return e(b.data)});this.Hn.DF(a,c);return c}});_(k.jj.prototype).extend(Backbone.Events);a.Sk=c})(window);
(function(a){a.Annotations=a.Annotations||{};var f=a.Annotations;f.Color=function(a,c,b,d){this.A=this.B=this.G=this.R=0;a instanceof f.Color?(this.R=a.R,this.G=a.G,this.B=a.B,this.A=a.A):_.isArray(a)?1===a.length?(this.B=this.G=this.R=a=Math.round(255*(a[0]||0)),this.A=1):3===a.length?(this.R=Math.round(255*(a[0]||0)),this.G=Math.round(255*(a[1]||0)),this.B=Math.round(255*(a[2]||0)),this.A=1):4===a.length&&(c=a[1]||0,b=a[2]||0,d=a[3]||0,this.R=Math.round(255*(1-(a[0]||0))*(1-d)),this.G=Math.round(255*
(1-c)*(1-d)),this.B=Math.round(255*(1-b)*(1-d)),this.A=1):_.isString(a)&&"#"===a[0]?(a=f.ca.Zj(a),this.R=a.R,this.G=a.G,this.B=a.B,this.A=1):(_.isUndefined(a)||(this.R=Number(a)),_.isUndefined(c)||(this.G=Number(c)),_.isUndefined(b)||(this.B=Number(b)),_.isUndefined(d)?_.isUndefined(a)&&_.isUndefined(c)&&_.isUndefined(b)||(this.A=1):this.A=Number(d))};f.Color.prototype={toString:function(){var a=this.R+","+this.G+","+this.B;return"undefined"===typeof this.A?"rgb("+a+")":"rgba("+a+","+this.A+")"},
toHexString:function(){return f.ca.yg(this)},LX:function(){return f.ca.toFixed(this.R/255,3)+" "+f.ca.toFixed(this.G/255,3)+" "+f.ca.toFixed(this.B/255,3)+" rg"},Yl:function(){return 0===this.R&&0===this.G&&0===this.B&&1===this.A},MI:function(){return 0===this.A}};f.Point=function(a,c){this.x=a;this.y=c;"string"===typeof a&&(this.x=parseFloat(a));"string"===typeof c&&(this.y=parseFloat(c))};f.Point.prototype={toString:function(){return"[Point: x="+this.x+" y="+this.y+"]"}};f.$a=function(a,c,b,d,g,
f,h,l){this.x1=a;this.y1=c;this.x2=b;this.y2=d;this.x3=g;this.y3=f;this.x4=h;this.y4=l};f.$a.prototype={normalize:function(){},Vz:function(){var a=[];a.push(this.x1);a.push(this.y1);a.push(this.x2);a.push(this.y2);a.push(this.x3);a.push(this.y3);a.push(this.x4);a.push(this.y4);return a}};f.Rect=function(a,c,b,d){a instanceof f.Rect?(this.x1=a.x1,this.y1=a.y1,this.x2=a.x2,this.y2=a.y2):_.isArray(a)?(this.x1=a[0],this.y1=a[1],this.x2=a[2],this.y2=a[3]):_.isObject(a)?(this.x1=a.x1,this.y1=a.y1,this.x2=
a.x2,this.y2=a.y2):(this.x1=a,this.y1=c,this.x2=b,this.y2=d)};f.Rect.prototype={Ca:function(){return this.x2-this.x1},xa:function(){return this.y2-this.y1},translate:function(a,c){this.x1+=a;this.y1+=c;this.x2+=a;this.y2+=c},Pu:function(a){var c=0,b=0;if(this.Ca()<=a.Ca()){var d=a.x2-this.x2;0>d&&(c=d);d=a.x1-this.x1;0<d&&(c=d)}this.xa()<=a.xa()&&(d=a.y2-this.y2,0>d&&(b=d),a=a.y1-this.y1,0<a&&(b=a));this.translate(c,b)},normalize:function(){var a;0>this.Ca()&&(a=this.x1,this.x1=this.x2,this.x2=a);
0>this.xa()&&(a=this.y1,this.y1=this.y2,this.y2=a)},MG:function(){var a;this.x1>this.x2&&(a=this.x1,this.x1=this.x2,this.x2=a);this.y2>this.y1&&(a=this.y1,this.y1=this.y2,this.y2=a)},isEqual:function(a){return this.x1===a.x1&&this.y1===a.y1&&this.x2===a.x2&&this.y2===a.y2},NI:function(){return 0===this.x1&&0===this.y1&&0===this.x2&&0===this.y2}};f.Math={xU:function(a,c){return a instanceof f.Point&&c instanceof f.Point?new f.Point((a.x+c.x)/2,(a.y+c.y)/2):null},distance:function(a,c){if(!(a instanceof
f.Point&&c instanceof f.Point))return null;var b=a.x-c.x,d=a.y-c.y;return Math.sqrt(b*b+d*d)},lJ:function(a,c,b){return a instanceof f.Point&&c instanceof f.Point&&b instanceof f.Point?c.x<=Math.max(a.x,b.x)&&c.x>=Math.min(a.x,b.x)&&c.y<=Math.max(a.y,b.y)&&c.y>=Math.min(a.y,b.y):null},GH:function(a,c,b){if(!(a instanceof f.Point&&c instanceof f.Point&&b instanceof f.Point))return null;a=(c.y-a.y)*(b.x-c.x)-(c.x-a.x)*(b.y-c.y);return 0===a?"colinear":0<a?"clockwise":"counterClockwise"},AT:function(a,
c,b,d){if(!(a instanceof f.Point&&c instanceof f.Point&&b instanceof f.Point&&d instanceof f.Point))return null;var g=f.Math.GH,k=f.Math.lJ,h=g(a,c,b),l=g(a,c,d),n=g(b,d,a),g=g(b,d,c);return h!==l&&n!==g||"colinear"===h&&k(a,b,c)||"colinear"===l&&k(a,d,c)||"colinear"===n&&k(b,a,d)||"colinear"===g&&k(b,c,d)?!0:!1}};f.ControlHandle=function(a,c,b,d){this.x=a;this.y=c;this.width=b;this.height=d};f.ControlHandle.handleWidth=12;f.ControlHandle.handleHeight=12;f.ControlHandle.selectionAccuracyPadding=1;
f.ControlHandle.prototype={testSelection:function(a,c,b,d,g){a=this.getDimensions(a,c,b);c=0;1<f.ControlHandle.selectionAccuracyPadding&&(c=f.ControlHandle.selectionAccuracyPadding);return d>=a.x1-c&&d<=a.x1+a.Ca()+c&&g>=a.y1-c&&g<=a.y1+a.xa()+c},draw:function(a,c,b,d){"undefined"===typeof d&&(d=1);this.kc(a,d);var g=this.getDimensions(c,b,d);c=g.x1;b=g.y1;d=g.Ca();g=g.xa();a.beginPath();a.arc(c+d/2,b+g/2,d/2,0,2*Math.PI);a.stroke();a.fill()},kc:function(a,c){a.strokeStyle=f.SelectionModel.defaultSelectionOutlineColor.toString();
a.fillStyle="rgb(255, 255, 255)";a.lineWidth=f.SelectionModel.selectionOutlineThickness/c},move:function(){console.warn("ControlHandle move() not implemented")},getDimensions:function(){console.warn("ControlHandle getDimensions() not implemented");return new f.Rect(0,0,0,0)}};f.Qe=function(a,c,b,d){this.width=a;this.height=c;this.If=b;this.Eg=d};f.Qe.prototype={getDimensions:function(a,c,b){a=c.x1;var d=c.y1,g=this.width/b;b=this.height/b;this.If===f.pa.tc.left?a+=-(g/2):this.If===f.pa.tc.ou?a+=(c.Ca()-
g)/2:this.If===f.pa.tc.right?a+=c.Ca()-g/2:console.warn("Invalid HorizonalAlignment");this.Eg===f.pa.Kc.top?d+=-(b/2):this.Eg===f.pa.Kc.Sv?d+=(c.xa()-b)/2:this.Eg===f.pa.Kc.bottom?d+=c.xa()-b/2:console.warn("Invalid VerticalAlignment");return new f.Rect(a,d,a+g,d+b)},move:function(a,c,b){var d=c||b;if(!d)return!1;var g=a.Ec();if(a.MaintainAspectRatio){var k=a.Width,h=a.Height;if(k>h){if(b=h/k*(k+c)-h,this.If===f.pa.tc.left&&this.Eg===f.pa.Kc.bottom||this.If===f.pa.tc.right&&this.Eg===f.pa.Kc.top)b*=
-1}else if(c=k/h*(h+b)-k,this.If===f.pa.tc.left&&this.Eg===f.pa.Kc.bottom||this.If===f.pa.tc.right&&this.Eg===f.pa.Kc.top)c*=-1}this.If===f.pa.tc.left?g.x1+=c:this.If===f.pa.tc.right&&(g.x2+=c);this.Eg===f.pa.Kc.top?g.y1+=b:this.Eg===f.pa.Kc.bottom&&(g.y2+=b);a.resize(g);return d}};f.Qe.prototype=$.extend(!0,new f.ControlHandle,f.Qe.prototype);f.al=function(a,c,b,d,g){this.x=a;this.y=c;this.width=b;this.height=d;this.$l=g};f.al.prototype={getDimensions:function(a,c,b){a=this.width/b;b=this.height/
b;return this.$l?new f.Rect(this.x-.5*a,this.y,this.x+.5*a,this.y+b):new f.Rect(this.x-.5*a,this.y-b,this.x+.5*a,this.y)},move:function(a,c,b,d,g,f){b=a.he();c=b[0];if("undefined"===typeof c)return!1;b=b[b.length-1];f=new window.ba.Jc(f);f.annotation=a;f.pageCoordinates[0]=g;d=Math.min(c.x1,c.x2,c.x3,c.x4);a=Math.max(b.x1,b.x2,b.x3,b.x4);c=Math.min(c.y1,c.y2,c.y3,c.y4);b=Math.max(b.y1,b.y2,b.y3,b.y4);this.$l?c={x:d+1,y:c,pageIndex:g.pageIndex}:(c=g,g={x:a-1,y:b,pageIndex:g.pageIndex});if(g.y<c.y)return!1;
(c.x<g.x||c.y<g.y)&&f.select(c,g);return!0},draw:function(a,c,b,d){var g,k,h,l;this.kc(a,d);g=c.he();this.$l?(l=g[g.length-1],g=l.x2,k=l.y2,h=l.x3,l=l.y3):(l=g[0],g=l.x1,k=l.y1,h=l.x4,l=l.y4);a.beginPath();a.moveTo(g,k);a.lineTo(h,l);a.stroke();f.ControlHandle.prototype.draw.call(this,a,c,b,d)}};f.al.prototype=$.extend(!0,new f.ControlHandle,f.al.prototype);f.Tg=function(a,c,b,d,g){this.x=a;this.y=c;this.width=b;this.height=d;this.ic=g};f.Tg.prototype={getDimensions:function(a,c,b){a=this.width/b;
b=this.height/b;c=this.x-.5*a;var d=this.y-.5*b;return new f.Rect(c,d,c+a,d+b)},move:function(a,c,b){var d=a.wi(this.ic);a.Nf(this.ic,d.x+c,d.y+b);return!0}};f.Tg.prototype=$.extend(!0,new f.ControlHandle,f.Tg.prototype);f.Ms=function(a,c,b,d,g){f.Tg.apply(this,arguments)};f.Ms.prototype={move:function(a,c,b,d,g){f.Tg.prototype.move.apply(this,arguments);if(0===this.ic){var k=a.wi(0);a.Nf(a.getPath().length-1,k.x,k.y)}return!0}};f.Ms.prototype=$.extend(!0,new f.Tg,f.Ms.prototype);f.ws=function(a,
c,b,d,g){this.x=a;this.y=c;this.width=b;this.height=d;this.ic=g};f.ws.prototype={move:function(a,c,b,d,g,k){g=a.getPath().length-4;d=g+1;var h=d+1,l=h+1;g=a.wi(g);var n=a.wi(d),m=a.wi(h),q=a.wi(l);if(this.ic===h){if(q.y<m.y+b||q.x<m.x+c)return}else if(this.ic===l&&(q.y+b<m.y||q.x+c<m.x))return;c=f.Tg.prototype.move.call(this,a,c,b);this.ic===h&&(q.y<m.y&&a.Nf(h,m.x,q.y),q.x<m.x&&a.Nf(h,q.x,m.y),a.Nf(d,m.x,m.y+.5*(q.y-m.y)),c=!0);this.ic===l&&(q.y<m.y&&a.Nf(h,q.x,m.y),q.x<m.x&&a.Nf(h,m.x,q.y),a.Nf(d,
n.x,m.y+.5*(q.y-m.y)),c=!0);k=k.Dc(a.xb());k=a.io(k)/2;b=f.Math.xU(m,q);k=[new f.Point(b.x,m.y+k),new f.Point(b.x,q.y-k),new f.Point(m.x+k,b.y),new f.Point(q.x-k,b.y)];m=[f.Math.distance(g,k[0]),f.Math.distance(g,k[1]),f.Math.distance(g,k[2]),f.Math.distance(g,k[3])];m=m.indexOf(Math.min.apply(Math,m));if(g.x!==k[m].x||g.y!==k[m].y)a.Nf(d,k[m].x,k[m].y),c=!0;return c}};f.ws.prototype=$.extend(!0,new f.Tg,f.ws.prototype);f.mj=function(a,c,b,d,g){this.x=a;this.y=c;this.width=b;this.height=d;this.$l=
g};f.mj.prototype={getDimensions:function(a,c,b){a=this.width/b;b=this.height/b;c=this.x-.5*a;var d=this.y-.5*b;return new f.Rect(c,d,c+a,d+b)},move:function(a,c,b){this.$l?(a.End.x+=c,a.End.y+=b):(a.Start.x+=c,a.Start.y+=b);a.adjustRect();return!0}};f.mj.prototype=$.extend(!0,new f.ControlHandle,f.mj.prototype);f.Bp=function(a,c,b,d){f.mj.call(this,a,c,b,d)};f.Bp.prototype={move:function(a,c,b){a.leaderLength+=Math.sqrt(c*c+b*b)*Math.sin(a.Nl()-Math.atan2(b,c));a.adjustRect();return!0}};f.Bp.prototype=
$.extend(Object.create(f.mj.prototype),f.Bp.prototype);f.SelectionModel=function(a,c,b){this.$b=[];this.ay=c;this.Bt=b};f.SelectionModel.selectionOutlineThickness=2;f.SelectionModel.selectionAccuracyPadding=2;f.SelectionModel.defaultSelectionOutlineColor=new f.Color(65,140,252);f.SelectionModel.defaultNoPermissionSelectionOutlineColor=new f.Color(255,0,0);f.SelectionModel.selectionOutlineDashSize=4;f.SelectionModel.prototype={testSelection:function(a,c,b){return f.Bb.Al(a,c,b)},cs:function(a,c,b,
d){for(var g=this.$b.length-1;0<=g;g--){var f=this.$b[g];if(f.testSelection(a,this.getDimensions(a),c,b,d))return f}},uR:function(){return this.$b},getDimensions:function(a){return new f.Rect(a.X,a.Y,a.X+a.Width,a.Y+a.Height)},Rc:function(){return this.ay},draw:function(a,c,b,d){a.save();this.drawSelectionOutline(a,c,b,d);a.restore();for(d=0;d<this.$b.length;d++)this.$b[d]&&this.$b[d].draw(a,c,this.getDimensions(c),b)},drawSelectionOutline:function(a,c,b){a.save();c=this.getDimensions(c);"undefined"===
typeof b&&(b=1);a.lineWidth=f.SelectionModel.selectionOutlineThickness/b;this.Rc()?a.strokeStyle=f.SelectionModel.defaultSelectionOutlineColor.toString():a.strokeStyle=f.SelectionModel.defaultNoPermissionSelectionOutlineColor.toString();a.beginPath();a.moveTo(c.x1,c.y1);a.lineTo(c.x2,c.y1);a.lineTo(c.x2,c.y2);a.lineTo(c.x1,c.y2);a.closePath();a.stroke();"undefined"!==typeof a.setLineDash||"undefined"!==typeof a.mozDash?(b=f.SelectionModel.selectionOutlineDashSize/b,b=[b,b],a.setLineDash?a.setLineDash(b):
a.mozDash=b):a.lineWidth/=2;a.strokeStyle="rgb(255, 255, 255)";a.beginPath();a.moveTo(c.x1,c.y1);a.lineTo(c.x2,c.y1);a.lineTo(c.x2,c.y2);a.lineTo(c.x1,c.y2);a.closePath();a.stroke();a.restore()}};f.Ks=function(){f.SelectionModel.call(this,0,!1,!1)};f.Ks.prototype={testSelection:function(){return!1},getDimensions:function(){return new f.Rect(0,0,0,0)},draw:function(){},drawSelectionOutline:function(){}};f.Ks.prototype=$.extend(!0,new f.SelectionModel,f.Ks.prototype);f.pa=function(a,c,b){f.SelectionModel.call(this,
0,c,b);b=f.ControlHandle.handleWidth;var d=f.ControlHandle.handleHeight;(this.ay=c)?(this.$b=[new f.Qe(b,d,f.pa.tc.left,f.pa.Kc.top),new f.Qe(b,d,f.pa.tc.left,f.pa.Kc.Sv),new f.Qe(b,d,f.pa.tc.left,f.pa.Kc.bottom),new f.Qe(b,d,f.pa.tc.ou,f.pa.Kc.top),new f.Qe(b,d,f.pa.tc.ou,f.pa.Kc.bottom),new f.Qe(b,d,f.pa.tc.right,f.pa.Kc.top),new f.Qe(b,d,f.pa.tc.right,f.pa.Kc.Sv),new f.Qe(b,d,f.pa.tc.right,f.pa.Kc.bottom)],a.MaintainAspectRatio&&(this.$b.splice(3,2),this.$b.splice(1,1),this.$b.splice(-2,1))):this.$b=
[]};f.pa.tc={left:1,ou:2,right:4};f.pa.Kc={top:16,Sv:32,bottom:64};f.pa.prototype={testSelection:function(a,c,b,d){return this.Bt?f.Bb.Al(a,c,b):f.Bb.Cl(a,c,b,d)},getDimensions:function(a){return new f.Rect(a.X,a.Y,a.X+a.Width,a.Y+a.Height)}};f.pa.prototype=$.extend(!0,new f.SelectionModel,f.pa.prototype);f.Ym=function(a,c,b){f.SelectionModel.call(this,0,c,b);if(c)for(a=a.getPath(),c=0;c<a.length;c++)b=a[c],this.$b.push(new f.Tg(b.x,b.y,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,c))};
f.Ym.prototype={testSelection:function(a,c,b,d){return this.Bt?f.Bb.Al(a,c,b):f.Bb.Cl(a,c,b,d)},draw:function(a,c,b){f.SelectionModel.prototype.draw.call(this,a,c,b)}};f.Ym.prototype=$.extend(!0,new f.SelectionModel,f.Ym.prototype);f.Ns=function(a,c,b){f.SelectionModel.call(this,0,c,b);if(c)for(a=a.getPath(),c=0;c<a.length-1;c++)b=a[c],this.$b.push(new f.Ms(b.x,b.y,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,c))};f.Ns.prototype={testSelection:function(a,c,b,d){return this.Bt?f.Bb.xT(a,
c,b,d):f.Bb.Cl(a,c,b,d)}};f.Ns.prototype=$.extend(!0,new f.SelectionModel,f.Ns.prototype);f.Cp=function(a,c,b){f.SelectionModel.call(this,0,c,b);c?(this.$b=[new f.mj(a.Start.x,a.Start.y,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,0),new f.mj(a.End.x,a.End.y,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,1)],a.leaderLength&&(a=a.RR(),this.$b=this.$b.concat([new f.Bp(a.qD.x,a.qD.y,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight),new f.Bp(a.$C.x,a.$C.y,f.ControlHandle.handleWidth,
f.ControlHandle.handleHeight)]))):this.$b=[]};f.Cp.prototype={testSelection:function(a,c,b,d){return f.Bb.Cl(a,c,b,d)},drawSelectionOutline:function(a,c,b,d){if(c.leaderLength||c.leaderExtend||c["leader-offset"])return f.SelectionModel.prototype.drawSelectionOutline.apply(this,arguments);"undefined"===typeof b&&(b=1);a.lineWidth=f.SelectionModel.selectionOutlineThickness/b;var g=Math.atan((c.End.y-c.Start.y)/(c.End.x-c.Start.x)),k=Math.max(.5*c.io(d),1)*Math.sin(g),g=Math.max(.5*c.io(d),1)*Math.cos(g);
this.Rc()?a.strokeStyle=f.SelectionModel.defaultSelectionOutlineColor.toString():a.strokeStyle=f.SelectionModel.defaultNoPermissionSelectionOutlineColor.toString();a.beginPath();a.moveTo(c.Start.x+k,c.Start.y-g);a.lineTo(c.End.x+k,c.End.y-g);a.stroke();a.beginPath();a.moveTo(c.Start.x-k,c.Start.y+g);a.lineTo(c.End.x-k,c.End.y+g);a.stroke();if("undefined"!==typeof a.setLineDash||"undefined"!==typeof a.mozDash){var h=f.SelectionModel.selectionOutlineDashSize/b,h=[h,h];a.setLineDash?a.setLineDash(h):
a.mozDash=h}else a.lineWidth/=2;a.strokeStyle="rgb(255, 255, 255)";a.beginPath();a.moveTo(c.Start.x+k,c.Start.y-g);a.lineTo(c.End.x+k,c.End.y-g);a.stroke();a.beginPath();a.moveTo(c.Start.x-k,c.Start.y+g);a.lineTo(c.End.x-k,c.End.y+g);a.stroke()}};f.Cp.prototype=$.extend(!0,new f.pa,f.Cp.prototype);f.zp=function(a,c,b){f.pa.apply(this,arguments)};f.zp.prototype={getDimensions:function(a){return f.SelectionModel.prototype.getDimensions.apply(this,arguments)},testSelection:function(a,c,b){return f.Bb.Al(a,
c,b)}};f.zp.prototype=$.extend(!0,new f.pa,f.zp.prototype);f.xs=function(a,c,b){f.SelectionModel.call(this,0,c,b);if(c)for(a=a.getPath(),c=0;c<a.length;c++)c!==a.length-3&&(b=a[c],this.$b.push(new f.ws(b.x,b.y,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,c)))};f.xs.prototype={testSelection:function(a,c,b,d){if(this.Bt)return f.Bb.Al(a,c,b);var g=a.getPath().slice(-2),k=g[0],g=g[1];return c<k.x||c>g.x||b<k.y||b>g.y?f.Bb.Cl(a,c,b,d):!0}};f.xs.prototype=$.extend(!0,new f.SelectionModel,f.xs.prototype);
f.vj=function(a,c,b,d,g){f.SelectionModel.call(this,0,c,b);this.ay=c;if(b=a.he())_.isUndefined(d)&&(d=!0),_.isUndefined(g)&&(g=!0),this.$b=[],c&&!a.NoResize&&(a=b[0],c=b[b.length-1],a&&(this.$b=[],d&&this.$b.push(new f.al(a.x1,a.y3,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,!1)),g&&this.$b.push(new f.al(c.x3,c.y1,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,!0))))};f.vj.prototype={testSelection:function(a,c,b){return f.Bb.CC(a,c,b)},getDimensions:function(a){var c=a.X-2,
b=a.Y-2;return new f.Rect(c,b,c+(a.Width+4),b+(a.Height+4))}};f.vj.prototype=$.extend(!0,new f.SelectionModel,f.vj.prototype);f.Os=function(a,c,b){var d=a.IsText?f.vj:f.pa;d.apply(this,[a,c,b]);return $.extend(!0,this,d.prototype,f.Os.prototype)};f.Os.prototype={testSelection:function(a,c,b,d){return a.IsText?f.Bb.CC(a,c,b):f.Bb.Al(a,c,b,d)}};f.Lp=function(a,c,b){f.SelectionModel.call(this,0,c,b)};f.Lp.prototype={testSelection:function(a,c,b,d,g,k){d=a.zi();var h=a.Ai();a=a.SIZE/(a.NoZoom?g:1);k===
window.o.La.Ce?h-=a:k===window.o.La.ao?(h-=a,d-=a):k===window.o.La.zf&&(d-=a);k=new f.Rect(d,h,d+a,h+a);return c>=k.x1&&c<=k.x2&&b>=k.y1&&b<=k.y2},getDimensions:function(a){return new f.Rect(a.X,a.Y,a.X+a.SIZE,a.Y+a.SIZE)}};f.Lp.prototype=$.extend(!0,new f.SelectionModel,f.Lp.prototype);f.Bb={Al:function(a,c,b){a=a.Ec();return c>=a.x1&&c<=a.x2&&b>=a.y1&&b<=a.y2},Cl:function(a,c,b,d){var g;f.Bb.qI?g=f.Bb.qI:(g=document.createElement("canvas"),f.Bb.qI=g);var k=g.getContext("2d");g.width=4;g.height=
4;k.setTransform(1,0,0,1,-(c-a.zi()),-(b-a.Ai()));c=a.StrokeThickness;a.Aj=c+f.Bb.canvasVisibilityPadding;k.translate(-1*a.zi(),-1*a.Ai());a.draw(k,d);d=1<k.getImageData(0,0,1,1).data[3];k.setTransform(1,0,0,1,0,0);k.clearRect(0,0,2,2);a.Aj=c;return d},CC:function(a,c,b){a=a.Quads;for(var d=0;d<a.length;d++){var g=a[d],f=Math.min(g.y1,g.y2,g.y3,g.y4),h=Math.max(g.y1,g.y2,g.y3,g.y4),l=Math.max(g.x1,g.x2,g.x3,g.x4);if(c>=Math.min(g.x1,g.x2,g.x3,g.x4)&&c<=l&&b>=f&&b<=h)return!0}return!1},xT:function(a,
c,b,d){if(!(a instanceof f.Wf))return!1;var g=a.getPath(),g=g.slice(0,g.length-1);if(3>g.length)return f.Bb.Cl(a,c,b,d);a=new f.Point(c,b);b=new f.Point(Number.MAX_VALUE,b);for(d=c=0;d<g.length;d++){var k=g[d],h=g[(d+1)%g.length];if(f.Math.AT(k,h,a,b)){if("colinear"===f.Math.GH(k,a,h))return f.Math.lJ(k,a,h);c++}}return 1===c%2}};f.Bb.canvasVisibilityPadding=5})(window);
(function(a){function f(){$("#selectionrect").css("display","none")}function e(b,d,c){var g=b[0],e=b[1],f=d[0].pageIndex;d=$("#selectionrect");0===d.length&&(d=$("<div id='selectionrect' class='ui-selectable-helper'></div>").appendTo(c.Vc()));var k=e.x-g.x;b=e.y-g.y;var h=c.yb(),n=h.scrollLeft()||0,h=h.scrollTop()||0,m=g.x-n,l=g.y-h,p=e.x-n,e=e.y-h,g=c.kd(f),q=c.jd(f),e=Math.min(e,l),m=Math.min(p,m),p=c.Sl().cf({x:0,y:0},f),q=c.Sl().cf({x:g,y:q},f);c=Math.min(p.x,q.x);f=Math.min(p.y,q.y);g=Math.max(p.x,
q.x);q=Math.max(p.y,q.y);c-=n;f-=h;f>e&&(b+=f-e,e=f);c>m&&(k+=c-m,m=c);k=a.ce.Math.MF(Math.abs(k),0,g-n-m);b=a.ce.Math.MF(Math.abs(b),0,q-h-e);n="inline";if(5>k||5>b)n="none";d.css({width:k,height:b,top:e,left:m,"z-index":"44",position:"absolute",border:"1px dotted black",display:n})}function c(b){Object.defineProperties(b.defaults,{Precision:{get:function(){return Annotations.ja.NH(b)},set:function(a){Annotations.ja.LK(b,a)},enumerable:!0},Scale:{get:function(){return Annotations.ja.UH(b)},set:function(a){Annotations.ja.PK(b,
a[0],a[1])},enumerable:!0}})}function b(b){return JSON.parse(JSON.stringify(b))}function d(){return"url("+a.o.br()+"dragginghand.cur), url("+a.o.br()+"dragginghand.png), pointer"}function g(){return"url("+a.o.br()+"hand.cur), url("+a.o.br()+"hand.png), pointer"}function k(b,a){n!==a&&(b.Vc().css("cursor",a),n=a)}var h=XODText,l="../core/assets/";a.o.WW=function(b){b.lastIndexOf("/")!==b.length-1&&(b+="/");l=b};a.o.br=function(){return l};var n;a.ba=function(){};var m=a.ba;m.YY={};m.Tool=function(b){this.Ib=
this.Vd=null;this.u=this.docViewer=b;this.pageCoordinates=[]};m.Tool.ENABLE_TEXT_SELECTION=!0;m.Tool.ENABLE_AUTO_SWITCH=!0;m.Tool.ENABLE_ANNOTATION_HOVER_CURSORS=!0;m.Tool.ALLOW_ANNOTS_OUTSIDE_PAGE=!1;m.Tool.prototype={Cf:function(b){var a={},d=this.u.yb(),c=d.scrollLeft()||0,d=d.scrollTop()||0;b.originalEvent&&b.originalEvent.touches?(b=0===b.originalEvent.touches.length?b.originalEvent.changedTouches[0]:b.originalEvent.touches[0],a.x=c+b.clientX,a.y=d+b.clientY):(a.x=c+b.pageX,a.y=d+b.pageY);return a},
mouseLeftDown:function(b){var a=this.Cf(b);this.Vd=a;this.Ib={x:a.x,y:a.y};this.pageCoordinates[0]=this.Rd(this.Vd);this.pageCoordinates[1]=this.pageCoordinates[0];b.data={mouseCoordinate:{x:a.x,y:a.y},pageCoordinate:this.pageCoordinates[0]};(this.Qb=this.u.da.Oq(b))&&(this.Qb instanceof Annotations.Cb?k(this.u,this.cursor):this.u.Ba().Rc(this.Qb)&&k(this.u,"move"))},mouseLeftUp:function(b){var a=this.Cf(b);this.Ib=a;this.pageCoordinates[1]=this.Rd(this.Ib);b.data={mouseCoordinate:{x:a.x,y:a.y},pageCoordinate:this.pageCoordinates[1]}},
mouseMove:function(b){var a=this.Cf(b),d=this.u.da;this.Ib=a;var c=this.Rd(this.Ib);c&&(this.Qb=d.Oq(b),this.AL(d,c),this.zL(d,b),this.ZX(d,c));if(null!==this.Vd){d=this.Rd(this.Vd);if(null===d)return;var g=d.pageIndex,d=this.u.kd(g),c=this.u.jd(g),g=this.Rd(this.Ib,g);m.Tool.ALLOW_ANNOTS_OUTSIDE_PAGE||(0>g.x&&(g.x=0),0>g.y&&(g.y=0),g.x>d&&(g.x=d),g.y>c&&(g.y=c));this.pageCoordinates[1]=g}else this.pageCoordinates[1]=this.Rd(this.Ib);b.data={mouseCoordinate:{x:a.x,y:a.y},pageCoordinate:this.pageCoordinates[1]}},
AL:function(b,a){var d=!m.Tool.ENABLE_TEXT_SELECTION||!m.Tool.ENABLE_AUTO_SWITCH,c=this.u.nv(),c=!(c instanceof m.Kk||c instanceof m.bn||c instanceof m.Jp),g=this.Ae&&0<Object.keys(this.Ae).length;d||this.Yc||c||g||0<b.Fe().length||this.u.sK(a.pageIndex,a,function(b,a){this instanceof m.Jp?(this.cursor=0<a.length?"text":"crosshair",k(this.u,this.cursor)):0<a.length?this.u.qC(this.u.mv("TextSelect")):0===a.length&&this.u.qC(this.u.mv("AnnotationEdit"))}.bind(this))},zL:function(b){m.Tool.ENABLE_ANNOTATION_HOVER_CURSORS&&
(this.Qb&&this.Qb.Listable?b.Gi(this.Qb)?this.Qb instanceof Annotations.Gd&&!this.Qb.IsText?k(this.u,"move"):this.Qb instanceof Annotations.Cb?k(this.u,this.cursor):this.u.Ba().Rc(this.Qb)&&k(this.u,"move"):k(this.u,"pointer"):k(this.u,this.cursor))},ZX:function(b,a){if(m.Tool.ENABLE_ANNOTATION_HOVER_CURSORS)for(var d=b.Fe(),c=0;c<d.length;c++){var g=d[c],e=(new g.selectionModel(g,b.Rc(g))).cs(g,this.u.sb(g.PageNumber-1),a.x,a.y);if(!e)break;g=this.u.gd(g.PageNumber);e instanceof Annotations.Qe?k(this.u,
(e.Eg===Annotations.pa.Kc.Sv?0===g%2?"ew":"ns":e.If===Annotations.pa.tc.ou?0===g%2?"ns":"ew":e.Eg===Annotations.pa.Kc.top?e.If===Annotations.pa.tc.right?0===g%2?"nesw":"nwse":0===g%2?"nwse":"nesw":e.If===Annotations.pa.tc.right?0===g%2?"nwse":"nesw":0===g%2?"nesw":"nwse")+"-resize"):e instanceof Annotations.al?0===g%2?k(this.u,"ew-resize"):k(this.u,"ns-resize"):k(this.u,"default")}},mouseDoubleClick:function(b){b=this.Cf(b);this.Vd={x:b.x,y:b.y};this.Ib={x:b.x,y:b.y};b=this.u.da;var a=this.Rd(this.Ib);
a&&(this.Dn=a.x,this.En=a.y,this.Qb&&!this.Qb.Ii()&&this.Qb.dm()&&b.trigger("annotationDoubleClicked",this.Qb))},mouseLeave:function(){},tap:function(){},keyDown:function(){},contextMenu:function(){},switchIn:function(){},switchOut:function(){k(this.u,"default");this.u.da.Pd()},mh:function(){return this.u},Rd:function(b,a){var d=this.docViewer.Sl().kv(b,b);if("undefined"===typeof a){if(d=null===d.first?d.last:d.first,null===d)return null}else d=a;d=this.docViewer.Sl().Fk(b,d);return{pageIndex:d.pageIndex,
x:d.x,y:d.y}},kc:function(b){var a=this.defaults,d=b(a);d&&(Object.keys(d).forEach(function(b){a[b]=d[b]}),this.u.trigger("toolUpdated",[this]))},DW:function(b){this.name=b;this.u.trigger("toolUpdated",[this])},wq:function(b){this.annotation&&b.originalEvent.touches&&1<b.originalEvent.touches.length&&(this.u.Ba().Od(this.annotation),this.annotation=null)}};var q=m.Tool;m.AnnotationSelectTool=function(b){q.call(this,b);this.En=this.Dn=0;this.Jj={x:0,y:0};this.Vj=this.zc=null;this.state=m.AnnotationSelectTool.Wb.NONE;
this.Yj=NaN;this.Yc=!1;this.cursor="default";this.overrideSelection=!1};m.AnnotationSelectTool.Wb={NONE:0,yx:1,mD:2,Gs:3,xx:4};m.AnnotationSelectTool.PAGE_PADDING=new Annotations.Rect(2,2,2,2);m.AnnotationSelectTool.prototype=$.extend(new q,{mouseLeftDown:function(b){q.prototype.mouseLeftDown.call(this,b);if(this.overrideSelection)this.state=m.AnnotationSelectTool.Wb.NONE;else{this.Yc=!0;this.state=m.AnnotationSelectTool.Wb.NONE;var a=this.u.da,d=this.Rd(this.Ib);if(d){this.Yj=d.pageIndex;this.Dn=
d.x;this.En=d.y;this.Jj.x=this.Dn;this.Jj.y=this.En;for(var c=a.Fe(),g=0;g<c.length;g++){var e=c[g];if("undefined"!==typeof e.selectionModel){var f=(new e.selectionModel(e,a.Rc(e))).cs(e,this.u.sb(e.xb()),d.x,d.y);if(f){this.zc=e;this.Vj=f;!this.zc.NoResize&&a.Rc(this.zc)?this.state=m.AnnotationSelectTool.Wb.xx:(this.state=m.AnnotationSelectTool.Wb.NONE,a.Pd());return}}else if(console.warn("no selection model for annotation"),this.Vj=a.oH(this.Yj,d)){this.zc=this.Vj.OO;!this.zc.NoResize&&a.Rc(this.zc)?
this.state=m.AnnotationSelectTool.Wb.mD:(this.state=m.AnnotationSelectTool.Wb.NONE,a.Pd());return}}if(0<a.Fe().length&&(d=a.eH(b),0<d.length)){this.zc=null;for(c=0;c<d.length;++c)if(a.Gi(d[c])){this.zc=d[c];break}this.zc||(this.zc=d[0]);d=a.Gi(this.zc);!this.zc.NoMove&&a.Rc(this.zc)&&d?this.state=m.AnnotationSelectTool.Wb.yx:b.ctrlKey?this.state=m.AnnotationSelectTool.Wb.Gs:(this.state=m.AnnotationSelectTool.Wb.NONE,a.Pd());return}}a.Pd()}},mouseMove:function(b){q.prototype.mouseMove.call(this,b);
!this.Yc||!this.isSelecting()&&(this instanceof m.Gp||this instanceof m.Kk)||document.activeElement instanceof HTMLTextAreaElement||document.activeElement instanceof HTMLInputElement||b.preventDefault();if(!this.overrideSelection&&this.state!==m.AnnotationSelectTool.Wb.NONE){b=this.u.da;var a=this.pageCoordinates[1];if(a&&this.Yj===a.pageIndex){var d=a.x-this.Jj.x,c=a.y-this.Jj.y;if(this.state===m.AnnotationSelectTool.Wb.yx&&this.zc){k(this.u,"move");var g=b.Fe(),e,f,h,n,l,p,E,H=!1;for(e=0;e<g.length;e++)h=
g[e],b.Rc(h)&&!h.NoMove&&(f=h.Ec(),H?(f.x1<n&&(n=f.x1),f.y1<l&&(l=f.y1),f.x2>p&&(p=f.x2),f.y2>E&&(E=f.y2)):(n=f.x1,l=f.y1,p=f.x2,E=f.y2,H=!0));f=this.u.kd(this.Yj);h=this.u.jd(this.Yj);e=new Annotations.Rect;this.u.sb(this.zc.xb());e.x1=1*m.AnnotationSelectTool.PAGE_PADDING.x1;e.y1=1*m.AnnotationSelectTool.PAGE_PADDING.y1;e.x2=f-1*m.AnnotationSelectTool.PAGE_PADDING.x2;e.y2=h-1*m.AnnotationSelectTool.PAGE_PADDING.y2;n=Math.max(0+m.AnnotationSelectTool.PAGE_PADDING.x1,n);l=Math.max(0+m.AnnotationSelectTool.PAGE_PADDING.y1,
l);p=Math.min(p,f-m.AnnotationSelectTool.PAGE_PADDING.x2);E=Math.min(E,h-m.AnnotationSelectTool.PAGE_PADDING.y2);if(H){n=n+d>=e.x1||m.Tool.ALLOW_ANNOTS_OUTSIDE_PAGE?d:e.x1-n;l=l+c>=e.y1||m.Tool.ALLOW_ANNOTS_OUTSIDE_PAGE?c:e.y1-l;p=p+d<=e.x2||m.Tool.ALLOW_ANNOTS_OUTSIDE_PAGE?d:e.x2-p;E=E+c<=e.y2||m.Tool.ALLOW_ANNOTS_OUTSIDE_PAGE?c:e.y2-E;d=0<=d?Math.min(n,p):Math.max(n,p);c=0<=c?Math.min(l,E):Math.max(l,E);this.Jj.x=a.x;this.Jj.y=a.y;a={};for(e=0;e<g.length;e++)if(h=g[e],b.Rc(h)&&!h.NoMove&&(f=h.Ec(),
f.x1+=d,f.y1+=c,f.x2+=d,f.y2+=c,0!==d||0!==c))h.resize(f),h.tF=!0,a[h.rb()]=!0;for(var G in a)this.u.da.Qd(parseInt(G,10))}}else this.state===m.AnnotationSelectTool.Wb.xx&&this.Vj&&this.zc&&(G=this.Vj.move(this.zc,d,c,this.Rd(new Annotations.Point(this.Vd.x,this.Vd.y)),a,this.u),this.Jj.x=a.x,this.Jj.y=a.y,G&&this.u.da.Kb(this.zc))}}},mouseLeftUp:function(){if(!this.overrideSelection){this.Yc=!1;var b=this.u.da,a=b.Fe();if(this.state===m.AnnotationSelectTool.Wb.yx){for(var d=[],c=0;c<a.length;c++){var g=
a[c];g.tF&&(g.tF=void 0,d.push(g))}0<d.length&&b.trigger("annotationChanged",[d,"modify"])}else this.state===m.AnnotationSelectTool.Wb.mD?(d=this.Vj.OO,this.Vj&&b.trigger("annotationChanged",[[d],"modify"])):this.state===m.AnnotationSelectTool.Wb.xx&&this.zc&&b.trigger("annotationChanged",[[this.zc],"modify"]);0<a.length?k(this.u,"default"):k(this.u,this.cursor);this.state=m.AnnotationSelectTool.Wb.NONE}},VB:function(){this.u.da.Od(this.annotation);this.annotation=null},keyDown:function(b){27===b.which&&
void 0!==this.annotation&&null!==this.annotation&&this.VB();46!==b.which&&8!==b.which||a.utils.isEditableElement($(b.target))||(b=this.u.Ba().Fe(),this.u.Ba().zu(b))},tap:function(b){if(!this.overrideSelection){var a=this.u.Ba();if(this.Qb=a.Oq(b)){var d=a.Gi(this.Qb);b.originalEvent.ctrlKey||b.originalEvent.metaKey?d?a.Fl(this.Qb):a.vm(this.Qb):d||(a.Pd(),a.vm(this.Qb));this.u.Cm("none");b.preventDefault()}}},isSelecting:function(){return this.state!==m.AnnotationSelectTool.Wb.NONE}});m.Gp=function(b,
a){m.AnnotationSelectTool.call(this,b);this.Cy={x:0,y:0};this.At=!1;this.cursor=g();this.name=a||"PanTool"};m.Gp.prototype=$.extend(new m.AnnotationSelectTool,{switchIn:function(){k(this.u,this.cursor)},mouseLeftDown:function(b){m.AnnotationSelectTool.prototype.mouseLeftDown.call(this,b);this.isSelecting()||(this.Cy=this.Cf(b),this.At=!0,this.cursor=d(),k(this.u,this.cursor))},mouseLeftUp:function(b){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,b);this.isSelecting()||(this.cursor=g(),k(this.u,
this.cursor),this.At=!1)},mouseMove:function(b){m.AnnotationSelectTool.prototype.mouseMove.call(this,b);if(!this.isSelecting()&&this.At){var a=this.u.yb(),c=this.Cf(b);b=this.Cy.x-c.x;c=this.Cy.y-c.y;this.u.scrollTo((a.scrollLeft()||0)+b,(a.scrollTop()||0)+c);k(this.u,d())}},mouseLeave:function(){this.At=!1;k(this.u,this.cursor)}});m.Yb=function(b){q.call(this,b);this.Yc=!1;this.cursor="text"};m.Yb.SELECTION_MODE="structural";m.Yb.prototype={switchIn:function(){this.KF(null,this.u.gd());this.u.on("rotationUpdated.textTool",
_.bind(this.KF,this))},switchOut:function(b){q.prototype.switchOut.call(this,b);this.u.off("rotationUpdated.textTool")},KF:function(b,d){this.cursor=d===a.o.La.Ce||d===a.o.La.zf?"vertical-text":"text";k(this.u,this.cursor)},mouseLeftDown:function(b){m.AnnotationSelectTool.prototype.mouseLeftDown.call(this,b);this.isSelecting()||(b.altKey&&(m.Yb.SELECTION_MODE="rectangular"),this.Yc=!0,this.u.Bq())},mouseMove:function(b){m.AnnotationSelectTool.prototype.mouseMove.call(this,b);this.isSelecting()||!0!==
this.Yc||(1!==b.which&&0!==b.which?this.Yc=!1:(b.data&&(this.pageCoordinates[1]=this.Rd(b.data.mouseCoordinate)),this.select(this.pageCoordinates[0],this.pageCoordinates[1]),this.wq(b)))},select:function(b,a){var d=this.u;if(b&&a){var c,g;a.pageIndex>=b.pageIndex?(c=b,g=a):(c=a,g=b);var e=c.pageIndex,f=g.pageIndex;if(null!==e&&null!==f){var k=new h.Ma,n=d.v.gc(e);1<=f-e?k.Ea(c.x,c.y,n.width,n.height):k.Ea(c.x,c.y,g.x,g.y);this.u.Bo="rectangular"===m.Yb.SELECTION_MODE?(new XODText.uj(this.u.getDocument())).tK:
(new XODText.uj(this.u.getDocument())).rK;this.u.Vi=[[e,k]];this.u.So(e,k,_.bind(this.textSelected,this));for(c=e+1;c<f;c++)this.u.Vi.unshift([c,k]),n=d.v.gc(c),k=new h.Ma,k.Ea(0,0,n.width,n.height),d.So(c,k,_.bind(this.textSelected,this));e!==f&&(k=new h.Ma,k.Ea(0,0,g.x,g.y),this.u.Vi.unshift([f,k]),d.So(f,k,_.bind(this.textSelected,this)))}}},textSelected:function(){},mouseLeftUp:function(b){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,b);this.isSelecting()||(b.altKey&&"rectangular"===
m.Yb.SELECTION_MODE&&(m.Yb.SELECTION_MODE="structural"),this.Yc=!1)}};m.Yb.prototype=$.extend(new m.AnnotationSelectTool,m.Yb.prototype);m.bn=function(b,a){m.Yb.call(this,b);this.Ae={};this.hE=this.bF=this.ln=null;this.name=a||"TextSelectTool"};m.bn.prototype=$.extend(new m.Yb,{select:function(){this.u.QF();this.Ae={};m.Yb.prototype.select.apply(this,arguments)},mouseLeftDown:function(b){this.ln=null;var a=this.Rd(this.Cf(b));if(a){var d=a.pageIndex,c=this.VN(d),g=this;c.he=function(){return g.Ae[d]};
var e=!1,f=!1,k=this.ky();0<k.length&&(d===k[0]&&(e=!0),d===k[k.length-1]&&(f=!0));if(a=(new Annotations.vj(c,!0,!1,e,f)).cs(c,this.u.sb(d),a.x,a.y))this.ln=a,this.ln.$l?this.bF=this.YN():this.hE=this.WN()}this.ln||(m.Yb.prototype.mouseLeftDown.apply(this,arguments),this.Ae={});this.Yc=!0},mouseMove:function(b){b.preventDefault();if(this.Yc&&this.ln){var a=this.Rd(this.Cf(b));if(a){var d;this.ln.$l?d=this.bF:(d=a,a=this.hE);this.Ae={};this.select(d,a)}}else m.Yb.prototype.mouseMove.apply(this,arguments)},
mouseLeftUp:function(){m.Yb.prototype.mouseLeftUp.apply(this,arguments);0<Object.keys(this.Ae).length?(k(this.u,"default"),this.Ey()):0===this.u.Ba().Fe().length&&k(this.u,this.cursor)},textSelected:function(b,a,d){this.u.ow(b,a,d);0<a.length&&(k(this.u,"default"),this.Ae[b]=a.map(function(b){return b.rh()}));this.Yc||this.Ey()},mouseDoubleClick:function(){var b=this.pageCoordinates[0];if(b){var a=this;this.u.sK(b.pageIndex,b,function(){a.textSelected.apply(a,arguments);a.Ey()})}},Bq:function(){this.Ae=
{}},Ey:function(){var b=this.sE();b.quad&&this.trigger("selectionComplete",[b,this.Ae])},ky:function(){return Object.keys(this.Ae).map(function(b){return parseInt(b,10)}).sort(function(b,a){return b-a})},sE:function(){var b=this.ky()[0],a=this.Ae[b];return{quad:a?a[0]:null,pageIndex:b}},YN:function(){var b=this.sE(),a=b.quad;return{x:a.x1,y:(a.y1+a.y3)/2,pageIndex:b.pageIndex}},WN:function(){var b=this.ky(),b=b[b.length-1],a=this.Ae[b],a=a[a.length-1];return{x:a.x3,y:(a.y1+a.y3)/2,pageIndex:b}},VN:function(b){var a=
Infinity,d=Infinity,c=0,g=0;if(b=this.Ae[b])for(var e=0;e<b.length;++e)var f=b[e],a=Math.min(a,f.x1,f.x2,f.x3,f.x4),d=Math.min(d,f.y1,f.y2,f.y3,f.y4),c=Math.max(c,f.x1,f.x2,f.x3,f.x4),g=Math.max(g,f.y1,f.y2,f.y3,f.y4);return{X:a,Y:d,Width:c-a,Height:g-d}}},a.utils.eventHandler);m.GenericAnnotationCreateTool=function(b,a,d){m.AnnotationSelectTool.call(this,b);this.annotation=null;this.Oy=a;this.JP=d;this.cursor="crosshair";this.defaults={StrokeColor:new Annotations.Color(0,0,0),FillColor:new Annotations.Color(0,
0,0,0),StrokeThickness:1,Opacity:1}};m.GenericAnnotationCreateTool.prototype=$.extend(new m.AnnotationSelectTool,{switchIn:function(){k(this.u,this.cursor);this.u.pe({annotMode:!0})},switchOut:function(b){null!==this.annotation&&void 0!==this.annotation&&(this.Aq&&this.Aq(),this.u.da.Od(this.annotation),this.annotation=null);m.AnnotationSelectTool.prototype.switchOut.call(this,b);this.u.pe({annotMode:!1})},mouseLeftDown:function(b){m.AnnotationSelectTool.prototype.mouseLeftDown.call(this,b);if(!this.isSelecting()&&
!this.annotation&&(b=this.pageCoordinates[0])){var a=this.u.da;this.annotation=new this.Oy(this.JP);this.annotation.X=b.x;this.annotation.Y=b.y;this.annotation.PageNumber=b.pageIndex+1;this.annotation.Author=a.Ql();null!==this.annotation.StrokeColor&&(b=this.defaults.StrokeColor,this.annotation.StrokeColor=new Annotations.Color(b.R,b.G,b.B,b.A));null!==this.annotation.StrokeThickness&&(this.annotation.StrokeThickness=this.defaults.StrokeThickness);null!==this.annotation.FillColor&&(b=this.defaults.FillColor,
this.annotation.FillColor=new Annotations.Color(b.R,b.G,b.B,b.A));this.annotation.Opacity=this.defaults.Opacity;this.annotation.ToolName=this.name;this.trigger("annotationCreated",[this.annotation])}},mouseLeftUp:function(b){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,b);this.isSelecting()||this.finish()},mouseMove:function(b){m.AnnotationSelectTool.prototype.mouseMove.call(this,b);if(!this.isSelecting()&&this.annotation&&"undefined"!==typeof this.pageCoordinates){var a=this.pageCoordinates[0],
d=this.pageCoordinates[1];null!==d&&null!==a&&a.pageIndex===d.pageIndex&&(a=new Annotations.Rect(a.x,a.y,d.x,d.y),a.normalize(),this.annotation.Ag(a),this.u.da.Kb(this.annotation),this.wq(b))}},finish:function(){this.annotation&&(this.JI(this.annotation)?this.u.Ba().Od(this.annotation):(this.u.da.bh(this.annotation),this.trigger("annotationAdded",[this.annotation])),this.annotation=null)},JI:function(b){var a=b.Ca(),d=b.xa();b=2*(b.getRectPadding()+1);return a<=b&&d<=b}},a.utils.eventHandler);new m.GenericAnnotationCreateTool;
m.Kk=function(b,a){m.AnnotationSelectTool.call(this,b);this.nk=null;this.name=a||"AnnotationEditTool"};m.Kk.prototype=$.extend(new m.AnnotationSelectTool,{switchIn:function(){k(this.u,"default");this.u.Cm("auto")},switchOut:function(b){q.prototype.switchOut.call(this,b);this.u.Cm("none")},JB:function(b){this.pointerType=b.originalEvent.pointerType},mouseLeftDown:function(b){m.AnnotationSelectTool.prototype.mouseLeftDown.call(this,b);if(!this.isSelecting()){this.Yc=!0;this.state=m.AnnotationSelectTool.Wb.NONE;
b=this.u.da;var a=this.Rd(this.Ib);a&&(this.Yj=a.pageIndex,b.Pd(),this.state=m.AnnotationSelectTool.Wb.Gs)}},mouseMove:function(b){m.AnnotationSelectTool.prototype.mouseMove.call(this,b);if(this.state===m.AnnotationSelectTool.Wb.Gs&&(b=this.pageCoordinates[1])&&this.Yj===b.pageIndex){var d=b.x,c=b.y;b=0>d-this.Dn?d:this.Dn;var g=0>c-this.En?c:this.En,d=Math.abs(d-this.Dn),c=Math.abs(c-this.En);e([this.Vd,this.Ib],this.pageCoordinates,this.u);this.nk=a.ce.bJ(b,g,d,c)}},mouseLeftUp:function(b){if(this.state!==
m.AnnotationSelectTool.Wb.Gs)m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,b);else{var a=this;this.Yc=!1;var d=function(){a.nk=null;a.state=m.AnnotationSelectTool.Wb.NONE;f()};if(!this.nk||!this.u.Iq){d();return}if(this.nk.x1===this.nk.x2&&this.nk.y1===this.nk.y2)m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,b);else{var c=this.TN(this.Yj,this.nk);this.u.Ba().Iw(c)}d()}if(d=this.pageCoordinates[1])c=this.u.da,this.AL(c,d),this.zL(c,b)},TN:function(b,d){for(var c,g=[],e=this.u.Ba().Pc.filter(function(a){return a.xb()===
b&&a.dm()}),f=0;f<e.length;f++){c=e[f];var k=1;!0===c.NoZoom&&(k=this.u.sb(c.xb()));a.ce.pV(d,a.ce.bJ(c.bv(),c.ov(),c.Ca()/k,c.xa()/k))&&g.push(c)}return g}});m.Rg=function(b,d){m.GenericAnnotationCreateTool.call(this,b,a.Annotations.Ed);delete this.defaults.FillColor;this.name=d||"LineCreateTool"};m.Rg.prototype=$.extend(new m.GenericAnnotationCreateTool,{mouseLeftDown:function(b){m.GenericAnnotationCreateTool.prototype.mouseLeftDown.call(this,b);this.isSelecting()||this.annotation&&(this.annotation.Start=
{x:this.pageCoordinates[0].x,y:this.pageCoordinates[0].y})},mouseMove:function(b){m.AnnotationSelectTool.prototype.mouseMove.call(this,b);if(!this.isSelecting()&&this.annotation&&"undefined"!==typeof this.pageCoordinates){var a=this.pageCoordinates[0],d=this.pageCoordinates[1];null!==d&&null!==a&&a.pageIndex===d.pageIndex&&(this.annotation.End={x:d.x,y:d.y},this.annotation.adjustRect(),this.u.da.Kb(this.annotation),this.wq(b))}}});m.rx=function(b,a){m.Rg.call(this,b);this.name=a||"ArrowCreateTool"};
m.rx.prototype=$.extend(new m.Rg,{mouseLeftDown:function(b){m.Rg.prototype.mouseLeftDown.call(this,b);this.annotation&&this.annotation.Vo("OpenArrow")}});m.Lx=function(b,d){m.GenericAnnotationCreateTool.call(this,b,a.Annotations.sj);this.name=d||"RectangleCreateTool"};m.Lx.prototype=new m.GenericAnnotationCreateTool;m.Bx=function(b,d){m.GenericAnnotationCreateTool.call(this,b,a.Annotations.Ok);this.name=d||"EllipseCreateTool"};m.Bx.prototype=new m.GenericAnnotationCreateTool;m.FreeHandCreateTool=
function(b,d){m.GenericAnnotationCreateTool.call(this,b,a.Annotations.FreeHandAnnotation);this.ic=0;this.vu=null;this.Yc=!1;this.pointerType=null;delete this.defaults.FillColor;this.name=d||"FreeHandCreateTool"};m.FreeHandCreateTool.prototype=$.extend(new m.GenericAnnotationCreateTool,{createDelay:1500,simplifyPen:!1,mouseLeftDown:function(b){m.AnnotationSelectTool.prototype.mouseLeftDown.call(this,b);if(!this.isSelecting()&&this.pageCoordinates[0]&&(this.type||(this.type=b.type),this.type===b.type)){this.Yc=
!0;if(this.annotation)if(this.pageCoordinates[0].pageIndex===this.annotation.PageNumber-1){var a=this.pageCoordinates[0].x,d=this.pageCoordinates[0].y,c=!1,g=this.annotation.getPath(this.ic);g&&0<g.length&&(g=g[g.length-1],g.x===a&&g.y===d&&(c=!0));c||this.annotation.vb(a,d,this.ic)}else{var e=this;this.complete().then(function(){m.FreeHandCreateTool.prototype.mouseLeftDown.call(e,b)})}else m.GenericAnnotationCreateTool.prototype.mouseLeftDown.call(this,b),this.annotation.vb(this.pageCoordinates[1].x,
this.pageCoordinates[1].y,this.ic);clearTimeout(this.vu)}},complete:function(){var b=this;if(this.annotation&&0<this.annotation.Ee().length)return this.u.da.Kb(this.annotation).then(function(){b.annotation.finish();m.GenericAnnotationCreateTool.prototype.mouseLeftUp.call(b,null);b.Ay()});b.Ay();this.annotation=null;return Promise.resolve()},Ar:function(){this.complete()},switchOut:function(b){var a=this;this.complete().then(function(){m.GenericAnnotationCreateTool.prototype.switchOut.call(a,b)})},
mouseLeftUp:function(){m.AnnotationSelectTool.prototype.mouseLeftUp.apply(this,arguments);if(!this.isSelecting()&&(this.Yc=!1,this.annotation)){var b=this.u.da;this.annotation.vb(this.pageCoordinates[1].x,this.pageCoordinates[1].y,this.ic);var a=this.annotation.getPath(this.ic);a&&(2>a.length?(this.annotation.Ee().pop(),this.annotation.adjustRect(),b.Kb(this.annotation)):(("pen"!==this.pointerType||this.simplifyPen)&&this.annotation.sX(.75),b.Kb(this.annotation),this.ic++),this.vu=setTimeout(_.bind(this.complete,
this),this.createDelay));0===this.annotation.Ee().length&&(this.complete(),clearTimeout(this.vu))}},mouseMove:function(b){m.AnnotationSelectTool.prototype.mouseMove.call(this,b);if(!this.isSelecting()&&!1!==this.Yc){if(this.annotation&&null!==this.pageCoordinates&&null!==this.pageCoordinates[1]){if(this.pageCoordinates[0].pageIndex!==this.pageCoordinates[1].pageIndex)return;this.annotation.vb(this.pageCoordinates[1].x,this.pageCoordinates[1].y,this.ic);this.u.da.Kb(this.annotation)}this.annotation&&
b.originalEvent.touches&&1<b.originalEvent.touches.length&&this.complete()}},Ay:function(){this.ic=0;this.Yc=!1;clearTimeout(this.vu)},VB:function(){this.Ay();m.AnnotationSelectTool.prototype.VB.call(this)},contextMenu:function(b){b.preventDefault()},JB:function(b){this.pointerType=b.originalEvent.pointerType}});m.SignatureCreateTool=function(b,a){m.Tool.call(this,b);this.tj=100;this.location=null;this.Hq=!1;this.gx=this.ic=0;this.visible=!1;this.mz=null;this.cursor="crosshair";this.GQ=3;var d=this;
$(document).on("mouseup",function(){d.Hq&&(d.visible=!0);d.lE()});this.defaults={StrokeColor:new Annotations.Color(0,0,0),StrokeThickness:1,Opacity:1};this.name=a||"SignatureCreateTool"};m.SignatureCreateTool.pC=function(b){m.SignatureCreateTool.prototype.rn=b};m.SignatureCreateTool.prototype={switchIn:function(){k(this.u,this.cursor);this.initAnnot()},pE:function(b){var a,d=this.canvas[0].getBoundingClientRect();b.originalEvent&&b.originalEvent.touches&&(b=0===b.originalEvent.touches.length?b.originalEvent.changedTouches[0]:
b.originalEvent.touches[0]);a=b.clientX;b=b.clientY;return{x:a-d.left,y:b-d.top}},aE:function(){this.ctx.setTransform(1,0,0,1,0,0);this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height)},DP:function(){this.aE();this.freeHandAnnot.IG();this.gx=this.ic=0},lE:function(){this.Hq&&(this.ic++,this.visible&&(this.gx++,this.visible=!1));this.Hq=!1},rn:function(){return"Sign Here"},drawBackground:function(){var b=window.utils.getCanvasMultiplier();this.ctx.scale(b,b);this.ctx.save();var a=2/
3*this.ctx.canvas.height/b;this.ctx.strokeStyle="#000";this.ctx.lineCap="square";this.ctx.lineWidth=1;this.ctx.beginPath();this.ctx.moveTo(10,a);this.ctx.lineTo(this.ctx.canvas.width/b-10,a);this.ctx.stroke();this.ctx.fillStyle="#000";var d=this.rn();this.ctx.textAlign="center";this.ctx.textBaseline="top";this.ctx.font="15px Verdana,Arial,sans-serif";this.ctx.fillText(d,this.ctx.canvas.width/b/2,a-20);this.ctx.restore()},yz:function(){this.aE();this.drawBackground();this.ctx.save();var b=this.u.Dc(0),
a=this.freeHandAnnot.StrokeThickness;this.freeHandAnnot.StrokeThickness*=this.GQ;this.freeHandAnnot.draw(this.ctx,b);this.freeHandAnnot.StrokeThickness=a;this.ctx.restore()},initAnnot:function(){var b=this.u.Ba();this.freeHandAnnot=new Annotations.FreeHandAnnotation;this.freeHandAnnot.Author=b.Ql();this.freeHandAnnot.StrokeColor=this.defaults.StrokeColor;this.freeHandAnnot.StrokeThickness=this.defaults.StrokeThickness;this.freeHandAnnot.Opacity=this.defaults.Opacity;this.freeHandAnnot.Subject=Annotations.ja.Ac("signature");
this.freeHandAnnot.ToolName=this.name;this.freeHandAnnot.MaintainAspectRatio=!0},tI:function(b){this.mz=b=$.extend(!0,[],b)},rO:function(b){this.tI(b);this.trigger("saveDefault",[b])},QV:function(){var b=$.extend(!0,[],this.freeHandAnnot.Ee());this.trigger("saveDefault",[b,this.freeHandAnnot])},TK:function(b,a){b=$.extend(!0,[],b);for(var d=0;d<b.length;++d){for(var c=0;c<b[d].length;++c)b[d][c]=new Annotations.Point(b[d][c].x,b[d][c].y);this.freeHandAnnot.setPath(b[d],d)}$.extend(this.freeHandAnnot,
a);this.gx=b.length},xP:function(){this.location=null},aT:function(){return!!this.location},XS:function(){return this.mz?!0:!1},NU:function(){this.initAnnot();this.drawBackground()},zO:function(){var b=this.mz;b&&(this.TK(b),this.oF())},BS:function(){if(this.freeHandAnnot.Width&&this.freeHandAnnot.Height){var b=this.u.Dc(0);this.TE({pageIndex:0,x:0,y:0});var a=this.freeHandAnnot.Ec(),d=a.Ca(),a=a.xa(),c=document.createElement("canvas");c.width=d;c.height=a;var g=c.getContext("2d");this.freeHandAnnot.draw(g,
b);b=this.u.Ze();return{imgSrc:c.toDataURL(),width:d*b,height:a*b}}},oF:function(b){if(this.CI())return!1;b&&this.rO(this.freeHandAnnot.Ee());b=this.u.Ba();var d=this.location.pageIndex+1;this.freeHandAnnot.PageNumber=d;d=this.u.gd(d);d!==a.o.La.ni&&this.freeHandAnnot.rotate(d*-Math.PI/2,this.location);this.TE(this.location);b.bh(this.freeHandAnnot);b.Kb(this.freeHandAnnot);this.trigger("annotationAdded",[this.freeHandAnnot]);this.initAnnot();this.location=null;return!0},TE:function(b){var a=this.freeHandAnnot.Width,
d=this.freeHandAnnot.Height,c,g,e;a>d?(c=b.x-this.tj,g=b.y-d/a*this.tj,e=b.x+this.tj,a=b.y+d/a*this.tj):(c=b.x-a/d*this.tj,g=b.y-this.tj,e=b.x+a/d*this.tj,a=b.y+this.tj);b=this.u.getDocument().gc(b.pageIndex);c=new Annotations.Rect(c,g,e,a);c.Pu(new Annotations.Rect(0,0,b.width,b.height));this.freeHandAnnot.resize(c)},CI:function(){return 0===this.gx},aX:function(b){var a=this;this.canvas=b;this.canvas[0].style.touchAction="none";this.ctx=b[0].getContext("2d");this.canvas.on("mousedown touchstart",
function(b){if(1===b.which||0===b.which)b=a.pE(b),a.freeHandAnnot.vb(b.x,b.y,a.ic),a.yz(),a.Hq=!0});this.canvas.on("touchmove",function(b){b.preventDefault()});this.canvas.on("mousemove touchmove",_.throttle(function(b){a.Hq&&(b=a.pE(b),a.freeHandAnnot.vb(b.x,b.y,a.ic),a.yz(),a.visible=!0)},20));this.canvas.on("mouseup touchend",function(){a.lE()})},mouseLeftDown:function(b){b.preventDefault();m.Tool.prototype.mouseLeftDown.apply(this,arguments);this.u.da.Pd()},mouseLeftUp:function(b){b.preventDefault();
m.Tool.prototype.mouseLeftUp.apply(this,arguments);var a=this.pageCoordinates[1];a&&(this.location=a,this.trigger("locationSelected",a))}};m.SignatureCreateTool.prototype=$.extend(new m.Tool,m.SignatureCreateTool.prototype,a.utils.eventHandler);m.Jc=function(b,a){m.Yb.call(this,b);this.text=this.annotation=null;this.Oy=a;this.defaults={Opacity:1,StrokeColor:new Annotations.Color(255,0,0)}};m.Jc.AUTO_SET_TEXT=!0;m.Jc.prototype=$.extend(new m.Yb,{switchIn:function(b){m.Yb.prototype.switchIn.call(this,
b);this.u.pe({annotMode:!0})},switchOut:function(b){m.Yb.prototype.switchOut.call(this,b);this.u.pe({annotMode:!1})},mouseLeftDown:function(b){m.Yb.prototype.mouseLeftDown.call(this,b);this.isSelecting()||this.annotation||!this.pageCoordinates||(b=this.u.da,this.annotation=new this.Oy,this.annotation.Author=b.Ql(),b=this.defaults.StrokeColor,this.annotation.StrokeColor=new Annotations.Color(b.R,b.G,b.B,b.A),this.annotation.Opacity=this.defaults.Opacity||1,this.annotation.ToolName=this.name,this.trigger("annotationCreated",
[this.annotation]))},textSelected:function(b,a,d){this.annotation&&this.pageCoordinates[0].pageIndex===b&&0<a.length&&(this.annotation.Sw(a.map(function(b){return b.rh()})),this.annotation.PageNumber=b+1,this.text=d,!m.Jc.AUTO_SET_TEXT||this.annotation instanceof Annotations.Gd||this.annotation.Gh(this.text),this.u.da.Kb(this.annotation))},mouseLeftUp:function(b){m.Yb.prototype.mouseLeftUp.call(this,b);!this.isSelecting()&&this.annotation&&(b=this.u.da,!this.text||1>this.text.length?b.Od(this.annotation):
(b.bh(this.annotation),this.trigger("annotationAdded",[this.annotation])),this.annotation=this.text=null)}},a.utils.eventHandler);m.Sx=function(b,d){m.Jc.call(this,b,a.Annotations.Qh);this.defaults.StrokeColor=new Annotations.Color(255,255,0);delete this.defaults.Opacity;this.name=d||"TextHighlightCreateTool"};m.Sx.prototype=new m.Jc;m.Jp=function(b,d){m.Jc.call(this,b,a.Annotations.Gd);this.name=d||"RedactCreateTool";this.defaults={StrokeColor:new Annotations.Color(255,0,0),FillColor:new Annotations.Color(0,
0,0,1),StrokeThickness:1.5,Opacity:1}};m.Jp.prototype=$.extend(new m.GenericAnnotationCreateTool,new m.Jc,{mouseMove:function(b){"text"===this.cursor?m.Jc.prototype.mouseMove.call(this,b):m.GenericAnnotationCreateTool.prototype.mouseMove.call(this,b)},mouseLeftDown:function(b){"text"===this.cursor?(m.Jc.prototype.mouseLeftDown.call(this,b),this.annotation&&(this.annotation.IsText=!0)):(m.GenericAnnotationCreateTool.prototype.mouseLeftDown.call(this,b),this.annotation&&(this.annotation.IsText=!1,this.annotation.NoMove=
!1));this.annotation&&this.defaults&&(null!==this.defaults.StrokeColor&&(b=this.defaults.StrokeColor,this.annotation.StrokeColor=new Annotations.Color(b.R,b.G,b.B,b.A)),null!==this.defaults.StrokeThickness&&(this.annotation.StrokeThickness=this.defaults.StrokeThickness),null!==this.defaults.FillColor&&(b=this.defaults.FillColor,this.annotation.FillColor=new Annotations.Color(b.R,b.G,b.B,b.A)))},mouseLeftUp:function(b){this.annotation&&this.annotation.IsText?m.Jc.prototype.mouseLeftUp.call(this,b):
m.GenericAnnotationCreateTool.prototype.mouseLeftUp.call(this,b)}});m.Vx=function(b,d){m.Jc.call(this,b,a.Annotations.en);this.name=d||"TextUnderlineCreateTool"};m.Vx.prototype=new m.Jc;m.Ux=function(b,d){m.Jc.call(this,b,a.Annotations.dn);this.name=d||"TextStrikeoutCreateTool"};m.Ux.prototype=$.extend(new m.Jc,{mouseLeftUp:function(){m.Jc.prototype.mouseLeftUp.apply(this,arguments);if(!this.isSelecting()){var b=this.annotation,a=this.u.da;b&&a.Bi(b)&&a.Kb(b)}}});m.Tx=function(b,d){m.Jc.call(this,
b,a.Annotations.cn);this.name=d||"TextSquigglyCreateTool"};m.Tx.prototype=new m.Jc;m.Ss=function(b,a){m.AnnotationSelectTool.call(this,b);this.annotation=null;this.defaults={StrokeColor:new Annotations.Color(255,255,0),Opacity:1};this.cursor="crosshair";this.name=a||"StickyCreateTool";this.lq=!1};m.Ss.prototype=$.extend(new m.AnnotationSelectTool,{switchIn:function(){k(this.u,this.cursor)},mouseLeftUp:function(b){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,b);var a=this.pageCoordinates[1];
if(a&&(!this.Qb||this.lq)){var d=this.u.da;d.Pd();this.annotation=new Annotations.Zk;this.annotation.X=a.x;this.annotation.Y=a.y;this.annotation.PageNumber=a.pageIndex+1;this.annotation.Author=d.Ql();a=this.defaults.StrokeColor;this.annotation.StrokeColor=new Annotations.Color(a.R,a.G,a.B,a.A);this.annotation.Opacity=this.defaults.Opacity;this.annotation.ToolName=this.name;this.trigger("annotationCreated",[this.annotation]);d.bh(this.annotation);this.trigger("annotationAdded",[this.annotation]);d.Kb(this.annotation);
this.annotation=null;b.preventDefault()}},gC:function(b){this.lq=b}},a.utils.eventHandler);m.Kp=function(b,a){q.call(this,b);this.annotation=null;this.defaults={Opacity:1};this.cursor="crosshair";this.name=a||"StampCreateTool"};m.Kp.ACCEPTED_IMAGE_TYPES=".jpg,.jpeg,.png";m.Kp.prototype=$.extend(new m.Tool,{switchIn:function(){k(this.u,this.cursor)},mouseLeftDown:function(b){if(!this.annotation){q.prototype.mouseLeftDown.call(this,b);this.u.Ba().Pd();var a=this.pageCoordinates[0];if(a){var d=this.Rd(this.Ib).pageIndex,
c=document.createElement("input");c.setAttribute("type","file");c.setAttribute("accept",m.Kp.ACCEPTED_IMAGE_TYPES);c.setAttribute("display","none");c.onchange=function(){if(c.files&&c.files[0])if("image/png"!==c.files[0].type&&"image/jpeg"!==c.files[0].type)console.warn("Invalid file type. Please choose a png/jpg/jpeg file.");else{var b=new FileReader;b.onload=function(b){var c=this.u.da;this.annotation=new Annotations.Yk;this.annotation.X=a.x;this.annotation.Y=a.y;this.annotation.PageNumber=a.pageIndex+
1;this.annotation.Author=c.Ql();this.annotation.ImageData=b.target.result;var g=90*this.u.gd(this.annotation.PageNumber);this.annotation.Rotation=g;var e=new Image;e.onload=function(){var b=e.width,a=e.height;if(90===g||270===g)var f=b,b=a,a=f;var k=b/a,f=this.u.kd(d),h=this.u.jd(d),b=Math.min(b,f),a=Math.min(a,h);b/a!==k&&(a*k<b?b=a*k:a=b/k);this.annotation.Width=b;this.annotation.Height=a;this.annotation.X-=this.annotation.Width/2;this.annotation.Y-=this.annotation.Height/2;b=this.annotation.Ec();
b.Pu(new Annotations.Rect(0,0,f,h));this.annotation.resize(b);this.annotation.ToolName=this.name;this.annotation.Opacity=this.defaults.Opacity;this.trigger("annotationCreated",[this.annotation]);c.bh(this.annotation);this.trigger("annotationAdded",[this.annotation]);c.Kb(this.annotation);this.annotation=null}.bind(this);e.src=b.target.result}.bind(this);b.readAsDataURL(c.files[0]);document.body.removeChild(c)}}.bind(this);document.body.appendChild(c);c.click()}}}},a.utils.eventHandler);m.Vg=function(b,
d){m.GenericAnnotationCreateTool.call(this,b,a.Annotations.qj);this.annotation=null;this.pm=!1;delete this.defaults.FillColor;this.name=d||"PolylineCreateTool";this.lq=!1};m.Vg.prototype=$.extend(new m.GenericAnnotationCreateTool,{mouseLeftDown:function(b){var a;m.GenericAnnotationCreateTool.prototype.mouseLeftDown.call(this,b);a=this.annotation&&0===this.annotation.getPath().length;this.isSelecting()||this.Qb&&a&&!this.lq||!this.annotation||((a=b.data.pageCoordinate,a&&a.pageIndex===this.annotation.xb())?
null!==a.x&&null!==a.y&&(0===this.annotation.na.length?this.annotation.vb(a.x,a.y):this.pm||(this.annotation.xk(),this.annotation.vb(a.x,a.y)),this.pm=!0):this instanceof m.CalloutCreateTool?(this.Aq(),this.u.da.Od(this.annotation),this.annotation=null):this.mouseDoubleClick(b))},mouseLeftUp:function(b){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,b)},mouseMove:function(b){m.AnnotationSelectTool.prototype.mouseMove.call(this,b);if(this.annotation&&!this.isSelecting()&&b.data){var a=b.data.pageCoordinate;
if(null!==a&&null!==a.x&&null!==a.y&&a.pageIndex===this.annotation.xb()){this.pm||this.annotation.xk();var d=this.annotation.getPath();0===d.length?(this.annotation.vb(a.x,a.y),this.pm=!1):0<d.length&&(d[d.length-1].x!==a.x||d[d.length-1].y!==a.y)&&(this.annotation.vb(a.x,a.y),this.pm=!1);this.annotation.X=this.annotation.Ya.x;this.annotation.Y=this.annotation.Ya.y;this.u.da.Kb(this.annotation);this.wq(b)}}},mouseDoubleClick:function(){this.annotation&&(this.annotation.finish(),this.finish())},Ar:function(b){this.annotation&&
this.mouseDoubleClick(b)},contextMenu:function(b){b.preventDefault()},tap:function(b){this.annotation&&0<this.annotation.getPath().length||m.AnnotationSelectTool.prototype.tap.call(this,b)},Aq:function(){for(;0<this.annotation.getPath().length;)this.annotation.xk()},gC:function(b){this.lq=b}});m.Ug=function(b,d){m.GenericAnnotationCreateTool.call(this,b,a.Annotations.Wf);this.annotation=null;this.pm=!1;this.name=d||"PolygonCreateTool"};m.Ug.prototype={Aq:function(){for(;0<this.annotation.getPath().length;)this.annotation.xk()}};
m.Ug.prototype=$.extend(new m.Vg,m.Ug.prototype);m.Ip=function(b,d){m.GenericAnnotationCreateTool.call(this,b,a.Annotations.Wf);this.annotation=null;this.pm=!1;this.name=d||"PolygonCloudCreateTool"};m.Ip.prototype={mouseLeftDown:function(){m.Ug.prototype.mouseLeftDown.apply(this,arguments);this.annotation&&(this.annotation.Style="cloudy",this.annotation.Intent="PolygonCloud")}};m.Ip.prototype=$.extend(new m.Ug,m.Ip.prototype);var p={scale:"1 in = 1 in",axis:[{factor:.0138889,unit:"in",decimalSymbol:".",
thousandsSymbol:",",display:"D",precision:100,unitPrefix:"",unitSuffix:"",unitPosition:"S"}],distance:[{factor:1,unit:"in",decimalSymbol:".",thousandsSymbol:",",display:"D",precision:100,unitPrefix:"",unitSuffix:"",unitPosition:"S"}],area:[{factor:1,unit:"sq in",decimalSymbol:".",thousandsSymbol:",",display:"D",precision:100,unitPrefix:"",unitSuffix:"",unitPosition:"S"}]};m.Bs=function(a,d){m.Rg.call(this,a);c(this);this.name=d||"DistanceMeasurementCreateTool";this.IT="LineDimension";this.Measure=
b(p);this.Av=this.JG=!1};m.Bs.prototype=$.extend(new m.Rg,{iW:function(b){this.JG=b},mouseLeftDown:function(a){this.Av?(this.finish(),this.Av=!1):(m.Rg.prototype.mouseLeftDown.call(this,a),this.annotation&&(this.annotation.caption="yes",this.annotation["caption-style"]="Top",this.annotation.IT=this.IT,this.annotation.Measure=b(this.Measure),this.annotation.ej("OpenArrow"),this.annotation.Vo("OpenArrow")))},mouseMove:function(b){m.AnnotationSelectTool.prototype.mouseMove.call(this,b);if(!this.isSelecting()&&
this.annotation)if(this.Av){var a=this.annotation.End;b=this.Rd(this.Cf(b));null!==b&&b.pageIndex===this.annotation.PageNumber-1&&(this.annotation.leaderLength=Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2))*Math.sin(this.annotation.Nl()-Math.atan2(b.y-a.y,b.x-a.x)),this.annotation.adjustRect(),this.u.da.Kb(this.annotation))}else m.Rg.prototype.mouseMove.call(this,b)},mouseLeftUp:function(b){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,b);this.annotation&&(this.JG?this.JI(this.annotation)?
(this.u.Ba().Od(this.annotation),this.annotation=null):this.Av=!0:this.finish())}});m.Kx=function(a,d){m.Vg.call(this,a);c(this);this.name=d||"PerimeterMeasurementCreateTool";this.IT="PolyLineDimension";this.Measure=b(p)};m.Kx.prototype=$.extend(new m.Vg,{mouseLeftDown:function(a){m.Vg.prototype.mouseLeftDown.call(this,a);this.annotation&&(this.annotation.Measure=b(this.Measure),this.annotation.IT=this.IT)}});m.qx=function(a,d){m.Ug.call(this,a);c(this);this.name=d||"AreaMeasurementCreateTool";this.IT=
"PolygonDimension";this.Measure=b(p)};m.qx.prototype=$.extend(new m.Ug,{mouseLeftDown:function(a){m.Ug.prototype.mouseLeftDown.call(this,a);this.annotation&&(this.annotation.Measure=b(this.Measure),this.annotation.IT=this.IT)}});m.CalloutCreateTool=function(b,d){m.GenericAnnotationCreateTool.call(this,b,a.Annotations.Ga,Annotations.Ga.Ic.FreeTextCallout);this.defaults.TextColor=new Annotations.Color(255,0,0);this.defaults.FontSize="9pt";this.defaults.Width=150;this.defaults.Height=30;this.name=d||
"CalloutCreateTool"};m.CalloutCreateTool.prototype=$.extend(new m.Vg,{lineCount:2,lr:function(){return!!this.u.Ba().cA().fo},mouseLeftDown:function(b){if(this.lr())this.annotation=null;else if(m.Vg.prototype.mouseLeftDown.call(this,b),null!==this.annotation&&(this.annotation.CalloutLineCount=this.lineCount,this.annotation.getPath().length>=this.annotation.CalloutLineCount+1)){this.annotation.getPath().length>this.annotation.CalloutLineCount+1&&this.annotation.xk();var a=this.annotation.getPath()[this.annotation.CalloutLineCount],
d=90*this.u.gd(this.annotation.PageNumber),c=this.defaults.Width,g=this.defaults.Height/2,e=this.u.kd(this.annotation.xb()),f=this.u.jd(this.annotation.xb());a.x+c>e&&(a.x-=c);a.y+g>f?a.y-=g:0>a.y-g&&(a.y+=g);90===d||270===d?(this.annotation.vb(a.x-g,a.y),this.annotation.vb(a.x+g,a.y+c)):(this.annotation.vb(a.x,a.y-g),this.annotation.vb(a.x+c,a.y+g));this.annotation.Rotation=d;a=this.defaults.TextColor;this.annotation.TextColor=new Annotations.Color(a.R,a.G,a.B,a.A);this.annotation.FontSize=this.defaults.FontSize;
this.u.da.Kb(this.annotation);this.finish();b.preventDefault()}},mouseDoubleClick:function(b){this.annotation||m.Tool.prototype.mouseDoubleClick.call(this,b)},Ar:function(){null!==this.annotation&&(this.Aq(),this.u.da.Od(this.annotation),this.annotation=null)},contextMenu:function(b){b.preventDefault()}});m.Tm=function(b,d){m.GenericAnnotationCreateTool.call(this,b,a.Annotations.Ga);this.defaults.StrokeThickness=0;this.defaults.TextColor=new Annotations.Color(255,0,0);this.defaults.FontSize="9pt";
this.name=d||"FreeTextCreateTool"};m.Tm.pC=function(b){m.Tm.prototype.rn=b};m.Tm.prototype=$.extend(new m.GenericAnnotationCreateTool,{initialText:"Insert text here",rn:function(){return this.initialText},lr:function(){var b=this.u.Ba().cA().fo,a=b&&b.length?document.contains(b[0]):!1;return!!b&&a},mouseLeftDown:function(b){var a=0<this.u.Ba().Fe().length;m.GenericAnnotationCreateTool.prototype.mouseLeftDown.call(this,b);this.isSelecting()||(this.lr()||a?this.annotation=null:this.annotation&&(this.annotation.StrokeThickness=
this.defaults.StrokeThickness,this.annotation.FillColor=new Annotations.Color(200,220,250,.2),this.annotation.Xo(Annotations.Ga.Ic.FreeText),this.annotation.Gh(this.rn()),this.annotation.Rotation=90*this.u.gd(this.annotation.PageNumber),b=this.defaults.TextColor,this.annotation.TextColor=new Annotations.Color(b.R,b.G,b.B,b.A),this.annotation.FontSize=this.defaults.FontSize))},mouseMove:function(b){m.AnnotationSelectTool.prototype.mouseMove.call(this,b);if(!this.isSelecting()&&!this.lr()&&this.annotation&&
"undefined"!==typeof this.pageCoordinates){var a=this.pageCoordinates[0],d=this.pageCoordinates[1];null!==d&&null!==a&&a.pageIndex===d.pageIndex&&(a=new Annotations.Rect(a.x,a.y,d.x,d.y),a.normalize(),this.annotation.Ag(a),this.annotation.Bm(new Annotations.Rect(0,0,0,0)),this.u.da.Kb(this.annotation),this.wq(b))}},mouseLeftUp:function(b){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,b);if(!this.isSelecting()){if(this.Qb&&this.annotation){b=this.annotation.Ca();var a=this.annotation.xa(),
d=2*(this.annotation.getRectPadding()+1);if(b<=d||a<=d){this.annotation=null;return}}if(this.lr())this.annotation=null;else if(this.annotation){b=this.annotation.Ca();a=this.annotation.xa();d=2*(this.annotation.getRectPadding()+1);if(b<=d||a<=d)this.annotation.tC(1),this.annotation.Wo(1),this.annotation.Rotation=90*this.u.gd(this.annotation.PageNumber),this.annotation.eW(!0);b=this.defaults.FillColor;this.annotation.FillColor=new Annotations.Color(b.R,b.G,b.B,b.A);b=this.annotation.getRectPadding();
this.annotation.Bm(new Annotations.Rect(b,b,b,b));this.u.da.Kb(this.annotation);this.u.da.bh(this.annotation);this.trigger("annotationAdded",[this.annotation]);this.annotation=null}}}});m.Cs=function(b,d){m.GenericAnnotationCreateTool.call(this,b,a.Annotations.FreeHandAnnotation);this.name=d||"EraserTool";this.defaults={StrokeColor:new Annotations.Color(205,205,205),StrokeThickness:20,Opacity:.25};this.yv=!1;this.$w=[];this.overrideSelection=!0};m.Cs.prototype=$.extend(new m.GenericAnnotationCreateTool,
{mouseLeftDown:function(b){this.yv=!0;this.annotation?(this.complete(),m.Cs.prototype.mouseLeftDown.call(this,b)):(m.GenericAnnotationCreateTool.prototype.mouseLeftDown.call(this,b),this.annotation.vb(this.pageCoordinates[1].x,this.pageCoordinates[1].y));k(this.u,"crosshair")},complete:function(){var b=this;if(this.annotation&&0<this.annotation.Ee().length){var a=this.$w.map(function(a){return b.docViewer.Ba().Bf(a)}),d=this.defaults.StrokeThickness/2;this.annotation.Ee().forEach(function(c){for(var g=
1,e=c.length;g<e;g++)for(var f=c[g-1],k=c[g],h=0;h<a.length;h++){var n=a[h];b.iE(n.Ee(),f,k,d);n.Ee()&&0===n.Ee().length&&b.docViewer.da.Od(n)}});this.u.da.Od(this.annotation)}this.yv=!1;this.$w=[];this.Pc=this.annotation=null},Ar:function(){this.complete()},switchIn:function(){m.Tool.ENABLE_ANNOTATION_HOVER_CURSORS=!1;m.Tool.ENABLE_AUTO_SWITCH=!1;k(this.u,"crosshair")},switchOut:function(b){m.Tool.ENABLE_ANNOTATION_HOVER_CURSORS=!0;m.Tool.ENABLE_AUTO_SWITCH=!0;this.complete();m.GenericAnnotationCreateTool.prototype.switchOut.call(this,
b)},mouseLeftUp:function(){this.yv=!1;this.annotation&&(this.annotation.vb(this.pageCoordinates[1].x,this.pageCoordinates[1].y),this.complete())},mouseMove:function(b){if(this.yv&&this.annotation&&1<this.annotation.getPath().length)for(var d=this._getList(this.annotation.rb()),c=this.annotation.getPath().concat(),g=c[c.length-2],c=c[c.length-1],e=this.defaults.StrokeThickness/3,f=0,k=d.length;f<k;f++){var h=d[f];if(this.u.Ba().Rc(h)){var n=[];if(h instanceof Annotations.qj||h instanceof Annotations.Wf)n.push(h.getPath());
else if(h instanceof Annotations.Ed)n.push([h.XH(),h.uH()]);else if(h instanceof Annotations.FreeHandAnnotation)n=h.Ee().map(function(b){return b.slice()});else{var l=h.Ec();n.push([new Annotations.Point(l.x1,l.y2),new Annotations.Point(l.x1,l.y1),new Annotations.Point(l.x2,l.y1),new Annotations.Point(l.x2,l.y2),new Annotations.Point(l.x1,l.y2)])}l=!1;l=h.FillColor&&1===h.FillColor.A?a.utils.isPointInQuad(c,n[0]):this.iE(n.concat(),g,c,e);!l||h instanceof Annotations.FreeHandAnnotation?l&&-1===this.$w.indexOf(h.Id)&&
this.$w.push(h.Id):this.u.Ba().Od(h)}}m.AnnotationSelectTool.prototype.mouseMove.call(this,b);this.annotation&&null!==this.pageCoordinates&&null!==this.pageCoordinates[1]&&this.pageCoordinates[0].pageIndex===this.pageCoordinates[1].pageIndex&&(this.annotation.vb(this.pageCoordinates[1].x,this.pageCoordinates[1].y),this.u.da.Kb(this.annotation))},_getList:function(b){this.Pc||(this.Pc=this.u.Ba().Bc().filter(function(a){return a.rb()===b}));return this.Pc},iE:function(b,d,c,g){var e=!1;if(!b||!Array.isArray(b))return e;
for(var f=b.length-1;0<=f;--f){var k=a.utils.getQuadFromPoints(d,c,g),h=b[f];if(!h||!Array.isArray(h))break;if(!h.length)break;if(1===h.length&&a.utils.isPointInQuad({x:h[0].x,y:h[0].y},k))b.splice(f,1),e=!0;else for(var n=h.length-1;0<n;--n){var m=h[n-1],l=h[n],p=a.utils.isPointInQuad(m,k),q=a.utils.isPointInQuad(l,k);!p&&q?(e=a.utils.returnPointThatIntersectsQuad(k,l,m),h.pop(),h.push(e[0]),e=!0):p&&q?(h.pop(),e=!0):p&&!q?(m=a.utils.returnPointThatIntersectsQuad(k,m,l),n===h.length-1?h.pop():(e=
a.utils.splitInkListBetween(b,n-1,f),e.unshift(m[0]),b.push(e),1===h.length&&b.splice(f,1),e=!0)):p||q||(m=a.utils.returnPointThatIntersectsQuad(k,m,l))&&2===m.length&&(e=a.utils.splitInkListBetween(b,n-1,f),h.push(m[0]),e.unshift(m[1]),b.push(e),e=!0)}}return e}});m.jf=function(b,a){m.Tool.call(this,b);this.name=a||"MarqueeZoomTool";this.Fj=!0};m.jf.kX=function(b){m.jf.prototype.qE=b};m.jf.AW=function(b){m.jf.prototype.Lt=b};m.jf.BW=function(b){m.jf.prototype.Nt=b};m.jf.prototype=$.extend(new m.Tool,
{Nt:Number.MIN_VALUE,Lt:Number.MAX_VALUE,switchIn:function(){m.Tool.ENABLE_ANNOTATION_HOVER_CURSORS=!1;m.Tool.ENABLE_AUTO_SWITCH=!1;k(this.u,"zoom-in");this.u.Cm("auto")},switchOut:function(){m.Tool.prototype.switchOut.call(this);m.Tool.ENABLE_ANNOTATION_HOVER_CURSORS=!0;m.Tool.ENABLE_AUTO_SWITCH=!0;this.u.Cm("none")},keyDown:function(b){if(b.metaKey||b.ctrlKey)this.Fj=!1,k(this.u,"zoom-out")},RI:function(){this.Fj=!0;k(this.u,"zoom-in")},mouseLeftDown:function(b){m.Tool.prototype.mouseLeftDown.call(this,
b);b=this.u.Ze();!this.pageCoordinates[0]||!this.Fj&&b<=this.Nt||this.Fj&&b>=this.Lt||(this.bB=!0,this.Fj?k(this.u,"zoom-in"):k(this.u,"zoom-out"))},mouseMove:function(b){m.Tool.prototype.mouseMove.call(this,b);b=this.pageCoordinates;this.bB&&this.Fj&&b[0].pageIndex===b[1].pageIndex&&(this.NQ=this.pageCoordinates[1],e([this.Vd,this.Ib],b,this.u))},mouseLeftUp:function(b){m.Tool.prototype.mouseLeftUp.call(this,b);if(this.bB){this.bB=!1;var a=Math.abs(this.Ib.x-this.Vd.x),d=Math.abs(this.Ib.y-this.Vd.y);
b=this.u.Ze();15>a&&15>d?(a=this.qE(b),this.Fj||(a-=2*(a-b)),a=Math.max(this.Nt,Math.min(this.Lt,a)),this.u.SL(a,0,0)):this.Fj&&(a=b*this.ZN(a,d),a=Math.max(this.Nt,Math.min(this.Lt,a)),this.u.ox(a),b=this.XN([this.pageCoordinates[0],this.NQ]),a=this.u.yb().offset(),this.u.scrollTo(b.x-a.left,b.y-a.top));f()}},qE:function(b){var a={"0.075":[Number.MIN_VALUE,.8],"0.25":[.8,1.5],1:[1.5,3.5],2:[3.5,8],4:[8,32],8:[32,64],16:[64,Number.MAX_VALUE]},d=Object.keys(a),c,g,e;for(g=0;g<d.length;g++)if(e=a[d[g]],
b>=e[0]&&b<=e[1]){c=d[g];break}return b+parseFloat(c)},ZN:function(b,a){var d=this.u.yb(),c=d.width(),d=d.height();return Math.min(c/b,d/a)},XN:function(b){var a=b[1].pageIndex,d=this.u.gd(a+1),c;0===d?c={x:Math.min(b[0].x,b[1].x),y:Math.min(b[0].y,b[1].y)}:1===d?c={x:Math.min(b[0].x,b[1].x),y:Math.max(b[0].y,b[1].y)}:2===d?c={x:Math.max(b[0].x,b[1].x),y:Math.max(b[0].y,b[1].y)}:3===d&&(c={x:Math.max(b[0].x,b[1].x),y:Math.min(b[0].y,b[1].y)});return this.u.Sl().ec().cf(c,a)}})})(window);
(function(a){function f(b,a){this.Oc=b;this.u=a;this.onAnnotationHover=function(a,c){var g=b.Oq(c),e=b.Bc().filter(function(b){return b.IsHovering});e.forEach(function(b){b.IsHovering=!1});g&&g.Listable&&g.IsHoverable&&(g.IsHovering=!0,e.push(g));b.ki(e)};this.u.on("mouseMove.hover",this.onAnnotationHover)}function e(b){var a=this;this.Oc=b;this.fo=null;this.onEditBoxAnnotationChanged=function(b,d,c){for(var e=0;e<d.length;++e){var f=d[e];"add"===c&&a.iI(f)&&a.Oc.Uy(f)?(a.vI(f),b.imported||(a.WG(f),
f.Ab.select(),f.Ab[0].setSelectionRange(0,99999))):"delete"===c&&f.Ab&&(f.Ab.remove(),delete f.Ab)}};this.onEditBoxAnnotationDoubleClicked=function(b,d){a.Oc.Uy(d)&&a.iI(d)&&(d.Ab||a.vI(d),a.fo&&d.Ab.val()!==d.kh()&&a.Oc.lC(d,d.Ab.val()),a.WG(d))};this.Oc.on("annotationChanged.editbox",this.onEditBoxAnnotationChanged);this.Oc.on("annotationDoubleClicked.editbox",this.onEditBoxAnnotationDoubleClicked)}function c(b){this.Oc=b;this.wm=[]}var b=window.o;b.ga=function(b){if(!b)throw Error("AnnotationManager requires DocumentViewer to initialize");
var g=this;g.wu="";g.WA=!1;g.readOnly=!1;g.n_=!1;g.fF=!0;g.u=b;g.Zg=new c(g);g.FZ=new f(g,b);g.gE=new e(g);g.wl=new a.o.xN(g);g.init();g.jh=new a.Annotations.O.Ng(this);g.uF=function(b){return b.Author};g.IB={get:function(b,a){return this[b]&&this[b][a]},set:function(b,a,d){this[b]=this[b]||{};this[b][a]=d},"delete":function(b,a){delete this[b][a]}};g.Gu={get:function(b,a){return this[b]&&this[b][a]},set:function(b,a,d){this[b]=this[b]||{};this[b][a]=d},"delete":function(b,a){delete this[b][a]}};
b.on("contentRemoved.annotManager",function(){g.Pc.forEach(function(b){b.trigger("contentRemoved")})});b.on("documentLoaded",function(){g.rQ()});g.f_={};g.Pj={line:[Annotations.Ed],circle:[Annotations.Ok],square:[Annotations.sj],freetext:[Annotations.Ga],stamp:[Annotations.Yk],text:[Annotations.Zk],ink:[Annotations.FreeHandAnnotation],polyline:[Annotations.qj],polygon:[Annotations.Wf],strikeout:[Annotations.dn],highlight:[Annotations.Qh],redact:[Annotations.Gd],underline:[Annotations.en],squiggly:[Annotations.cn],
caret:[Annotations.sp],widget:[Annotations.bl,Annotations.Lg,Annotations.nj,Annotations.rj,Annotations.Lh,Annotations.Uk,Annotations.Xf],link:[Annotations.vd],custom:[Annotations.vp]};g.controlPointSize=8;g.controlPointHitBoxScale=1;g.on("annotationSelected",function(b,a,d){var c=this;if(a)if("selected"===d){var e=[];a.forEach(function(b){e=e.concat(g.jA(b))});e=e.filter(function(b){return!c.Gi(b)});c.Iw(e)}else if("deselected"===d){var f=[];a.forEach(function(b){f=f.concat(g.jA(b))});f=f.forEach(function(b){c.Gi(b)&&
c.Fl(b)})}});g.on("annotationChanged",function(b,a,d){"add"===d&&a.forEach(function(b){if(b.Listable&&!b.ToolName)switch(b.elementName){case "line":b.ToolName=b.Measure&&"LineDimension"===b.IT?"AnnotationCreateDistanceMeasurement":"None"===b.nh()&&"None"===b.Ye()?"AnnotationCreateLine":"AnnotationCreateArrow";break;case "circle":b.ToolName="AnnotationCreateEllipse";break;case "square":b.ToolName="AnnotationCreateRectangle";break;case "freetext":b.ToolName=b.oh()===Annotations.Ga.Intent.FreeTextCallout?
"AnnotationCreateFreeText":"AnnotationCreateCallout";break;case "stamp":b.ToolName="AnnotationCreateStamp";break;case "ink":b.cZ===Annotations.ja.Ac("signature")?b.ToolName="AnnotationCreateSignature":b.ToolName="AnnotationCreateFreeHand";break;case "polyline":b.ToolName=b.Measure&&"PolyLineDimension"===b.IT?"AnnotationCreatePerimeterMeasurement":"AnnotationCreatePolyline";break;case "polygon":b.ToolName="cloudy"===b.oN&&"PolygonCloud"===b.Ic?"AnnotationCreatePolygonCloud":b.Measure&&"PolygonDimension"===
b.IT?"AnnotationCreateAreaMeasurement":"AnnotationCreatePolygon";break;case "strikeout":b.ToolName="AnnotationCreateTextStrikeout";break;case "highlight":b.ToolName="AnnotationCreateTextHighlight";break;case "underline":b.ToolName="AnnotationCreateTextUnderline";break;case "squiggly":b.ToolName="AnnotationCreateTextSquiggly";break;case "text":b.ToolName="AnnotationCreateSticky";break;case "redact":b.ToolName="AnnotationCreateRedaction"}})});g.on("annotationChanged",function(b,a,d,c){if(!c&&!b.F_&&
Annotations.ja.extraSelectorsEnabled&&a&&0!==a.length&&!(1<a.length)){var e=a[0],f=g.u.getDocument(),p=e.xb();if(-1!==p&&g.u.Bo&&0!==g.u.Vi.length&&e.Ak())if(g.u.Vi[g.u.Vi.length-1][0]!==p)g.u.Bo=null,g.u.Vi=[];else{var u=g.u.Vi.pop(),r=function(){if(e&&u&&g.u.Bo){var b=g.u.getDocument();b===f&&g.Bf(e.PY)&&(b=new XODText.uj(b),g.u.Bo.apply(b,u),e.TextIndices=b.Jt,e.SurroundingTexts=b.Kt,e.kb(!0),g.trigger("annotationChanged",[[e],"modify",!0]))}};f.bc().then(function(){var b=g.u.getDocument();if(b===
f){var a=Annotations.ja.qG(p,b.wb());b.wr(a).then(r)}})}}})};b.ga.prototype={init:function(){this.Pc=[];this.pz=[];this.mq=[];this.yu={};this.Zg.Pd();this.wk=null},US:function(b,a){function c(b){b.kA().forEach(function(b){e(b)})}function e(a){b.jq(a);var c=a.InReplyTo;a.InReplyTo=b.Id;a.ReplyType="group";c&&a.InReplyTo!==c&&f.Bf(c).oz(a)}var f=this;a.forEach(function(a){a!==b&&(a.InReplyTo?e(a):(e(a),c(a)))});this.trigger("annotationChanged",[a,"modify"])},RX:function(b){var a=this;b.forEach(function(b){if("group"===
b.ReplyType){var d=a.Bf(b.InReplyTo);d&&d.oz(b);b.InReplyTo=null;b.ReplyType=null}});this.trigger("annotationChanged",[b,"modify"])},YR:function(b){var a=0,c=[];b.forEach(function(b){b=b.InReplyTo||b.Id;0>c.indexOf(b)&&(c.push(b),a++)});return a},jA:function(b){var a=[];if(b.EI()){if(b=this.Bf(b.InReplyTo))return a.push(b),a.concat(b.kA())}else a=b.kA(),a.push(b);return a},rQ:function(){this.Vn=!1},Ql:function(){return this.wu},iC:function(b){this.wu=b;this.trigger("updateAnnotationPermission")},
NR:function(){return this.WA},sW:function(b){this.WA=b;this.trigger("updateAnnotationPermission")},PH:function(){return this.readOnly},UW:function(b){this.readOnly=b;this.trigger("updateAnnotationPermission")},iY:function(){return this.fF},kQ:function(){this.fF=!1;this.gE.disable()},SW:function(b){this.hG=b},GF:function(b){return(this.hG?this.hG(b.Author,b):this.WA||b.Author===this.wu||null===b.Author||"undefined"===typeof b.Author)&&!this.readOnly&&!b.ReadOnly},Rc:function(b){return this.GF(b)&&
!b.Locked},Uy:function(b){return this.GF(b)&&!b.LockedContents},cX:function(b){this.lL=b},fe:function(){return this.jh},QB:function(b){b=b.map(Number);var a=[];this.Pc=this.Pc.filter(function(c){return-1!==b.indexOf(c.PageNumber)&&c.VA?(a.push(c),c.bx(),!1):!0});if(0<a.length){var c=this;setTimeout(function(){c.trigger("annotationChanged",[a,"delete"])},0)}},tV:function(b){var a=this;b.on("layoutChanged",function(b,d){a.QB(d.removed);a.Pc.forEach(function(b){var a=d.moved[b.PageNumber];a&&(b.PageNumber=
a)})});b.on("pageContentChanged",function(b,d){0<d.length&&a.QB(d)});b.on("pageDiff",function(b,d){var c={};a.Pc.forEach(function(b){var a=b.rb();a in c?c[a].push(b):c[a]=[b]});d.forEach(function(b){var a=b.before;b=b.after;var d=c[b.pageNum];if(d){var g=new XODText.Matrix2D;g.initMatrix(b.matrix);g.concat(a.bb.inverse());d.forEach(function(b){var a=b.IsModified,d=b.Ec(),c=d.x1,e=d.y1,f=d.x2,k=d.y2;b.Kh(g);a||d.x1!==c||d.x2!==f||d.y1!==e||d.y2!==k||(b.IsModified=a)})}})})},ZK:function(b){return(!(b instanceof
Annotations.HTMLAnnotation)||b instanceof Annotations.rj)&&b.kg()},Qd:function(b,c,e,f){var l=b;_.isObject(b)||(l={pageNumber:b,overrideCanvas:c,majorRedraw:e,overrideContainer:f});b=l.pageNumber;c=l.namespace||"default";l.namespace=c;f=a.o.za.fk(b-1);l.Nn=f;if(!this.Gu.get(f,c))return this.oU(l);this.IB.set(f,c,{Kf:b,rU:e});return this.Gu.get(f,c)},oU:function(b){var c=b.pageNumber,e=b.overrideCanvas,f=b.overrideContainer,l=b.majorRedraw,n=b.namespace,m=b.Nn,q=c-1;if(isNaN(q))throw Error("Invalid page index given");
var p=this.u.sb(q);b=this.Ol(c);var u=!!e,r=e;!u&&this.u.dk(q)&&(r=this.u.Sn(q))&&this.u.$o(q,$(r));if(!r)return Promise.resolve();var v=r.getContext("2d"),w=this.u.gd(q+1),z=90*w,C=this.u.Dc(c-1);u||(z=this.u.Tl(q+1),this.uP(r,q,z));for(var A=f||a.o.za.KA(q),x=Promise.resolve(),y=0;y<this.Pc.length;y++){var F=this.Pc[y];F.xb()===q&&(x=x.then(this.xG.bind(this,F,v,C,z,w,b,u,e,l,A)))}this.wk&&this.wk.PageNumber===c&&(this.Bi(this.wk)?this.wk=null:x=x.then(this.xG.bind(this,this.wk,v,C,z,w,b,u,e,l,
A)));var L=this,c=x.then(function(){u||L.u.oI(q,r);L.Gu["delete"](m,n);var b=(L.u.je()-w)%4;L.u.getDocument().$n(r,q,!0,b);u||p!==L.u.sb(q)||L.u.uw(q,r);if(b=L.IB.get(m,n))return L.IB["delete"](m,n),L.Qd({pageNumber:b.Kf,overrideCanvas:e,overrideContainer:f,majorRedraw:b.rU,namespace:n})});this.Gu.set(m,n,c);return c},uP:function(b,c,e){var f=this.u.no(c);c=f.width;f=f.height;if(90===e||270===e)e=c,c=f,f=e;a.o.za.zq(b,c,f)},sQ:function(b,a,c,e,f,n,m,q,p,u){var r=this;return new Promise(function(f){if(r.u.Iq||
b.FI())if(q?b.Printable&&b.dm():b.dm()){if(p){var n=q?1:r.u.sb(b.PageNumber-1);r.Bi(b)&&b.render(u,r,n,q)}r.tQ(m,b,a,c,e).then(function(){f()})}else q||b.bx(),f();else f()})},tQ:function(b,a,c,e,f){return!this.ZK(a)||a.IsHovering?(a.draw(c,e,f),Promise.resolve()):b.UO[b.Qj.indexOf(a)].then(function(b){c.save();return b.draw(c,a.kg().offset).then(function(){c.restore()})})["catch"](function(){a.draw(c,e,f)})},xG:function(b,a,c,e,f,n,m,q,p,u){a.save();var r=this.u.sb(b.xb());this.nX(b,a,m);a.save();
var v=this;return b.Ew().then(function(){return v.sQ(b,a,c,e,f,r,n,m,p,u)}).then(function(){a.restore();m||v.Cz(b,a,c);a.restore()})},nX:function(b,a,c){var e=this.u.sb(b.xb());!0===b.NoZoom&&(a.translate(b.zi(),b.Ai()),c||(a.scale(1/e,1/e),b=this.u.gd(b.PageNumber),a.rotate(-1*b*Math.PI/2)))},Cz:function(b,a,c){if("undefined"!==typeof b.selectionModel){if(this.Gi(b)&&b.dm()){var e=new b.selectionModel(b,this.Rc(b)),f=this.u.sb(b.xb());!0===b.NoZoom&&(a.translate(-b.zi(),-b.Ai()),f=1);e.draw(a,b,
f,c)}}else(b=this.Zg.A_(b))&&b.draw(a)},Ol:function(b){var a=this,c=this.Bc().filter(function(c){return c.PageNumber===b&&a.ZK(c)}),e=c.map(function(b){return b.kg()});return{UO:this.u.getDocument().Ol(e,b),Qj:c}},Kb:function(b){this.Bi(b)||(this.wk=b);return this.Qd(b.PageNumber)},VW:function(a){this.Kb=_.throttle(b.ga.prototype.Kb.bind(this),a)},aU:function(b){this.u.OI(b.rb()-1,[{x4:b.bv(),y4:b.ov(),x2:b.SH(),y2:b.hH()}])},hT:function(b){this.nI([b])},nI:function(b){0!==b.length&&(b.forEach(function(b){b.Hidden=
!0}),this.Pd(),this.ki(b),this.trigger("annotationHidden",[b,!0]))},qX:function(b){this.dL([b])},dL:function(b){b.forEach(function(b){b.Hidden=!1});this.ki(b);this.trigger("annotationHidden",[b,!1])},Bi:function(b){return-1<this.Pc.indexOf(b)},lC:function(b,a){b.Gh(a);this.trigger("annotationChanged",[[b],"modify"])},bh:function(b,a){this.dh([b],a)},dh:function(b,a){if(b){for(var c=0;c<b.length;++c){var e=b[c];0>=e.PageNumber&&console.warn("Invalid annotation PageNumber: "+e.PageNumber);this.Pc.push(e);
this.XK(e)}this.vC(b);0<b.length&&(c=$.Event("annotationChanged"),c.imported=a,this.trigger(c,[b,"add"]))}},UX:function(b){this.XK(b);if(b.Ii()){var a=this.Vl(b);this.trigger("setNoteText",[b,a])}else this.trigger("setNoteText",b)},XK:function(b){function a(){return(65536*(1+Math.random())|0).toString(16).substring(1)}b.Id||(b.Id=a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a());b.zg&&b.zg(this.u);b.kk()&&b.Lb(b.Hb().value)},AO:function(b){var a=this;this.Bc().forEach(function(c){c.InReplyTo&&c.InReplyTo===
b.Id&&(b.jq(c),a.trigger("addReply",[c,b,a.Vl(b)]))})},vC:function(b){function a(b,d){return d.DateCreated-b.DateCreated}var c=[],e;for(e=0;e<b.length;++e){var f=b[e];if(f instanceof Annotations.Annotation)if(f.Ii()){var n=this.Bf(f.InReplyTo);n&&(n.jq(f),this.trigger("addReply",[f,n,this.Vl(n)]))}else c.push(f),this.AO(f)}for(e=0;e<c.length;++e)if(b=c[e],0!==b.hv().length)for(f=[],f.push({Oj:b,sz:null});0<f.length;){var m=f.pop(),n=m.Oj;null!==m.sz&&this.trigger("addReply",[n,m.sz,b]);for(var m=
n.hv().sort(a),q=0;q<m.length;++q)f.push({Oj:m[q],sz:n})}},lX:function(b){if(b.Ii()){var a=this.Bf(b.InReplyTo);a&&(a.jq(b),this.trigger("addReply",[b,a,this.Vl(b)]))}},Vl:function(b){for(;null!==b&&b.Ii();)b=this.Bf(b.InReplyTo);return b},MP:function(b,a){var c=new Annotations.Zk;c.InReplyTo=b.Id;c.X=b.X;c.Y=b.Y;c.PageNumber=b.PageNumber;c.Author=this.Ql();c.Gh(a||"");b.jq(c);this.bh(c);this.trigger("addReply",[c,b,this.Vl(b)]);return c},yL:function(b){this.Bi(b)&&this.Qd(b.rb())},Py:function(b){return Annotations.Wg.Py(b,
this.u)},XA:function(){var a=this.u.getDocument(),a=a&&a.HA();return this.RJ&&(b.Hi()&&"pdf"===a||"blackbox"===a)},FT:function(){return this.RJ},JQ:function(b){this.RJ=b},DT:function(b){var a=this.u.getDocument();return b&&b instanceof Annotations.Gd&&!(a&&"blackbox"===a.HA()&&a.tg())&&this.XA()},Od:function(b,a,c){this.zu([b],a,c)},zu:function(b,a,c){var e=this,f={};if(!a&&this.PH())this.u.trigger("notify","readOnlyDelete");else{var n=[],m=!1;b=b.slice();for(var q=0;q<b.length;q++){var p=b[q];p===
this.wk&&(this.wk=null);p.bx();if(this.Bi(p))if(c||a||this.Rc(p)){this.Zg.Fl(p);this.trigger("annotationSelected",[[p],"deselected"]);var u=this.Pc.splice(this.Pc.indexOf(p),1);n.push(u[0]);p.IsAdded||a||this.pz.push(u[0]);p.Ii()&&(p.jI&&(u=this.Vl(p),this.trigger("deleteReply",[p,u])),this.Bf(p.InReplyTo).oz(p));p.hv().forEach(function(b){e.trigger("setNoteText",[b]);b.InReplyTo=null;e.vC([b])});f[p.rb()]=!0}else m=!0;else f[p.rb()]=!0}0<n.length&&(c=$.Event("annotationChanged"),c.imported=a,this.trigger(c,
[n,"delete"]));m&&this.u.trigger("notify","permissionDelete");$.each(f,function(b){e.Qd(parseInt(b,10))})}},XX:function(){if(!this.readOnly){this.mq=[];for(var b=this.Fe(),a=0;a<b.length;a++)if(!(b[a]instanceof Annotations.Cb)){var c=this.Tz(b[a]);this.mq.push(c)}this.ct=0}},$U:function(){if(!this.readOnly&&"undefined"!==typeof this.ct){this.ct++;for(var b=[],a=0;a<this.mq.length;a++){var c=this.Tz(this.mq[a]);b.push(c);var e=this.u.Pl(),f=this.u.v.kd(e-1),n=this.u.v.jd(e-1),f=new Annotations.Rect(0,
0,f,n),n=c.Ec();c.rb()===e?n.translate(5*this.ct,5*this.ct):c.IK(e);n.Pu(f);c.resize(n)}this.dh(b);this.mq=b;this.Pd();this.Iw(b)}},Tz:function(b){function a(){return(65536*(1+Math.random())|0).toString(16).substring(1)}var c=this.uS(b);if(null===c)return null;var e=b.xb(),e=this.u.Dc(e),f=e.inverse(),n=document.createElementNS("",b.elementName),n=b.serialize(n,f);b=new c;b.deserialize(n,e,this);b.Id=a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a();b.Author=this.wu;b.DateCreated=new Date;b.DateModified=
new Date;b.IsAdded=!0;b.IsModified=!1;return b},hR:function(b){return b.MY()},Gi:function(b){return this.Zg.vF(b)},vm:function(b){b.Listable&&this.Bi(b)&&(this.Zg.vm(b),this.Qd(b.rb()),this.trigger("annotationSelected",[[b],"selected"]))},Iw:function(b){var a=[],c={};if(b&&$.isArray(b)){for(var e=0;e<b.length;e++){var f=b[e];f.Listable&&this.Bi(f)&&(this.Zg.vm(f),c[f.rb()]=f.rb(),a.push(f))}var n=this;$.each(c,function(b){n.Qd(parseInt(b,10))})}0<a.length&&this.trigger("annotationSelected",[a,"selected"])},
Pd:function(){if(0!==this.Fe().length){this.Zg.Pd();for(var b=this.u.ea.Td(),a=0;a<b.length;a++)this.Qd(b[a]+1);this.trigger("annotationSelected",[null,"deselected"])}},Fl:function(b){this.Zg.Fl(b);this.Qd(b.rb());this.trigger("annotationSelected",[[b],"deselected"])},Fe:function(){return this.Zg.Fe()},Bc:function(){return this.Pc},Bf:function(b,a){a=a||this.Pc;if(_.isUndefined(b)||_.isNull(b))return null;for(var c=0;c<a.length;c++)if(a[c].Id===b)return a[c];return null},cH:function(b,a,c){c=c||this.Pc;
if(_.isUndefined(b)||_.isNull(b))return[];for(var e=[],f=0;f<c.length;f++)c[f].Id===b&&e.push(c[f]);return _.isUndefined(a)?e:e.filter(function(b){return b.PageNumber-1===a})},Oq:function(b){b=this.eH(b);return 0<b.length?b[0]:null},eH:function(b){if(!this.u.Iq)return[];var a=new window.ba.Tool(this.u);b=a.Rd({x:a.Cf(b).x,y:a.Cf(b).y});a=[];if(null!==b)for(var c=this.Bc(),e=new Annotations.Rect(b.x,b.y,b.x,b.y),f=c.length-1;0<=f;f--){var n=c[f];if(n.selectionModel&&n.dm()&&n.rb()-1===b.pageIndex){var m=
Annotations.Bb.canvasVisibilityPadding,q=n.Ec();q.translate(-m,-m);q.x2+=2*m;q.y2+=2*m;if(window.utils.isRectIntersecting(q,e)||n.IsClickableOutsideRect){var m=this.u.sb(n.xb()),q=this.u.Dc(n.xb()),p=this.u.gd(n.PageNumber),u=this.Gi(n),r=new n.selectionModel(n,this.Rc(n),u);r.testSelection(n,b.x,b.y,q,m,p)?a.push(n):u&&r.cs(n,m,b.x,b.y)&&a.push(n)}}}return a},oH:function(b,a){return this.Zg.oH(b,a)},Nu:function(b){this.u.xF||console.warn("exportAnnotations was called before all annotations were loaded.");
return this.wl.lN(b)},Vu:function(){return this.wl.Vu()},RG:function(b){this.vC(b);var a=this.Bc().filter(function(b){return b instanceof Annotations.Xf}),c=this.Bc().filter(function(b){return b instanceof Annotations.FreeHandAnnotation});a.forEach(function(b){for(var a=0;a<c.length;a++)if(b.Ev(c[a],{Hy:!0})){b.freeHandAnnot=c[a];break}});this.u.QH().Ui("DocumentViewer.renderRequest",{type:"annotations",pages:_.uniq(b.map(function(b){return b.rb()-1}))})},nT:function(b,c){var e=a.Annotations.ca.fr(b),
e=this.wl.sM(e,c&&c.VA);this.RG(e);return e},sI:function(b,c,e){c=c||function(){};var f=this;b=a.Annotations.ca.fr(b);e=$.extend({Zl:function(){return f.Vn},batchSize:100,batchDelay:0},e);this.wl.tM(b,function(b){f.Vn?c([]):(b=b.Qj,f.RG(b),c(b))},e)},zo:function(b){b=a.Annotations.ca.fr(b);b=this.wl.zo(b);var c=[];b.fu&&(c=c.concat(b.fu),0<b.fu.length&&this.lX(b.fu[0]));b.nG&&(c=c.concat(b.nG));b.cJ&&(c=c.concat(b.cJ));return c},ki:function(b){b=_.uniq(b.map(function(b){return b.PageNumber}));for(var a=
[],c=0;c<b.length;c++)a.push(this.Qd(b[c],void 0,!0));return Promise.all(a)},ed:function(){this.Bc().forEach(function(b){b.off();b.Ab&&b.Ab.off();b.innerElement&&b.innerElement.off();b.element&&b.element.off()});this.init();this.Vn=!0;this.jh.ed();return Promise.resolve()},sV:function(b,a){if("string"!==typeof b||!a)return!1;"undefined"===typeof this.Pj[b]&&(this.Pj[b]=[]);this.Pj[b].push(a);return!0},fQ:function(b,a){if("string"!==typeof b||!a)return!1;this.Pj[b]=$.grep(this.Pj[b],function(b){return b!==
a});return!0},vS:function(){return this.Pj},uS:function(b){if(!b||!b.elementName)return null;var a=this.Pj[b.elementName];if(a&&0<a.length)for(var c=0;c<a.length;c++){var e=a[c];if(b instanceof e)return e}return null},hU:function(b){var a=this.yu[b];if(a){var c=a.length;b=this.u.Dc(b);for(var e=[],f=0;f<c;++f){var n=a[f].Oj,m=a[f].data;n.isImporting=!0;n.deserialize(m,b,this);n.isImporting=!1;n.IsAdded=!1;n.IsModified=!1;e.push(n)}this.dh(e,!0);this.ki(e)}},cA:function(){return this.gE},cW:function(b,
a){var c="StrokeColor TextColor FillColor FontSize Opacity StrokeThickness Precision Scale".split(" ").reduce(function(a,c){if(b[c]||0===b[c])a[c]=b[c];return a},{}),e=a(c);e&&(Object.keys(e).forEach(function(a){b[a]=e[a]}),this.yL(b),this.trigger("annotationChanged",[[b],"modify"]))},vK:function(b){this.uF=b},xR:function(b){return this.uF(b)}};$.extend(b.ga.prototype,a.utils.eventHandler);c.prototype={vm:function(b){this.vF(b)||this.wm.push(b)},Fl:function(b){this.wm=$.grep(this.wm,function(a){return a!==
b})},Pd:function(){this.wm=[]},vF:function(b){for(var a=0;a<this.wm.length;a++)if(b===this.wm[a])return!0;return!1},Fe:function(){return this.wm.slice()}};e.prototype={disable:function(){this.Oc.off("annotationChanged.editbox");this.Oc.off("annotationDoubleClicked.editbox")},iI:function(b){return b instanceof Annotations.Ga},vI:function(b){var a=this.Oc,c=this;b.Ab=$('<textarea class="freetext">');b.Ab.on("focus input",function(){b.BF&&c.cP(b)});b.Ab.on("blur DOMNodeRemovedFromDocument",function(){c.fo===
b.Ab&&(c.fo=null,b.oh()!==Annotations.Ga.Intent.FreeTextCallout&&c.GV(b,c.YQ),b.Ab.hide(),a.lC(b,b.Ab.val()),a.ki([b]),setTimeout(function(){a.vm(b)},0))});b.Ab.on("touchstart touchmove touchend mousedown mousemove mouseup",function(b){b.stopPropagation()})},cP:function(b){var c=b.xb(),e=this.Oc.u.kd(c),f=this.Oc.u.jd(c),l=this.Oc.u.sb(c),c=b.Ab[0];c.style.width=0;c.style.overflow="hidden";c.style.whiteSpace="nowrap";a.utils.isFirefox&&(c.style.whiteSpace="pre");var n=c.scrollWidth+2,m=this.WR(b,
l,e,f);n>=m&&(c.style.whiteSpace="normal",n=m);c.style.width=n+"px";c.style.height=0;if(a.utils.isFirefox||a.utils.ie)c.style.whiteSpace="pre-wrap";n=c.scrollHeight+1;b=this.VR(b,l,e,f);n>=b&&(c.style.overflow="auto",n=b);c.style.height=n+"px"},WR:function(b,a,c,e){switch(b.Rotation){case 90:b=this.Ih*a;break;case 180:b=this.Hh*a;break;case 270:b=(e-this.Ih)*a;break;default:b=(c-this.Hh)*a}return b},VR:function(b,a,c,e){switch(b.Rotation){case 90:b=(c-this.Hh)*a;break;case 180:b=this.Ih*a;break;case 270:b=
this.Hh*a;break;default:b=(e-this.Ih)*a}return b},GV:function(b,a){var c=b.getRectPadding(),e=b.xb(),f=b.zi(),n=b.Ai(),m=this.Oc.u.sb(e),q=a/m,p=2*b.StrokeThickness,e=parseFloat(b.Ab[0].style.width)/q/m+p,m=parseFloat(b.Ab[0].style.height)/q/m+p;switch(b.Rotation){case 90:q=e;e=m;m=q;n=this.Ih-m;break;case 180:f=this.Hh-e;n=this.Ih-m;break;case 270:q=e,e=m,m=q,f=this.Hh-e}b.VK(f);b.WK(n);b.tC(e);b.Wo(m);b.Bm(new Annotations.Rect(c,c,c,c));this.Oc.ki([b])},WG:function(b){var c=b.xb(),e=a.o.za.KA(c);
e.append(b.Ab);var f=this.Oc.u.sb(c);b.Ab.val(b.kh()||"");0<e.length&&(this.fo=b.Ab,this.YQ=f,b.Gh(""));var e=this.Oc.u.Dc(c),c=Annotations.ja.rq(e,parseFloat(b.FontSize)||12)*f*.75+b.iA(),e=b.io(e)*f,l=Math.ceil(1.598*parseFloat(c)),n=b.getPath().slice(-2),m=n[0].x*f,q=Math.min(n[0].y,n[1].y)*f,p=Math.abs(n[1].x-n[0].x)*f,n=Math.abs(n[1].y-n[0].y)*f,u=360-b.Rotation;if(90===u||270===u)var r=p,p=n,n=r;var r=0,v=-l/2+.66*parseFloat(c);switch((360-u)%360){case 90:r=-1.5*f;v+=p+1.7*f;break;case 180:r+=
p+.1*f;v+=n+2.7*f;break;case 270:r+=n+1.5*f,v=0}r="translate("+r+"px,"+v+"px) rotate("+u+"deg)";u=Math.abs(u%360/90);u===a.o.La.ni?(m+=e,q+=e):u===a.o.La.Ce?(m-=e,q+=e):u===a.o.La.ao?(m-=e,q-=e):u===a.o.La.zf&&(m+=e,q-=e);u=1>b.FillColor.A?new Annotations.Color(255,255,255,0):b.FillColor;b.Ab.css({top:q,left:m,width:p-2*e,height:n-2*e,font:c+" "+b.Font,color:b.TextColor.toString(),background:u.toString(),transform:r,"transform-origin":"top left","line-height":a.utils.ie?1:l+"px","padding-top":a.utils.ie?
Math.max(1,1+1.5*(f-1)):0});this.Oc.ki([b]);this.BX(b,f);this.rX(b);var w=this;setTimeout(function(){w.Oc.Fl(b)},0)},BX:function(b,a){this.Hh=b.zi();this.Ih=b.Ai();var c=parseFloat(b.Ab[0].style.width)/a,e=parseFloat(b.Ab[0].style.height)/a;switch(b.Rotation){case 90:this.Ih+=c;break;case 180:this.Hh+=c;this.Ih+=e;break;case 270:this.Hh+=e}},rX:function(b){b.Ab.show().focus()}}})(window);
(function(a){a.ce={bJ:function(a,e,c,b){return null===a||null===e||null===c||null===b?null:{x1:a,y1:e,x2:a+c,y2:e+b}},q0:function(a,e){if(!e||!a)return!1;var c,b;"undefined"!==typeof e.x1&&"undefined"!==typeof e.y1&&"undefined"!==typeof e.x2&&"undefined"!==typeof e.y2||console.warn("rect points are undefined");c=a.x>=e.x1&&a.x<=e.x2;b=a.y>=e.y1&&a.y<=e.y2;return c&&b},pV:function(a,e){return a&&e?a.x1<=e.x2&&a.x2>=e.x1&&a.y1<=e.y2&&a.y2>=e.y1?!0:!1:!1},k0:function(a,e,c,b,d){a=d.W(new XODText.Fd(a,
e));c=d.W(new XODText.Fd(c,b));return{x:Math.min(a.x,c.x),y:Math.min(a.y,c.y),w:Math.abs(a.x-c.x),Gf:Math.abs(a.y-c.y)}},Math:{dU:function(a,e,c,b){function d(b,a,d){return(d.y-b.y)*(a.x-b.x)>(a.y-b.y)*(d.x-b.x)}return d(a,c,b)!==d(e,c,b)&&d(a,e,c)!==d(a,e,b)},Nl:function(a,e){var c=Math.atan(Math.abs(a.y-e.y)/Math.abs(a.x-e.x));e.x<a.x&&e.y>a.y?c=Math.PI-c:e.x<=a.x&&e.y<a.y?(c=Math.PI-c,c*=-1):e.x>=a.x&&e.y<a.y&&(c*=-1);0===c&&a.x>e.x&&(c=Math.PI);return c},MV:function(a,e,c){c=c||{x:0,y:0};var b=
a.x-c.x;a=a.y-c.y;return{x:Math.cos(e)*b-Math.sin(e)*a+c.x,y:Math.sin(e)*b+Math.cos(e)*a+c.y}},MF:function(a,e,c){c=void 0!==c?c:Infinity;e=void 0!==e?e:-Infinity;return Math.max(Math.min(a,c),e)},fR:function(a,e){return Math.atan2(e,a)},oS:function(a){if(!(3>a.length)){for(var e=a[0],c=0,b=1;b<a.length;b++)var d=a[b],c=c+(d.x-e.x)*(d.y+e.y),e=d;return 0<=c?1:-1}},FP:function(a){for(var e=[],c=0;c<a.length;c++)e.push({x:a[c].x,y:a[c].y});return e},EJ:function(a){if(1>a.length)return!1;var e=Math.abs(a[a.length-
1].y-a[0].y);return 1.2358E-4<Math.abs(a[a.length-1].x-a[0].x)||1.2358E-4<e?!0:!1},rotationMatrix:function(a){var e=Math.cos(a);a=Math.sin(a);return{m_a:e,m_b:-a,m_c:a,m_d:e,m_h:0,m_v:0}},translate:function(a,e,c){a.m_h+=e;a.m_v+=c;return a},W:function(a,e,c){return{x:e*a.m_a+c*a.m_c+a.m_h,y:e*a.m_b+c*a.m_d+a.m_v}},YO:function(a,e,c,b,d,g,k,h,l,n,m){0>d&&(d=-d);0>g&&(g=-g);var q=(a-n)/2,p=(e-m)/2,u=Math.cos(k),r=Math.sin(k),v=u*q+r*p,q=-r*q+u*p,p=d*d,w=g*g,z=v*v,C=q*q,A=z/p+C/w;1<A&&(d*=Math.sqrt(A),
g*=Math.sqrt(A),p=d*d,w=g*g);if(A=p*C+w*z){p=(p*w-p*C-w*z)/A;h=(h===l?-1:1)*Math.sqrt(0>p?0:p);w=d*q/g*h;z=h*-(g*v/d);h=(a+n)/2+(u*w-r*z);u=(e+m)/2+(r*w+u*z);r=(v-w)/d;p=(q-z)/g;w=(-v-w)/d;q=(-q-z)/g;z=Math.sqrt(r*r+p*p);v=(0>p?-1:1)*Math.acos(r/z);z=Math.sqrt((r*r+p*p)*(w*w+q*q));p=(0>r*q-p*w?-1:1)*Math.acos(Math.max(Math.min((r*w+p*q)/z,1),-1));!l&&0<p?p-=2*Math.PI:l&&0>p&&(p+=2*Math.PI);q=[];r=!1;if(1E-9>Math.abs(p))l=4,r=!0,q[0]=d*Math.cos(v),q[1]=g*Math.sin(v),q[2]=d*Math.cos(v+p),q[3]=g*Math.sin(v+
p);else{w=0;l=2;C=!1;do{0>p?(A=w,z=.5*-Math.PI,w-=.5*Math.PI,w<=p+.01&&(z=p-A,C=!0)):(A=w,z=.5*Math.PI,w+=.5*Math.PI,w>=p-.01&&(z=p-A,C=!0));var x=Math.cos(z/2),y=Math.sin(z/2),F=4*(1-x)/3,L=y-F*x/y,A=[],E=[];A[0]=x;E[0]=-y;A[1]=x+F;E[1]=-L;A[2]=x+F;E[2]=L;A[3]=x;E[3]=y;x=Math.sin(v+z/2);y=Math.cos(v+z/2);for(F=0;4>F;F++)q[l-2+2*F]=d*(A[F]*y-E[F]*x),q[l-1+2*F]=g*(A[F]*x+E[F]*y);l+=6;v+=z}while(!C&&26>l)}d=this.rotationMatrix(-k);this.translate(d,h,u);for(g=2;g<l-2;g+=2)k=void 0===q[g]?this.W(d,0,
0):this.W(d,q[g],q[g+1]),q[g]=k.x,q[g+1]=k.y;q[0]=a;q[1]=e;2<l&&(q[l-2]=n,q[l-1]=m);if(r)b.push("l"),b.push("l"),c.push(q[0]),c.push(q[1]),c.push(q[2]),c.push(q[3]);else for(b.push("l"),c.push(q[0]),c.push(q[1]),a=2;a<l;a+=6)b.push("c"),c.push(q[a]),c.push(q[a+1]),c.push(q[a+2]),c.push(q[a+3]),c.push(q[a+4]),c.push(q[a+5])}},crossProduct:function(a,e){return a.x*e.y-a.y*e.x},c0:function(a){return 1E4*(a+2*Math.PI)%2*Math.PI*1E4/1E4}}}})(window);
(function(a){function f(b){if(!b)throw Error("XfdfManager requires AnnotationManager to initialize");this.Zb=b;this.Ni=null}function e(b,a){this.SC=b;this.Lu=a||function(){return!0}}String.prototype.trim||function(){var b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(b,"")}}();e.prototype.Ir=function(b,a,g){b=this.SC;b.writeStartElement("field");b.writeAttributeString("name",c.escape(a));a=g.value;_.isNull(a)||(b.writeStartElement("value"),b.writeString(c.escape(a)),
b.writeEndElement());b.writeEndElement()};e.prototype.aw=function(b,a,g){b=c.escape(a);a=this.SC;g.value&&(a.writeStartElement("field"),a.writeAttributeString("name",b),a.writeStartElement("value"),a.writeString(c.escape(g.value)),a.writeEndElement(),a.writeEndElement());a.writeStartElement("field");a.writeAttributeString("name",b)};e.prototype.wB=function(){this.SC.writeEndElement()};f.prototype={CF:function(b){return b&&0<b.getElementsByTagName("annots").length?(c.sH(b,"link"),c.sH(b,"widget"),
b.getElementsByTagName("annots")[0].childNodes):[]},eA:function(b){return b?b.querySelector("xfdf > fields"):null},IH:function(b){return b&&(b=b.getElementsByTagName("pdf-info"),0<b.length)?b[0]:null},lF:function(b,d,c){var e=this;a.kf.parse(new a.Se(b),function(b){return e.Zb.u.Dc(b-1)},function(b){var a=e.Zb,c=a.jh,g=a.u;if(g.getDocument()){c.xK(b.calculationOrder);var f=b.fields;Object.keys(f).forEach(function(b){var a=f[b],d=c.Yq(a.name),g=a.widgets.reduce(function(b,a){return"Off"!==a.appearance&&
a.appearance||b},null),d=d.Wa();g&&g!==d&&(d=g);a.Le(d,!0);c.cu(f[b],!0)});a.dh(b.widgets,!0);a.dh(b.custom,!0);g=g.getDocument();g.au(b.documentActions);for(var a=b.pages,g=g.Sb(),p=0;p<a.length;++p){var u=a[p],r=Number(u.number);0<r&&r<g.length+1?g[r-1].au(u.actions):console.warn("Invalid page number on PDFInfo page:",r)}d(b)}},c)},sM:function(b,d){function c(){var a=e.IH(b);a&&e.lF(a,function(b){f=b.widgets;f=f.concat(b.custom)},!0)}var e=this,f=[],l=this.CF(b),n=this.eA(b);n?this.Ky(new a.Se(n),
c,!0):c();return null!==l?f.concat(this.px(l,!0,d)):f},tM:function(b,d,c){function e(){var a=f.IH(b);a?f.lF(a,function(b){f.jF(l,function(a){a.Qj=a.Qj.concat(b.widgets);a.Qj=a.Qj.concat(b.custom);d(a)},c)}):f.jF(l,function(){d.apply(this,arguments)},c)}var f=this,l=this.CF(b),n=this.eA(b);n?this.Ky(new a.Se(n),e,!1):e()},zo:function(b){var d={};if(b){var c=this.eA(b);c&&this.Ky(new a.Se(c),function(){},!0);var c=b.getElementsByTagName("add"),e=b.getElementsByTagName("modify");b=b.getElementsByTagName("delete");
0<c.length&&(d.fu=this.px(c[0].childNodes,!0));0<b.length&&(d.nG=this.aM(b[0]));0<e.length&&(d.cJ=this.yM(e[0].childNodes))}return d},aM:function(b){var a=[];b=b.getElementsByTagName("id");for(var c=0;c<b.length;++c){var e=this.Zb.Bf(b[c].textContent);e&&(a.push(e),this.Zb.Od(e,!0))}return a},yM:function(b){return this.px(b,!0)},px:function(b,a,c){var e=[];this.iF(b,e,0,b.length,a,c);return e},bh:function(b,a,c,e,f){var l=this.Zb,n=null,m=!1,q=l.Pj[b];if(q){var p=a.getAttribute("page"),p=parseInt(p,
10),u;p<l.u.wb()&&(u=l.u.Dc(p));for(var r=0;r<q.length;r++)if(q[r].prototype.ai(a)){n=null;if(c){c=a.getAttribute("name");var v=parseInt(a.getAttribute("page"),10),n=this.Zb.cH(c,v)[0];if(!n&&this.Zb.cH(c,v,e)[0])break}if(!n){var w;"widget"===b&&(b=a.getAttribute("title"),w=l.jh.Yq(b));n=new q[r](w);m=!0}try{if(u)n.isImporting=!0,n.deserialize(a,u,l),n.isImporting=!1;else return l.yu[p]||(l.yu[p]=[]),l.yu[p].push({data:a,Oj:n}),{Oj:null,YK:!1};n.qW(f)}catch(z){console.warn("Error parsing annotation",
z);m=!1;n=null;break}m||l.UX(n);n.IsAdded=!1;n.IsModified=!1;break}}else console.warn("Unsupported annotation type.",b);return{Oj:n,YK:m}},iF:function(b,a,g,e,f,l){for(var n=[],m=[];g<e;++g)if(b[g].nodeType===Node.ELEMENT_NODE){var q=this.bh(c.cv(b[g]),b[g],f,a,l),p=q.Oj;p&&(a.push(p),q.YK?n.push(p):m.push(p))}0<n.length&&(this.Zb.dh(n,!0),n.forEach(function(b){b.IsAdded=!1;b.IsModified=!1}));0<m.length&&(b=$.Event("annotationChanged"),b.imported=!0,this.Zb.trigger(b,[m,"modify"]))},Ky:function(b,
d,c){function e(a){var d=b.K("name");if(!d)return console.warn("Invalid field name part:",d,b.current),null;a=a?a+"."+d:d;var d={name:a},c=[d],g=null;for(b.oa();b.advance();){var f=b.ua();switch(f){case "value":_.isNull(g)?g=b.current.textContent:(_.isArray(g)||(g=[g]),g.push(b.current.textContent));break;case "field":(f=e(a))&&0<f.length&&(c=c.concat(f));break;default:console.warn("unknown field child node: ",f)}}b.Aa();_.isNull(g)||(d.value=g);return c}var f=this.Zb.jh;b.oa();b.advance()?a.busyLoop(function(){"field"===
b.ua()&&e("").forEach(function(b){f.cu(b,!0)});var a=b.advance();a||b.Aa();return a},d,c):d()},yJ:function(b){var a=[];$(b).each(function(b,c){a.push(c.textContent.trim())});return a},jF:function(b,a,c){function e(){if(c.Zl())a({Qj:[]});else{f.iF(b,q,l,Math.min(l+m,b.length),!0,c.VA);if(l>n){n+=1E3;for(var p=f.Zb.u.Sl().Td(),u=0;u<p.length;u++)f.Zb.Qd(p[u]+1)}setTimeout(function(){l+=m;l<b.length?e():a({Qj:q})},c.batchDelay)}}var f=this,l=0,n=1E3,m=2*c.batchSize,q=[];e()},Rs:function(b,a,c){var e=
this.Zb.u.Dc(b.rb()-1).inverse(),f=document.createElementNS("",b.elementName);b.serialize(f,e,c);b=new XMLSerializer;f.OG&&this.Ni.push(f.OG);f=b.serializeToString(f);a.writeString(f)},hN:function(b){var d=this.Zb,c=d.fe(),e=d.u,f=e.getDocument(),l=[];c.ns({Ir:function(b,a,d){void 0!==d.type&&l.push(d)},aw:function(b,a,d){void 0!==d.type&&l.push(d)}});var n=f.Sb().map(function(b,a){return{number:a+1,actions:b.ck()}}).filter(function(b){return 0<Object.keys(b.actions).length});a.kf.write(b,{calculationOrder:c.Ty,
widgets:d.Bc().filter(function(b){return b.kk()}),fields:l,documentActions:f.ck(),pages:n},function(b){return 1>b?(console.warn("Invalid page number:",b),b=new XODText.Matrix2D,b.initMatrix(1,0,0,1,0,0),b):e.Dc(b-1)})},lN:function(b){var a=this;b=b||{};var g=new XMLWriter("UTF-8","1.0");g.formatting="none";this.Ni=[];var e,f,l;b.annotList?(e=b.fields||!1,f=b.widgets||!1,l=b.links||!1):(e=!1!==b.fields,f=!1!==b.widgets,l=!1!==b.links);g.writeStartDocument();g.writeStartElement("xfdf");g.writeAttributeString("xmlns",
"http://ns.adobe.com/xfdf/");g.writeAttributeString("xml:space","preserve");f&&this.hN(g);e&&this.eN(g);g.writeStartElement("annots");e=this.Zb;b=b.annotList||e.Bc();for(var n=0;n<b.length;++n)e=b[n],e instanceof Annotations.vd?l&&this.Rs(e,g,!0):e instanceof Annotations.WidgetAnnotation||this.Rs(e,g,!0);g.writeEndElement();g.writeEndElement();this.iN(g);g=g.flush();n=0;this.Ni.length&&(g=g.replace(c.dK,function(){return a.Ni[n++]}));this.Ni=null;return g},iN:function(b){var a=this.Zb;b.writeStartElement("pages");
var c=a.u.getDocument().Sb();if(c){var e=a.u.Dc(0);b.writeStartElement("defmtx");b.writeAttributeString("matrix",""+(e.m_a+","+e.m_b+","+e.m_c+","+e.m_d+","+e.m_h+","+e.m_v));b.writeEndElement();for(var f=1;f<c.length;++f){var l=a.u.Dc(f);if(!l.KG(e)){b.writeStartElement("pgmtx");var n="",n=n+(l.m_a+","+l.m_b+","+l.m_c+","+l.m_d+","+l.m_h+","+l.m_v);b.writeAttributeString("matrix",n);b.writeAttributeString("page",f.toString());b.writeEndElement()}}}b.writeEndElement()},cN:function(b){b.writeStartElement("add");
for(var a=this.Zb.Bc(),c=0;c<a.length;++c){var e=a[c];e.IsAdded&&(this.Rs(e,b),e.IsAdded=!1)}b.writeEndElement()},gN:function(b){b.writeStartElement("modify");for(var a=this.Zb,c=a.Bc(),e=0;e<c.length;++e){var f=c[e];f.IsModified&&a.Rc(f)&&(this.Rs(f,b),f.IsModified=!1)}b.writeEndElement()},dN:function(b){b.writeStartElement("delete");for(var a=this.Zb,c=this.jM(),e=0;e<c.length;++e)b.writeStartElement("id"),b.writeAttributeString("page",c[e].Jb),b.writeString(c[e].id),b.writeEndElement();a.pz.length=
0;b.writeEndElement()},eN:function(b){b.writeStartElement("fields");this.Zb.jh.ns(new e(b));b.writeEndElement()},fN:function(b){b.writeStartElement("fields");var a=[];this.Zb.jh.ns(new e(b,function(b){a.push(b);return b.IsModified}));a.forEach(function(b){b.IsModified=!1});b.writeEndElement()},jN:function(b){var d=new XMLWriter("UTF-8","1.0");d.writeStartDocument();d.writeStartElement("xfdf");d.writeAttributeString("xmlns","http://ns.adobe.com/xfdf/");d.writeAttributeString("xml:space","preserve");
d.writeStartElement("fields");var c=new a.Annotations.O.Ng;b.forEach(function(b){c.cu(b)});c.ns(new e(d));d.writeEndElement();d.writeEndElement();b=d.flush();return b=b.replace(/\t/g,"")},kN:function(b){for(var a=[],c=0;c<b.length;++c){var e=b[c];_.isUndefined(e.name)||a.push(e.name+"="+encodeURIComponent(e.value))}return a.join("&")},Vu:function(){var b=this;this.Ni=[];var a=new XMLWriter("UTF-8","1.0");a.writeStartDocument();a.writeStartElement("xfdf");a.writeAttributeString("xmlns","http://ns.adobe.com/xfdf/");
a.writeAttributeString("xml:space","preserve");this.fN(a);this.cN(a);this.gN(a);this.dN(a);a.writeEndElement();var a=a.flush(),a=a.replace(/\t/g,""),g=0;this.Ni.length&&(a=a.replace(c.dK,function(){return b.Ni[g++]}));this.Ni=null;return a},jM:function(){return _.map(this.Zb.pz,function(b){return{id:b.Id,Jb:b.xb()}})}};a.o.xN=f;var c={dK:/<replace-element-please ?\/>|<replace-element-please><\/replace-element-please>/g,yV:"replace-element-please",fr:function(b){if("string"===typeof b){for(var a=(new DOMParser).parseFromString(b,
"text/xml"),c=a.getElementsByTagName("contents-richtext"),e=0,f=0;0<(e=b.indexOf("<contents-richtext>",e));++f)if(f<c.length){var l=b.indexOf("</contents-richtext>",e);c[f].PU=b.substring(e+19,l);e=l}else{console.warn("contents-richtext: More elements found by searching!");break}f<c.length&&console.warn("contents-richtext More elements found by getElementsByTagName!");return a}return b},GC:function(b){var a;a="D:"+b.getFullYear().toString();a+=this.de((b.getMonth()+1).toString());a+=this.de(b.getDate().toString());
a+=this.de(b.getHours().toString());a+=this.de(b.getMinutes().toString());a+=this.de(b.getSeconds().toString());b=b.getTimezoneOffset();0===b?a+="Z00'00'":(0>b?(a+="+",b*=-1):a+="-",a+=this.de(parseInt(b/60,10).toString())+"'",a+=this.de((b%60).toString())+"'");return a},toDateString:function(b){return b.getFullYear().toString()+"-"+this.de((b.getMonth()+1).toString())+"-"+this.de(b.getDate().toString())+" "+this.de(b.getHours().toString())+":"+this.de(b.getMinutes().toString())+":"+this.de(b.getSeconds().toString())},
de:function(b){return 2>b.length?"0"+b:b},escape:function(b){b&&(b=_.escape(b),b=b.replace(/(?:\r\n|\r|\n)/g,"&#xA;"));return b},toFixed:function(b,a){_.isUndefined(a)&&(a=2);return parseFloat(b.toFixed(a)).toString()},getAttribute:function(b,a){return b.getAttribute(a)||b.getAttribute(a.toLowerCase())},cv:function(b){return b.localName||b.baseName||b.nodeName},sH:function(b,a){var c=[],e=b.getElementsByTagName(a);if(0===e.length)return c;for(var f=0;f<e.length;++f){var l=e[f].outerHTML||e[f].xml;
if(_.isUndefined(l)||0!==l.indexOf("<"+a+" "))l=(new XMLSerializer).serializeToString(e[f]);0>l.indexOf("</"+a+">")&&"/"!==l.charAt(l.length-2)&&(l=l.slice(0,l.length-1)+"/"+l.slice(l.length-1));c.push(l)}return c},C_:function(b){return c.getAttribute(b,"ActionType")?!0:0<b.getElementsByTagName("OnActivation").length},dR:function(b){return c.getAttribute(b,"ActionType")?[b]:b.getElementsByTagName("Action")},eR:function(b){if(!b)return null;var a=c.getAttribute(b,"ActionType");return a?a:(b=c.fA(b))?
c.cv(b):null},fA:function(b){b=_.filter(b.childNodes,function(b){return 1===b.nodeType});return 0<b.length?b[0]:null},jo:function(b,a,g){a=c.getAttribute(b,a);_.isNull(a)&&(a=b.getElementsByTagName(g),a=0<a.length?a[0].textContent:null);return a},JZ:function(b,a,c){c=c.W({x:_.isNull(b)?0:parseFloat(b),y:_.isNull(a)?0:parseFloat(a)});return{x:_.isNull(b)?null:c.x,y:_.isNull(a)?null:c.y}},i_:function(b,a,c){b=b.split(";");for(var e=[],f=0;f<b.length;++f){var l=b[f].split(","),l=new XODText.Fd(l[0],
l[1]),l=new Annotations.Point(l.x,l.y);a.W(l);"function"===typeof c&&c(l);e.push(l)}return e},Lw:function(b,a,g){if("undefined"===typeof g||null===g)g=",";if(!(b instanceof Annotations.Point))return null;b=new Annotations.Point(b.x,b.y);a&&a.W(b);return c.toFixed(b.x)+g+c.toFixed(b.y)},pG:function(b,a,c){if("undefined"===typeof c||null===c)c=",";if("string"!==typeof b)return null;b=b.split(c);c=null;2===b.length?(c=new Annotations.Point(parseFloat(b[0]),parseFloat(b[1])),a&&a.W(c)):console.warn("Invalid serialized string format.");
return c},Uo:function(b,a,g,e){if("undefined"===typeof e||null===e)e=";";if("undefined"===typeof g||null===g)g=",";for(var f="",l=0;l<b.length;l++){var n=new Annotations.Point(b[l].x,b[l].y);a&&a.W(n);f+=c.toFixed(n.x)+g;f+=c.toFixed(n.y)+e}return f.substring(0,f.length-1)},Gl:function(b,a,c,e){var f=[];if("undefined"===typeof e||null===e)e=";";if("undefined"===typeof c||null===c)c=",";if(!b)return f;var l;b=b.split(e);if(e===c)for(e=0;e+1<b.length;e+=2)l=new Annotations.Point(b[e],b[e+1]),a&&a.W(l),
f.push(l);else for(e=0;e<b.length;++e)l=b[e].split(c),l=new Annotations.Point(l[0],l[1]),a&&a.W(l),f.push(l);return f},eC:function(b,a,g){if("undefined"===typeof g||null===g)g=",";var e=new Annotations.Point(b.x1,b.y1);b=new Annotations.Point(b.x2,b.y2);a.W(e);a.W(b);return c.toFixed(e.x,6)+g+c.toFixed(e.y,6)+g+c.toFixed(b.x,6)+g+c.toFixed(b.y,6)},Bu:function(b,a,c){if("undefined"===typeof c||null===c)c=",";c=b.split(c);b=new Annotations.Point(c[0],c[1]);c=new Annotations.Point(c[2],c[3]);a&&(a.W(b),
a.W(c));return new Annotations.Rect(b.x,b.y,c.x,c.y)},cC:function(b,a,g){var e=new XODText.Matrix2D;e.initMatrix(a);e.m_d*=-1;e.m_h=0;e.m_v=0;return c.eC(b,e,g)},oG:function(b,a,e){var f=new XODText.Matrix2D;f.initMatrix(a);f.m_d*=-1;f.m_h=0;f.m_v=0;return c.Bu(b,f,e)},B0:function(b,a){for(var e="",f=0;f<b.length;f++){var h=b[f],h=new Annotations.Point(h.x,h.y);a.inverse().W(h);e+=c.toFixed(h.x)+",";e+=c.toFixed(h.y)+";"}return e.substring(0,e.length-1)},j_:function(b,a){var c=b.split(","),e=new Annotations.Point(c[0],
c[1]),c=new Annotations.Point(c[2],c[3]);"undefined"!==typeof a&&(a.W(e),a.W(c));return new Annotations.Rect(e.x,e.y,c.x,c.y)},C0:function(b,a){var e=new Annotations.Point(b.x1,b.y1),f=new Annotations.Point(b.x2,b.y2),h=a.inverse();h.W(e);h.W(f);return c.toFixed(e.x)+","+c.toFixed(e.y)+","+c.toFixed(f.x)+","+c.toFixed(f.y)},yg:function(b){if("undefined"===typeof b||null===b||!(b instanceof Annotations.Color)||0===b.A)return null;var a=b.R.toString(16).toUpperCase();2>a.length&&(a="0"+a);var c=b.G.toString(16).toUpperCase();
2>c.length&&(c="0"+c);b=b.B.toString(16).toUpperCase();2>b.length&&(b="0"+b);return"#"+a+c+b},Zj:function(b){return(new RegExp(/^#[0-9a-f]{6}$/i)).test(b)?new Annotations.Color(parseInt(b.substr(1,2),16),parseInt(b.substr(3,2),16),parseInt(b.substr(5,2),16)):null},qz:function(b){if(b){var a=new Date(Date.UTC(parseInt(b.substring(2,6),10),parseInt(b.substring(6,8),10)-1,parseInt(b.substring(8,10),10),parseInt(b.substring(10,12),10),parseInt(b.substring(12,14),10),parseInt(b.substring(14,16),10),0));
b=b.substring(16);if(7===b.length){var c=b.substring(0,1);if("Z"!==c){var c="-"===c?1:-1,e=parseInt(b.substring(4,6),10);a.setUTCHours(a.getUTCHours()+c*parseInt(b.substring(1,3),10));a.setUTCMinutes(a.getUTCMinutes()+c*e)}}return a}},jH:function(b,a,e){b="#"+c.de(b.toString(16));b+=c.de(a.toString(16));return b+=c.de(e.toString(16))},WV:function(b,a){return"/"+b.replace(/ /g,"")+" "+a+" Tf"},DS:function(b){return 1<b.split(" ").length?"'"+b+"'":b},VV:function(b){return"font: "+c.DS(b.Font)+" "+b.hA()+
"pt; text-align: "+b.TextAlign+"; color: "+c.yg(b.TextColor)},A0:function(b){return"font-family: "+b.Font+"; font-size: "+b.hA()+"pt; text-align: "+b.TextAlign+"; color: "+c.yg(b.TextColor)},aQ:["Tf","rg"],FB:function(b){var a={qe:b};if(!_.isNull(b))for(b=b.split(" ");0<b.length;){var e=b.pop();if(-1!==c.aQ.indexOf(e))switch(e){case "Tf":var e=b.pop(),f=b.pop().slice(1);a.font={size:e+"pt",name:c.Kr(f),t0:f};break;case "rg":var e=parseInt(255*b.pop(),10),f=parseInt(255*b.pop(),10),h=parseInt(255*
b.pop(),10);a.color=c.jH(h,f,e)}}return a},ZZ:function(b){if(4===b.length)return{r:parseInt(b.charAt(1),16)/16,g:parseInt(b.charAt(2),16)/16,b:parseInt(b.charAt(3),16)/16};if(7===b.length)return{r:parseInt(b.slice(1,3),16)/255,g:parseInt(b.slice(3,5),16)/255,b:parseInt(b.slice(5,7),16)/255}},VU:function(b){var a={};_.isNull(b)||b.split(";").forEach(function(b){b=b.split(":");if(!(2>b.length)){var e=b[0].trim();b=b[1].trim();switch(e){case "text-align":a.textAlign=b;break;case "color":b.startsWith("rgb")?
(b=/rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)/.exec(b),null!==b&&(a.color=c.jH(parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10)))):a.color=b;break;case "font":var e=b.split(" "),f=e[0],l=e[1];"'"===b[0]&&(f=b.slice(1,b.lastIndexOf("'")),l=e[e.length-1]);a.font={name:c.Kr(f),size:l}}}});return a},Kr:function(b){function a(d,c){var e=b;0===e.indexOf(d)&&(e=c);return e}b=a("Arial","Arial");b=a("Courier","Courier");b=a("Helv","Arial");return b=a("Times","Times New Roman")},AJ:function(b){return 0<b.indexOf("Bold")?
"bold":"normal"},zJ:function(b){return 0<b.indexOf("Italic")||0<b.indexOf("Oblique")?"italic":"normal"},hQ:function(b){var a=[];b=b.split(";");for(var c=0;c<b.length;++c){var e=b[c].split(",");2===e.length&&0<e[0].length&&0<e[1].length&&a.push(e)}return a},YV:function(b){for(var a="",c=0;c<b.length;c++)a+=b[c][0]+",",a+=b[c][1]+";";return a.substring(0,a.length-1)},XV:function(b){for(var a=[],c=0;c<b.length;c++){var e=[];e.push(this.escape(b[c][0]));e.push(this.escape(b[c][1]));a.push(e)}return a},
yk:function(b,a,c){_.isUndefined(c)||_.isNull(c)||(b[a]=c)},GK:function(b,a,c){_.isUndefined(c)||_.isNull(c)||(b[a]=Number(c))},zb:function(b,a,c){_.isUndefined(c)||_.isNull(c)||b.setAttribute(a,c)},Kw:function(b){var a=this,c=document.createElementNS("","measure");this.zb(c,"scale",b.scale);var e=document.createElementNS("","axis");b.axis.forEach(function(b){e.appendChild(a.dC(b))});var f=document.createElementNS("","distance");b.distance.forEach(function(b){f.appendChild(a.dC(b))});var l=document.createElementNS("",
"area");b.area.forEach(function(b){l.appendChild(a.dC(b))});c.appendChild(e);c.appendChild(f);c.appendChild(l);return c},Au:function(b){var a,c,e={};this.yk(e,"scale",b.getAttribute("scale"));e.axis=[];a=b.querySelector("axis").querySelectorAll("numberformat");for(c=0;c<a.length;c++)e.axis.push(this.rz(a[c]));e.distance=[];a=b.querySelector("distance").querySelectorAll("numberformat");for(c=0;c<a.length;c++)e.distance.push(this.rz(a[c]));e.area=[];a=b.querySelector("area").querySelectorAll("numberformat");
for(c=0;c<a.length;c++)e.area.push(this.rz(a[c]));return e},dC:function(b){var a=document.createElementNS("","numberformat");this.zb(a,"factor",b.factor);this.zb(a,"unit",b.unit);this.zb(a,"decimal-symbol",b.decimalSymbol);this.zb(a,"thousands-symbol",b.thousandsSymbol);this.zb(a,"display",b.display);this.zb(a,"precision",b.precision);this.zb(a,"unit-prefix",b.unitPrefix);this.zb(a,"unit-suffix",b.unitSuffix);this.zb(a,"unit-position",b.unitPosition);return a},rz:function(b){var a={};this.GK(a,"factor",
b.getAttribute("factor"));this.yk(a,"unit",b.getAttribute("unit"));this.yk(a,"decimalSymbol",b.getAttribute("decimal-symbol")||".");this.yk(a,"thousandsSymbol",b.getAttribute("thousands-symbol")||",");this.yk(a,"display",b.getAttribute("display")||"D");this.GK(a,"precision",b.getAttribute("precision")||100);this.yk(a,"unitPrefix",b.getAttribute("unit-prefix")||"");this.yk(a,"unitSuffix",b.getAttribute("unit-suffix")||"");this.yk(a,"unitPosition",b.getAttribute("unit-position")||"S");return a}};a.Annotations.ca=
c})(window);
(function(a){a.o=a.o||{};var f=a.o;f.Wx=function(a){this.v=a;this.J=[];this.sk={};this.tv=f.La.ni;this.og=1;if(a){this.TJ();this.UJ();var c=this;a.on("pagesDiff",function(b,a){c.trigger("pageDiff",[a]);c.trigger("pageContentChanged",[a.filter(function(b){return b.after.contentChanged}).map(function(b){return b.after.pageNum})])});a.on("pagesUpdated",function(b,a){function e(b){var a={};Object.keys(b).forEach(function(c){a[c]=b[c].Sa});return a}var f=e(c.sk);c.TJ();c.UJ();f=c.jP(f,e(c.sk));f.contentChanged=
a.filter(function(b){return b.contentChanged}).map(function(b){return b.pageNum});c.trigger("layoutChanged",[f])})}};f.Wx.prototype=$.extend({RZ:function(){return this.J.length},jP:function(a,c){var b={added:[],removed:[],moved:{}},d={};Object.keys(a).forEach(function(b){d[b]=d[b]||{};d[b].before=a[b]});Object.keys(c).forEach(function(b){d[b]=d[b]||{};d[b].after=c[b]});Object.keys(d).forEach(function(a){a=d[a];a.before&&!a.after?b.removed.push(a.before):!a.before&&a.after?b.added.push(a.after):a.before&&
a.after&&a.before!==a.after&&(b.moved[a.before]=a.after)});return b},TJ:function(){var a=this.v.oo(),c={};a.forEach(function(b){c[b]=!0});var b=this.sk;Object.keys(b).forEach(function(a){a in c||delete b[a]});a.forEach(function(a){b[a]||(b[a]={rotation:null,zoom:null,Gg:null,Hg:null,Bg:null,bj:null,To:null,jc:null,Sa:null,id:a})})},UJ:function(){for(var a=this.v.numPages,c=this.v,b=[],d=0;d<a;++d){var g=this.sk[c.Zq(d)];g.Sa=d+1;b.push(g)}this.J=b},kC:function(a){this.tv=a},v_:function(){return this.tv},
cj:function(a){this.og=a;this.trigger("zoomChanged",[a])},w_:function(){return this.og},JK:function(a,c){var b=this.J[a];if(b)b.To=c;else throw Error("Invalid page text selected "+a);},hS:function(a){var c=this.J[a];if(c)return c.To;throw Error("Selected text requested for invalid page index: "+a);},iS:function(a){var c=this.J[a];if(c)return c.Bg.map(function(b){return{x1:b.x1,x2:b.x2,x3:b.Im,x4:b.Jm,y1:b.y1,y2:b.y2,y3:b.Km,y4:b.Lm}});throw Error("Selected text quads requested for invalid page index: "+
a);},dz:function(){this.J.forEach(function(a){a.To=null})},lv:function(){return this.J.map(function(a){return a.To}).filter(function(a){return null!==a}).join("\n")},CA:function(){var a={};this.J.filter(function(a){return null!==a.Bg}).forEach(function(c){a[c.Sa-1]=c.Bg.map(function(b){return{x1:b.x1,x2:b.x2,x3:b.Im,x4:b.Jm,y1:b.y1,y2:b.y2,y3:b.Km,y4:b.Lm}})});return a},Sd:function(a){var c=this.J[a];if(c){var b=this.v.kd(a);a=this.v.jd(a);var d=_.isNull(c.rotation)?this.tv:c.rotation;if(d===f.La.Ce||
d===f.La.zf){var g=b,b=a;a=g}return{width:b,height:a,rotation:d,zoom:_.isNull(c.zoom)?this.og:c.zoom,Gg:c.Gg,Hg:c.Hg,Bg:c.Bg,bj:c.bj,To:c.To,jc:c.jc,Sa:c.Sa,id:c.id}}return{width:0,height:0}},Td:function(){for(var a=[],c=this.J.length,b=0;b<c;++b)a.push(this.Sd(b));return a},Qw:function(a,c){var b=this.J[a];if(b)b.zoom=c;else throw Error("Invalid page index zoomed "+a);},cS:function(a){var c=this.J[a];if(c)return!_.isNull(c.zoom);throw Error("Invalid page index get has individual zoom "+a);},Zr:function(a,
c){var b=this.J[a];if(b)b.rotation=c;else throw Error("Invalid page index rotated "+a);},OW:function(a,c){var b=this.J[a];if(b)b.Bg=c;else throw Error("Invalid page index set text quads "+a);},MW:function(a,c){var b=this.J[a];if(b)b.bj=[c];else throw Error("Invalid page index set search quads "+a);},aY:function(a,c){var b=this.J[a];if(b){var d=b.bj||[];d.push(c);b.bj=d}else throw Error("Invalid page index update search quads "+a);},cz:function(){this.J.forEach(function(a){a.bj=null})},PF:function(){this.J.forEach(function(a){a.Bg=
null})},dS:function(a){var c=this.J[a];if(c)return!!c.Bg||!!c.bj;throw Error("Invalid page index get has text quads "+a);},KW:function(a,c){var b=this.J[a];if(b)b.Gg=c.Gg,b.Hg=c.Hg;else throw Error("Tried to set offsets of invalid page"+a);},JR:function(){var a={};this.J.forEach(function(c,b){_.isNull(c.rotation)||(a[b]=c.rotation)});return a},wP:function(){this.J.forEach(function(a){a.rotation=null})},YG:function(a){this.J.forEach(function(c){_.isNull(c.rotation)||a(c)})},mC:function(a,c){var b=
this.J[a];if(b)b.jc?c&&b.jc[0]===c[0]||(b.jc[0].width=0,b.jc[0].height=0,b.jc=c):b.jc=c;else throw Error("Invalid page index set preview canvas "+a);},KH:function(){var a=[];this.J.forEach(function(c,b){_.isNull(c.Bg)&&_.isNull(c.bj)||a.push(b)});return a},fS:function(){var a=[];this.J.forEach(function(c,b){_.isNull(c.Bg)||a.push(b)});return a},yP:function(a){a=this.J[a];a.jc&&(a.jc[0].width=0,a.jc[0].height=0,a.jc=null)},zP:function(){this.J.forEach(function(a){a.width=0;a.height=0;a.jc&&(a.jc[0].width=
0,a.jc[0].height=0,a.jc=null)})},GI:function(a){return!!this.sk[a]},ld:function(a){var c=this.sk[a];if(c)return this.Sd(c.Sa-1);throw Error("Unknown page ID "+a);},Df:function(a){var c=this.J[a];if(c)return c.id;throw Error("Page index is not loaded "+a);},ed:function(){this.off()}},a.utils.eventHandler)})(window);
(function(a){function f(a,b){this.handlers=a;this.state=_.isUndefined(b)?null:b;this.ei=[];this.NB=!0}function e(){this.XG=[];this.$G=[];this.Si={};this.os=!1;Promise.resolve();Promise.resolve();this.Vn=!1;this.gu=null}f.prototype={Ui:function(a){this.ei.push(a)},cL:function(){return 0<this.ei.length},$K:function(){return this.NB||0<this.ei.length},read:function(){this.state=this.handlers.read(this.state);this.NB=!1},write:function(){var a=this.ei;this.handlers.consolidateChanges&&(a=this.handlers.consolidateChanges(a));
this.ei=[];this.state=this.handlers.write(this.state,a);this.NB=!0}};e.prototype={ed:function(){this.os=!1;window.cancelAnimationFrame(this.gu);this.gu=null;this.Vn=!0},WJ:function(a,b,d,e){_.isUndefined(e)&&(e=!0);if(this.Si[a])throw Error("Tried to register pipeline "+a+" twice");this.Si[a]=new f(b,d);e&&this.TB()},bT:function(a){return!!this.Si[a]},nS:function(a){if(!this.Si[a])throw Error("Tried to get non-existent pipeline "+a);return this.Si[a]},TB:function(){var a=this;this.os||this.Vn||(this.os=
!0,this.gu=window.requestAnimationFrame(function(){try{a.gu=null;var b=Object.keys(a.Si).map(function(b){return a.Si[b]});b.forEach(function(b){b.$K()&&b.read()});b.forEach(function(b){b.cL()&&b.write()});var d=b.some(function(b){return b.$K()||b.cL()});a.os=!1;d?a.TB():(a.$G.forEach(function(b){b()}),a.$G=[]);a.XG.forEach(function(b){b()});a.XG=[]}catch(e){var g=Object.keys(a.Si);0<g.length&&a.Si[g[0]].handlers.clearCacheIfFull();throw e;}finally{a.os=!1}}))},Ui:function(a,b){this.nS(a).Ui(b);this.TB()}};
a.Hp=e;a.ZY=f})((window.o?window.o:window.o={}).$m={});
(function(a){function f(b){this.EL=!0;this.kr=this.Bw=this.bL=this.Fg=!1;this.Bd=[];this.Lc={};this.jl={};this.ee=.5;this.u=b;this.v=null;this.yw=Promise.resolve();this.Fv=!1;this.No=null;this.paused=!1;this.pB=null}function e(b){this.rotation=b.rotation;this.zoom=b.zoom;this.width=b.width;this.height=b.height;this.oe=this.canvas=null;this.Dh=this.Ry=this.xg=!1;this.aL=!0;this.Gc=this.Wl=this.fp=this.request=null}function c(b,a){this.Fa=b;this.tk=a;this.LB=createPromiseCapability()}c.prototype={cancel:function(){var b=
this.Fa.Tc(this.tk);try{if(b.Dh){b.Gc&&(b.Gc.HF(),b.Gc.abort&&b.Gc.abort());if(b.request)try{this.Fa.v.bi(b.request)}finally{b.request=null,b.Gc=null}if(b.fp)try{this.Fa.v.Tj(b.fp)}finally{b.fp=null}if(b.Wl)try{this.Fa.v.bi(b.Wl)}finally{b.Wl=null}}}finally{b.Dh=!1,b.aL=!0,this.LB.resolve("canceled")}},vL:function(){this.cancel();var b=this.Fa.Tc(this.tk);b.Gc&&(b.Gc.Mb(void 0,this.Fa.u.N.ld(this.tk).Sa-1),b.Gc=null)},render:function(b){var a=this;b.then(function(){a.LB.resolve("complete")})},xA:function(){return this.LB.promise}};
e.prototype={Wq:function(b){return(this.canvas||b?1:0)*this.width*this.height*this.zoom*this.zoom*(window.devicePixelRatio?window.devicePixelRatio*window.devicePixelRatio:1)*4},isValid:function(){return!!this.canvas||!a.o.za.Ek},update:function(b){if(this.rotation!==b.rotation||this.zoom!==b.zoom)this.oe=this.canvas=null,this.aL=!0;this.rotation=b.rotation;this.zoom=b.zoom;this.width=b.width;this.height=b.height;this.Sa=b.Sa}};f.prototype={init:function(){this.$y();this.v=this.u.getDocument()},ed:function(){this.kr=
!0;this.as();return this.yw},$y:function(){this.as();Object.keys(this.Lc).forEach(this.xv.bind(this))},AP:function(){Object.keys(this.Lc).forEach(this.yI.bind(this))},$W:function(b){this.bL=!!b},xI:function(b){var a=this.Lc[b];a&&(a.canvas&&(document.body.contains(a.canvas)||(a.canvas.width=0,a.canvas.height=0),a.canvas=null),a.Gc&&(a.Gc.Mb(),a.Gc=null),a.oe=null);this.cp(b)},yI:function(b){if(b=this.Lc[b])b.xg=!1},xv:function(b){this.xI(b);this.yI(b)},mu:function(b){var a=this.u,c=a.Pl()-1;b=a.N.ld(b).Sa-
1;a=a.wb();c=b-c;0>c&&(c-=.5);return a-Math.abs(c)},yA:function(b){return this.jl[b]||null},mF:function(b,a){var e=this;if(this.Tc(b).Dh)return this.yA(b);var f=new c(this,b);this.cp(b);var h;h=e.bL&&a?a.then(function(){if(!e.Bw)return e.bK(b,function(){})}):this.bK(b,function(){});f.render(h);return this.jl[b]=f},mR:function(){var b=this;return Object.keys(this.Lc).reduce(function(a,c){return a+b.Tc(c).Wq()},0)},KO:function(b,c){for(var e=this.Tc(c),f=this,h=Object.keys(this.Lc).sort(function(b,
a){return f.mu(b)-f.mu(a)}),l=this.mR(),n=e.Wq(b)+l,m=0;n>a.Pm&&m<h.length;)n-=this.Tc(h[m]).Wq(),++m;if(n<a.Pm){for(l=0;l<m;++l)this.xI(h[l]);e.canvas=b}else console.warn("Could not fit "+c+" with size "+e.Wq(b)+" into cache of size "+l+" with max size "+a.Pm)},Tc:function(b){if(this.u.N.GI(b)){this.Lc[b]=this.Lc[b]||new e(this.u.N.ld(b));var a=this.u.N.ld(b);this.Lc[b].update(a);return this.Lc[b]}return this.Lc[b]?this.Lc[b]:new e({})},DY:function(b){this.xv(b)},nr:function(b){return!!this.Tc(b).canvas},
pause:function(){this.paused=!0},resume:function(){this.paused=!1;var b=this.Lc;Object.keys(b).forEach(function(a){a=b[a];a.Gc&&(a.Gc.paused=!1,a.Gc.resume&&a.Gc.resume())})},ip:function(b){this.Bd=b||this.u.ea.Td()},ZO:function(b){var a=this;return b.some(function(b){return-1===a.Bd.indexOf(b)})||a.Bd.some(function(a){return-1===b.indexOf(a)})},wS:function(){var b=this;return Object.keys(this.Lc).map(function(a){return{id:a,page:b.Lc[a]}}).filter(function(b){return b.page.xg}).map(function(a){return b.u.N.ld(a.id).Sa-
1})},uG:function(b){var c=this.u.N.Df(b),e=this.Tc(c);if(this.Fg){c=e.Yd;if(e.Dh||!e.xg||!c)return!0;var e=this.u.ea,f=this.ee/2;return(b=e.uo(b,e.JA(f,f)))&&!a.utils.containsRect(c,b.Yd)}return!e.Dh&&!e.xg},gI:function(b){for(var a=[],c=[],e=b.length,f=0;f<e;++f){var l=b[f];this.uG(l)?c.push(l):a.push(l)}return{wJ:a,EB:c}},OA:function(){var b=this;return b.kr?[]:b.u.ea.Td(b.ee,b.ee).some(function(a){return b.uG(a)})},sP:function(){!this.No&&this.OA()&&this.mG()},mG:function(){var b=this;this.No||
(this.No=setTimeout(function(){this.No=null;var a=b.u.ea.Td(b.ee,b.ee);b.as(a);b.Fv||(b.yw=b.yw.then(function(){return b.cK()})["catch"](function(a){console.error(a);b.yw=Promise.resolve()}))},80))},cV:function(b){var a=this;return Promise.resolve().then(function(){var c=a.u.N.ld(b).Sa-1,e=a.Tc(b);if(!e.canvas)throw Error("Tried to place uncached page from cache "+b);e.xg=!0;a.u.qq(e.canvas,c);a.ak(c,e);a.u.trigger("pageComplete",[c,e.canvas])})},FA:function(b){var a=this;return new Promise(function(c){var e=
a.Tc(b),f=a.u.N.ld(b).Sa-1;e.fp||a.u.dT(f)?c():e.fp=a.v.nB(f,function(c){a.Tc(b).fp=null;a.u.yF(c,f,-1!==a.Bd.indexOf(f),!1)})})},IR:function(b){var c=this;return new Promise(function(e){var f=c.Tc(b),h=c.u.N.ld(b).Sa-1;if(f.Wl||c.u.$S(h))e();else{var l=a.utils.getCanvasMultiplier(),n=f.width,m=f.height,q=n>m?2E3/n:2E3/m,q=q/l;f.Wl=c.v.Mv({pageIndex:h,getZoom:function(){return q},getPageRotation:function(){return a.o.La.ni},drawComplete:function(b){c.v.Uj(f.Wl);f.Wl=null;c.u.yF(b,h,-1!==c.Bd.indexOf(h),
!0);e()},useProgress:!1})}})},cK:function(){var b=this;return this.kr?Promise.resolve():Promise.resolve().then(function(){var c=b.u.ea.Td(b.ee,b.ee),e=b.gI(c);b.as(c);b.ZJ(e.wJ);b.Fv=!0;b.u.trigger("beginRendering");var f=Promise.resolve();!b.v.ik()&&a.o.za.Ek||c.forEach(function(a){a=b.u.N.Df(a);b.FA(a)});b.Bw=!1;return Promise.all(e.EB.map(function(a){a=b.u.N.Df(a);return b.nr(a)&&!b.Fg?b.cV(a):f=b.mF(a,f).xA()}))}).then(function(){b.Bw=!1;b.Fv=!1;var a=b.OA();b.u.trigger("finishedRendering",a);
if(!b.kr)return new Promise(function(a,c){window.requestAnimationFrame(function(){try{var d;if(b.OA())return d=b.cK(),a(d);b.MT()&&b.eV();a()}catch(e){c(e)}})})})["catch"](function(a){b.Fv=!1;console.error(a);throw a;})},MT:function(){return a.o.za.Ek&&(0!==a.Rv||0!==a.Qv)},iP:function(){var b=this;return _.range(b.u.wb()).map(function(a){return b.u.N.Df(a)}).sort(function(a,c){return b.mu(c)-b.mu(a)})},FF:function(){var b=this,c=_.min(b.Bd),e=_.max(b.Bd),f=c-a.Rv,h=e+a.Qv,c=this.iP().filter(function(a){a=
b.u.N.ld(a).Sa-1;return f<a&&h>a});if(b.Fg)return[c[0]];for(var e=[],l=c.length,n=0,m=0;m<l;++m){var q=b.Tc(c[m]),n=n+q.Wq(!0);if(n<a.Pm)e.push(c[m]);else break}return e},kP:function(){var b=this;return b.kr?[]:b.FF().filter(function(a){return!b.Tc(a).isValid()})},eV:function(){var b=this;return Promise.resolve().then(function(){return b.Fg?Promise.all(b.Bd.map(function(a){a=b.u.N.Df(a);return b.IR(a)})):Promise.all(b.kP().map(function(a){return b.mF(a).xA()}))["catch"](function(b){console.error("error pre-rendering",
b);throw b;})})},bK:function(b,a){a=a||function(){};var c=this;return new Promise(function(e){c.wV(b,function(b){!b||b.type&&"Cancelled"===b.type||console.warn(b);e()},a)})},ZJ:function(b){var c=this,e=this.FF();b||(b=c.u.ea.Td(c.ee,c.ee),b=c.gI(b).wJ);b&&b.length&&(b=b.map(function(b){return c.u.N.Df(b)}),e=e.concat(b));Object.keys(this.Lc).forEach(function(b){var f=c.Tc(b);if(c.u.N.GI(b)){var l=c.u.N.ld(b).Sa-1;if(a.o.za.Ek)-1===e.indexOf(b)&&(c.xL(b),f.xg&&(c.u.uV(l),f.xg=!1));else{var n=-1!==
c.Bd.indexOf(l);!f.xg&&!f.Ry||n||(a.o.za.Mo(l),f.Ry=!1,f.xg=!1,c.xL(b))}}})},wV:function(b,c,e){var f=this,h=this.Tc(b);c=c||function(){};e=e||function(){};if(h.Dh)a.utils.warn("renderPage: Another request for page ID",b),c("renderPage: Another request for page ID "+b);else{var l=f.u.N.ld(b),n=l.zoom,m=l.rotation;if(f.v!==f.u.getDocument())c("Document changed");else{var q=!0,p=null,u=!1,r,v=f.u.ea.po(l.Sa-1);if(f.Fg||v&&v.viewportRender)if(v=f.u.ea,r=v.uo(l.Sa-1,v.JA(f.ee,f.ee)),null===r){c("Page "+
(l.Sa-1)+" no longer visible");return}this.pB=window.setTimeout(function(){$("#pageContainer"+(l.Sa-1)).addClass("loading")},300);var w={pageIndex:this.u.N.ld(b).Sa-1,getZoom:function(){return f.u.N.ld(b).zoom},getPageRotation:function(){return f.u.N.ld(b).rotation},finishedLoading:function(a,e){if(f.v!==f.u.getDocument())return c(Error("Document changed")),!1;if(a)return console.warn("Error loading page "+b),c(Error("Error loading page "+b)),!1;q=null===h.Gc;h.Gc=e;f.paused&&h.Gc.pause();return!0},
acquireResources:function(){return q},resourcesLoaded:function(){if(f.v!==f.u.getDocument())return c(Error("Document changed")),!1;if(!1===h.Dh)return!1;var a=f.u.N.ld(b);n===a.zoom&&m===a.rotation||f.ak(a.Sa-1,h);return!0},drawComplete:function(e,g,n){f.v!==f.u.getDocument()||_.isNull(p)?c(Error("Document changed, or progress event not received")):(l=f.u.N.ld(b),h.Dh=!1,h.xg=!!u,h.oe=n,h.Yd=r?r.Yd:null,u?f.u.trigger("pageComplete",[g,p]):a.o.za.Mo(g),a.o.za.Ek&&!f.Fg&&f.KO(p,b,l),f.v.Uj(h.request),
clearTimeout(this.pB),$("#pageContainer"+(l.Sa-1)).removeClass("loading"),e=-1!==f.Bd.indexOf(g),f.v.am()&&e&&f.ak(l.Sa-1,h),c())},drawProgressive:function(h){if(f.v!==f.u.getDocument())c(Error("Document changed"));else{var l=f.u.N.ld(b),q=l.Sa-1;if(n===l.zoom){if(!_.isUndefined(r)){var v=$(h);v.css("top",r.ax.y+"px");v.css("left",r.ax.x+"px")}v=f.v.gc(q);p=a.o.za.vH(h,q,n,m,w.getPageTransform(),v);u=!!f.u.qq(p,q)}else a.utils.warn("bad zoom: "+q);$("#pageContainer"+(l.Sa-1)).removeClass("loading");
f.u.trigger("pageProgressiveUpdate",[q,p]);e(q)}},getPageTransform:function(){return f.u.ea.po(l.Sa-1)},onError:function(b){c(b)},useProgress:!f.Fg&&a.o.OH(),renderRect:_.isUndefined(r)?void 0:r.Yd};h.request=-1;h.Dh=!0;h.request=f.v.Mv(w);f.ak(l.Sa-1,h)}}},ak:function(b,a){this.u.ak(b);a.Ry=!0},KP:function(){for(var b=[],c=0;c<this.u.wb();++c){var e=this.u.N.Df(c);b.push(e)}this.wL(b);this.as();a.o.za.Pr()},wL:function(b){var a=this;Object.keys(this.Lc).forEach(function(c){if(-1===b.indexOf(c)){var e=
a.jl[c];e&&(e.cancel(),e.vL(),delete a.jl[c]);delete a.Lc[c]}else a.Lc[c].xg=!1})},KC:function(b){this.v&&((this.Fg=this.EL&&b>this.v.v.yr)&&1<a.utils.getCanvasMultiplier()?this.ee=0:this.ee=.5)},as:function(b){var c=this,e={};"undefined"!==typeof b&&$.each(b,function(b,a){e[c.u.N.Df(a)]=!0});var f=[];Object.keys(this.jl).forEach(function(b){b in e&&a.o.za.Ek?f[b]=c.jl[b]:c.cp(b)});this.jl=f;this.Bw=!0;clearTimeout(this.No);this.No=null},cp:function(b){var c=this.yA(b);clearTimeout(this.pB);$("#pageContainer"+
b).removeClass("loading");c&&(this.Tc(b).Dh&&(b=this.u.N.ld(b).Sa-1,$(document.getElementById("pageContainer"+b)).find(".progressive").remove()),c.cancel(),a.o.za.bz())},xL:function(b){(b=this.yA(b))&&b.vL()},sC:function(b){this.EL=!!b;this.KC()},OK:function(){}};a.o.ZM=f})(window);
(function(a){function f(b,a){this.Ej=!b;this.height=this.width=0;this.Fh=null;b&&(this.width=a.width,this.height=a.height,this.rotation=a.rotation,this.Jb=a.Sa-1,this.tk=b,this.zoom=a.zoom,this.jc=a.jc)}function e(b,a){this.J=a;this.index=b;this.height=a.reduce(function(b,a){return a.xa()>b?a.xa():b},0);this.width=a.reduce(function(b,a){return b+a.Ca()},0)}function c(b){this.rows=b.rows;this.jm=b.jm;this.gj=b.gj;this.od=b.od;this.Go=b.Go;this.gi=b.gi;this.J=b.J;this.Eh=b.Eh;b=this.rows;this.width=
this.gi.reduce(function(b,a){return b+a},2*this.gj*this.jm);this.height=b.reduce(function(b,a){return b+a.xa()},this.rows.length*this.gj*2)}function b(b,a){var c=a.zoom,d=a.rotation,e=a.width*c,c=a.height*c,g=null;d===window.o.La.Ce||d===window.o.La.zf?(g="rotate("+90*d+"deg)",g=d===window.o.La.Ce?" translate("+e+"px, 0)  "+g:" translate(0,"+c+"px)  "+g,b.css("height",e),b.css("width",c)):(d===window.o.La.ao&&(g="translate("+e+"px,"+c+"px) scale(-1,-1)"),b.css("width",e),b.css("height",c));null!==
g&&b.css({position:"absolute",transform:g,"transform-origin":"top left","ms-transform":g,"ms-transform-origin":"top left","-moz-transform":g,"-moz-transform-origin":"top left","-webkit-transform-origin":"top left","-webkit-transform":g,"-o-transform":g,"-o-transform-origin":"top left"})}function d(b,a,c){if(a)for(a=b-1;0<=a;--a)c(a);else for(a=0;a<b;++a)c(a)}function g(b,a,c){var d=document.createElement("div");d.id="pageContainer"+b.gk();2===c?0===a?d.style.marginLeft="auto":1===a&&(d.style.marginRight=
"auto"):(d.style.marginLeft="auto",d.style.marginRight="auto");d.className="pageContainer";return d}function k(b,a,c){var d=document.createElement("div");d.id="pageSection"+b.gk();d.style.cssFloat="left";d.style.position="relative";d.className="pageSection";d.appendChild(g(b,a,c));return d}function h(b,a,c){var e=document.createDocumentFragment(),g=b.Sb();d(g.length,c,function(b){e.appendChild(k(g[b],b,a))});b=document.createElement("div");b.style.clear="both";e.appendChild(b);return e}function l(a,
c){if(c.jc){var d=c.jc,e=parseFloat(d.css("width")),g=parseFloat(d.css("height")),f=parseFloat(a.style.width)/e,k=d.attr("id");if(k&&0<=k.indexOf("hrthumb")){k=c.rotation;if(k===window.o.La.Ce||k===window.o.La.zf)f=parseFloat(a.style.width)/g;b(d,c)}d.each(function(){var b=$(this);b.css({top:parseFloat(b.css("top"))*f,width:e*f,height:g*f});a.appendChild(this)})}}function n(b,a,c){var d=Math.floor(a.xa())+"px";b.style.width=Math.floor(a.Ca())+"px";b.style.height=d;b.style.top=Math.floor(c-a.xa())/
2+"px";$(b).find("canvas").each(function(){this.height=this.width=0});$(b).children().detach();l(b,a)}function m(b,a,c,e,g,f){var k=a.Sb(),h=b;d(k.length,g,function(b){if(!h)throw Error("Tried to update non-existent page section");var d=h,g=k[b],m=a.xa();d.style.width=Math.floor(c[b])+"px";d.style.height=Math.floor(m)+"px";d.style.margin=e+"px";f||n(d.firstChild,g,m);h=h.nextSibling});return h=h.nextSibling}function q(b,a,c){var e=a.Sb(),g=b;d(e.length,c,function(b){if(!g)throw Error("Tried to skip non-existent page section");
l(g.firstChild,e[b]);g=g.nextSibling});return g=g.nextSibling}function p(b,a,c){var e=a.Sb().length,g=b;u(g);a=document.createRange();d(e,c,function(){if(!g)throw Error("Tried to remove non-existent page section");g=g.nextSibling;u(g)});c=g.nextSibling;a.setStartBefore(b);a.setEndAfter(g);a.deleteContents();return c}function u(b){$(b.querySelector(".pageContainer")).children().detach()}function r(b){this.ei=[];this.state=b}f.XF=function(b,a){var c=new f(null,{});c.Jb="b"+b;c.width=0;c.height=0;c.zoom=
a.zoom;c.rotation=0;c.jc=null;c.gT=a.width;c.E_=a.height;return c};f.prototype={TH:function(){return this.Fh},Ze:function(){return this.zoom},je:function(){return this.rotation},Ca:function(){return this.width*this.zoom},lA:function(){var b=this.width;this.Ej&&(b=this.gT);return b*this.zoom},xa:function(){return this.height*this.zoom},gk:function(){return this.Jb},PT:function(b){return this.Ej&&b.Ej||this.tk===b.tk},aB:function(b){return this.Ej!==b.Ej||!this.Ej&&(this.tk!==b.tk||this.Ca()!==b.Ca()||
this.xa()!==b.xa()||this.Ze()!==b.Ze()||this.je()!==b.je())}};e.prototype={Sb:function(){return this.J},xa:function(){return this.height},Ca:function(){return this.width},gk:function(){return this.index},aB:function(b){var a=b.Sb();return this.J.length!==b.Sb().length||this.J.some(function(b,c){return b.aB(a[c])})},QT:function(b){var a=b.Sb();return this.J.length===b.Sb().length&&this.J.every(function(b,c){return b.PT(a[c])})}};c.prototype={Sb:function(){return this.J},Ca:function(){return this.width},
xa:function(){return this.height},TH:function(b){return this.rows[b]}};r.prototype={make:function(b,a,c){this.ei.push({xB:b,eh:{Fh:a,JU:c}})},VO:function(b){var a=this,c=b.firstChild,d=[];b.style.width=Math.ceil(this.state.Ca())+"px";this.ei.forEach(function(e){switch(e.xB){case "addRow":d=d.concat(e.eh.Fh.Sb());c=a.nF(c,e.eh,b);break;case "updateRow":d=d.concat(e.eh.Fh.Sb());c=a.cY(c,e.eh,b);break;case "updateColumns":c=a.WX(c,e.eh,b);break;case "skipRow":c=a.tX(c,e.eh,b);break;case "replaceRow":d=
d.concat(e.eh.Fh.Sb());c=a.zV(c,e.eh,b);break;case "removeRow":c=a.$J(c,e.eh,b);break;default:console.warn("Unsupported layout change operation:",e.xB)}});if(c&&"selectionrect"!==c.id)throw Error("Nodes left after applying changes");d=d.filter(function(b){return!b.Ej}).map(function(b){return b.gk()});return{EB:d}},eS:function(){var b=[];this.ei.forEach(function(a){switch(a.xB){case "updateRow":b=b.concat(a.eh.Fh.Sb())}});return b.filter(function(b){return!b.Ej}).map(function(b){return b.gk()})},nF:function(b,
a,c){a=a.Fh;var d=h(a,this.state.gi.length,this.state.Eh);m(d.firstChild,a,this.state.gi,this.state.gj,this.state.Eh);b?c.insertBefore(d,b):c.appendChild(d);return b},cY:function(b,a){return m(b,a.Fh,this.state.gi,this.state.gj,this.state.Eh)},tX:function(b,a){return q(b,a.Fh,this.state.Eh)},zV:function(b,a,c){b=this.$J(b,a);return this.nF(b,a,c)},$J:function(b,a){return p(b,a.JU,this.state.Eh)},WX:function(b,a){return m(b,a.Fh,this.state.gi,this.state.gj,this.state.Eh,!0)}};a.QR=function(b){var a=
b.kY,d=b.gj,g={width:0,height:0},k={width:0,height:0};a&&0<a.length&&(g={width:a[0].width,height:a[0].height,zoom:a[0].zoom},k={width:a[a.length-1].width,height:a[a.length-1].height,zoom:a[a.length-1].zoom});var h=b.vX||0,n=[],m;for(m=0;m<h;++m)n.push(f.XF(m,g));var n=n.concat(a.map(function(b){return new f(b.id,b)})),l=b.jm;l>n.length&&(l=n.length);a=b.od||0;g=Math.ceil(n.length/b.jm);_.isUndefined(b.Go)||(g=b.Go<g?b.Go:g);var p=Array(l),h=n.reduce(function(b,a,c){var d;0===b.length?(d=[],b.push(d)):
d=b[b.length-1];d.length===l&&(d=[],b.push(d));d.push(a);if(c===n.length-1&&(a=l-d.length,0<a))for(var e=0;e<a;++e)d.push(f.XF(c+e+1,k));return b},[]).slice(a,a+g).map(function(b,a){var c=new e(a,b);c.Sb().forEach(function(b,a){p[a]=p[a]?b.lA()>p[a]?b.lA():p[a]:b.lA()});return c});return new c({rows:h,gj:d,jm:l,od:a,Go:g,gi:p,J:n,Eh:b.Eh})};a.PR=function(b,a){var c=new r(a);if(!b)return a.rows.forEach(function(b){c.make("addRow",b,null)}),c;var d=b.rows,e,g=b.gi,f=a.gi;e=g.length===f.length?g.every(function(b,
a){return b===f[a]}):!1;g=a.rows;g.forEach(function(b){var a=d[b.gk()];a?a.QT(b)?a.aB(b)?c.make("updateRow",b,a):e?c.make("skipRow",b,a):c.make("updateColumns",b,a):c.make("replaceRow",b,a):c.make("addRow",b,a)});if(g.length<d.length)for(g=g.length;g<d.length;++g)c.make("removeRow",null,d[g]);return c};a.Fp=f;a.aZ=e;a.TY=c;a.SY=r})((window.o=window.o||{}).kD={});
(function(a){var f=XODText,e=window.o,c={pD:"Single",tp:"Continuous",aD:"Facing",Fx:"FacingContinuous",ys:"Cover",zs:"CoverFacing",Mg:"Custom"};e.Cd=function(b,a,e){this.mode=null;this.u=b;this.Nd=this.zh=this.Ub=null;this.ig=this.od=0;this.lk=null;this.Bd=[];this.xd={};b=a===c.Mg;this.Ro=_.isUndefined(e)?!b:e;_.isNull(a)||_.isUndefined(a)||(this.mode=a)};e.Cd.prototype={RW:function(b,a,e,f,h){this.mode=c.Mg;this.Ub=b;this.zh=a;this.Nd=e;this.od=f;this.ig=h},gW:function(b){this.xd=b},ZA:function(){return this.mode===
c.tp||this.mode===c.Fx||this.mode===c.ys},xb:function(b,a){if(!this.lk)return-1;var c=this.lk.TH(b-this.lk.od);if(this.u.AA())var e=this.lk.jm,c=c.Sb()[e-(a+1)];else c=c.Sb()[a];return c&&_.isNumber(c.gk())?c.gk():-1},cf:function(b,a){if(this.xd.pageToWindow)return this.xd.pageToWindow(b,a);b=this.u.BA(b,a);var c=this.u.N.Sd(a);return{x:b.x+c.Gg,y:b.y+c.Hg}},RU:function(b,a){if(this.xd.pageToWindow)return this.xd.pageToWindow(b,a);b=this.u.zS(b,a);var c=this.u.N.Sd(a);return{x:b.x+c.Gg,y:b.y+c.Hg}},
Fk:function(b,c){if(this.xd.windowToPage)return this.xd.windowToPage(b,c);var e=this.u.sb(c),k=this.u.N.Sd(c),h=new f.Fd;h.x=b.x-k.Gg;h.y=b.y-k.Hg;e=a.Dd(e,this.u.gd(c+1),{width:this.u.kd(c),height:this.u.jd(c)},0,!1);e=e.inverse();h=e.W(h);return{pageIndex:c,x:h.x,y:h.y}},qY:function(b,c){if(this.xd.windowToPage)return this.xd.windowToPage(b,c);var e=this.u.sb(c),k=this.u.N.Sd(c),h=new f.Fd;h.x=b.x-k.Gg;h.y=b.y-k.Hg;e=a.Dd(e,this.u.je(c+1),this.u.v.gc(c),0,!1);e=e.inverse();h=e.W(h);return{pageIndex:c,
x:h.x,y:h.y}},kv:function(b,a){if(this.xd.getSelectedPages)return this.xd.getSelectedPages(b,a);var c=null,e=null;b=_.isUndefined(b)?this.u.Vd:b;a=_.isUndefined(a)?this.u.Ib:a;a:for(var f=this.od;f<this.ig;f++)for(var l=0;l<this.Ub;l++){var n=this.xb(f,l);if(!(0>n)){var m=this.u.N.Sd(n),q=m.Gg,p=m.Hg,u=m.Gg+m.width*(m.zoom||this.u.zoom),m=m.Hg+m.height*(m.zoom||this.u.zoom);null===c&&b.x<=u&&b.x>=q&&b.y<=m&&b.y>=p&&(c=n);null===e&&a.x<=u&&a.x>=q&&a.y<=m&&a.y>=p&&(e=n);if(null!==c&&null!==e)break a}}c>
e&&(f=c,c=e,e=f);return{first:c,last:e}},Td:function(b,a){if(this.xd.getVisiblePages)return this.xd.getVisiblePages(b,a);if(0===this.u.yb().length)return[];for(var c,e=[],f=this.getVisibleRegionRect(b,a),l=this.getVisibleRegionRect(0,0),n=this.od;n<this.ig;n++)for(var m=0;m<this.Ub;m++)if(c=this.xb(n,m),!(0>c)){var q=this.uo(c,f,l);null!==q&&e.push({Jb:c,DJ:q.aV})}e.sort(function(b,a){return a.DJ-b.DJ});c=e.length;for(f=0;f<c;++f)e[f]=e[f].Jb;return e},getVisibleRegionRect:function(b,a){b=_.isUndefined(b)?
.5:b;a=_.isUndefined(a)?.5:a;var c=this.u.iv();if(null===c)return[];var e=c.getBoundingClientRect(),f=e.width,l=e.height,n=c.scrollTop+e.top-l*b,c=c.scrollLeft+e.left-f*a;return{x1:c,y1:n,x2:c+f*(1+2*a),y2:n+l*(1+2*b)}},uo:function(b,c,e){var f=this.u.v.gc(b),h=this.pageToWindowNoRotate({x:0,y:0},b),l=this.pageToWindowNoRotate({x:f.width,y:f.height},b),f=a.utils.normalizeRect(h,l);c=a.utils.getRectIntersection(f,c);if(c.x1!==c.x2){var n;e&&(e=a.utils.getRectIntersection(f,e),n=(e.x2-e.x1)*(e.y2-e.y1)/
((f.x2-f.x1)*(f.y2-f.y1)));h=this.windowToPageNoRotate({x:c.x1,y:c.y1},b);l=this.windowToPageNoRotate({x:c.x2,y:c.y2},b);return{Yd:a.utils.normalizeRect(h,l),ax:{x:c.x1-f.x1,y:c.y1-f.y1},aV:n}}return null},po:function(b){if(this.xd.getPageTransform)return this.xd.getPageTransform(b);b=this.u.no(b);return{x:0,y:0,width:b.width,height:b.height}},sA:function(){return{x:0,y:0}},Tn:function(){return e.kD.QR({gj:this.u.VH(),kY:this.u.N.Td(),jm:this.Ub,od:this.od,Go:this.ig-this.od,vX:this.mode===c.ys||
this.mode===c.zs?1:0,Eh:this.u.AA()})},nr:function(b){var a=this.u.N.Df(b);return this.u.Fa.nr(a)||this.u.N.Sd(b).jc},OF:function(b){var c=this;this.Ru(function(e){var f=e.id.slice(13),h=parseInt(f,10);0===f.indexOf("b")||c.nr(h)||$(e).children("canvas.canvas"+h).each(function(){this.height=this.width=0});a.o.za.Zy(h);b&&$(e).children().detach()})},Sr:function(b){b?this.mode===c.Mg?this.u.Vc().children().detach():this.OF(!0):(this.lk=null,this.OF(),this.u.Vc().empty(),this.u.trigger("contentRemoved"))},
Dg:function(){if(this.xd.createPageSections)return this.Sr(!1),this.xd.createPageSections(),_.range(0,this.u.wb());var b=this;if(this.mode!==c.Mg){var a=this.Tn(),g=e.kD.PR(this.lk,a);g.eS().forEach(function(a){var c=document.getElementById("pageContainer"+a),c=b.u.NC?$(c).find("#hrthumb"+a):$(c).find(".canvas"+a+":not(.progressive)");0<c.length&&b.u.N.mC(a,c)});this.lk=a;a=g.VO(this.u.Vc().get(0)).EB;this.u.Ly(this.lk.xa());return a}return _.range(0,this.u.wb())},Ru:function(b){var c=this.u.Vc();
if(0!==c.length)for(c=c[0],c=c.firstChild;c;)a.utils.hasClass(c,"pageSection")&&b(c.firstChild),c=c.nextSibling},Qf:function(){var b=this.u.N;this.Ru(function(a){var c=a.parentNode,e=Number(a.id.slice(13));_.isNaN(parseInt(e,10))||b.KW(e,{Gg:c.offsetLeft+a.offsetLeft,Hg:c.offsetTop+a.offsetTop})})}};e.xp=function(b){if(!b)throw Error("DisplayModeManager requires DocumentViewer to initialize");this.u=b;this.ia=new a.o.Cd(this.u,c.tp)};e.xp.prototype={ec:function(){return this.ia},AK:function(b){this.ia.Sr();
null===this.u.v?(this.ia=b,this.u.trigger("displayModeUpdated")):(this.ZE(b),this.u.N.cj(this.u.Af()),this.u.trigger("zoomUpdated",this.u.Ze()),this.u.Ch(),this.ia.ZA()&&(this.Dg(),this.ia.Qf()),this.u.Ke(this.u.ac+1))},ZE:function(b){this.ia=b;this.nD();this.u.N.PF();this.u.trigger("displayModeUpdated")},nD:function(){var b=this.ia.mode;_.isNull(b)||(b===c.pD?(this.ia.Ub=1,this.ia.zh=Math.ceil(this.u.v.numPages/this.ia.Ub),this.ia.Nd=Math.ceil(this.u.ac/this.ia.Ub),this.ia.od=this.ia.Nd,this.ia.ig=
this.ia.Nd+1):b===c.tp?(this.ia.Ub=1,this.ia.zh=Math.ceil(this.u.v.numPages/this.ia.Ub),this.ia.Nd=-1,this.ia.od=0,this.ia.ig=this.ia.zh):b===c.aD?(this.ia.Ub=2,this.ia.Nd=Math.floor(this.u.ac/this.ia.Ub),this.ia.zh=Math.ceil(this.u.v.numPages/this.ia.Ub),this.ia.od=this.ia.Nd,this.ia.ig=this.ia.Nd+1):b===c.Fx?(this.ia.Ub=2,this.ia.Nd=-1,this.ia.zh=Math.ceil(this.u.v.numPages/this.ia.Ub),this.ia.od=0,this.ia.ig=this.ia.zh):b===c.ys?(this.ia.Ub=2,this.ia.Nd=-1,this.ia.zh=Math.ceil((this.u.v.numPages+
1)/this.ia.Ub),this.ia.od=0,this.ia.ig=this.ia.zh):b===c.zs&&(this.ia.Ub=2,this.ia.Nd=Math.floor(this.u.ac/this.ia.Ub),this.ia.zh=Math.ceil(this.u.v.numPages/this.ia.Ub),this.ia.od=this.ia.Nd,this.ia.ig=this.ia.Nd+1))},kv:function(b,a){return this.ia.getSelectedPages(b,a)},Td:function(b,a){return this.ia.getVisiblePages(b,a)},uo:function(b,a,c){return this.ia.uo(b,a,c)},JA:function(b,a){return this.ia.getVisibleRegionRect(b,a)},cf:function(b,a){return this.ia.pageToWindow(b,a)},Fk:function(b,a){return this.ia.windowToPage(b,
a)},po:function(b){return this.ia.getPageTransform(b)},sA:function(b){return this.ia.getPageOffset(b)},Tn:function(){return this.ia.Tn()},Dg:function(b){return this.ia.Dg(b)},Sr:function(b){return this.ia.Sr(b)},Ru:function(b){return this.ia.Ru(b)},Qf:function(){return this.ia.Qf()}};a.o.ae=c})(window);
(function(a){function f(){}var e=window.o,c=XODText;f.prototype=Object.create(Error.prototype);e.aa=function(){var b=this;this.select=_.bind(this.select,this);this.gb=c.gb;this.v=null;this.defaults={FitMode:this.Og.Gx,DisplayMode:new a.o.Cd(this,a.o.ae.tp),Zoom:1};this.da=new a.o.ga(this);this.ea=new a.o.xp(this);this.pi={};this.hM=3;this.yK();this.LG=this.NO=this.Iq=!1;this.cursor="default";this.Bo=null;this.Vi=[];this.jB=!1;this.xJ=function(b,a,c){c(b)};a.o.Px(5);this.iD=function(a){this.trigger("mouseLeftUp",
a);b.wa&&b.wa.mouseLeftUp&&b.wa.mouseLeftUp(a);for(var c in b.links)if(b.links.hasOwnProperty(c)){a=b.links[parseInt(c,10)];for(var e=0;e<a.length;++e)a[e].style&&(a[e].style.border="")}};this.hD=function(a){this.trigger("mouseLeftDown",a);b.wa&&b.wa.mouseLeftDown&&(b.wa.mouseLeftDown(a),b.wa.isSelecting&&b.wa.isSelecting()||!(b.wa instanceof Tools.Kk)?b.Cm("none"):b.Cm("auto"))};this.JM=function(b){this.trigger("click",b)};this.UM=function(a){this.trigger("tap",a);b.wa&&b.wa.tap&&b.wa.tap(a)};this.LM=
function(a){this.trigger("dblClick",a);b.wa&&b.wa.mouseDoubleClick&&b.wa.mouseDoubleClick(a)};this.NM=function(a){this.trigger("keyDown",a);b.wa&&b.wa.keyDown&&b.wa.keyDown(a)};this.OM=function(a){this.trigger("keyUp",a);b.wa&&b.wa.RI&&b.wa.RI(a)};this.KM=function(a){b.wa&&b.wa.contextMenu&&b.wa.contextMenu(a)};this.PM=function(a){this.trigger("mouseEnter",a);b.wa&&b.wa.BU&&b.wa.BU(a)};this.jD=function(a){this.trigger("mouseMove",a);b.wa&&b.wa.mouseMove&&b.wa.mouseMove(a)};this.QM=function(a){this.trigger("mouseLeave",
a);b.wa&&b.wa.mouseLeave&&b.wa.mouseLeave(a)};this.RM=function(a){this.trigger("mouseRightDown",a);b.wa&&b.wa.Ar&&b.wa.Ar(a)};this.SM=function(a){this.trigger("mouseRightUp",a);b.wa&&b.wa.CU&&b.wa.CU(a)};this.TM=function(a){b.wa&&b.wa.JB&&b.wa.JB(a)};this.sL={AnnotationCreateArrow:new a.ba.rx(this,"AnnotationCreateArrow"),AnnotationCreateCallout:new a.ba.CalloutCreateTool(this,"AnnotationCreateCallout"),AnnotationCreateEllipse:new a.ba.Bx(this,"AnnotationCreateEllipse"),AnnotationCreateFreeHand:new a.ba.FreeHandCreateTool(this,
"AnnotationCreateFreeHand"),AnnotationCreateFreeText:new a.ba.Tm(this,"AnnotationCreateFreeText"),AnnotationCreateLine:new a.ba.Rg(this,"AnnotationCreateLine"),AnnotationCreatePolygon:new a.ba.Ug(this,"AnnotationCreatePolygon"),AnnotationCreatePolygonCloud:new a.ba.Ip(this,"AnnotationCreatePolygonCloud"),AnnotationCreatePolyline:new a.ba.Vg(this,"AnnotationCreatePolyline"),AnnotationCreateRectangle:new a.ba.Lx(this,"AnnotationCreateRectangle"),AnnotationCreateDistanceMeasurement:new a.ba.Bs(this,
"AnnotationCreateDistanceMeasurement"),AnnotationCreatePerimeterMeasurement:new a.ba.Kx(this,"AnnotationCreatePerimeterMeasurement"),AnnotationCreateAreaMeasurement:new a.ba.qx(this,"AnnotationCreateAreaMeasurement"),AnnotationCreateSignature:new a.ba.SignatureCreateTool(this,"AnnotationCreateSignature"),AnnotationCreateStamp:new a.ba.Kp(this,"AnnotationCreateStamp"),AnnotationCreateSticky:new a.ba.Ss(this,"AnnotationCreateSticky"),AnnotationCreateTextHighlight:new a.ba.Sx(this,"AnnotationCreateTextHighlight"),
AnnotationCreateTextSquiggly:new a.ba.Tx(this,"AnnotationCreateTextSquiggly"),AnnotationCreateTextStrikeout:new a.ba.Ux(this,"AnnotationCreateTextStrikeout"),AnnotationCreateTextUnderline:new a.ba.Vx(this,"AnnotationCreateTextUnderline"),AnnotationCreateRedaction:new a.ba.Jp(this,"AnnotationCreateRedaction"),AnnotationEdit:new a.ba.Kk(this,"AnnotationEdit"),Pan:new a.ba.Gp(this,"Pan"),TextSelect:new a.ba.bn(this,"TextSelect"),MarqueeZoomTool:new a.ba.jf(this,"MarqueeZoomTool"),AnnotationEraserTool:new a.ba.Cs(this,
"AnnotationEraserTool")}};e.aa.prototype={eP:function(){function b(b){h=!0;var e=c.v.Sb()[b-1];if(e){var g,f,k=c.Ba().Bc();if(l&&l!==e){for(g=0;g<k;++g)f=k[g],f.kk()&&f.pageNumber===n&&k[g].Me("PC",new a.Annotations.O.ub.Events.Fp("Close",c,{}));l.Me("C",new a.Annotations.O.ub.Events.Fp.create("Close",c,{}))}l=e;n=b;e.Me("O",new a.Annotations.O.ub.Events.Fp.create("Open",c,{}));for(g=0;g<k;++g)f=k[g],f.kk()&&f.pageNumber===b&&k[g].Me("PO",new a.Annotations.O.ub.Events.Fp("Close",c,{}))}}var c=this;
c.Vc().on("dragstart",function(b){"IMG"===b.target.nodeName&&b.preventDefault()});c.Vc().on("touchstart",function(b){c.hD(b)});c.Vc().on("touchmove",function(b){c.Ib={x:b.originalEvent.touches[0].pageX,y:b.originalEvent.touches[0].pageY};c.jD(b)});c.Vc().on("touchend",function(b){c.iD(b);c.py=!1});c.Vc().on("pointerdown",function(b){c.TM(b)});c.Vc().dblclick(function(b){c.LM(b)});c.Vc().click(function(b){c.JM(b)});c.Vc().on("tap",function(b){c.UM(b)});$(window).on("keydown",function(b){c.NM(b)});
$(window).on("keyup",function(b){c.OM(b)});c.Vc().on("contextmenu",function(b){c.KM(b)});c.Vc().mouseenter(function(b){c.PM(b)});var e=c.Vc(),f=c.yb();0<f.length&&(e=f);e.mousedown(function(b){if(0<f.length){var a=f[0].clientHeight;if(b.clientX>f[0].offsetLeft+f[0].clientWidth||b.clientY>f[0].offsetTop+a)return}1===b.which?(c.hD(b),c.py=!0):3===b.which&&(c.RM(b),c.xE=!0)});$(document).on("mouseup",function(b){1===b.which&&c.py?(c.iD(b),c.py=!1):3===b.which&&c.xE&&(c.SM(b),c.xE=!1)});$(document).mousemove(function(b){c.Ib=
{x:b.pageX,y:b.pageY};c.jD(b)});c.Vc().mouseleave(function(b){c.QM(b)});if(c.ea.ec().Ro)c.yb().on("scroll",_.bind(c.onscroll,c));$(a).on("resize",_.bind(c.resize,c));c.on("PAUSE",function(){c.Fa.pause()});c.on("RESUME",function(){c.Fa.resume()});var h=!1,l=null,n;c.on("documentReady",function(){c.v.Me("Init",new a.Annotations.O.ub.Events.ZC.create("Open",c,{}));c.v.Me("Open",new a.Annotations.O.ub.Events.ZC.create("Open",c,{}));h||b(1)});c.on("pageNumberUpdated",function(a,e){b(e);c.v.xm({currentPage:e})});
c.on("visiblePagesChanged",function(b,a){if(c.jB){c.uu();var e=[];a.forEach(function(b){c.wg[b]&&e.push(b)});c.wg.fill(!1);e.forEach(function(b){c.wg[b]=!0});var g=c.da.Bc().filter(function(b){return-1===a.indexOf(b.rb()-1)});c.da.zu(g,!0,!0)}c.v.xm({visiblePages:a});var f=_.intersection(a,c.nq);f.length&&(clearTimeout(c.SO),c.SO=setTimeout(function(){c.Yi.Ui("DocumentViewer.renderRequest",{type:"annotations",pages:f})},80))});c.on("endOfDocumentResult",function(b,a){c.bm=!1;c.gs();a?(c.loop=!0,c.DC(c.fG,
c.VP,!1)):c.loop=!1})},resize:function(b){b&&b.target!==window||!this.v||!this.ea.ec().Ro||(this.Af===this.Og.Zoom?(this.Ly(),this.ea.ec().Qf(),this.onscroll()):(b=this.Af(),b!==this.N.og?(this.hq(b),this.Xy()):(this.ea.ec().Qf(),this.Xy(),this.onscroll())))},Xy:function(){var b=this.yb(),a=(b[0].scrollWidth-b.width()+this.jv())/2;b.scrollLeft(a)},UV:function(){this.resize()},TF:function(){var b=this;return this.Eu=this.Eu.then(function(){if(b.v)return b.trigger("documentUnloaded"),b.Ch(!0),Promise.resolve(b.ed()).then(function(){b.yK()});
b.em&&b.em.Mb();return Promise.resolve()})},yK:function(){this.v=null;this.Eu=Promise.resolve();this.Fa=new a.o.ZM(this);this.ea.AK(this.defaults.DisplayMode);this.Af=this.defaults.FitMode;this.kK=!1;this.SI=[];this.ac=0;this.links={};this.wf=[];this.Ra||(this.Ra=Promise.resolve(null));this.N=new e.Wx(null);this.Ib=this.Vd=null;this.margin=4;this.oK=this.pK=0;this.hs=new c.we;this.nd=this.jJ=this.Yv=null;this.eJ=this.qB=this.bm=this.NA=this.loop=!1;this.fJ=this.gJ=null;this.jr=!1;this.pL="rgba(0, 0, 200, 0.3)";
this.$B="rgba(255, 255, 0, 0.5)";this.Iy="rgba(248, 153, 57, 0.5)";var b=this,d=Object.keys(this.pi);0<d.length&&d.forEach(function(a){b.pi[a].then(function(b){b.destroy()})});this.pi={};this.Sz=[];this.Yi=new a.o.$m.Hp;this.Yi.WJ("DocumentViewer.renderRequest",{read:function(a){a.Sy&&b.ea.Qf();b.YX();a=b.ea.Td();b.Fa.ip(a);return{Bd:a,TV:b.mV()}},consolidateChanges:function(b){var a=b.filter(function(b){return"pages"===b.type}),c=b.filter(function(b){return"annotations"===b.type}),d=b.filter(function(b){return"layout"===
b.type});b=b.filter(function(b){return"retainScroll"===b.type});var e=[];a.length&&e.push({type:"pages",pages:_.union.apply(null,a.map(function(b){return b.pages||[]})),useVisiblePages:a.some(function(b){return!!b.useVisiblePages}),check:a.every(function(b){return!!b.check})});c.length&&e.push({type:"annotations",pages:_.union.apply(null,c.map(function(b){return b.pages||[]}))});d.length&&e.push({type:"layout",pages:_.union.apply(null,d.map(function(b){return b.pages||[]}))});return e=e.concat(b)},
write:function(a,c){var d={Sy:!1};c.forEach(function(c){var e;"pages"===c.type?(e=c.useVisiblePages?_.union(a.Bd,c.pages):_.intersection(a.Bd,c.pages),0<e.length&&(c.check?b.Fa.sP():b.Ck(e))):"annotations"===c.type?(e=_.intersection(a.Bd,c.pages),b.nq=_.difference(b.nq,e),b.Fa.ZJ(),e.forEach(function(a){b.ak(a)})):"layout"===c.type?(d.Sy=!0,e=b.ea.Dg().concat(c.pages),c.pages.forEach(function(a){b.N.mC(a,void 0)}),e.length&&(e.forEach(function(a){b.Fa.xv(b.N.Df(a))}),b.Yi.Ui("DocumentViewer.renderRequest",
{type:"pages",pages:e})),b.Fa.KC(b.Ze())):"retainScroll"===c.type&&b.tY(a.TV)});return d},clearCacheIfFull:function(){var a=null;try{a=b.dk(b.Pl()-1).getContext("2d")}catch(c){console.log("Cache is full")}a||(console.log("Clearing Cache"),b.Ch(!1,!1,!1))}},{Sy:!0},!1);this.iw=[];this.nq=[];this.hu=null;this.wF=Promise.resolve()},mV:function(){var b=this.Pl()-1,a=this.yb(),c=a.scrollLeft()||0,a=a.scrollTop()||0,e=document.getElementById("pageContainer"+b);e&&(c-=e.offsetLeft+e.parentNode.offsetLeft,
a-=e.offsetTop+e.parentNode.offsetTop);return{Jb:b,x:c,y:a}},tY:function(b){var a=document.getElementById("pageContainer"+b.Jb),c=b.x;b=b.y;a&&(c+=a.offsetLeft+a.parentNode.offsetLeft,b+=a.offsetTop+a.parentNode.offsetTop);this.scrollTo(c,b)},kM:function(b){var a={};_.isUndefined(b)||(_.isObject(b)?a=b:a.docId=b);"onError"in a||(a.onError=function(b){throw Error("Error loading document: "+b);});"getPassword"in a||(a.getPassword=function(){throw Error("Document requires a password. If you wish to process this type of document please define a getPassword callback.");
});"docId"in a||(a.docId=null);"workerTransportPromise"in a||("pdf"===a.type?a.workerTransportPromise=e.uv(a.pdfBackendType,a.workerHandlers,a.l):"office"===a.type&&(a.workerTransportPromise=e.uI(a.officeBackendType,a.workerHandlers,a.l)));return a},PJ:function(b){this.Yi.Ui("DocumentViewer.renderRequest",{type:"layout",pages:b});this.Yi.Ui("DocumentViewer.renderRequest",{type:"retainScroll"})},QH:function(){return this.Yi},QG:function(){if(this.jB){for(var b=this.ea.Td(),a=0;a<b.length;++a){var c=
b[a];if(!this.wg[c])return c}return null}c=this.ac;b=this.wg;for(a=c;!_.isUndefined(b[c])||!_.isUndefined(b[a]);){if(!1===b[c])return c;if(!1===b[a])return a;--a;++c}return null},TG:function(b){var a=this;b=b.pages;a.kI||-1===b.indexOf(1)||(a.trigger("documentReady"),a.kI=!0);var c=a.Fa.wS();b.forEach(function(b){--b;a.wg[b]=!0;0<=c.indexOf(b)&&a.ak(b)});var e=a.QG();null===e&&a.trigger("annotationsLoaded");a.Cv=!1;a.nq=a.nq.concat(b.map(function(b){return b-1}));a.uu(e)},uu:function(b){this.Cv||
(b=_.isUndefined(b)?this.QG():b,null!==b?this.fU([b],this.v):this.Cv=!1)},fU:function(b,a){var c=this;c.Cv=!0;this.iw=this.iw.concat(b);this.hu||(this.hu=setTimeout(function(){if(c.em===a){var e=c.iw;c.iw=[];c.hu=null;c.IZ=c.wF.then(function(){if(c.em===a){var b=e.map(function(b){return b+1});c.da.QB(b);for(var f=e.length,n=0;n<f;++n)c.da.hU(e[n]);return c.getDocument().Jz(b)}}).then(function(e){return new Promise(function(f){c.em===a&&e?e.hasOwnProperty("xfdfString")?c.xJ(e.xfdfString,b,function(b){c.em!==
a||_.isUndefined(b)?f():c.da.sI(b,function(){c.TG(e);f()},c.iR(e.xfdfString===b))}):e.hasOwnProperty("annots")&&(c.da.dh(e.annots),c.TG(e),f()):(c.trigger("annotationsLoaded"),f())})})}},20))},ur:function(b,c){var g=this;c=g.kM(c);var k=new a.CoreControls.Document(c.docId,c.type);this.em=k;k.zg(g);g.Eu.then(function(){return g.Ra}).then(function(b){k.Dm(b)}).then(function(){return new Promise(function(a,e){g.kI=!1;g.xF=!1;k.ur(b,function(b){k!==g.em?(k.Mb(),e(new f)):b?e(b):null!==g.v?a(g.TF().then(function(){return k})):
a(k)},{annotationManager:g.da,getPassword:c.getPassword,workerTransportPromise:c.workerTransportPromise,extension:c.extension,defaultPageSize:c.defaultPageSize,pageSizes:c.pageSizes,forceClientSideInit:c.forceClientSideInit})})}).then(function(b){g.v=b;var f=b.numPages;g.i0=f;g.wg=Array(f);g.Cv=!1;f=b.bp();g.wg.fill(f?!1:1);f&&g.uu(0);g.N=new e.Wx(b);g.defaults.FitMode===g.Og.Zoom&&g.N.cj(g.defaults.Zoom);g.v.on("bookmarksUpdated",function(){g.trigger("bookmarksUpdated")});g.v.on("officeAnnotationsUpdated",
function(b,a){g.da.dh(a);g.da.ki(a)});g.N.on("layoutChanged",g.cU.bind(g));g.N.on("zoomChanged",function(b,a){g.NC=g.Fa.Fg;g.Fa.KC(a)});g.da.tV(g.N);g.trigger("beforeDocumentLoaded");c.type&&"pdf"===c.type&&a.o.dG!==a.o.Qm.Us||g.Fa.$W(!0);g.Fa.init();g.ea.ZE(g.ea.ec());g.LG||(g.LG=!0,g.eP());g.ea.ec().mode!==a.o.ae.Mg&&(g.N.cj(g.Wt(g.Af)),g.Ch(),g.ea.Dg(),g.ea.Qf(),g.Ck(),b=g.yb(),f=(b[0].scrollWidth+g.jv()-b.innerWidth())/2,b.scrollLeft(f));g.RO=new Promise(function(b){g.off("annotationsLoaded.internal").on("annotationsLoaded.internal",
function(){g.xF=!0;b()})});g.trigger("documentLoaded");1.2>=g.v.v.Tf&&g.trigger("documentReady")})["catch"](function(b){if(!(b instanceof f))c.onError(b)})},jR:function(){return this.RO},Cm:function(b){this.ea.ec().mode!==a.o.ae.Mg&&this.yb().css("touch-action",b)},yb:function(){return $(this.iv())},iv:function(){this.qK||this.QK(document.getElementById("DocumentViewer"));return this.qK},QK:function(b){this.qK=b},Vc:function(){return $(this.$H())},$H:function(){this.GL||this.UK(document.getElementById("viewer"));
return this.GL},UK:function(b){this.GL=b},jv:function(){var b=$('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div></div>');$("body").append(b);var a=$("div",b).innerWidth();b.css("overflow-y","auto");var c=$("div",b).innerWidth();$(b).remove();return a-c},ed:function(){var b=this;if(this.v){var a=this.v;clearTimeout(this.hu);return this.da.ed().then(function(){return Promise.all([b.wF,b.Yi?b.Yi.ed():null,b.Fa?b.Fa.ed():
null,b.N?b.N.ed():null])}).then(function(){b.off("documentReady.annotsLoaded");a.off();return a.Mb()})}return Promise.resolve()},jd:function(b){var a=this.v.$q(b);return 90===a||270===a?this.v.kd(b):this.v.jd(b)},kd:function(b){var a=this.v.$q(b);return 90===a||270===a?this.v.jd(b):this.v.kd(b)},Dc:function(b){return this.v.Dc(b)},Ba:function(){return this.da},bW:function(b){this.PO=b},iR:function(b){return $.extend({VA:b},this.PO)},xW:function(b){this.jB=b},rW:function(){},QW:function(b){this.xJ=
b},PW:function(b){this.uJ=b},LF:function(){if(this.uJ){for(var b=this.SI,a=this.ea.Td(0,0),b=_.difference(a,b),c=0;c<b.length;++c)this.uJ(b[c]+1);this.SI=a}},Sl:function(){return this.ea},uX:function(b,a,c){if(!e.Hi())return console.warn("snapToNearest requires the full API to be enabled. Please set the fullAPI option to true in your WebViewer constructor."),Promise.resolve();var f=this.getDocument(),h=f.Ul(b-1,a,c);return this.ER(b).then(function(b){return b.snapToNearest(h.x,h.y)}).then(function(a){return f.rv(b-
1,a.x,a.y)})},ER:function(b){if(this.pi[b])return this.pi[b];var a=this,c;this.pi[b]=window.PDFNet.initialize().then(function(){return a.getDocument().mg().then(function(a){c=a;return c.requirePage(b)}).then(function(){return c.getGeometryCollectionForPage(b)}).then(function(b){return b})});a.LO(b);return this.pi[b]},LO:function(b){this.Sz.push(b);this.Sz.length>this.hM&&(b=this.Sz.shift(),this.pi[b].then(function(b){b.destroy()}),delete this.pi[b])},Rw:function(b,c){a.o.za.Rw(b,c)},pe:function(b){"undefined"!==
typeof b.enableAnnotations&&(this.Iq=!!b.enableAnnotations);"undefined"!==typeof b.annotMode&&(this.NO=!!b.annotMode)},Ze:function(){return this.N.og},dv:function(){return this.margin},VH:function(){return this.margin*this.Ze()},zW:function(b){this.margin=b},lv:function(b){return b?this.N.hS(b-1):this.N.lv()},CA:function(b){return b?this.N.iS(b-1):this.N.CA()},dX:function(b){this.pL=b},ZW:function(b){this.$B=b.searchResult||this.$B;this.Iy=b.activeSearchResult||this.Iy},nv:function(){return this.wa},
KS:function(){return this.sL},mv:function(b){return this.sL[b]},je:function(b){return _.isUndefined(b)?this.N.tv:this.N.Sd(b-1).rotation},gd:function(b){var a=this.je(b);if(_.isUndefined(b))return a;b=this.Tl(b)/90;return(a+b)%4},YW:function(b,a){var c;0<=b&&3>=b&&(_.isUndefined(a)?(this.N.kC(b),this.N.wP()):(c=a-1,this.N.Zr(c,b)),this.rotate(c))},Tl:function(b){--b;return 0>b||_.isNaN(b)?0:this.v.$q?this.v.$q(b):0},LW:function(b){var a=this;Object.keys(b).forEach(function(c){a.N.Zr(c,b[c])});this.hq(this.Af(),
void 0,void 0,!0)},gS:function(){return this.N.JR()},getDocument:function(){return this.v},er:function(b){var a=null;this.Fa.Fg&&(a=this.ea,a=a.uo(b,a.JA(this.Fa.ee,this.Fa.ee)));return a},QS:function(b){var a=null;if(b=this.er(b))a=b.Yd;return a},$o:function(b,c){var e=this.v.gc(b),f=this.sb(b),h=this.ea.po(b),l,n=this.er(b);n&&(l=n.Yd,h=n.ax);return a.o.za.$o(c,{width:e.width,height:e.height},f,this.je(b+1),h,l,this.Tl(b+1)/90)},dk:function(b){var c=this.v.gc(b),e=this.sb(b),f=this.ea.po(b),h,l=
this.er(b);l&&(h=l.Yd,f=l.ax);return a.o.za.dk(b,{width:c.width,height:c.height},e,this.je(b+1),f,h,this.Tl(b+1)/90)},CR:function(){return this.Af},AA:function(){return this.kK},XW:function(b){this.kK=b},nQ:function(b){if(b.url)(new Actions.wj({uri:b.url})).onTriggered(b,null,this);else b.isValid()?this.Un(b.Kf,b.yo,b.jp):console.warn("Tried to go to invalid bookmark destination")},Un:function(b,a,c,e){if(this.ea.ec().Ro){this.Pl()!==b&&this.Ke(b);var f=this.kd(b-1),l=this.jd(b-1);b=this.ea.cf({x:a>
f?0:0>a?0:a,y:c>l?0:0>c?0:c},b-1);a=this.yb();c=a.offset();if(e&&(e=b.x-c.left-(a.scrollLeft()||0),f=b.y-c.top-(a.scrollTop()||0),0<e&&e<a.outerWidth()&&0<f&&f<a.outerHeight()))return;this.scrollTo(b.x-c.left,b.y-c.top)}else this.trigger("displayPageLocation",[b,c,a,e])},scrollTo:function(b,a){this.yb().scrollLeft(b).scrollTop(a)},CX:function(b,a,c){if(b!==this.Yv||a!==this.jJ)this.gJ=b,this.fJ=a,this.qB=!0,this.eJ=c},HX:function(b){var a=!1;if(null===this.Yv||this.Yv!==b)a=!0;if(null===this.loop||
!0===this.loop)a=!0;this.Yv=b;this.nd!==this.ac&&(this.nd=this.ac,a=!0);return a},DC:function(b,a,e,f){e=e||!1;this.ZB=!1;var h=this,l=!0;this.fG!==b&&(this.fG=b,this.NA=!1);this.VP=a;for(var n=0;n<b.length;++n){var m=b.charCodeAt(n);if(!(1424<=m&&1535>=m||1536<=m&&1791>=m||1872<=m&&1919>=m||64336<=m&&65023>=m||65136<=m&&65279>=m)){l=!1;break}}l&&(b=b.split("").reverse().join(""));h.G0=h.ac;if(!0===this.bm)this.CX(b,a,e);else{e?(l=function(){},h.N.cz(),h.jr=!1):(h.jr=!0,l=function(b){b.Fw===c.lc.Gq?
(h.wz(b),h.NA=!0):b.Fw===c.lc.Il&&(h.NA?h.trigger("notify","endOfDocumentSearch"):h.trigger("notify","noMatchesFound"))});f=f||l;if(e||this.HX(b))e?(l=this.nd=0,n=this.v.numPages-1):0<(a&c.gb.Ez)?(n=!0===this.loop?this.v.numPages-1:this.nd,l=0):(l=!0===this.loop?0:this.nd,n=this.v.numPages-1),this.hs.dP(this.v,b,a,l,n);this.hs.setMode(a);this.jJ=a;this.JX(e,f)}},GJ:function(b){null===this.v.uA(b)&&this.v.wh(b,function(){})},gs:function(){this.trigger("searchInProgress",[this.bm,!this.jr])},JX:function(b,
a){function e(){function g(){n=[];l=h.hs.run(n);m=l.Fw;l.s0=n;var e=l;e.ambient_str=l.sF;e.result_str=l.WB;e.result_str_start=l.jK;e.result_str_end=l.iK;e.page_num=l.DB;e.resultCode=m;e.quads=n;if(h.ZB)h.ZB=!1,h.bm=!1,h.gs();else if(!0===h.qB)h.qB=!1,h.bm=!1,h.gs(),setTimeout(function(){h.DC(h.gJ,h.fJ,h.eJ,a)},0);else{if(m===c.lc.Hu){var r,v;if(h.hs.uh()){if(0<h.nd)for(h.nd--,v=0;3>v;++v)r=h.nd-v,0<r&&h.GJ(r)}else if(h.nd<h.v.numPages-1)for(h.nd++,v=0;3>v;++v)r=h.nd+v,r<h.v.numPages-1&&h.GJ(r)}else m!==
c.lc.Gq||b||(h.N.dz(),h.N.JK(l.DB,l.WB));a(e);m===c.lc.Il||!b&&m===c.lc.Gq?(h.bm=!1,h.gs()):null!==h.v.uA(h.nd)?setTimeout(g,0):h.v.wh(h.nd,f)}}var m=-1;null!==h.v.uA(h.nd)?setTimeout(g,0):h.v.wh(h.nd,f)}function f(b){m===h.v&&(h.v.NW(h.nd,b),e())}var h=this;this.bm=!0;this.gs();!0===this.loop&&(h.nd=this.hs.uh()?this.v.numPages-1:0,this.loop=!1);var l,n=[],m=this.v;e()},OI:function(b,a){b!==this.ac&&this.Ke(b+1);if(0<a.length){a=a.map(function(b){return b.rh?b.rh():b});for(var c=a[0].y4,e=a[0].x4,
f=a[0].y2,l=a[0].x2,n=1;n<a.length;n++)a[n].x4<e&&(e=a[n].x4),a[n].y4<c&&(c=a[n].y4),a[n].x2>l&&(l=a[n].x2),a[n].y2>f&&(f=a[n].y2);var n=this.yb(),m=n.offset(),q=m.top+(n.scrollTop()||0),p=q+n.innerHeight(),m=m.left+(n.scrollLeft()||0),u=m+n.innerWidth(),c=this.ea.cf({x:e,y:c},b),r=this.ea.cf({x:l,y:f},b),l=c.x<r.x?c.x:r.x,f=c.y<r.y?c.y:r.y,e=c.x>r.x?c.x:r.x,c=c.y>r.y?c.y:r.y;if(l<m||f<q||e>u||c>p)q=e-l,p=c-f,q=l-n.innerWidth()/2+q/2-n.offset().left,n=f-n.innerHeight()/2+p/2-n.offset().top,this.scrollTo(q,
n)}},QI:function(b,a){var c=b.page_num;"undefined"!==typeof a?a(c,b.quads):this.OI(c,b.quads)},wz:function(b,a){var c=this;this.jr=!0;this.gF=b;this.hp(function(){var e=b.page_num;c.N.cz();c.N.MW(e,b);c.QI(b,a)})},mQ:function(b){var a=this;this.hp(function(){a.N.aY(b.page_num,b)})},ZV:function(b){this.jr?this.wz(b):(this.gF=b,this.QI(b),this.hp())},BP:function(){var b=this;this.hp(function(){b.N.cz()});this.ZB=!0},sK:function(b,a,e){var f=new c.Ma;f.Ea(a.x,a.y,a.x+1,a.y+1);var h=this,l=new c.uj(this.v),
n=this.v;n.wh(b,function(){n===h.v&&(l.XE(b,f),h.Bo=l.XE,h.Vi=[[b,f]],e(b,l.he(),l.Qa))})},So:function(b,a,e){if(a.constructor!==c.Ma){var f=new c.Ma;f.Ea(a.x1,a.y1,a.x2,a.y2);a=f}var h=this,l=new c.uj(this.v),n=this.v;n.wh(b,function(){if(n===h.v){"rectangular"===Tools.Yb.SELECTION_MODE?l.tK(b,a):l.rK(b,a);var c=l.Qa,f=l.he();e&&e(b,f,c)}})},ow:function(b,a,c){this.N.JK(b,c);this.N.OW(b,a);this.trigger("textSelected",[a,c,b]);this.hp()},Cz:function(b){this.oI(b-1)},pI:function(b,a,c){for(var e=0;e<
a.length;e++){var f=a[e];f.rh&&(f=f.rh());b.fillStyle=c;b.beginPath();b.moveTo(f.x1,f.y1);b.lineTo(f.x2,f.y2);b.lineTo(f.x3,f.y3);b.lineTo(f.x4,f.y4);b.closePath();b.fill()}},jT:function(b,a){var c=this.N.Sd(b).Bg;if(c&&0!==c.length){var e=a.getContext("2d");this.pI(e,c,this.pL);var f={he:function(){return c.map(function(b){return b.rh()})}},l=this.N.fS(),n=!1,m=!1;b===l[0]&&(n=!0);b===l[l.length-1]&&(m=!0);e.save();l=new Annotations.vj(f,!0,!1,n,m);n=this.Dc(b);l.draw(e,f,this.sb(b),n);e.restore()}},
iT:function(b,a){var c=this.N.Sd(b).bj;if(c&&0!==c.length){var e=a.getContext("2d"),f=this;c.forEach(function(b){f.pI(e,b.quads,b===f.gF?f.Iy:f.$B)})}},oI:function(b,a){a=a||this.dk(b);null!==a&&(this.jT(b,a),this.iT(b,a))},hp:function(b){var a=this.N.KH();b&&b();b=this.N.KH();a=_.uniq(a.concat(b));for(b=0;b<a.length;++b)this.da.Qd(a[b]+1)},select:function(b,a){if(null!==this.Vd&&null!==this.Ib||b||a){this.N.dz();var e;b&&a?(b.Jb=b.pageIndex,b.x=b.x,b.y=b.y,a.Jb=a.pageIndex,a.x=a.x,a.y=a.y,e={first:b.Jb,
last:a.Jb}):(console.error("deprecated"),e=this.ea.kv());var f=e.first;e=e.last;if(null!==f&&null!==e){var h=new c.Ma,l=b||this.ea.Fk(this.Vd,f),n=a||this.ea.Fk(this.Ib,f),m;l.y>n.y&&(m=l,l=n,n=m);m=this.kd(f);var q=this.jd(f);1<=e-f?h.Ea(l.x,l.y,m,q):h.Ea(l.x,l.y,n.x,n.y);this.So(f,h,_.bind(this.ow,this));for(l=f+1;l<e;l++)h=new c.Ma,m=this.kd(l),q=this.jd(l),h.Ea(0,0,m,q),this.So(l,h,_.bind(this.ow,this));f!==e&&(l=b||this.ea.Fk(this.Vd,e),n=a||this.ea.Fk(this.Ib,e),l.y>n.y&&(n=l),h=new c.Ma,h.Ea(0,
0,n.x,n.y),this.So(e,h,_.bind(this.ow,this)))}}},CP:function(b){if(0!==this.lv().length||this.N.dS(b)){var c=this.dk(b);null!==c&&(a.o.za.zq(c,this.kd(b),this.jd(b)),this.Iq&&this.da.Qd(b+1))}},QF:function(){this.N.dz();this.N.PF()},Bq:function(){var b=this;this.hp(function(){b.QF();b.trigger("textSelected",[null,""]);b.nv()instanceof Tools.bn&&b.nv().Bq()})},rR:function(b,c,e){var f=[],h=b-1;b=this.N.Df(h);if((b=this.Fa.Tc(b))&&b.oe)for(c=this.BA({x:c,y:e},h),e=b.Yd?this.BA({x:b.Yd.x1,y:b.Yd.y1},
h):{x:0,y:0},h=a.utils.getCanvasMultiplier(),c.x*=h,c.y*=h,e.x*=h,e.y*=h,c=Math.round(c.y-e.y)*b.oe.width+Math.round(c.x-e.x),b=b.oe.data,e=0;e<b.length;++e)if(h=b[e],"Alpha"!==h.name){var l=new Uint8Array(h.data);c<l.length&&0<=c&&f.push({name:h.name,value:Math.round(l[c]/255*100)})}return f},BA:function(b,c){var e=this.sb(c),f=this.gd(c+1);b=a.Dd(e,f,{width:this.kd(c),height:this.jd(c)},null,!1).W(b);return{x:b.x,y:b.y}},zS:function(b,c){var e=this.sb(c),f=this.je(c+1);b=a.Dd(e,f,this.v.gc(c),0,
!1).W(b);return{x:b.x,y:b.y}},Og:{cD:function(){var b=this.jv(),a=this.yb(),c;c=1===this.ea.ec().Ub?this.N.Sd(this.ac).width:this.ea.Tn().Ca()/this.Ze();return parseFloat(a.innerWidth()-b)/(c+1+this.dv()*this.ea.ec().Ub*2)},Gx:function(){var b=this.yb(),a=this.N.Sd(this.ac),c=parseFloat(b.innerHeight())/(a.height+2*this.dv()),a=1===this.ea.ec().Ub?a.width:this.ea.Tn().Ca()/this.Ze(),b=parseFloat(b.innerWidth()-this.jv())/(a+1+this.dv()*this.ea.ec().Ub*2);return c<b?c:b},Zoom:function(){this.Ly();
return this.N.og}},qC:function(b){if(b&&this.wa!==b){b instanceof Tools.Kk||b instanceof Tools.bn||b instanceof Tools.Gp||this.Bq();var a;this.wa&&(this.wa.switchOut&&this.wa.switchOut(b),a=this.wa);b.switchIn&&b.switchIn(this.wa);this.wa=b;this.trigger("toolModeUpdated",[b,a])}},eY:function(){var b=this.yb();this.pK=parseFloat(b.scrollTop())/b[0].scrollHeight;this.oK=parseFloat(b.scrollLeft()+b.innerWidth()/2)/b[0].scrollWidth},dY:function(){var b=this.yb(),a=this.pK*b[0].scrollHeight,b=this.oK*
b[0].scrollWidth-b.innerWidth()/2;this.scrollTo(b,a)},jC:function(b){null===this.v?(this.Af=b,this.trigger("fitModeUpdated",this.Af)):(b=this.Wt(b),this.ea.ec().mode===a.o.ae.Mg?this.N.cj(b):b!==this.N.og&&(this.hq(b),this.Xy()))},Wt:function(b){this.Af=b;b=this.Af();this.trigger("fitModeUpdated",this.Af);return b},rotate:function(b){var a;_.isUndefined(b)||(a=b+1);this.hq(this.Af(),void 0,void 0,!0);this.trigger("rotationUpdated",[this.gd(a),a])},so:function(b,a){return a?(b+1)%4:(b-1+4)%4},KV:function(b){var a=
this,c;_.isUndefined(b)?(this.N.kC(this.so(this.je(),!0)),this.N.YG(function(b){b.rotation=a.so(b.rotation,!0)})):(c=b-1,this.N.Zr(c,this.so(this.je(b),!0)));this.rotate(c)},LV:function(b){var a=this,c;_.isUndefined(b)?(this.N.kC(this.so(this.je(),!1)),this.N.YG(function(b){b.rotation=a.so(b.rotation,!1)})):(c=b-1,this.N.Zr(c,this.so(this.je(b),!1)));this.rotate(c)},hq:function(b,a,c,e){this.N.cj(b);this.ea.ec().Ro&&("undefined"!==typeof a&&"undefined"!==typeof c?(this.Ch(!1,e,!0),this.ea.Dg(),this.ea.Qf(),
this.scrollTo(a,c)):(this.eY(),this.Ch(!1,e,!0),this.ea.Dg(),this.ea.Qf(),this.dY()),this.Fa.$y(),this.Ck(),this.trigger("zoomUpdated",this.N.og))},ox:function(b,a,c){this.Wt(this.Og.Zoom);null===this.v?(this.N.cj(b),this.trigger("zoomUpdated",b)):this.hq(b,a,c)},SL:function(b,a,c){this.Wt(this.Og.Zoom);this.N.cj(b);b=this.yb();a=this.Ib.x-a;c=this.Ib.y-c;var e=(parseFloat(b.scrollTop())+c)/b[0].scrollHeight,f=(parseFloat(b.scrollLeft())+a)/b[0].scrollWidth;this.Ch(!1,!1,!0);this.ea.Dg();this.ea.Qf();
this.scrollTo(f*b[0].scrollWidth-a,e*b[0].scrollHeight-c);this.Ck();this.trigger("zoomUpdated",this.N.og)},sb:function(b){return this.N.Sd(b).zoom},Qw:function(b,a){var c=this.N.Df(b);this.Fa.DY(c);this.N.Qw(b,a)},Ch:function(b,c,e){this.Fa.KP(this.N.og,c);this.links=[];if(this.ea.ec().mode!==a.o.ae.Mg){var f=this.Fa.Bd;if(!c&&e)for(var h=0;h<f.length;h++){var l=f[h],n;n=this.NC?$("#pageContainer"+l).find("#hrthumb"+l):$("#pageContainer"+l).find(".canvas"+l+":not(.progressive)");0<n.length&&this.N.mC(l,
n)}e&&!c||this.N.zP()}this.ea.Sr(!b)},uV:function(b){if(this.ea.ec().Ro){var c=$("#pageContainer"+b),e=$(document.activeElement);0<e.closest("#pageWidgetContainer"+b).length&&e.trigger("focusout");this.ea.ec().nr(b)||c.children("canvas").each(function(){this.height=this.width=0});c.children().detach();a.o.za.Zy(b)}b in this.links&&delete this.links[b]},Vt:function(b){if(0>b||b>=this.N.J.length)return!1;this.ac!==b&&(this.ac=b,this.trigger("pageNumberUpdated",b+1));return!0},Ke:function(b){if(!this.ea.ec().Ro)this.trigger("changePage",
b);else if(!1!==this.Vt(parseInt(b,10)-1)){this.eG=!0;b=this.ac;var c=this.ea.ec();c.ZA()||c.mode===a.o.ae.Mg||(this.ea.ec().mode===a.o.ae.zs&&b++,c.Nd=Math.floor(parseFloat(b)/c.Ub),c.od=c.Nd,c.ig=c.Nd+1,this.Ch(),this.ea.Dg(),this.ea.Qf());b=this.v.gc(this.ac);0<this.Tl(this.ac)/90%2&&(c=b.width,b.width=b.height,b.height=c);var c=this.ea.cf({x:0,y:0},this.ac),e=this.ea.cf({x:b.width,y:b.height},this.ac);b=c.x<e.x?c.x:e.x;c=c.y<e.y?c.y:e.y;e=this.yb().offset();this.scrollTo(b-e.left,c-this.VH()-
e.top);this.Ck()}},Pl:function(){return this.ac+1},wb:function(){return this.v.numPages},pQ:function(){this.Ke(this.N.J.length)},oQ:function(){this.Ke(1)},Ly:function(b){b=b||this.ea.Tn().xa();var a=0,c=document.getElementById("docpad");if(null!==c){var e=this.iv(),e=e?parseFloat(e.style.height):0;e>b&&(a=Math.floor((e-b)/2));c.style.marginBottom=parseInt(a,10)+"px"}},XO:function(b,c){var e=this.sb(c),f=this.N.Sd(c),h=this.je(c+1),l=Math.floor(f.width*e),e=Math.floor(f.height*e),f=null;h===a.o.La.Ce||
h===a.o.La.zf?(f="rotate("+90*h+"deg)",f=h===a.o.La.Ce?" translate("+l+"px, 0)  "+f:" translate(0,"+e+"px)  "+f,b.css("height",l),b.css("width",e)):(h===a.o.La.ao&&(f="translate("+l+"px,"+e+"px) scale(-1,-1)"),b.css("width",l),b.css("height",e));null!==f&&b.css({position:"absolute",transform:f,"transform-origin":"top left","ms-transform":f,"ms-transform-origin":"top left","-moz-transform":f,"-moz-transform-origin":"top left","-webkit-transform-origin":"top left","-webkit-transform":f,"-o-transform":f,
"-o-transform-origin":"top left"})},yF:function(b,c,e,f){this.trigger("appendThumb",c);b.id=(f?"hrthumb":"thumb")+c;b.style.position="absolute";var h=$(b);this.XO(h,c);e&&(h.css("z-index",f?"10":"7"),e=$("#pageContainer"+c),0<e.length?0===e.find("#"+b.id).length&&e.prepend(b):a.utils.warn("appendThumb: Page container "+c+" missing"))},ak:function(b){this.iu(b);this.CP(b);this.PP(b);this.$X(b);this.da.Qd(b+1,void 0,!0);var c=a.o.za;2===c.uk&&c.fk(b)===c.fk(b+1)&&b+2<=this.wb()&&this.da.Qd(b+2)},qq:function(b,
c){this.NC||this.N.yP(c);var e=a.o.za.qq(b,c);e||a.utils.warn("appendAllCanvas: Page container for page "+c+" does not exist.");return e},iu:function(b){var c,e=this.er(b);e&&(c=e.Yd);var e=this.v.gc(b),f=this.Tl(b+1);if(90===f||270===f)f=e.width,e.width=e.height,e.height=f;a.o.za.iu(b,e,this.sb(b),this.gd(b+1),c)},Sn:function(b){var c,e=this.er(b);e&&(c=e.Yd);var e=this.v.gc(b),f=this.Tl(b+1);if(90===f||270===f)f=e.width,e.width=e.height,e.height=f;return a.o.za.Sn(b,e,this.sb(b),this.gd(b+1),c)},
uw:function(b,c){var e=this.no(b);a.o.za.uw(b,c,e)},Hw:function(b,c){a.o.za.Hw(b,c)},PP:function(b){var c=this.v.gc(b),e=c.width,c=c.height,f=this.v.$q(b);if(90===f||270===f)f=e,e=c,c=f;var f=this.sb(b),e=e*f,c=c*f,h=a.Dd(1,this.gd(b+1),{width:e,height:c},void 0,!1),f=$("#pageWidgetContainer"+b);0===f.length&&(f=$('<div id="pageWidgetContainer'+b+'" />'),a.o.za.dI(b).append(f));h="matrix("+h.m_a.toFixed(10)+","+h.m_b.toFixed(10)+","+h.m_c.toFixed(10)+","+h.m_d.toFixed(10)+","+h.m_h.toFixed(10)+","+
h.m_v.toFixed(10)+")";b=this.ea.sA(b);f.css({position:"absolute",top:b.y,left:b.x,width:e,height:c,"z-index":40,transform:h,"transform-origin":"top left","-webkit-transform":h,"-webkit-transform-origin":"top left","-ms-transform":h,"-ms-transform-origin":"top left","-moz-transform":h,"-moz-transform-origin":"top left",overflow:"hidden"});return f},no:function(b){return this.N.Sd(b)},rV:function(){this.trigger("layoutChanged",{contentChanged:_.range(1,this.wb()+1),removed:[],added:[],moved:{}});this.Fa.$y()},
SJ:function(b){this.trigger("layoutChanged",{contentChanged:[b],removed:[],added:[],moved:{}});this.Fa.xv(this.no(b-1).id)},$X:function(b){b=this.v.bS(b);_.isArray(b)&&this.da.dh(b,!0)},Ck:function(b,a){_.isUndefined(a)||this.Vt(a);this.ip(b);this.Fa.mG(b);this.LF()},ip:function(b){b=b||this.ea.Td();var a=this.Fa.ZO(b);this.Fa.ip(b);a&&this.trigger("visiblePagesChanged",[b])},cp:function(b){this.Fa.cp(b)},onscroll:function(){this.v&&this.Yi.Ui("DocumentViewer.renderRequest",{type:"pages",useVisiblePages:!0,
check:!0});this.LF()},dT:function(b){return 0<$("#pageContainer"+b).find("#thumb"+b).length},$S:function(b){return 0<$("#pageContainer"+b).find("#hrthumb"+b).length},YX:function(){if(this.eG)this.eG=!1;else{var b=0,c;this.ip();for(var e=this.Fa.Bd,f=0;f<e.length;f++){var h=this.yb(),l=h.scrollTop()||0,n=l+h.innerHeight(),m=h.scrollLeft()||0,h=m+h.innerWidth(),n={x1:m,y1:l,x2:h,y2:n},h=e[f];0>h||(l=this.v.gc(h),m=this.ea.cf({x:0,y:0},h),h=this.ea.cf({x:l.width,y:l.height},h),n=a.utils.getRectIntersection(n,
{x1:m.x<h.x?m.x:h.x,y1:m.y<h.y?m.y:h.y,x2:m.x>h.x?m.x:h.x,y2:m.y>h.y?m.y:h.y}),l=parseFloat((n.x2-n.x1)*(n.y2-n.y1))/(l.width*l.height),l>b&&(c=e[f],b=l))}0<b&&this.Vt(c)}},sC:function(b){this.Fa.sC(b)},OK:function(){},cU:function(b,a){var c=this;c.PJ(a.contentChanged.map(function(b){return b-1}));var e=!1,f=a.added;0<f.length&&(f.forEach(function(b){c.wg.splice(b-1,0,!1)}),e=!0);f=a.removed;0<f.length&&(f.reverse().forEach(function(b){c.wg.splice(b-1,1)}),c.Fa.wL(c.v.oo()),e=!0,c.ac>=c.wb()&&c.Vt(c.wb()-
1));if(e){c.Fa.AP();var l=c.yb(),f=l.offset(),l=c.ea.Fk({x:(l.scrollLeft()||0)+f.left,y:(l.scrollTop()||0)+f.top},c.ac);c.ea.nD();c.ea.Dg();c.ea.Qf();l=c.ea.cf(l,c.ac);c.scrollTo(l.x-f.left,l.y-f.top);c.Ck()}f=a.contentChanged;(l=0<f.length)&&f.forEach(function(b){1===c.wg[b-1]&&(c.wg[b-1]=!1)});(e||l)&&c.uu();c.trigger("layoutChanged",[a])},Dm:function(b){this.Ra=Promise.resolve(b);if(this.v){var a=this;this.Ra.then(function(b){a.v.Dm(b)})}},aI:function(){return this.Ra}};$.extend(e.aa.prototype,
a.utils.eventHandler);Object.defineProperty(e.aa.prototype,"zoom",{get:function(){return this.Ze()},set:function(b){this.N.cj(b)}});a.o=a.o||{}})(window);window.o.aa.prototype.version="5.2.0.72203";
(function(a){var f=a.Annotations||{};a.Annotations=f;f.O=f.O||{};f.O.getUsableInputWidth=function(a){return a};f.O.Ng=function(a){this.da=a;this.init()};f.O.Ng.prototype={init:function(){this.lb={};this.Ty=[];this.oy=!1;this.ap=this.mE=!0;this.Ny=null},xK:function(a){this.Ty=a},Hb:function(a){if(!a)return null;a=a.split(".");var c=this.lb[a[0]];if(c)for(var b=1;b<a.length&&(c=c.Yz(a[b]),c);++b);return c?c:null},cu:function(a,c){if(c){var b=this.Yq(a.name);b.set(a);a=b;a.widgets.forEach(function(b){b.CK(a)});
a.off("change")}else b=a.name.split("."),1===b.length?this.lb[a.name]=a:this.Yq(b.slice(0,-1).join(".")).kF(new f.O.ha(a.name,a));a.set({fieldManager:this});this.da&&a.zg(this.da.u);a.on("change",_.bind(this.Lz,this));return a},uq:function(a,c){if(!this.oy&&this.ap){this.oy=!0;var b=this.Ty;if(!c||this.mE)c=0,this.mE=!1;for(var d=c;d<b.length;++d){var f=b[d],k=this.Hb(f);k?k.trigger("calculate",[a]):console.warn("Non-existent field referenced in calculation order",f,k)}this.oy=!1}},Lz:function(a,
c){this.uq(c,0);this.da.trigger("fieldChanged",[c,c.value])},Yq:function(e){if(!e)return null;e=e.split(".");var c=this.lb[e[0]];c||(c=new a.Annotations.O.ha(e[0],{fieldManager:this}),c.on("change",_.bind(this.Lz,this)),this.lb[e[0]]=c);for(var b=1;b<e.length;++b){var d=e[b],f=c.Yz(d);f?c=f:(f=new a.Annotations.O.ha(c.name+"."+d,{fieldManager:this}),c.kF(f),c=f,c.on("change",_.bind(this.Lz,this)))}this.da&&c.zg(this.da.u);return c},ns:function(a){this.ho(function(c){c.MC(a)})},ho:function(a){var c=
this;Object.keys(this.lb).forEach(function(b){a(c.lb[b])})},ed:function(){this.ho(function(a){a.off()});this.init()},alert:function(a){this.Ny?this.Ny(a):window.alert(a)},aW:function(a){this.Ny=a}}})(window);
(function(a){a.Annotations||(a.Annotations={});var f=a.Annotations;f.O=f.O||{};f.O.ha=function(e,c){if(c instanceof f.O.ha)return c;a.Actions.Mh.call(this,c);this.wc=e;this.pf=[];this.Lj=[];this.ol=!1;this.jh=null;this.nn=new f.Pg;this.mc=new f.xj({mask:["ReadOnly","Required","NoExport"]});this.tf=-1;this.nc||(this.nc=new f.O.ha.Xb(this,c));this.initialize(c);this.on("calculate",_.bind(this.uq,this));this.on("commit",_.bind(this.fz,this))};f.O.ha.prototype={initialize:function(a){_.isObject(a)&&(a.type&&
this.RK(a.type),_.isArray(a.children)&&$.extend(this.pf,a.children),a.widgets&&$.extend(this.Lj,a.widgets),a.fieldManager&&(this.jh=a.fieldManager),a.font&&this.nn.set(a.font),_.isUndefined(a.maxLen)||(this.tf=Number(a.maxLen)),a.tooltipName&&(this.cF=a.tooltipName),this.nc.set(a))},set:function(a){this.initialize(a);_.isObject(a)&&_.isObject(a.actions)&&this.au(a.actions,!0)},ZG:function(a){this.Lj.forEach(a)},RK:function(a){"Tx"===a?this.nc=new f.O.ha.Rx(this,this.nc):"Ch"===a?this.nc=new f.O.ha.ux(this,
this.nc):"Btn"===a?this.nc=new f.O.ha.sx(this,this.nc):"Sig"===a?this.nc=new f.O.ha.Qx(this,this.nc):console.warn("Unrecognised field type: "+a);this.Yt=a},Pf:function(a){this.Lj.forEach(function(c){c.Pf(a)})},mH:function(){return this.pf},UT:function(){return 0===this.pf.length},MO:function(a,c){-1===this.Lj.indexOf(a)&&(_.isUndefined(c)?this.Lj.push(a):this.Lj[c]=a)},qg:function(a){this.nc.qg(a)},Lb:function(a,c){this.nc.Lb(a,c)},Wa:function(){return this.nc.Wa()},Rq:function(){return this.nc.Rq()},
pe:function(a){this.nc.pe(a)},eu:function(a,c){this.nc.eu(a,c)},qh:function(){return this.nc.qh()},Nw:function(a){this.nc.Nw(a)},Pq:function(){return this.nc.Pq()},vA:function(){var a=this.wc.split(".");return a[a.length-1]},jS:function(){var a,c=this.wc.split(".");1<c.length&&(a=c.slice(0,c.length-1).join("."));return a},MC:function(a,c){var b=this.vA();(c=(c?c+".":"")+b)||(c="");if(this.UT()){if(a.Ir){var d=!0;a.Lu&&(a.Lu(this)||(d=!1));d&&a.Ir(c,b,this)}}else{var f;a.Lu?(f=[],this.pf.forEach(function(b){a.Lu(b)&&
f.push(b)})):f=this.pf;0<f.length&&(a.aw&&a.aw(c,b,this),f.forEach(function(b){b.MC(a,c)}),a.wB&&a.wB(c,b,this))}},Yz:function(a){for(var c=this.pf,b=c.length,d=0;d<b;++d){var f=c[d];if(f.vA()===a)return f}if(a.match(/^\d+$/))return this.Lj[parseInt(a,10)]},removeChild:function(a){a=this.pf.indexOf(a);-1!==a&&this.pf.splice(a,1)},kF:function(a){var c=this.Yz(a.vA());c&&this.removeChild(c);this.pf.push(a)},hK:function(){this.Lb(this.Pq())},uq:function(e,c){var b=new a.Annotations.O.ub.Events.ha.create("Calculate",
this,{value:this.value,source:c,rc:!0}),d=this.Wa();this.Me("C",b);var f=this.Z_;this.tf=-1;var k=b.value;b.rc&&k!==d&&this.Lb(k);this.tf=f},rm:function(){this.ZG(function(a){a.refresh()})},fz:function(e,c,b){e=a.Annotations.O.ub.Events.ha.create("Keystroke",this,{value:c,change:"",willCommit:!0,selStart:-1,selEnd:-1});this.Me("K",e);e.rc&&(c=a.Annotations.O.ub.Events.ri(e),e=new a.Annotations.O.ub.Events.ha.create("Validate",this,{value:c}),this.Me("V",e),e.rc&&this.Lb(e.value,b))},Le:function(a,
c){this.nc.Le(a,c)}};$.extend(f.O.ha.prototype,Object.create(a.utils.eventHandler));Object.defineProperties(f.O.ha.prototype,{name:{get:function(){return this.wc}},tooltipName:{get:function(){return this.cF},set:function(a){this.cF=a}},value:{get:function(){return this.Wa()},set:function(a){this.Lb(a)}},widgets:{get:function(){return this.Lj}},children:{get:function(){return this.pf}},options:{get:function(){return this.qh()},set:function(a){this.pe(a)}},exportValue:{get:function(){return this.Rq()}},
actions:{get:function(){return this.ck()}},defaultValue:{get:function(){return this.Pq()},set:function(a){this.Nw(a)}},flags:{get:function(){return this.nc.mc}},IsModified:{set:function(a){a!==this.ol&&this.pf.forEach(function(c){c.IsModified=a});this.ol=a},get:function(){return this.ol||this.pf.reduce(function(a,c){return a||c.IsModified},!1)}},font:{get:function(){return this.nn}},maxLen:{get:function(){return this.tf},set:function(a){this.tf=Number(a);0<this.tf&&this.Lb(this.Wa())}},type:{get:function(){return this.Yt}},
userName:{get:function(){return this.tO},set:function(a){this.tO=a}}});$.extend(f.O.ha.prototype,a.Actions.Mh.prototype);f.O.ha.Xb=function(a,c){c=c||{};this.Ha=a;this._value=this.hy="";this.mc=new f.xj({mask:["ReadOnly","Required","NoExport"],onUpdate:c.onUpdate})};f.O.ha.Xb.prototype={Lb:function(e,c){var b=this.Ha,d=typeof e;"number"===d?e=a.Annotations.ca.toFixed(e,6):e&&"string"!==d&&(e=e.toString());d=this._value!==e;this.Le(e);d&&(e=this._value,this.rC(e,c),b.IsModified=!0,b.trigger("change",
[b]))},rC:function(a){this.Ha.ZG(function(c){c.Lb(a)})},Le:function(a){this._value=a},qg:function(a){this.Le(a)},set:function(a){_.isObject(a)&&(_.isNull(a.value)||_.isUndefined(a.value)||(this._value=a.value),_.isNull(a.defaultValue)||_.isUndefined(a.defaultValue)||(this.hy=a.defaultValue),a.flags&&(_.isArray(a.flags)?this.mc.set(a.flags,!0):_.isObject(a.flags)&&this.mc.set(a.flags.toArray(),!0)))},Wa:function(){return this._value},Pq:function(){return this.hy},Nw:function(a){this.hy=a},eu:function(){},
qh:function(){return null},pe:function(){},Rq:function(){return this._value}};Object.defineProperties(f.O.ha.Xb.prototype,{value:{get:function(){return this.Wa()},set:function(a){this.Lb(a)}},defaultValue:{get:function(){return this.Pq()},set:function(a){this.Nw(a)}}});f.O.ha.Rx=function(a,c){if(c instanceof f.O.ha.Rx)return c;f.O.ha.Xb.call(this,a,c);this.mc.Kq("Multiline Password FileSelect DoNotSpellCheck DoNotScroll Comb RichText".split(" "));this.set(c)};f.O.ha.Rx.prototype=$.extend(Object.create(f.O.ha.Xb.prototype),
{Le:function(a,c){var b=this.Ha.maxLen;0<b&&!_.isNull(a)&&(a=String(a),a.length>b&&!c&&(a=a.slice(0,b)));f.O.ha.Xb.prototype.Le.call(this,a)}});f.O.ha.ux=function(a,c){if(c instanceof f.O.ha.ux)return c;f.O.ha.Xb.call(this,a,c);this.mc.Kq("Combo Edit Sort MultiSelect DoNotSpellCheck CommitOnSelChange".split(" "));this.fg=[];this.set(c)};f.O.ha.ux.prototype=$.extend(Object.create(f.O.ha.Xb.prototype),{set:function(a){_.isObject(a)&&a.options&&this.pe(a.options);f.O.ha.Xb.prototype.set.call(this,a)},
$R:function(a){for(var c=0;c<this.fg.length;++c){var b=this.fg[c];if(b.value===a)return b}return null},Le:function(a){a=a.replace(/\n/g," ");this.mc.get("Edit")||!_.isNull(this.$R(a))?f.O.ha.Xb.prototype.Le.call(this,a):f.O.ha.Xb.prototype.Le.call(this,null)},qh:function(){return this.fg},eu:function(a,c){for(var b=this.fg,d=0;d<b.length;++d)if(b[d].value===b.value)return;this.fg.splice(c,0,a);this.mc.get("Combo")||this.Lb(a.value)},pe:function(a){this.fg=a.map(function(a){var b=a.value;a=a.displayValue;
return{value:b,displayValue:_.isUndefined(a)?b:a}})}});f.O.ha.sx=function(a,c){if(c instanceof f.O.ha.sx)return c;f.O.ha.Xb.call(this,a,c);this.mc.Kq(["NoToggleToOff","Radio","PushButton","RadiosInUnison"]);this.fg=null;this.set(c);""===this._value&&(this._value="Off")};f.O.ha.sx.prototype=$.extend(Object.create(f.O.ha.Xb.prototype),{set:function(a){f.O.ha.Xb.prototype.set.call(this,a);_.isObject(a)&&a.options&&this.pe(a.options)},qh:function(){return this.fg},qg:function(a){(""===this._value||"Off"!==
a||this.Ha.widgets.every(function(a){return!a.appearance}))&&f.O.ha.Xb.prototype.qg.call(this,a)},Le:function(a){"Off"!==a?""===a?f.O.ha.Xb.prototype.Le.call(this,"Off"):f.O.ha.Xb.prototype.Le.call(this,a):this.mc.get("NoToggleToOff")&&this.mc.get("Radio")||f.O.ha.Xb.prototype.Le.call(this,a)},Rq:function(){return this.fg?this.fg[Number(this.Wa())]:f.O.ha.Xb.prototype.Rq.call(this)},pe:function(a){this.fg=a.slice()},rC:function(a,c){f.O.ha.Xb.prototype.rC.call(this,a,c)}});f.O.ha.Qx=function(a,c){if(c instanceof
f.O.ha.Qx)return c;var b=this,d=Object.assign({},c,{onUpdate:function(){b.Ha.rm()}});f.O.ha.Xb.call(this,a,d);this.set(c)};f.O.ha.Qx.prototype=$.extend(Object.create(f.O.ha.Xb.prototype),{})})(window);
(function(a){function f(b){return _.isArray(b)?b.map(f).join(" "):_.isNumber(b)?b.toString():_.escape(String(b))}function e(b,a,c,d){c!==d&&b.writeAttributeString(a,f(c))}function c(b,a,c){var d=c.Ur||[];c=c.Ho||{};for(var g=0;g<d.length;++g){var k=d[g],h=a[k];_.isUndefined(a)?console.warn("Required attribute: "+k+" is undefined"):b.writeAttributeString(k,f(h))}for(var l in c)c.hasOwnProperty(l)&&e(b,l,a[l],c[l])}function b(b,a,g,k){k=k||"actions";var h=Object.keys(a);if(0<h.length){b.writeStartElement(k);
for(k=0;k<h.length;++k)b.writeStartElement("action"),b.writeAttributeString("trigger",_.escape(h[k])),a[h[k]].forEach(function(a){var k=a.name;switch(k){case "JavaScript":b.writeStartElement("javascript");b.writeString(f(a.javascript));b.writeEndElement();break;case "ResetForm":b.writeStartElement("reset-form");c(b,a,{Ur:["exclude"]});a.fields&&d(b,a.fields);b.writeEndElement();break;case "SubmitForm":b.writeStartElement("submit-form");c(b,a,{Ur:["url","format"],Ho:{method:"POST",exclude:!1}});k=
a.flags.toArray();0<k.length&&b.writeAttributeString("flags",f(k));a=a.fields;0<a.length&&d(b,a);b.writeEndElement();break;case "GoTo":b.writeStartElement("goto");b.writeStartElement("dest");a=a.dest;c(b,a,{Ur:["fit","page"],Ho:{zoom:void 0}});var h=g(a.page).inverse(),k=a.top||0,m=a.left||0,l=a.bottom||0,p=a.right||0,m=h.W({x:m,y:k}),h=h.W({x:p,y:l}),k=_.isUndefined(a.top)?null:m.y,m=_.isUndefined(a.left)?null:m.x,p=_.isUndefined(a.right)?null:h.x,l=_.isUndefined(a.bottom)?null:h.y;e(b,"top",k,null);
e(b,"left",m,null);e(b,"right",p,null);e(b,"bottom",l,null);b.writeEndElement();b.writeEndElement();break;case "URI":b.writeStartElement("uri");c(b,a,{Ur:["uri"]});b.writeEndElement();break;case "Hide":b.writeStartElement("hide");c(b,a,{Ho:{hide:!0}});d(b,a.fields);b.writeEndElement();break;case "Named":b.writeStartElement("named");b.writeAttributeString("name",_.escape(a.action));b.writeEndElement();break;default:console.warn("Unrecognised action name"+k)}}),b.writeEndElement();b.writeEndElement()}}
function d(b,a,c){c||(c="fields");b.writeStartElement(c);c=a.length;for(var d=0;d<c;++d){var e=b,f=a[d];e.writeStartElement("ffield");e.writeAttributeString("name",_.escape(f));e.writeEndElement()}b.writeEndElement()}function g(b,a,c,d){if(d||!a.MI())b.writeStartElement(c),e(b,"r",a.R,0),e(b,"g",a.G,0),e(b,"b",a.B,0),e(b,"a",a.A,1),b.writeEndElement()}function k(b,a,d){if(a&&(0!==a.size||""!==a.name||"Type1"!==a.type||!a.Yl())){b.writeStartElement("font");c(b,a,{Ho:{type:"Type1",name:""}});var f=
a.size,k=d.inverse();d=k.W({x:0,y:0});k=k.W({x:f,y:0});f=d.x-k.x;d=d.y-k.y;e(b,"size",Math.sqrt(f*f+d*d),0);d=a.fillColor;d.Yl()||g(b,d,"fill-color",!0);a=a.strokeColor;a.Yl()||g(b,a,"stroke-color",!0);b.writeEndElement()}}function h(b,a,c){b.writeStartElement("aappearance");b.writeAttributeString("name",a);Object.keys(c).forEach(function(a){b.writeStartElement(a);b.writeString(f(c[a].data||""));b.writeEndElement()});b.writeEndElement()}a.kf=a.kf||{};var l=a.kf;l.vi=function(b,a){var c;a in b?c=b[a]:
(c={},b[a]=c);return c};l.parse=function(b,a,c,d){var e={calculationOrder:[],widgets:[],fields:{},pages:[],documentActions:{},custom:[]},f=b.ua();"pdf-info"!==f?(console.warn("pdf-info missing. found: "+f),c(e)):(f=b.K("version"),"1"===f?l.tN.parse(b,a,c,d):"2"===f?l.uD.parse(b,a,c,d):(console.warn("PDFInfo version is incorrect: "+f),c(e)))};l.LL=function(b,a,c){if(a)for(var d in a){var g=a[d],k;for(k in g){var h=g[k];"objnum"in h&&(b.writeStartElement("apref"),e(b,"appearance-state",d,"_DEFAULT"),
e(b,"annotation-state",k,"Normal"),b.writeAttributeString("gennum",f(h.gennum)),b.writeAttributeString("objnum",f(h.objnum)),h=h.offset,h=c.W({x:h.x,y:h.y}),b.writeAttributeString("x",f(h.x)),b.writeAttributeString("y",f(h.y)),b.writeEndElement())}}};l.write=function(a,m,q){a.writeStartElement("pdf-info");a.writeAttributeString("xmlns","http://www.pdftron.com/pdfinfo");a.writeAttributeString("version","2");var p=m.calculationOrder;_.isArray(p)&&0<p.length&&d(a,p,"calculation-order");b(a,m.documentActions,
q,"document-actions");p=m.pages;if(0<p.length){a.writeStartElement("pages");for(var u=0;u<p.length;++u){var r=a,v=p[u],w=q;r.writeStartElement("page");r.writeAttributeString("number",f(v.number));b(r,v.actions,w);r.writeEndElement()}a.writeEndElement()}u=m.fields;r=Object.keys(u);for(p=0;p<r.length;++p){var v=a,w=u[r[p]],z=q;v.writeStartElement("ffield");c(v,w,{Ho:{},Ur:["type","name"]});var C=w.flags.toArray();0<C.length&&v.writeAttributeString("flags",f(C));C=w.maxLen;-1!==C&&v.writeAttributeString("max-len",
f(C));(C=w.tooltipName)&&v.writeAttributeString("tooltip-name",f(C));b(v,w.ck(),z);(C=w.defaultValue)&&v.writeElementString("default-value",f(C));k(v,w.font,z(1));z=v;if((w=w.options)&&0<w.length){z.writeStartElement("options");for(var C=w.length,A=0;A<C;++A){z.writeStartElement("option");var x=w[A].displayValue,y=w[A].value;x===y||_.isUndefined(x)||z.writeAttributeString("display-value",f(x));z.writeAttributeString("value",f(y));z.writeEndElement()}z.writeEndElement()}v.writeEndElement()}m=m.widgets;
for(p=0;p<m.length;++p){u=a;r=m[p];v=q;u.writeStartElement("widget");c(u,r,{Ho:{appearance:"",rotation:0,quadding:"Left-justified"}});w=r;w=w.Hb().widgets.indexOf(w);w=f(w);"0"!==w&&u.writeAttributeString("index",w);u.writeAttributeString("field",f(r.Hb().name));w=r.flags.toArray();0<w.length&&u.writeAttributeString("flags",f(w));w=r.PageNumber;u.writeAttributeString("page",f(w));w=v(w).inverse();z=u;A=r.rect;x=w;z.writeStartElement("rect");C=x.W({x:A.x1,y:A.y1});A=x.W({x:A.x2,y:A.y2});x={};x.x1=
_.min([C.x,A.x]);x.x2=_.max([C.x,A.x]);x.y1=_.min([C.y,A.y]);x.y2=_.max([C.y,A.y]);z.writeAttributeString("x1",f(Number(Number(x.x1).toFixed(4))));z.writeAttributeString("x2",f(Number(Number(x.x2).toFixed(4))));z.writeAttributeString("y1",f(Number(Number(x.y1).toFixed(4))));z.writeAttributeString("y2",f(Number(Number(x.y2).toFixed(4))));z.writeEndElement();z=u;!(C=r.border)||C.color.MI()&&1===C.width&&"Solid"===C.style||(z.writeStartElement("border"),e(z,"width",C.width,1),e(z,"style",C.style,"Solid"),
C=C.color,C.Yl()||g(z,C,"color",!0),z.writeEndElement());g(u,r.backgroundColor,"background-color");b(u,r.ck(),v);l.LL(u,r.appearances,w);w=u;z=r.appearances;C=Object.keys(z);if(A=0<C.length)A=z[C[0]],A=0===Object.keys(A).length||"Normal"in A&&!!A.Normal.data;if(A){w.writeStartElement("appearances");A=C.length;for(x=0;x<A;++x)y=C[x],h(w,y,z[y]);w.writeEndElement()}w=u;z=r;z.YS()&&(w.writeStartElement("extra"),k(w,z.font,v(1)),w.writeEndElement());v=u;r=r.captions;w=r.Rollover;z=r.Down;if(r.Normal||
w||z)v.writeStartElement("captions"),e(v,"Normal",r.Normal,""),e(v,"Rollover",r.Rollover,""),e(v,"Down",r.Down,""),v.writeEndElement();u.writeEndElement()}a.writeEndElement()}})(window);
(function(a){function f(b){var a=[];for(b.oa();b.advance();){var c=b.ua();"field"===c?a.push(String(b.K("name"))):console.warn("unrecognised field list element: "+c)}b.Aa();return a}function e(b,a){return a?"false"===b?!1:!0:"true"===b?!0:!1}function c(b,a){var c=b.ua();switch(c){case "javascript":return{name:"JavaScript",javascript:b.current.textContent};case "uri":return{name:"URI",uri:b.K("uri")};case "goto":c=null;b.oa();if(b.advance()){var d=b.K("fit"),c={page:b.K("page"),fit:d};if("0"===c.page)console.warn("null page encountered in dest");
else{var g=a(Number(c.page));switch(d){case "Fit":case "FitB":break;case "FitH":case "FitBH":c.top=g.W({x:0,y:b.K("top")||0}).y;break;case "FitV":case "FitBV":c.left=g.W({x:b.K("left")||0,y:0}).x;break;case "FitR":d=g.W({x:b.K("left")||0,y:b.K("top")||0});g=g.W({x:b.K("right")||0,y:b.K("bottom")||0});g=new Annotations.Rect(d.x,d.y,g.x,g.y);c.top=g.y1;c.left=g.x1;c.bottom=g.y2;c.right=g.x2;break;case "XYZ":d=g.W({x:b.K("left")||0,y:b.K("top")||0});c.top=d.y;c.left=d.x;c.zoom=b.K("zoom")||0;break;default:console.warn("unknown dest fit: "+
d)}}c={name:"GoTo",dest:c}}else console.mY("missing dest in GoTo action");b.Aa();return c;case "submit-form":c={name:"SubmitForm",url:b.K("url"),format:b.K("format"),method:b.K("method")||"POST",exclude:e(b.K("exclude"),!1)};g=b.K("flags");c.flags=g?g.split(" "):[];for(b.oa();b.advance();)switch(g=b.ua(),g){case "fields":c.fields=f(b);break;default:console.warn("unrecognised submit-form child: "+g)}b.Aa();return c;case "reset-form":c={name:"ResetForm",exclude:e(b.K("exclude"),!1)};for(b.oa();b.advance();)switch(g=
b.ua(),g){case "fields":c.fields=f(b);break;default:console.warn("unrecognised reset-form child: "+g)}b.Aa();return c;case "hide":c={name:"Hide",hide:e(b.K("hide"),!0)};for(b.oa();b.advance();)switch(g=b.ua(),g){case "fields":c.fields=f(b);break;default:console.warn("unrecognised hide child: "+g)}b.Aa();return c;case "named":return{name:"Named",action:b.K("name")};default:console.warn("Encountered unexpected action type: "+c)}return null}function b(b,a,d){var e={};for(b.oa();b.advance();){var f=b.ua();
switch(f){case "action":f=b.K("trigger");if(a?-1!==a.indexOf(f):1){e[f]=[];for(b.oa();b.advance();){var g=c(b,d);_.isNull(g)||e[f].push(g)}b.Aa()}else console.warn("encountered unexpected trigger on field: "+f);break;default:console.warn("encountered unknown action child: "+f)}}b.Aa();return e}function d(b){return"calculation-order"===b.ua()?f(b):[]}function g(b){return new a.Annotations.Color(b.K("r")||0,b.K("g")||0,b.K("b")||0,b.K("a")||1)}function k(b,a){var c=b.K("name"),d=b.K("type")||"Type1",
e=b.K("size"),f=a.W({x:0,y:0}),k=a.W({x:Number(e),y:0}),e=f.x-k.x,f=f.y-k.y,c={name:c,type:d,size:Math.sqrt(e*e+f*f)||0,strokeColor:[0,0,0],fillColor:[0,0,0]};for(b.oa();b.advance();)switch(d=b.ua(),d){case "stroke-color":c.strokeColor=g(b);break;case "fill-color":c.fillColor=g(b);break;default:console.warn("unrecognised font child: "+d)}b.Aa();return c}function h(a,c){var d={border:{style:"Solid",width:1},backgroundColor:[],fieldName:a.K("field"),page:a.K("page"),index:a.K("index")||0,rotation:a.K("rotation")||
0,flags:[]},e=a.K("appearance");e&&(d.appearance=e);(e=a.K("flags"))&&(d.flags=e.split(" "));for(a.oa();a.advance();)switch(e=a.ua(),e){case "rect":var f=a,h=c(Number(d.page)),e=h.W({x:f.K("x1")||0,y:f.K("y1")||0}),f=h.W({x:f.K("x2")||0,y:f.K("y2")||0}),e=new Annotations.Rect(e.x,e.y,f.x,f.y);e.normalize();d.rect={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2};break;case "border":e=a;f={style:e.K("style")||"Solid",width:e.K("width")||1,color:[0,0,0]};for(e.oa();e.advance();)switch(h=e.ua(),h){case "color":f.color=
g(e);break;default:console.warn("unrecognised border child: "+h)}e.Aa();d.border=f;break;case "background-color":d.backgroundColor=g(a);break;case "actions":d.actions=b(a,"E X D U Fo Bl PO PC PV PI".split(" "),c);break;case "appearances":e=a;f=p.vi(d,"appearances");for(e.oa();e.advance();)if(h=e.ua(),"appearance"===h){var h=e.K("name"),n=p.vi(f,h),h=e;for(h.oa();h.advance();){var l=h.ua();switch(l){case "Normal":p.vi(n,"Normal").data=h.current.textContent;break;default:console.warn("unexpected appearance state: ",
l)}}h.Aa()}else console.warn("unexpected appearances child: "+h);e.Aa();break;case "extra":e=a;f=c;h={};for(e.oa();e.advance();)switch(n=e.ua(),n){case "font":h.font=k(e,f(1));break;default:console.warn("unrecognised extra child: "+n)}e.Aa();e=h;e.font&&(d.font=e.font);break;case "captions":f=a;e={};(h=f.K("Normal"))&&(e.Normal=h);(h=f.K("Rollover"))&&(e.Rollover=h);(f=f.K("Down"))&&(e.Down=f);d.captions=e;break;default:console.warn("unrecognised widget child: "+e)}a.Aa();return d}function l(b){var a=
{value:b.K("value")};(b=b.K("display-value"))&&(a.displayValue=b);return a}function n(c,d){var e=c.K("name"),f={type:c.K("type"),quadding:c.K("quadding")||"Left-justified",maxLen:c.K("max-len")||-1},g=c.K("flags");_.isString(g)&&(f.flags=g.split(" "));for(c.oa();c.advance();)switch(g=c.ua(),g){case "actions":f.actions=b(c,["C","F","K","V"],d);break;case "default-value":g=c;g.oa();g.advance();var h=g.current.textContent;g.Aa();f.defaultValue=h;break;case "font":f.font=k(c,d);break;case "options":g=
c;h=[];for(g.oa();g.advance();){var n=g.ua();switch(n){case "option":h.push(l(g));break;default:console.warn("unrecognised options child: "+n)}}g.Aa();f.options=h;break;default:console.warn("unknown field child: "+g)}c.Aa();return new a.Annotations.O.ha(e,f)}function m(b,c){switch(b.type){case "Tx":return new a.Annotations.bl(b,c);case "Ch":return b.flags.get("Combo")?new a.Annotations.Lg(b,c):new a.Annotations.nj(b,c);case "Btn":return b.flags.get("PushButton")?new a.Annotations.rj(b,c):b.flags.get("Radio")?
new a.Annotations.Uk(b,c):new a.Annotations.Lh(b,c);case "Sig":return new a.Annotations.Xf(b,c);default:console.warn("Unrecognised field type: "+b.type)}return null}function q(a,c){var d={number:a.K("number")};for(a.oa();a.advance();){var e=a.ua();switch(e){case "actions":d.actions=b(a,["O","C"],c);break;default:console.warn("unrecognised page child: "+e)}}a.Aa();return d}a.kf=a.kf||{};var p=a.kf;p.tN={parse:function(c,e,f,g){var k=[],l={};c.oa();var p=[],x={},y=[];a.busyLoop(function(){var a,f;if(c.advance()){a=
c.ua();switch(a){case "calculation-order":p=d(c);break;case "document-actions":x=b(c,["Init","Open"],e);break;case "pages":a=[];for(c.oa();c.advance();)switch(f=c.ua(),f){case "page":a.push(q(c,e));break;default:console.warn("unrecognised page child: "+f)}c.Aa();y=a;break;case "field":a=n(c,e(1));l[a.name]=a;break;case "widget":f=h(c,e);(a=l[f.fieldName])?(a=m(a,f),k.push(a)):console.warn("ignoring widget with no corresponding field data: "+f.fieldName);break;default:console.warn("Unknown element encountered in PDFInfo: "+
a)}return!0}return!1},function(){c.Aa();f({calculationOrder:p,widgets:k,fields:l,documentActions:x,pages:y,custom:[]})},g)},WU:n,YU:h,yJ:d}})(window);
(function(a){function f(b){var a=[];for(b.oa();b.advance();){var c=b.ua();"ffield"===c?a.push(String(b.K("name"))):console.warn("unrecognised field list element: "+c)}b.Aa();return a}function e(b,a){return a?"false"===b?!1:!0:"true"===b?!0:!1}function c(b,a){var c=b.ua();switch(c){case "javascript":return{name:"JavaScript",javascript:b.current.textContent};case "uri":return{name:"URI",uri:b.K("uri")};case "goto":c=null;b.oa();if(b.advance()){var d=b.K("fit"),c={page:b.K("page"),fit:d};if("0"===c.page)console.warn("null page encountered in dest");
else{var g=a(Number(c.page));switch(d){case "Fit":case "FitB":break;case "FitH":case "FitBH":c.top=g.W({x:0,y:b.K("top")||0}).y;break;case "FitV":case "FitBV":c.left=g.W({x:b.K("left")||0,y:0}).x;break;case "FitR":d=g.W({x:b.K("left")||0,y:b.K("top")||0});g=g.W({x:b.K("right")||0,y:b.K("bottom")||0});g=new Annotations.Rect(d.x,d.y,g.x,g.y);c.top=g.y1;c.left=g.x1;c.bottom=g.y2;c.right=g.x2;break;case "XYZ":d=g.W({x:b.K("left")||0,y:b.K("top")||0});c.top=d.y;c.left=d.x;c.zoom=b.K("zoom")||0;break;default:console.warn("unknown dest fit: "+
d)}}c={name:"GoTo",dest:c}}else console.mY("missing dest in GoTo action");b.Aa();return c;case "submit-form":c={name:"SubmitForm",url:b.K("url"),format:b.K("format"),method:b.K("method")||"POST",exclude:e(b.K("exclude"),!1)};g=b.K("flags");c.flags=g?g.split(" "):[];for(b.oa();b.advance();)switch(g=b.ua(),g){case "fields":c.fields=f(b);break;default:console.warn("unrecognised submit-form child: "+g)}b.Aa();return c;case "reset-form":c={name:"ResetForm",exclude:e(b.K("exclude"),!1)};for(b.oa();b.advance();)switch(g=
b.ua(),g){case "fields":c.fields=f(b);break;default:console.warn("unrecognised reset-form child: "+g)}b.Aa();return c;case "hide":c={name:"Hide",hide:e(b.K("hide"),!0)};for(b.oa();b.advance();)switch(g=b.ua(),g){case "fields":c.fields=f(b);break;default:console.warn("unrecognised hide child: "+g)}b.Aa();return c;case "named":return{name:"Named",action:b.K("name")};default:console.warn("Encountered unexpected action type: "+c)}return null}function b(b,a,d){var e={};for(b.oa();b.advance();){var f=b.ua();
switch(f){case "action":f=b.K("trigger");if(a?-1!==a.indexOf(f):1){e[f]=[];for(b.oa();b.advance();){var g=c(b,d);_.isNull(g)||e[f].push(g)}b.Aa()}else console.warn("encountered unexpected trigger on field: "+f);break;default:console.warn("encountered unknown action child: "+f)}}b.Aa();return e}function d(b){return"calculation-order"===b.ua()?f(b):[]}function g(b){return new a.Annotations.Color(b.K("r")||0,b.K("g")||0,b.K("b")||0,b.K("a")||1)}function k(b,a,c){var d=r.vi(a,"appearances"),e=b.K("appearance-state")||
"_DEFAULT",f=b.K("annotation-state")||"Normal";a=Number(b.K("objnum"));var g=Number(b.K("gennum")),k=Number(b.K("x")),h=Number(b.K("y"));b=b.K("blend-mode");d=r.vi(d,e);f=r.vi(d,f);f.objnum=a;f.gennum=g;f.offset=c.W({x:k,y:h});f.blendMode=b}function h(b,a){var c=b.K("name"),d=b.K("type")||"Type1",e=b.K("size"),f=a.W({x:0,y:0}),k=a.W({x:Number(e),y:0}),e=f.x-k.x,f=f.y-k.y,c={name:c,type:d,size:Math.sqrt(e*e+f*f)||0,strokeColor:[0,0,0],fillColor:[0,0,0]};for(b.oa();b.advance();)switch(d=b.ua(),d){case "stroke-color":c.strokeColor=
g(b);break;case "fill-color":c.fillColor=g(b);break;default:console.warn("unrecognised font child: "+d)}b.Aa();return c}function l(a,c){var d={border:{style:"Solid",width:1},backgroundColor:[],fieldName:a.K("field"),page:a.K("page"),index:a.K("index")||0,rotation:a.K("rotation")||0,quadding:a.K("quadding")||"Left-justified",flags:[]},e=a.K("appearance");e&&(d.appearance=e);(e=a.K("flags"))&&(d.flags=e.split(" "));for(a.oa();a.advance();)switch(e=a.ua(),e){case "rect":var f=a,n=c(Number(d.page)),e=
n.W({x:f.K("x1")||0,y:f.K("y1")||0}),f=n.W({x:f.K("x2")||0,y:f.K("y2")||0}),e=new Annotations.Rect(e.x,e.y,f.x,f.y);e.normalize();d.rect={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2};break;case "border":e=a;f={style:e.K("style")||"Solid",width:e.K("width")||1,color:[0,0,0]};for(e.oa();e.advance();)switch(n=e.ua(),n){case "color":f.color=g(e);break;default:console.warn("unrecognised border child: "+n)}e.Aa();d.border=f;break;case "background-color":d.backgroundColor=g(a);break;case "actions":d.actions=b(a,"E X D U Fo Bl PO PC PV PI".split(" "),
c);break;case "appearances":e=a;f=r.vi(d,"appearances");for(e.oa();e.advance();)if(n=e.ua(),"aappearance"===n){var n=e.K("name"),l=r.vi(f,n),n=e;for(n.oa();n.advance();){var m=n.ua();switch(m){case "Normal":r.vi(l,"Normal").data=n.current.textContent;break;default:console.warn("unexpected appearance state: ",m)}}n.Aa()}else console.warn("unexpected appearances child: "+n);e.Aa();break;case "apref":k(a,d,c(Number(d.page)));break;case "extra":e=a;f=c;n={};for(e.oa();e.advance();)switch(l=e.ua(),l){case "font":n.font=
h(e,f(1));break;default:console.warn("unrecognised extra child: "+l)}e.Aa();e=n;e.font&&(d.font=e.font);break;case "captions":f=a;e={};(n=f.K("Normal"))&&(e.Normal=n);(n=f.K("Rollover"))&&(e.Rollover=n);(f=f.K("Down"))&&(e.Down=f);d.captions=e;break;default:console.warn("unrecognised widget child: "+e)}a.Aa();return d}function n(b,c){var d=b.K("page"),e=c(1+Number(d)),d={page:d,rect:Annotations.ca.Bu(b.K("rect"),e)};for(b.oa();b.advance();){var f=b.ua();switch(f){case "apref":k(b,d,e);break;default:console.warn("unrecognised custom tag: "+
f)}}b.Aa();return new a.Annotations.vp(d)}function m(b){var a={value:b.K("value")};(b=b.K("display-value"))&&(a.displayValue=b);return a}function q(c,d){var e=c.K("name"),f={type:c.K("type"),maxLen:c.K("max-len")||-1,tooltipName:c.K("tooltip-name")},g=c.K("flags");_.isString(g)&&(f.flags=g.split(" "));for(c.oa();c.advance();)switch(g=c.ua(),g){case "actions":f.actions=b(c,["C","F","K","V"],d);break;case "default-value":g=c;g.oa();g.advance();var k=g.current.textContent;g.Aa();f.defaultValue=k;break;
case "font":f.font=h(c,d);break;case "options":g=c;k=[];for(g.oa();g.advance();){var n=g.ua();switch(n){case "option":k.push(m(g));break;default:console.warn("unrecognised options child: "+n)}}g.Aa();f.options=k;break;default:console.warn("unknown field child: "+g)}c.Aa();return new a.Annotations.O.ha(e,f)}function p(b,c){switch(b.type){case "Tx":return new a.Annotations.bl(b,c);case "Ch":return b.flags.get("Combo")?new a.Annotations.Lg(b,c):new a.Annotations.nj(b,c);case "Btn":return b.flags.get("PushButton")?
new a.Annotations.rj(b,c):b.flags.get("Radio")?new a.Annotations.Uk(b,c):new a.Annotations.Lh(b,c);case "Sig":return new a.Annotations.Xf(b,c);default:console.warn("Unrecognised field type: "+b.type)}return null}function u(a,c){var d={number:a.K("number")};for(a.oa();a.advance();){var e=a.ua();switch(e){case "actions":d.actions=b(a,["O","C"],c);break;default:console.warn("unrecognised page child: "+e)}}a.Aa();return d}a.kf=a.kf||{};var r=a.kf;r.uD={parse:function(c,e,f,g){var k=[],h=[],m={};c.oa();
var r=[],L={},E=[];a.busyLoop(function(){var a,f;if(c.advance()){a=c.ua();switch(a){case "calculation-order":r=d(c);break;case "document-actions":L=b(c,["Init","Open"],e);break;case "pages":a=[];for(c.oa();c.advance();)switch(f=c.ua(),f){case "page":a.push(u(c,e));break;default:console.warn("unrecognised page child: "+f)}c.Aa();E=a;break;case "ffield":a=q(c,e(1));m[a.name]=a;break;case "widget":f=l(c,e);(a=m[f.fieldName])?(a=p(a,f),k.push(a)):console.warn("ignoring widget with no corresponding field data: "+
f.fieldName);break;case "custom":h.push(n(c,e));break;default:console.warn("Unknown element encountered in PDFInfo: "+a)}return!0}return!1},function(){c.Aa();f({calculationOrder:r,widgets:k,fields:m,documentActions:L,pages:E,custom:h})},g)},YZ:p,WU:q,YU:l,yJ:d,xO:k}})(window);
(function(a){a.Annotations=a.Annotations||{};a.Annotations.O=a.Annotations.O||{};a.Annotations.O.ub=a.Annotations.O.ub||{};a=a.Annotations.O.ub;a.Events={};var f=a.Events;f.Event=function(a){this.rc=!0;_.isObject(a)&&(_.isString(a.name)&&Object.defineProperty(this,"name",{value:a.name,enumerable:!0}),_.isString(a.type)&&Object.defineProperty(this,"type",{value:a.type,enumerable:!0}))};f.ri=function(a){var b=String(a.value),d=a.change,e=b.slice(0,a.selStart),f=b.slice(a.selEnd);if(_.isObject(a.change)){var h=
a.selStart;a=a.selEnd;h===a&&("backspace"===d.type?e=b.slice(0,h-1):"delete"===d.type&&(f=b.slice(a+1)));d=""}return e+d+f};var e={Validate:function(a){f.Event.call(this,a);var b;_.isObject(a)&&(b=a.value);Object.defineProperty(this,"value",{value:b,writable:!0,enumerable:!0})},Calculate:function(a){f.Event.call(this,a);var b,d;_.isObject(a)&&(b=a.value,d=a.source);Object.defineProperties(this,{value:{value:b,writable:!0,enumerable:!0},source:{value:d,enumerable:!0}})},Format:function(a){f.Event.call(this,
a);var b;_.isObject(a)&&(b=a.value);Object.defineProperty(this,"value",{value:b,writable:!0,enumerable:!0})},Keystroke:function(a){f.Event.call(this,a);var b,d,e,k,h;_.isObject(a)&&(b=a.value,d=a.change,e=a.selStart,k=a.selEnd,h=a.willCommit);b="undefined"!==typeof b?b:"";d="undefined"!==typeof d||_.isString(d)?d:"";k="undefined"!==typeof k?k:b.length;Object.defineProperties(this,{value:{value:b,writable:!0,enumerable:!0},change:{value:d,writable:!0,enumerable:!0},selStart:{value:"undefined"!==typeof e?
e:0,writable:!0,enumerable:!0},selEnd:{value:k,writable:!0,enumerable:!0},willCommit:{value:h||!1,enumerable:!0}})},"Mouse Enter":function(a){f.Event.call(this,a)},"Mouse Leave":function(a){f.Event.call(this,a)},"Mouse Up":function(a){f.Event.call(this,a)},"Mouse Down":function(a){f.Event.call(this,a)},Focus:function(a){f.Event.call(this,a)},Blur:function(a){f.Event.call(this,a);var b;_.isObject(a)&&(b=a.value);Object.defineProperty(this,"value",{value:b,writable:!0,enumerable:!0})},Open:function(a){f.Event.call(this,
a);var b;_.isObject(a)&&(b=a.targetName);Object.defineProperty(this,"targetName",{value:b||"",writable:!0,enumerable:!0})},Close:function(a){f.Event.call(this,a)}};f.create=function(a,b){return e[a]?new e[a](b):null};f.ha={create:function(a,b,d){d=$.extend({name:a,type:"Field",value:b.Wa()},d);return(a=f.create(a,d))?(Object.defineProperties(a,{target:{value:b,writable:!0,enumerable:!0},targetName:{value:b.name,enumerable:!0},modifier:{value:null,enumerable:!0},shift:{value:null,enumerable:!0}}),
a):null}};f.ZC={create:function(a,b,d){d=$.extend({name:a,type:"Doc",targetName:""},d);return(a=f.create(a,d))?(Object.defineProperty(a,"target",{value:b,writable:!0,enumerable:!0}),a):null}};f.Fp={create:function(a,b,d){d=$.extend({name:a,type:"Page"},d);return(a=f.create(a,d))?(Object.defineProperty(a,"target",{value:b,writable:!0,enumerable:!0}),a):null}};f.vd={create:function(a,b){return f.create(a,b)}}})(window);
(function(a){function f(){}function e(b){this.stringValue=b}function c(b,a,c){a=a||",";c=c||".";var d=b.split(c),e=d[0];"-"===b.charAt(0)&&(e=e.substr(1));for(var f=[];3<e.length;)f.push(e.substr(e.length-3)),e=e.substr(0,e.length-3);0<e.length&&f.push(e);e=f.reverse().join(a);"-"===b.charAt(0)&&(e="-"+e);d[0]=e;return d.join(c)}function b(b,a,c){var d="\\.,";0===c?d="\\.":2===c&&(d=",");if(0===a)return/^-?\d*$/.test(b);if(_.isUndefined(a))return a=new RegExp("^-?\\d*(["+d+"]\\d*)?$"),a.test(b);a=
new RegExp("^-?\\d*(["+d+"]\\d{0,"+a.toString()+"})?$");return a.test(b)}function d(b){for(var a=[],c=[],d=-1;-1!==(d=b.indexOf(".",d+1));)a.push(d);for(d=-1;-1!==(d=b.indexOf(",",d+1));)c.push(d);if(a.length&&c.length){if(a[a.length-1]<c[0])return!0}else if(c.length)for(b=b.length-4,a=c.length-1;0<=a;--a)if(c[a]!==b)return!0;return!1}function g(b){return 65<=b&&90>=b||97<=b&&122>=b}function k(b,a){switch(a){case 57:return 48<=b&&57>=b;case 65:return g(b);case 79:return g(b)||48<=b&&57>=b;case 88:return!0;
default:return b===a}}function h(a){var c=typeof a;a=_.isNull(a)||"object"!==c&&"string"!==c?a:String(a).replace(",",d(a)?".":"");c=parseFloat(a);return b(a)&&!isNaN(c)?c:c="Off"===a||_.isUndefined(a)||_.isNull(a)||""===a?0:1}function l(b,a){var c=String(b);if(c.length<a)for(var d=a-c.length,e=0;e<d;++e)c="0"+c;return c}function n(b){_.isString(b)&&(b=b.replace(/\s+/g," "),b=b.replace(/[/.]/g,"-"));return b}function m(b){return b.replace(/(mmmm)|(mmm)|(:mm)|(mm)|(:m)|(m)|(dddd)|(ddd)|(dd)|(d)|(yyyy)|(yy)|(HH)|(H)|(hh)|(h)|(MM)|(M)|(ss)|(s)|(tt)|(t)/g,
function(b){return{mmmm:"MMMM",mmm:"MMM",":mm":":mm",mm:"MM",":m":":m",m:"M",dddd:"dddd",ddd:"ddd",dd:"DD",d:"D",yyyy:"YYYY",yy:"YY",HH:"HH",H:"H",hh:"hh",h:"h",MM:"mm",M:"m",ss:"ss",s:"s",tt:"A",t:"a"}[b]||""})}function q(b,a){if(!b)return null;var c=J.slice(0);a&&(a=m(a),a=n(a));b=n(b);a&&"d"===a.charAt(0).toLowerCase()?(O.unshift(a),c=E(b,O,!0)):(a&&c.unshift(a),c=E(b,c,!0));return c.isValid()?c:null}function p(b,a){return!b||null!==q(b,a)}function u(b,a){if(N[a]){b=n(b);var c;c=a&&"d"===a.charAt(0).toLowerCase()?
E(b,O,!0):E(b,J,!0);if(c.isValid())return c.format(N[a])}return null}function r(b,a){if((1===a||3===a)&&H.exec(b))return b.replace(/am/ig," am").replace(/pm/ig," pm").replace(/\s\s+/g," ");var c=String(b).split(":");if(3<a||0>a||!b)return null;var d=0,e=0,f=0;c[0]&&(d=Number(c[0]));c[1]&&(e=Number(c[1]));c[2]&&(f=Number(c[2]));if(23<d||59<e||59<f||_.isNaN(d)||_.isNaN(e)||_.isNaN(f))return null;var c=1===a||3===a,g;c?(g=12<=d&&24>d?"PM":"AM",d%=12,0===d&&(d=12)):d=l(d,2);e=l(e,2);f=l(f,2);d=d+":"+
e+(2>a?"":":"+f);c&&(d+=" "+g);return d}function v(b,a){for(var c=0,d="",e=0;e<a.length&&c<b.length;++e){var f=a.charAt(e);switch(f){case "9":d+=b.charAt(c);c++;break;default:d+=f}}return d}function w(b,a){this.sO=a;this.Nz=!1;this.$T=b;b.xX()}function z(b){return function(){console.log("stub: "+b+" called with",arguments)}}function C(b){var a=null;if(_.isArray(b))switch(b[0]){case "T":a=[];break;case "G":a=b.slice(1,2);break;case "RGB":a=b.slice(1,4);break;case "CMYK":a=b.slice(1,5)}return a}function A(b,
a){b.widgets.forEach(function(b){b.backgroundColor=a})}function x(b){this.LE={};this.vE=b}function y(){var b=this;this.KE={Doc:new x(function(){return"id"}),Field:new x(function(b){return b.name})};this.Qp=0;this.dt=[];this.iO={Doc:function(b){return G.fD(b)},Color:function(b){return G.Js(b)},Field:function(b){b.kk&&b.kk()&&(b=b.Hb());return new G.yp(b)},Event:function(a){var c={target:b.im({Field:"Field",Page:"Doc",Doc:"Doc"}[a.type],a.target)};Object.defineProperties(c,{value:{get:function(){return G.utils.toString(a.value)},
set:function(b){a.value=b},enumerable:!0}});for(var d in a)a.hasOwnProperty(d)&&"target"!==d&&"value"!==d&&function(b){Object.defineProperty(c,b,{set:function(c){a[b]=c},get:function(){return a[b]},enumerable:!0})}(d);return c}}}function F(){y.call(this);this.$N=this.FR();a.CZ=this.$N;for(var b in B)B.hasOwnProperty(b)&&(b in a||(a[b]=B[b]))}function L(){y.call(this);if(T){this.Wp=$("<iframe />");this.Wp.css({display:"none"});this.Wp.appendTo("body");this.Gn=this.Wp[0].contentWindow;var b=this.Gn.document;
b.open();b.write("<script>var event = {};\x3c/script>");b.write("<script>window.__add_action = function(__script){ return function(){(1,eval)(__script); } }\x3c/script>");b.close();this.kl=!1;for(var a in B)B.hasOwnProperty(a)&&(this.Gn[a]=B[a]);f(this.Gn)}}a.Annotations=a.Annotations||{};a.Annotations.O=a.Annotations.O||{};a.Annotations.O.ub=a.Annotations.O.ub||{};var E=a.moment,H=new RegExp(/^(0?\d|1[0-2]):[0-5]\d?:?[0-5]?\d ?([AaPp][Mm])/),G=a.Annotations.O.ub,J="M-D;M-D-YYYY;MM-DD-YY;MM-YY;D-MMM;D-MMM-YY;DD-MMM-YY;YYMM-DD;MMM-YY;MMMM-YY;MMM D, YYYY;MMMM D, YYYY;M-D-YY h:mm A;M-D-YY HH:mm;DD-MMM-YYYY".split(";"),
O="D-MMM D-MMM-YY DD-MMM-YY DD-MMM-YYYY DD-MM-YYYY D-M-YYYY".split(" "),M="m/d;m/d/yy;mm/dd/yy;mm/yy;d-mmm;d-mmm-yy;dd-mmm-yy;yymm-dd;mmm-yy;mmmm-yy;mmm d, yyyy;mmmm d, yyyy;m/d/yy h:MM tt;m/d/yy HH:MM;dd-mmm-yyyy".split(";"),N={"m/d":"M/D","m/d/yy":"M/D/YYYY","mm/dd/yy":"MM/DD/YY","mm/dd/yyyy":"MM/DD/YYYY","mm/yy":"MM/YY","d-mmm":"D-MMM","d-mmm-yy":"D-MMM-YY","dd-mmm-yy":"DD-MMM-YY","yymm-dd":"YYMM-DD","mmm-yy":"MMM-YY","mmmm-yy":"MMMM-YY","mmm d, yyyy":"MMM D, YYYY","mmmm d, yyyy":"MMMM D, YYYY",
"m/d/yy h:MM tt":"M/D/YY h:mm A","m/d/yy HH:MM":"M/D/YY HH:mm","dd-mmm-yyyy":"DD-MMM-YYYY"};G.utils={isNumber:b,D0:c,j0:h,h0:l,q_:u,U_:p,r_:r,formatNumber:v,toString:function(b){return _.isString(b)?b:_.isNumber(b)?String(b):""},I0:function(a){var c=a;b(a)&&""!==a&&(c=h(a));return c},gV:function(b,a){var c=E(a),d=m(b);return c.format(d)},hV:function(b){var a=Array.prototype.slice.call(arguments,1),d=0;return b.replace(/%(,\d+)?([+ 0#]+)?(\d+)?(\.\d+)?([dfsx]+)/g,function(b,e,f,g,k,h){b=0;g=".";var n=
",";if(e)switch(e.slice(1)){case "0":n=",";g=".";break;case "1":n="";g=".";break;case "2":n=".";g=",";break;case "3":n="",g=","}if(f)for(e=f.length-2,f=1;f<e;++f);k&&(b=k.slice(1));k=a[d];d++;e=String(k);switch(h){case "f":e=Number(k).toFixed(b).replace(".",g);e=c(e,n,g);break;case "d":e=Number(k).toFixed();break;case "x":e=Number(k).toString(16)}return e})},iV:function(a,c){for(var d="",e=0,f="",k=a.length,h=0;h<k;++h){var n=c,l=a[h],m="";switch(l){case "?":m="upper"===f?m+n.charAt(e).toUpperCase():
"lower"===f?m+n.charAt(e).toLowerCase():m+n.charAt(e);e++;break;case "X":for(;e<n.length;){l=n.charCodeAt(e);if(g(l)||48<=l&&57>=l){m="upper"===f?m+n.charAt(e).toUpperCase():"lower"===f?m+n.charAt(e).toLowerCase():m+n.charAt(e);e++;break}e++}break;case "A":for(;e<n.length;){if(g(n.charCodeAt(e))){m="upper"===f?m+n.charAt(e).toUpperCase():"lower"===f?m+n.charAt(e).toLowerCase():m+n.charAt(e);e++;break}e++}break;case "9":for(;e<n.length;){if(b(n.charAt(e))){m+=n.charAt(e);e++;break}e++}break;case "*":m=
"lower"===f?n.slice(e).toLowerCase():"upper"===f?n.slice(e).toUpperCase():n.slice(e);e=n.length-1;break;case "\\":break;case ">":f="upper";break;case "<":f="lower";break;case "=":f="";break;default:m=l}d+=m}return d},VC:function(b,c){c=c||b;var d=a.Annotations.O.ub.Events.ri(I);if(b&&d){var e=d.length,f=b.length;if(I.willCommit&&e!==f&&0!==f)D.Ba().fe().alert("The value entered does not match the format of the field [ "+c+" ]"),I.rc=!1;else if(e&&f)if(e<=f)for(f=0;f<e;++f){if(!k(d.charCodeAt(f),b.charCodeAt(f))){I.rc=
!1;D.Ba().fe().alert("The value entered does not match the format of the field [ "+c+" ]");break}}else D.Ba().fe().alert("The value entered does not match the format of the field [ "+c+" ]"),I.rc=!1}},rs:function(b){var a=String(I.value);a&&I.willCommit&&!p(a,b)&&(I.rc=!1,D.Ba().fe().alert("Invalid Date/Time: Input should match format "+b))}};Object.getOwnPropertyNames(String.prototype).forEach(function(b){e.prototype[b]=function(){return this.stringValue[b].apply(this.stringValue,arguments)}});e.prototype.valueOf=
function(){this.wI||(this.wI=h(this.stringValue));return this.wI};w.prototype={terminate:function(){this.Nz||(this.Nz=!0,this.sO(),this.$T.VQ())}};var I=null,D=null,B={AFNumber_Format:function(a,d,e,f,g,k){e=(e=D.Ba().fe().Hb(I.target.name))?e.Wa():null;b(e)&&null!==e&&""!==e&&(e=h(e),isNaN(e)||(e=e.toFixed(a),0===d?e=c(e):2===d&&(e=c(e),a=e.indexOf("."),e=e.split(",").join("."),0<=a&&(e=e.substr(0,a)+","+e.substr(a+1))),I.value=k?g+e:e+g,I.rc=!0))},AFPercent_Format:function(a,d){var e=I.value;b(e)&&
(e=h(e),e=(100*e).toFixed(a),d&&(e=c(e)),I.value=e+"%",I.rc=!0)},AFDate_KeystrokeEx:G.utils.rs,AFDate_Keystroke:function(b){b<M.length&&G.utils.rs(M[b])},AFDate_FormatEx:function(b){b=u(String(I.value),b);_.isNull(b)||(I.value=b,I.rc=!0)},AFDate_Format:function(b){var a=String(I.value);b<M.length&&(b=u(a,M[b]),_.isNull(b)||(I.value=b,I.rc=!0))},AFRange_Validate:function(b,a,c,d){var e=Number(I.value),e=(!b||e>=a)&&(!c||e<=d);if(!e){var f="Invalid value: must be";b&&(f+=" greater than or equal to "+
a);b&&c&&(f+=" and");c&&(f+=" less than or equal to "+d);D.Ba().fe().alert(f+".")}I.rc=e},AFTime_Format:function(b){I.value=r(I.value,b);I.rc=!0},AFTime_FormatEx:function(b){b=u(String(I.value),b);_.isNull(b)||(I.value=b,I.rc=!0)},AFTime_Keystroke:function(b){switch(b){case 0:b="HH:MM";break;case 1:b="h:MM tt";break;case 2:b="HH:MM:ss";break;case 3:b="h:MM:ss tt"}G.utils.rs(b)},AFTime_KeyStrokeEx:G.utils.rs,AFMakeNumber:function(b){return Number(b)},AFSimple_Calculate:function(b,a){var c={PRD:function(b,
a){return b*a},SUM:function(b,a){return b+a},MIN:function(b,a){return a<b?a:b},MAX:function(b,a){return a>b?a:b}}[b];c&&("string"===typeof a&&(a=a.split(",")),I.value=a.map(function(b){b=I.target.doc.getField(b).value;return h(b)}).reduce(c),I.rc=!0)},AFNumber_Keystroke:function(c,d){I.rc=b(a.Annotations.O.ub.Events.ri(I),void 0,d)},AFPercent_Keystroke:function(c){I.rc=b(a.Annotations.O.ub.Events.ri(I),c+2)},AFMergeChange:function(b){return a.Annotations.O.ub.Events.ri(b)},AFParseDateEx:q,AFSpecial_Format:function(b){if(0===
arguments.length)I.rc=!1;else{var a=I.value,c;switch(b){case 0:c="99999";break;case 1:c="99999-9999";break;case 2:c=10<=a.length?"(999) 999-9999":"999-9999";break;case 3:c="999-99-9999"}I.value=a.match(/^\d+$/)?v(a,c):a;I.rc=!0}},AFSpecial_Keystroke:function(b){var a="",c;switch(b){case 0:a="99999";c="Zipcode";break;case 1:a="999999999";c="Zipcode + 4";break;case 2:a="9999999999";c="Phone";break;case 3:a="999999999",c="Social Security Number"}G.utils.VC(a,c)},AFSpecial_KeystrokeEx:G.utils.VC,util:{printd:G.utils.gV,
printf:G.utils.hV,printx:G.utils.iV,scand:function(b,a){a=a.trim();return q(a,b).toDate()}},app:{beep:z("app.beep"),alert:function(b){if(_.isObject(b)){var a=b.nType||0;b=b.cMsg;if(0===a)return D.Ba().fe().alert(b),1;b=window.confirm(b);return 1===a?b?1:2:b?4:3}D.Ba().fe().alert(b);return 1},response:z("app.response"),setInterval:function(b,a){var c=D.getDocument().Yp;b=c.Qn(b);var d=I,e=window.setInterval(function(){c.Qo(b,d,D)},a);return new w(c,function(){window.clearInterval(e)})},clearInterval:function(b){b.terminate()},
setTimeOut:function(b,a){var c=D.getDocument().Yp,d;b=c.Qn(b);var e=I,f=window.setTimeout(function(){c.Qo(b,e,D);d.terminate()},a);return d=new w(c,function(){window.clearTimeout(f)})},clearTimeOut:function(b){b.terminate()},launchURL:z("app.launchURL")},console:{clear:function(){console.clear()},println:function(b){console.log(b)}},alert:function(b){D.Ba().fe().alert(b)},print:function(){$(window).trigger("documentPrint")},ADBE:null,color:{transparent:["T"],black:["G",0],white:["G",1],red:["RGB",
1,0,0],green:["RGB",0,1,0],blue:["RGB",0,0,1],cyan:["CMYK",1,0,0,0],magenta:["CMYK",0,1,0,0],yellow:["CMYK",0,0,1,0],dkGray:["G",.25],gray:["G",.5],ltGray:["G",.75]},border:{s:"solid",b:"beveled",d:"dashed",i:"inset",J0:"underline"},style:{ch:"check",cr:"cross",k_:"diamond",ci:"circle",F0:"start",E0:"square"},display:{visible:0,hidden:1,GU:2,HU:3}};G.yp=function(b){this.la=b};G.yp.prototype={insertItemAt:function(b,a,c){_.isUndefined(a)&&(a=b);_.isUndefined(c)&&(c=0);_.isArray(b)&&(b=b[0]);_.isArray(a)&&
(a=a[0]);a={displayValue:b,value:a};var d=this.la.qh();c=-1===c?d.length-c:c;this.la.eu(a,c);"Ch"!==this.la.type||this.la.flags.get("Combo")||this.la.Lb(b)},getItemAt:function(b,a){a=_.isUndefined(a)?!0:!!a;var c=this.la.qh(),c=-1===b?c[c.length-1]:c[b];return a?c.value:c.displayValue},deleteItemAt:function(b){var a=this.la.qh();if(_.isUndefined(b)){var c=this.la.Wa();a.forEach(function(a,d){a.value===c&&(b=d)});_.isUndefined(b)||(a.splice(b,1),0===b?this.la.Lb(a[a.length-1].value):this.la.Lb(a[b-
1].value))}else a.splice(b,1)},clearItems:function(){this.la.pe([]);this.la.Lb(null);this.la.rm()},setItems:function(b){for(var a=[],c=b.length,d=0;d<c;++d){var e=b[d];_.isString(e)?a.push({value:e}):_.isArray(e)&&a.push({displayValue:e[0],value:e[1]?e[1]:e[0]})}this.la.pe(a);this.la.Lb(a[0].value||null);this.la.rm()},setFocus:function(){var b;if(b="widgets"in this.la?this.la.widgets[0]:this.la)this.la.mh().Un(b.PageNumber,b.X,b.Y,!0),b.innerElement.trigger("focus")},isBoxChecked:function(b){return(b=
this.la.widgets[b])?b.appearance===b.ti()?1:0:0},checkThisBox:function(b,a){_.isUndefined(a)&&(a=!0);var c=this.la.widgets[b];c&&(a?this.la.Lb(c.ti()):this.la.Wa()===c.ti()&&this.la.Lb("Off"),this.la.rm())},buttonSetCaption:function(b){this.la.widgets.forEach(function(a){a.captions.Normal=String(b);a.refresh()})},getArray:function(){var b=[],a=this.la.mh().da.jh;this.la.MC({wB:function(){},aw:function(){},Ir:function(c){b.push(new G.yp(a.Hb(c)))}},this.la.jS());return b}};Object.defineProperties(G.yp.prototype,
{name:{get:function(){return this.la.name},enumerable:!0},doc:{get:function(){return G.fD(this.la.mh())},enumerable:!0},value:{get:function(){var a=this.la.Wa();return"number"===typeof a?a:b(a)&&""!==a?"0"===a?0:new e(a):a||""},set:function(b){this.la.Lb(b)},enumerable:!0},valueAsString:{get:function(){var b=this.la.Wa();return b?b.toString():""}},fillColor:{set:function(b){A(this.la,C(b))},get:function(){return G.Js(this.la.widgets[0].backgroundColor)},enumerable:!0},textColor:{set:function(b){this.la.font.fillColor=
C(b)},get:function(){return G.Js(this.la.font.fillColor)},enumerable:!0},bgColor:{set:function(b){A(this.la,C(b))},get:function(){return G.Js(this.la.widgets[0].backgroundColor)},enumerable:!0},numItems:{get:function(){return(this.la.qh()||[]).length},enumerable:!0},charLimit:{set:function(b){b=Number(b);_.isNaN(b)||(this.la.maxLen=b)},get:function(){return this.la.maxLen},enumerable:!0},hidden:{set:function(b){this.la.Pf(!b)},get:function(){return this.la.widgets[0].hidden},enumerable:!0},display:{set:function(b){b===
B.display.visible||b===B.display.GU?this.la.Pf(!0):b!==B.display.hidden&&b!==B.display.HU||this.la.Pf(!1)},get:function(){return this.la.widgets[0].hidden},enumerable:!0},readonly:{set:function(b){this.la.flags.set("ReadOnly",b);this.la.rm()},get:function(){return this.la.flags.get("ReadOnly")}},required:{set:function(b){this.la.flags.set("Required",b);this.la.rm()},get:function(){return this.la.flags.get("Required")}},userName:{set:function(b){this.la.userName=b;this.la.rm()},get:function(){return this.la.userName},
enumerable:!0},type:{get:function(){switch(this.la.type){case "Tx":return"text";case "Btn":return this.la.flags.get("PushButton")?"button":this.la.flags.get("Radio")?"radiobutton":"checkbox";case "Ch":return this.la.flags.get("Combo")?"combobox":"listbox";case "Sig":return"signature"}return null},enumerable:!0},currentValueIndices:{get:function(){for(var b=this.la.qh(),a=this.la.value,c=0;c<b.length;++c)if(b[c].value===a)return c;return-1},enumerable:!0}});x.prototype={get:function(b){b=this.vE(b);
b=this.LE[b];return _.isUndefined(b)?null:b},set:function(b){this.LE[this.vE(b)]=b}};G.Js=function(b){return b?0!==b.A?["RGB",b.R/255,b.G/255,b.B/255]:["T"]:["T"]};G.fD=function(b){var c=b.Ba().fe(),d={getField:function(b){return(b=c.Hb(b))?new G.yp(b):null},submitForm:function(c,d,e,f){_.isUndefined(d)&&(d=!0);(new a.Actions.$k({url:c,format:d?"fdf":"xfdf",includeEmpty:!!e,fields:f||[]})).onTriggered(null,null,b)},resetForm:function(c){(new a.Actions.Vk({fields:c})).onTriggered(null,null,b)},calculateNow:function(){c.uq(null)},
getNthFieldName:function(b){var a,d=0;c.ho(function(c){d===b&&(a=c.name);++d});return a}};Object.defineProperties(d,{calculate:{set:function(b){c.ap=!!b},get:function(){return c.ap},enumerable:!0},numPages:{get:function(){return b.wb()},enumerable:!0},pageNum:{get:function(){return b.Pl()-1},set:function(a){b.Ke(a+1)},enumerable:!0},numFields:{get:function(){var b=0;c.ho(function(){++b});return b},enumerable:!0}});return d};y.prototype={Qn:function(){},Qo:function(){},ed:function(){this.dt.forEach(function(b){b()})},
JC:function(b){return b},RC:function(b){return b},ix:function(b){return b},JL:function(b){return b},KL:function(b){return b},IL:function(b){return b},HL:function(b){return b},lp:function(b){var a=null;if(_.isArray(b))a=this.HL(b);else if(_.isNull(b))a=null;else switch(typeof b){case "object":a=this.RC(b);break;case "function":a=this.ix(b);break;case "number":a=this.JL(b);break;case "string":a=this.KL(b);break;case "boolean":a=this.IL(b);break;case "undefined":a=void 0;break;default:console.warn("unrecognised type: "+
typeof b)}return a},wrap:function(b,a){var c=this.KE[b];if(c){var d=c.get(a);if(!_.isNull(d))return d}d=this.im(b,a);d=this.lp(d);c&&c.set(d);return d},im:function(b,a){var c=this.KE[b];if(c){var d=c.get(a);if(!_.isNull(d))return d}if(d=this.iO[b])return d=d(a),c&&c.set(d),d;console.warn(b+" is not a valid normalizable embedded JS type",a);return{}},lY:function(b){0<this.Qp?this.dt.push(b):b()},xX:function(){this.Qp+=1},VQ:function(){--this.Qp;if(0===this.Qp){var b=this.dt;this.dt=[];b.forEach(function(b){b()})}},
FR:function(){return this.RC($.extend({},B))}};G.NY=B;var Q=eval;F.prototype=$.extend(Object.create(y.prototype),{iq:function(b){b=this.im("Doc",b);for(var c=Object.keys(b),d=0;d<c.length;++d){var e=c[d];Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(b,e))}},Qn:function(b){return function(a){I=a;Q("with(_PDFTRON_JS_API){"+b+"\n}");I=null}},Qo:function(b,c,d){a.event=c;this.kl||(this.iq(d),this.kl=!0);var e=D;D=d;try{b(this.wrap("Event",c),this.wrap("Doc",d))}catch(f){console.warn("Embedded JS error encountered: "+
f+" "+b.pr)}D=e}});(function(){y.call(this);this.Wh=continuum.WZ();this.kl=!1;for(var b=Object.keys(B),a=0;a<b.length;++a)this.Wh.global.lD(b[a],this.lp(B[b[a]]))}).prototype=$.extend(Object.create(y.prototype),{Qn:function(b){return continuum.XZ(b)},iq:function(b){b=this.im("Doc",b);for(var a=Object.keys(b),c=0;c<a.length;++c)this.Wh.global.lD(a[c],this.lp(b[a[c]]))},Qo:function(b,a,c){this.kl||(this.iq(c),this.kl=!0);a=this.im("Event",a);c=this.lp(a);this.Wh.global.lD("event",c);I=a;this.Wh.evaluate(b);
I=null},JC:function(b){var a=this;if(_.isObject(b)){if(b.$O)return b.$O.map(function(b){return a.JC(b)});console.warn("object argument: ",b)}return b},ix:function(b){var a=this;return continuum.iz(function(){var c=Array.prototype.map.call(arguments,function(b){return a.JC(b)});return a.lp(b.apply(null,c))})},JL:function(b){return this.Wh.evaluate(JSON.stringify(b))},KL:function(b){return this.Wh.evaluate(JSON.stringify(b))},IL:function(b){return this.Wh.evaluate(JSON.stringify(b))},HL:function(b){var a=
this.Wh.evaluate("new Array()");console.warn("array:",a);return b},RC:function(b){for(var a=this.Wh.evaluate("Object.create(null)"),c=Object.keys(b),d=c.length,e=0;e<d;++e){var f=c[e],g=Object.getOwnPropertyDescriptor(b,f),k={Enumerable:g.enumerable,Writeable:g.writeable};_.isUndefined(g.value)||(k.Value=this.lp(g.value));_.isUndefined(g.set)||(k.Set=this.ix(g.set));_.isUndefined(g.get)||(k.Get=this.ix(g.get));a.JY(f,k)}return a}});var T=!0;a.o.jQ=function(){T=!1};a.Annotations.O.Cx={update:function(b){f=
b},ri:a.Annotations.O.ub.Events.ri};L.prototype=$.extend(Object.create(y.prototype),{Qn:function(b){if(T)try{var a=this.Gn.__add_action(b);a.pr=b;return a}catch(c){console.warn("Failed to compile embedded JS script")}},iq:function(b){b=this.im("Doc",b);for(var a=Object.keys(b),c=0;c<a.length;++c){var d=a[c];Object.defineProperty(this.Gn,d,Object.getOwnPropertyDescriptor(b,d))}},ed:function(){y.prototype.ed.call(this);this.Wp&&this.Wp.remove()},Qo:function(b,a,c){if(T){this.kl||(this.iq(c),this.kl=
!0);var d=D;D=c;a=this.im("Event",a);this.Gn.event=a;c=I;I=a;try{b()}catch(e){console.warn("Embedded JS error encountered: ",e,b&&b.pr)}I=c;D=d}}});G.GY=F;G.OP=function(){return new L}})(window);(function(a){if(a&&a.Worker){var f=a.Worker;a.ij=a.ij||[];a.ij.nL||(a.ij.nL=function(){for(var e=a.ij.length-1;0<=e;e--)a.ij[e].terminate(),delete a.ij[e]});a.Worker.isFake||(a.Worker=function(e){e=new f(e);a.ij.push(e);return e},a.uM=function(a){return a instanceof f},a.Worker.isFake=!0)}})(window);
window.addEventListener("unload",function(){window.ij&&window.ij.nL()});
(function(a){a.Sg=a.Sg||{};var f=a.Sg;f.ls=function(a){var c=Object.getOwnPropertyNames(a).reduce(function(b,c){b[c]=Object.getOwnPropertyDescriptor(a,c);return b},{});Object.defineProperties(this,c);var b=Object.getPrototypeOf(a),c=Object.getOwnPropertyNames(b).reduce(function(a,c){a[c]=Object.getOwnPropertyDescriptor(b,c);return a},{});Object.defineProperties(this,c)};f.LC=function(a){var c=this;a.forEach(function(b){f.ls.call(c,b)})}})(window);
(function(a){(a.Sg||{}).Mk=function(){var a="solid";Object.defineProperties(this,{oN:{get:function(){return a},set:function(e){a=e;this.kb()}}})}})(window);
(function(a){a.Annotations=a.Annotations||{};var f=a.Annotations,e=f.ja||{};f.Annotation=function(){this.Subject="Annotation";this.ND=1;this.Op=this.Pp=this.$s=this.Zs=0;this.CD=void 0;this.NoRotate=this.NoZoom=this.XY=this.WY=!1;this.Printable=!0;this.zj=new f.Color(0,0,0);this.WD=void 0;this.gy=new Date;this.uE=e.VS();this.ny=!0;this.yE=this.ol=!1;this.UE=Promise.resolve();this.AE=!0;this.tl=[];this.vf=this.Xg=null;this.JD=this.KD=!1};f.Annotation.prototype={elementName:"annotation",selectionModel:f.Ks,
jI:!1,MH:function(){return null},draw:function(){},render:function(){},bx:function(){},kk:function(){return!1},FI:function(){return!1},dm:function(){return!this.Hidden&&!this.NoView&&!this.Ii()},NK:function(a){var b=new f.Rect(a.x1,a.y1,a.x2,a.y2);0>b.Ca()&&(a=b.x1,b.x1=b.x2,b.x2=a);0>b.xa()&&(a=b.y1,b.y1=b.y2,b.y2=a);this.X=b.x1;this.Y=b.y1;this.Width=b.Ca();this.Height=b.xa()},Ag:function(a){var b=this.Ec();a=new f.Rect(a.x1,a.y1,a.x2,a.y2);0>a.Ca()&&(a.x1=b.x1,a.x2=b.x2);0>a.xa()&&(a.y1=b.y1,a.y2=
b.y2);this.X=a.x1;this.Y=a.y1;this.Width=a.Ca();this.Height=a.xa()},adjustRect:function(){},resize:function(a){this.Ag(a)},zi:function(){return this.X},VK:function(a){this.X=parseFloat(a)},Ai:function(){return this.Y},WK:function(a){this.Y=parseFloat(a)},Ca:function(){return this.Width},tC:function(a){this.Width=parseFloat(a)},xa:function(){return this.Height},Wo:function(a){this.Height=parseFloat(a)},Ec:function(){return new f.Rect(this.X,this.Y,this.X+this.Width,this.Y+this.Height)},getRectPadding:function(){return 0},
rb:function(){return this.PageNumber},xb:function(){return"undefined"===typeof this.PageNumber?void 0:this.PageNumber-1},IK:function(a){this.PageNumber=parseInt(a,10)},bv:function(){return this.zi()},SH:function(){return this.bv()+this.Width},ov:function(){return this.Ai()},hH:function(){return this.ov()+this.Height},vR:function(){return this.Custom},fW:function(a){this.Custom=a},kh:function(){return this.dV},Gh:function(a){this.dV=a;this.kb(!(this instanceof f.Ga))},jq:function(a){if(a.Id)for(var b=
0;b<this.tl.length;++b)if(this.tl[b].Id===a.Id)return;this.tl.push(a)},oz:function(a){a=this.tl.indexOf(a);-1<a&&this.tl.splice(a,1)},hv:function(){return this.tl.filter(function(a){return"group"!==a.ReplyType})},kA:function(){return this.tl.filter(function(a){return"group"===a.ReplyType})},Ii:function(){return!(_.isUndefined(this.InReplyTo)||_.isNull(this.InReplyTo))&&"group"!==this.ReplyType},EI:function(){return!(_.isUndefined(this.InReplyTo)||_.isNull(this.InReplyTo))&&"group"===this.ReplyType},
Ew:function(){return this.UE},kg:function(){var a=this.appearances&&this.appearances._DEFAULT;return a&&a.Normal},kb:function(a){this.isImporting||(this.gy=new Date,a||delete this.appearances);this.ny||(this.ol=!0)},DR:function(){var a=[];this.Invisible&&a.push("invisible");this.Hidden&&a.push("hidden");this.Printable&&a.push("print");this.NoZoom&&a.push("nozoom");this.NoRotate&&a.push("norotate");this.NoView&&a.push("noview");this.ReadOnly&&a.push("readonly");this.Locked&&a.push("locked");this.ToggleNoView&&
a.push("togglenoview");this.LockedContents&&a.push("lockedcontents");return 0<a.length?a.join(","):null},qW:function(a){this.dO=a},MR:function(){return this.dO},serialize:function(c,b){var d=f.ca,e=this.Ec();this.cw&&this.cw.isEqual(e)?e=this.dw:(e.MG(),this.dw&&(delete this.dw,delete this.cw),e=d.eC(e,b));var e={page:this.xb(),rect:e},k=d.yg(this.Color);null!==k&&(e.color=k);(k=this.DR())&&(e.flags=k);!this.cT&&this.Id&&(e.name=this.Id);this.Author&&(e.title=this.Author);this.Subject&&(e.subject=
this.Subject);(k=this.Rotation)&&0!==k&&(e.rotation=k);if(k=this.DateModified){var h;this.AB&&(k.getTime()===this.qJ?h=this.AB:(delete this.AB,delete this.qJ));h||(h=d.GC(k));e.date=h}for(var l in e)c.setAttribute(l,e[l]);l=this.kh();l===this.oJ?(this.rJ&&(h=document.createElementNS("","contents-richtext"),d=document.createElementNS("",d.yV),c.OG=this.rJ,h.appendChild(d),c.appendChild(h)),this.CB&&(h=document.createElementNS("","contents"),h.textContent=this.CB,c.appendChild(h))):(delete this.oJ,
delete this.CB,h=document.createElementNS("","contents"),h.textContent=l,c.appendChild(h));(d=this.appearances)&&a.kf.LL(new a.vD(c),d,b);return c},ai:function(a){return(a=a.nodeName)&&this.elementName?a.toLowerCase()===this.elementName.toLowerCase():!1},deserialize:function(c,b){var d=f.ca,e=c.getAttribute("page"),e=parseInt(e,10);this.PageNumber=e+1;this.dw=e=c.getAttribute("rect")||"0,0,100,100";e=d.Bu(e,b);e.normalize();this.Ag(e);e=c.getAttribute("name");this.cT=!e;this.Id=e;this.Author=c.getAttribute("title");
this.Subject=c.getAttribute("subject");e=(c.getAttribute("flags")||"").split(",");this.Invisible=-1!==e.indexOf("invisible");this.Hidden=-1!==e.indexOf("hidden");this.Printable=-1!==e.indexOf("print");this.NoZoom=-1!==e.indexOf("nozoom");this.NoRotate=-1!==e.indexOf("norotate");this.NoView=-1!==e.indexOf("noview");this.ReadOnly=-1!==e.indexOf("readonly");this.Locked=-1!==e.indexOf("locked");this.ToggleNoView=-1!==e.indexOf("togglenoview");this.LockedContents=-1!==e.indexOf("lockedcontents");e=d.Zj(c.getAttribute("color"));
this.Color=null!==e?e:new f.Color(0,0,0,0);(e=c.getAttribute("rotation"))&&(this.Rotation=e);(e=c.getAttribute("date"))?(this.AB=e,d=d.qz(e),this.qJ=d.getTime(),this.DateModified=d):this.DateModified=null;var d=c.getElementsByTagName("contents-richtext"),e="",k=c.getElementsByTagName("contents"),h=c.getElementsByTagName("apref"),l;if(0<k.length)this.CB=e=k[0].textContent;else if(0<d.length)if(l=d[0].getElementsByTagName("body"),0<l.length)if(k=l[0].getElementsByTagName("span"),0<k.length)for(l=0;l<
k.length;++l)e+=k[l].textContent;else e=l[0].textContent;else e=d[0].textContent;0<d.length&&(this.rJ=d[0].PU);for(l=0;l<h.length;++l)a.kf.uD.xO(new a.Se(h[l]),this,b);this.oJ=e;this.Gh(e)},Kh:function(a){var b={x:this.X,y:this.Y},d={x:b.x+this.Width,y:b.y+this.Height},b=a.W(b),d=a.W(d);this.NK({x1:b.x,y1:b.y,x2:d.x,y2:d.y})},dj:function(a,b){var d=a.getAttribute(b);_.isUndefined(d)||_.isNull(d)||(this[b]=d)},Yr:function(a,b){var d=a.getAttribute(b);_.isUndefined(d)||_.isNull(d)||(this[b]=Number(d))},
zb:function(a,b,d){var e=this[b];_.isUndefined(e)||_.isNull(e)||e===d||a.setAttribute(b,e)},Ak:function(){return!1},Uw:function(){this.dw&&!this.cw&&(this.cw=this.Ec())}};f.Annotation.prototype=$.extend(Object.create(a.utils.eventHandler),f.Annotation.prototype);Object.defineProperties(f.Annotation.prototype,{X:{get:function(){return this.Zs},set:function(a){this.Zs=parseFloat(a);this.kb(!0);(a=this.kg())&&a.offset&&(a.offset.x=this.Zs)}},Y:{get:function(){return this.$s},set:function(a){this.$s=
parseFloat(a);this.kb(!0);(a=this.kg())&&a.offset&&(a.offset.y=this.$s)}},Width:{get:function(){return this.Pp},set:function(a){a=parseFloat(a);window.utils.fCmp(this.Pp,a)||(this.Pp=a,this.kb())}},Height:{get:function(){return this.Op},set:function(a){a=parseFloat(a);window.utils.fCmp(this.Op,a)||(this.Op=a,this.kb())}},NoMove:{get:function(){return this.LD},set:function(a){this.LD=!0===a||"true"===a}},NoResize:{get:function(){return this.MD},set:function(a){this.MD=!0===a||"true"===a}},PageNumber:{get:function(){return this.ND},
set:function(a){this.ND=parseInt(a,10)}},DateModified:{get:function(){return this.gy},set:function(a){this.gy=e.pH(a)}},Id:{get:function(){return this.uE},set:function(a){this.uE=a}},Author:{get:function(){return this.WD},set:function(a){this.WD=a}},IsAdded:{get:function(){return this.ny},set:function(a){this.ny=a}},IsModified:{get:function(){return this.ol},set:function(a){this.ol=a}},IsDeleted:{get:function(){return this.yE},set:function(a){this.yE=a}},Custom:{get:function(){return this.CD},set:function(a){this.CD=
a}},Listable:{get:function(){return this.AE},set:function(a){this.AE=!!a}},Color:{get:function(){return this.zj},set:function(a){a instanceof f.Color&&(this.zj=a,this.kb())}},MaintainAspectRatio:{get:function(){return this.KD},set:function(a){this.KD=a}},IsClickableOutsideRect:{get:function(){return this.JD},set:function(a){this.JD=a}}})})(window);
(function(a){var f=a.Annotations||{};f.pp=function(a){this.Rp=new f.Color;this.vl=this.ll=this.Fn=0;this.uf=null;this.set(a)};f.pp.prototype={set:function(a){a instanceof f.pp?(this.Rp=new f.Color(a.Rp),this.Fn=a.Fn,this.ll=a.ll,this.vl=a.vl,this.uf=a.uf):_.isArray(a)?3===a.length||4===a.length?(_.isUndefined(a[0])||(this.ll=Number(a[0])),_.isUndefined(a[1])||(this.vl=Number(a[1])),_.isUndefined(a[2])||(this.Fn=Number(a[2])),4===a.length&&_.isArray(a[3])&&console.warn("dashed borders are currently unsupported")):
console.warn("Invalid border specification ",a," should be 3 or 4 elements long"):_.isObject(a)&&(_.isArray(a.border)&&this.set(a.border),_.isUndefined(a.color)||(this.Rp=new f.Color(a.color)),_.isUndefined(a.width)||(this.Fn=Number(a.width)),_.isUndefined(a.cornerRadius)?_.isArray(a.cornerRadius)&&(this.ll=a.cornerRadius[0]||0,this.vl=a.cornerRadius[1]||0):this.vl=this.ll=Number(a.cornerRadius),_.isString(a.style)&&(this.uf=a.style))},serialize:function(a){var c=f.ca;this.GN&&a.setAttribute("width",
this.GN);this.uf&&a.setAttribute("style",this.uf);var b=this.color;a.setAttribute("BC",[b.R/255,b.G/255,b.B/255].map(c.toFixed).join(","))},deserialize:function(a){var c=f.ca,b={};c.getAttribute(a,"width")?b.width=parseInt(c.getAttribute(a,"width"),10):b.width=1;c.getAttribute(a,"style")&&(b.style=c.getAttribute(a,"style"),"beveled"===b.style&&(b.style="bevelled"));c.getAttribute(a,"BC")&&(b.color=c.getAttribute(a,"BC").split(",").map(Number));this.set(b)},FC:function(a){var c=_.isNull(this.uf)?"solid":
this.uf;a*=this.Fn;var b=this.ll.toFixed(6)+"px "+this.vl.toFixed(6)+"px",d={};"underline"===c?(d["border-bottom-style"]="solid",d["border-top-style"]="hidden",d["border-left-style"]="hidden",d["border-right-style"]="hidden"):(c={solid:"solid",bevelled:"outset",inset:"inset"}[c],_.isUndefined(c)&&(c="solid"),d["border-style"]=c);d["border-color"]=this.Rp.toString();d["border-width"]=a;d["border-top-left-radius"]=b;d["border-top-right-radius"]=b;d["border-bottom-left-radius"]=b;d["border-bottom-right-radius"]=
b;return d}};Object.defineProperties(f.pp.prototype,{color:{get:function(){return this.Rp},set:function(a){this.set({color:a})}},width:{get:function(){return this.Fn},set:function(a){this.set({width:a})}},style:{get:function(){return this.uf},set:function(a){this.set({style:a})}},cornerRadius:{get:function(){return[this.ll,this.vl]},set:function(a){this.set({cornerRadius:a})}}})})(window);
(function(a){var f=a.Annotations||{},e=f.ja||{};f.Pg=function(a){this.il=this.wc="";this._size=0;this.nt=new f.Color([0,0,0]);this.ul=new f.Color([0,0,0]);this.Yt="Type1";this.Cj=0;this.JE=4;this.HE=12;this.set(a)};f.Pg.prototype={set:function(a){_.isObject(a)?(a.name&&(this.wc=String(a.name),this.il=f.ca.Kr(this.wc),this.fy=f.ca.AJ(this.wc),this.cE=f.ca.zJ(this.wc)),a.size&&(this._size=Number(a.size)),a.fillColor&&(this.nt=new f.Color(a.fillColor)),a.strokeColor&&(this.ul=new f.Color(a.strokeColor)),
a.type&&(this.Yt=a.type)):_.isString(a)&&(this.wc=a,this.il=f.ca.Kr(this.wc),this.fy=f.ca.AJ(this.wc),this.cE=f.ca.zJ(this.wc))},WQ:function(a,b,d){if(0===this._size){var f=b.pv(1);if(0===a.replace(/\s/g,"").length)return this.Cj=Math.min(f/2,this.HE);var k=20;d?(k=f*e.Qk,b.element?(b=b.element[0].cloneNode(!0),f=document.getElementsByTagName("body")[0],f.appendChild(b),k=e.UG(a,b.children[0],k)/e.Qk,f.removeChild(b)):k/=2):(b=.95*b.IA(1),f*=.95,a=e.measureText(a,k,this.il?this.il:void 0,this.fy),
k*=Math.min(b/a.width,f/a.height));return this.Cj=Math.max(this.JE,Math.min(k,this.HE))}},deserialize:function(a,b){var d=f.ca;if(d.getAttribute(a,"FontName")){var e=d.getAttribute(a,"FontName");this.wc=e;this.il=f.ca.Kr(e)}if(d.getAttribute(a,"FontSize")){var e=parseFloat(d.getAttribute(a,"FontSize")),d=b.W({x:0,y:0}),k=b.W({x:e,y:0}),e=d.x-k.x,d=d.y-k.y;this._size=Math.sqrt(e*e+d*d)}},Yl:function(){return this.nt.Yl()&&this.ul.Yl()},FC:function(a){var b={};""!==this.il&&(b["font-family"]=this.il,
b["font-weight"]=this.fy,b["font-style"]=this.cE);b["font-size"]=0===this._size&&0!==this.Cj?String(this.Cj*a)+"px":String(this._size*a)+"px";b.color=this.nt.toString();3>parseFloat(b["font-size"])&&(b["font-size"]="3px");return b}};Object.defineProperties(f.Pg.prototype,{name:{get:function(){return this.wc},set:function(a){this.set({name:a})}},size:{get:function(){return this._size},set:function(a){this.set({size:a})}},type:{get:function(){return this.Yt}},strokeColor:{get:function(){return this.ul},
set:function(a){this.set({strokeColor:a})}},fillColor:{get:function(){return this.nt},set:function(a){this.set({fillColor:a})}},calculatedSize:{get:function(){return 0===this._size?this.Cj:this._size}}})})(window);
(function(a){var f=a.Annotations||{};f.HTMLAnnotation=function(e){f.Annotation.call(this);a.Actions.Mh.call(this,e);this.ul=new f.Color(0,0,0,1);this.et=new f.Color;this.ht=new f.pp;this.vt=!1;this.By=0;this.xe=this.bg=null;this.on("contentRemoved",function(){this.xe=this.bg=null;this.$x=!1});this.Xt=!0;_.isObject(e)&&(_.isUndefined(e.border)||this.ht.set(e.border),_.isUndefined(e.backgroundColor)||(this.et=new f.Color(e.backgroundColor)),_.isUndefined(e.color)||(this.ul=new f.Color(e.color)),_.isUndefined(e.rect)||
(this.rect=new f.Rect(e.rect)));var c=this.dr(),b=this;Object.keys(c).forEach(function(a){var e=c[a];$(b).on(e.internal_name,function(c){b.Me(a,e.getEvent(b,c))})})};f.HTMLAnnotation.prototype={$j:"",IA:function(a){return(this.Ca()-(this.Xt?2*this.border.width:0))*a},pv:function(a){return(this.xa()-(this.Xt?2*this.border.width:0))*a},eL:function(a){this.Xt=!!a},serialize:function(){this.Hidden=this.hidden;f.Annotation.prototype.serialize.apply(this,arguments)},deserialize:function(){f.Annotation.prototype.deserialize.apply(this,
arguments);this.Hidden&&(this.hidden=!0,this.Hidden=!1)},dr:function(){return{}},Zh:function(){},ke:function(e){var c=this.By,b=a.utils.getRotationOffsets(c,this.Ca(),this.xa()),d=b.dx*e,b=b.dy*e;return $.extend({left:this.X*e,top:this.Y*e,width:this.IA(e),height:this.pv(e),position:"absolute",padding:"0",margin:"0","background-color":this.et.toString(),"z-index":"35",display:this.vt?"none":"",transform:"translate("+d+"px,"+b+"px) rotate("+-c+"deg)","transform-origin":"top left","-webkit-transform":"translate("+
d+"px,"+b+"px) rotate("+-c+"deg)","-webkit-transform-origin":"top left","-ms-transform":"translate("+d+"px,"+b+"px) rotate("+-c+"deg)","-ms-transform-origin":"top left","-moz-transform":"translate("+d+"px,"+b+"px) rotate("+-c+"deg)","-moz-transform-origin":"top left","-webkit-appearance":"none"},this.Xt?this.ht.FC(e):{})},Cc:function(a){if(!a)throw Error("no zoom?");return{position:"absolute","font-size":"inherit","font-family":"inherit","font-weight":"inherit","font-style":"inherit",color:"inherit",
width:this.IA(a),height:this.pv(a),border:0,padding:0,margin:0,"background-color":"transparent","vertical-align":"top"}},sq:function(a,c){for(var b in c){var d=c[b];"number"===typeof d&&(d+="px");a.style[b]=d}},Pf:function(a){this.vt=!a;this.bg&&(this.bg[0].style.display=this.vt?"none":"")},createInnerElement:function(){console.warn("missing inner element");return null},AH:function(){return this.xe},rH:function(){return this.bg},render:function(a,c,b,d){if(!this.bg){var f=document.createElement("div");
f.className=this.$j;this.bg=$(f)}var f=d?$(this.bg[0].cloneNode()):this.bg,k=this.ke(b,c),h=JSON.stringify(k);h!==f.fB&&(f.css(k),f.fB=h);if(this.xe=this.xe||this.createInnerElement(c)){var l=d?$(this.xe[0].cloneNode(!0)):this.xe;l!==this.xe&&(this.refresh&&this.refresh(),l[0].value=this.xe[0].value,this.xe[0].checked&&(l[0].checked=!0));document.activeElement===l[0]&&l.trigger("focusout");b=this.Cc(b);h=JSON.stringify(b);h!==l.fB&&(this.sq(l[0],b),l.fB=h);this.$x||(this.Zh(c),this.$x=!0)}if(this.bg[0].parentNode!==
a[0])for(a[0].appendChild(f[0]),a=0;a<this.xe.length;++a)c=0===a?l[0]:d?this.xe[a].cloneNode(!0):this.xe[a],f[0].appendChild(c)},bx:function(){this.bg&&(this.bg.remove(),this.$x=!1)}};f.HTMLAnnotation.prototype=$.extend(Object.create(f.Annotation.prototype),f.HTMLAnnotation.prototype,a.Actions.Mh.prototype);Object.defineProperties(f.HTMLAnnotation.prototype,{rect:{get:function(){return this.Ec()},set:function(a){this.Ag(a)}},element:{get:function(){return this.rH()}},innerElement:{get:function(){return this.AH()}},
hidden:{get:function(){return this.vt},set:function(a){this.Pf(!a)}},StrokeColor:{get:function(){return this.ul},set:function(a){this.ul=new f.Color(a)}},border:{get:function(){return this.ht},set:function(a){this.ht.set(a)}},backgroundColor:{get:function(){return this.et},set:function(a){this.et=new f.Color(a)}},actions:{get:function(){return this.ck()}},rotation:{get:function(){return this.By},set:function(a){this.By=Number(a)}}})})(window);
(function(a){var f=a.Annotations||{};f.vd=function(a){f.HTMLAnnotation.call(this,a);this.Listable=!1};f.vd.prototype=Object.create(f.HTMLAnnotation.prototype);f.vd.prototype.elementName="link";f.vd.prototype.createInnerElement=function(){var a=document.createElement("span");a.className="link";a.setAttribute("tabindex",0);return $(a)};f.vd.prototype.Zh=function(){f.HTMLAnnotation.prototype.Zh.apply(this,arguments);var a=this;this.innerElement.on("tap",function(){a.trigger("mouseup")})};f.vd.prototype.FI=
function(){return!0};f.vd.prototype.dr=function(){var e=a.Annotations.O.ub.Events;return $.extend(f.HTMLAnnotation.prototype.dr.call(this),{U:{triggers:"tap",internal_name:"mouseup",getEvent:function(){return e.vd.create("Mouse Up")}}})};f.vd.prototype.ke=function(a,c){var b=f.HTMLAnnotation.prototype.ke.apply(this,arguments),d={};if(this.StrokeThickness&&this.StrokeColor){var g=this.StrokeStyle,k="border";"underline"===g&&(k="border-bottom");"solid"!==g&&"dashed"!==g&&"inset"!==g&&(g="solid");var h=
c.u.Dc(this.xb());d[k]=f.ja.rq(h,this.StrokeThickness)*a+"px "+g+" "+this.StrokeColor.toHexString()}return $.extend(b,d)};f.vd.prototype.deserialize=function(a,c,b){f.HTMLAnnotation.prototype.deserialize.call(this,a,c,b);var d=f.ca.Zj(a.getAttribute("color"));d&&(this.StrokeColor=d);d=a.getAttribute("width");"undefined"!==typeof d&&null!==d&&(this.StrokeThickness=parseFloat(d));d=a.getAttribute("style");"undefined"!==typeof d&&null!==d&&(this.StrokeStyle=d);this.hF(a,c,b)};f.vd.prototype.serialize=
function(a,c){f.HTMLAnnotation.prototype.serialize.call(this,a,c);this.StrokeColor&&a.setAttribute("color",this.StrokeColor.toHexString());"undefined"!==typeof this.StrokeThickness&&null!==this.StrokeThickness&&a.setAttribute("width",this.StrokeThickness);this.StrokeStyle&&a.setAttribute("style",this.StrokeStyle);this.PV(a,c);return a}})(window);
(function(a){var f=a.Annotations||{};f.Tk=function(){f.Annotation.call(this);this._isOpen=!1;this.Id=null;this.NoRotate=this.NoZoom=this.Printable=!0;this.DateModified=null};f.Tk.prototype={elementName:"popup",isOpen:function(){return this._isOpen},HK:function(a){this._isOpen=a},serialize:function(a){a=f.Annotation.prototype.serialize.apply(this,arguments);this.isOpen()&&a.setAttribute("open","yes");return a},deserialize:function(a){this.Printable=!1;f.Annotation.prototype.deserialize.apply(this,
arguments);var c=a.getAttribute("open");this.HK(c&&"yes"===c)}};f.Tk.prototype=$.extend(new f.Annotation,f.Tk.prototype)})(window);
(function(a){var f=a.Annotations||{},e=f.ja||{};f.WidgetAnnotation=function(a,b){f.HTMLAnnotation.call(this,b);if(!a)throw Error("Please set the field properly in the widget constructor");this._value=null;this.Ha=a;this.nn=null;a.MO(this,b?b.index:void 0);this.IsAdded=!1;this.IY=new Date;this.QE="Left-justified";this.Listable=!1;this.UD="";this.Zx={};this.XD={Normal:"",Rollover:"",Down:""};this.jt=!1;this.mc=new f.xj({mask:"Invisible Hidden NoPrint NoZoom NoRotate NoView ReadOnly Locked ToggleNoView LockedContents".split(" ")});
this["_xsi:type"]="Widget";this.Subject=this["_xsi:type"];this.set(b);var d=this;this.on("commit",_.bind(this.fz,this));this.on("change",function(b,a){d.zK();d.Of(a);d.trigger("commit")});this.on("blur",function(){d.fieldFlags.get("ReadOnly")||d.Lb(d.Ha.value);d.refresh()});this.on("focus",function(){d.fieldFlags.get("ReadOnly")||d.Of(d.Ha.value);d.refresh()})};f.WidgetAnnotation.prototype={elementName:"widget",Hm:null,ai:function(a){if(!f.Annotation.prototype.ai.call(this,a)||!this.Hm)return!1;a=
f.ca.getAttribute(a,"FT");return this.Hm===a},ti:function(){for(var a="",b=Object.keys(this.appearances),d=0;d<b.length;++d){var e=b[d];if("Off"!==e){a=e;break}}return a},qg:function(a){this.Of(a)},zK:function(){this.jt=!0},set:function(a){if(_.isObject(a)){_.isUndefined(a.value)||(this.value=String(a.value));_.isUndefined(a.flags)||(this.mc.set(a.flags),this.mc.get("Hidden")&&this.Pf(!1),this.mc.get("NoView")&&this.Pf(!1));if(!_.isUndefined(a.captions)){var b=a.captions,d=this.XD;Object.keys(b).forEach(function(a){d[a]=
b[a]})}_.isUndefined(a.page)||(this.PageNumber=a.page);_.isUndefined(a.quadding)||(this.quadding=a.quadding);_.isUndefined(a.appearances)||(this.Zx=a.appearances);_.isUndefined(a.appearance)||(this.appearance=a.appearance);_.isUndefined(a.rotation)||(this.rotation=a.rotation);_.isUndefined(a.font)||(this.font=a.font)}},ke:function(a){var b=f.HTMLAnnotation.prototype.ke.apply(this,arguments),b=$.extend(b,this.font.FC(a));this.fieldFlags.get("Required")?b.border=1.5*a+"px solid red":b["border-width"]||
(b["border-width"]=0);return $.extend(b,this.tR())},Cc:function(){var a=f.HTMLAnnotation.prototype.Cc.apply(this,arguments);return $.extend(a,{"text-align":{"Left-justified":"left",Centered:"center","Right-justified":"right"}[this.quadding]})},tR:function(){var a=f.WidgetAnnotation.getContainerCustomStyles;return a&&a(this)},Rl:function(){var a=f.WidgetAnnotation.getCustomStyles;return a&&a(this)},rF:function(){function a(b){b.scale&&1!==b.scale&&b.preventDefault();b.stopPropagation()}var b=this.xe[0];
b.addEventListener("touchstart",a,{Nr:!1});b.addEventListener("touchmove",a,{Nr:!1});b.addEventListener("touchend",a,{Nr:!1});b.addEventListener("mousedown",a,{Nr:!1});b.addEventListener("mousemove",a,{Nr:!1});b.addEventListener("mouseup",a,{Nr:!1})},kk:function(){return!0},Wa:function(){return this._value},Lb:function(c){c=a.Annotations.O.ub.Events.ha.create("Format",this.Ha,{value:c});this.Ha.Me("F",c);this.Of(c.value)},Pf:function(a){this.mc.set("Hidden",!a);f.HTMLAnnotation.prototype.Pf.call(this,
a)},render:function(a,b,d,g){if(!g){e.Qk=d;var k=!1;this.innerElement&&this.element||(k=!0)}f.HTMLAnnotation.prototype.render.apply(this,arguments);k&&!g&&(this.element.attr("id",this.Ha.name),this.refresh())},Of:function(a){this._value=a;this.refresh()},refresh:function(){var a=this.fieldFlags.get("Multiline"),b=this._value?String(this._value):"";this instanceof f.Lh||this.font.WQ(b,this,a);if(a=this.element)if(a[0].setAttribute("id",this.Ha.name),b=this.ke(e.Qk),this.sq(a[0],b),a=this.innerElement)b=
this.Ha.userName||this.Ha.tooltipName,this.Ha&&b&&a[0].setAttribute("title",b),b=this.Cc(e.Qk),this.sq(a[0],b)},xi:function(){return null},deserialize:function(a,b,d){f.HTMLAnnotation.prototype.deserialize.call(this,a,b);var e=f.ca;this.Ha.RK(e.getAttribute(a,"FT"));e.getAttribute(a,"creationdate")?this.DateCreated=e.qz(e.getAttribute(a,"creationdate")):this.DateCreated=null;this.border.deserialize(a);this.fieldFlags.deserialize(a);this.font.deserialize(a,b);var k=e.jo(a,"V","value");this.qg(k);this.Ha.qg(k);
this.defaultValue=e.jo(a,"DV","defaultvalue");k=e.jo(a,"defaultappearance","defaultappearance");k=e.FB(k);e.getAttribute(a,"color")?this.StrokeColor=e.getAttribute(a,"color").split(","):k.color&&(this.StrokeColor=k.color);e.getAttribute(a,"BG")&&(this.backgroundColor=e.getAttribute(a,"BG").split(","));this.rotation=e=(e=e.getAttribute(a,"rotation"))?parseInt(e,10):0;if(90===e||270===e)e=this.Width,this.Width=this.Height,this.Height=e;this.hF(a,b,d)},serialize:function(){},Hb:function(){return this.Ha},
CK:function(a){this.Ha=a;this.Of(this.Ha.value)},zg:function(a){f.HTMLAnnotation.prototype.zg.call(this,a);this.Ha&&this.Ha.zg(a)},BO:function(a,b){this.Ha.Nj(a,b)},Nj:function(a,b){-1!==["K","V","F","C"].indexOf(a)?this.BO(a,b):f.HTMLAnnotation.prototype.Nj.call(this,a,b)},fz:function(){this.Ha.trigger("commit",this.Wa(),this)},dr:function(){var c=a.Annotations.O.ub.Events,b=this;return $.extend(f.HTMLAnnotation.prototype.dr.call(this),{E:{triggers:"mouseenter",internal_name:"mouseenter",getEvent:function(){return c.ha.create("Mouse Enter",
b.Hb())}},X:{triggers:"mouseleave",internal_name:"mouseleave",getEvent:function(){return c.ha.create("Mouse Leave",b.Hb())}},D:{triggers:"mousedown",internal_name:"mousedown",getEvent:function(){return c.ha.create("Mouse Down",b.Hb())}},U:{triggers:a.utils.mouseUpEventBug?"touchend":"mouseup",internal_name:"mouseup",getEvent:function(){return c.ha.create("Mouse Up",b.Hb())}},Bl:{triggers:"focusout",internal_name:"blur",getEvent:function(){var a=b.Hb();return c.ha.create("Blur",a,{value:a.value})}},
Fo:{triggers:"focusin",internal_name:"focus",getEvent:function(){return c.ha.create("Focus",b.Hb())}}})},YS:function(){return!!this.nn},Zh:function(){f.HTMLAnnotation.prototype.Zh.apply(this,arguments);var c=this,b=this.innerElement;b&&(b.on("focusout",function(){c.jt&&(c.jt=!1,c.trigger("commit"));c.trigger("blur")}),b.on("focusin",function(){c.trigger("focus")}),b.on("mouseenter",function(){c.trigger("mouseenter")}),b.on("mouseleave",function(){c.trigger("mouseleave")}),b.on("mousedown",function(){c.trigger("mousedown")}),
b.on(c.DL?"click":a.utils.mouseUpEventBug?"touchend":"mouseup",function(){c.trigger("mouseup")}))}};f.WidgetAnnotation.prototype=$.extend(Object.create(f.HTMLAnnotation.prototype),f.WidgetAnnotation.prototype);Object.defineProperties(f.WidgetAnnotation.prototype,{fieldName:{get:function(){return this.Ha.name}},value:{get:function(){return this.Wa()},set:function(a){this.Lb(a)}},defaultValue:{get:function(){return this.Ha.defaultValue},set:function(a){this.Ha.defaultValue=a}},fieldFlags:{get:function(){return this.Ha.flags}},
flags:{get:function(){return this.mc}},font:{get:function(){return this.nn||this.Ha.font},set:function(c){this.nn=new a.Annotations.Pg(c)}},fieldActions:{get:function(){return this.Ha.actions}},appearance:{get:function(){return this.UD},set:function(a){this.Zx[a]?this.UD=a:console.log("Unknown appearance: "+a)}},quadding:{get:function(){return this.QE},set:function(a){this.QE=a}},appearances:{get:function(){return this.Zx}},captions:{get:function(){return this.XD}}})})(window);
(function(a){var f=a.Annotations||{},e=f.ja||{};f.sc=function(a,b){f.WidgetAnnotation.call(this,a,b)};f.sc.prototype={Hm:"Btn",ku:null,ai:function(a){if(f.WidgetAnnotation.prototype.ai.call(this,a)){var b=new f.xj({mask:["PushButton","Radio"]}),d="C";b.deserialize(a);b.get("PushButton")?d="P":b.get("Radio")&&(d="R");return d===this.ku}return!1},nK:function(c){if(a.utils.isSafari&&!a.utils.isIOS||a.utils.isFirefox)16>c.height||16>c.width?(c.transform="scale("+Math.min(c.height,c.width)/16+")",c.transformOrigin=
"top left"):(c.transform="",c.transformOrigin="")},Bk:function(a){var b=!!this.fieldFlags.get("ReadOnly");a.disabled=b}};f.sc.prototype=$.extend(Object.create(f.WidgetAnnotation.prototype),f.sc.prototype);f.rj=function(a,b){f.sc.call(this,a,b)};f.rj.prototype={ku:"P",$j:"pButton",Cc:function(){return $.extend(f.sc.prototype.Cc.apply(this,arguments),{"background-color":"transparent"},this.Rl())},deserialize:function(a,b,d){var e=f.ca;f.sc.prototype.deserialize.call(this,a,b,d);(a=e.getAttribute(a,
"ButtonLabel"))&&(this.captions.Normal=a)},xi:function(){return null},createInnerElement:function(){var a=document.createElement("button");a.setAttribute("tabindex",0);$(a).append(this.captions.Normal);this.Bk(a);return $(a)}};f.rj.prototype=$.extend(!0,Object.create(f.sc.prototype),f.rj.prototype);f.Lh=function(a,b){f.sc.call(this,a,b);this.eL(!1);var d=this;this.DL=!0;this.on("click",function(){"Off"===this.Wa()?d.trigger("change",d.ti()):d.trigger("change","Off")})};f.Lh.prototype={ku:"C",$j:"checkBox",
refresh:function(){f.WidgetAnnotation.prototype.refresh.call(this);var a=this.innerElement;a&&(a.prop("checked",this.Wa()===this.ti()),a.css(this.Cc(e.Qk)),this.Bk(a[0]))},Of:function(a){a===this.ti()?(this.appearance=a,f.sc.prototype.Of.call(this,a)):(this.appearance="Off",f.sc.prototype.Of.call(this,"Off"))},Cc:function(){var a=f.sc.prototype.Cc.apply(this,arguments);a.left=Math.round(a.left);a.top=Math.round(a.top);this.nK(a);return $.extend(a,{border:"none",margin:0},this.Rl())},xi:function(){var a=
this.innerElement;if(a)return a.prop("checked")?this.ti():"Off"},createInnerElement:function(){var a=document.createElement("input");a.type="checkbox";a.setAttribute("tabindex",0);this.Bk(a);var b=this,a=$(a);a.on("click",function(){b.trigger("click")});return a},deserialize:function(a,b,d){var e=f.ca.getAttribute(a,"N");e&&(this.appearances.Off={},this.appearances[e]={});f.sc.prototype.deserialize.call(this,a,b,d)}};f.Lh.prototype=$.extend(!0,Object.create(f.sc.prototype),f.Lh.prototype);Object.defineProperties(f.Lh.prototype,
{buttonName:{set:function(a){this.HN=a},get:function(){return this.HN}}});f.Uk=function(a,b){f.sc.call(this,a,b);this.eL(!1);var d=this;this.DL=!0;this.on("click",function(){"Off"===this.Wa()?d.trigger("change",d.ti()):d.trigger("change","Off")})};f.Uk.prototype={ku:"R",$j:"radioButton",xi:function(){return this.ti()},refresh:function(){f.WidgetAnnotation.prototype.refresh.call(this);var a=this.innerElement;a&&(a.prop("checked",this.Ha.Wa()===this.xi()),a.css(this.Cc(e.Qk)),this.Bk(a[0]))},Cc:function(){var a=
f.sc.prototype.Cc.apply(this,arguments);a.left=Math.round(a.left);a.top=Math.round(a.top);this.nK(a);return $.extend(a,{border:"none",margin:0},this.Rl())},Of:function(a){"Off"!==a&&-1!==Object.keys(this.appearances).indexOf(a)?(this.appearance=a,f.sc.prototype.Of.call(this,a)):(this.appearance="Off",f.sc.prototype.Of.call(this,"Off"))},createInnerElement:function(){var a=document.createElement("input");a.type="radio";a.setAttribute("tabindex",0);this.Bk(a);var b=this;$(a).on("click",function(){b.trigger("click")});
return $(a)},deserialize:function(a,b,d){var e=f.ca.getAttribute(a,"N");e&&(this.appearances.Off={},this.appearances[e]={});f.sc.prototype.deserialize.call(this,a,b,d)}};f.Uk.prototype=$.extend(!0,Object.create(f.sc.prototype),f.Uk.prototype)})(window);
(function(a){var f=a.Annotations||{},e=f.ja||{},c,b;f.sa=function(){f.Annotation.call(this);this.Yf=new f.Color(0,0,0,0);this._opacity=this.Aj=1;this.dE=new Date;this.OD=this.GD=this.Rt=null};f.sa.prototype={kc:function(b,a){null!==this.Opacity&&(b.globalAlpha=this.Opacity);this.Style&&"dash"===this.Style&&this.Dashes&&b.setLineDash(this.Dashes.toString().split(/,\s*/));null!==this.FillColor&&(b.fillStyle=this.FillColor.toString());null!==this.StrokeColor&&(b.strokeStyle=this.StrokeColor.toString());
b.lineWidth=0===this.StrokeThickness?.001:this.io(a)},oX:function(){var a=this.X+this.Ca()+2*this.StrokeThickness+100,e=this.Y+this.xa()+2*this.StrokeThickness+100;c=c||document.createElement("canvas").getContext("2d");c.canvas.width=a;c.canvas.height=e;b=b||document.createElement("canvas").getContext("2d");b.canvas.width=a;b.canvas.height=e},EQ:function(a,e){this.oX();this.kc(c,e);c.globalAlpha=1;this.li(c);c.stroke();this.kc(b,e);b.globalAlpha=1;this.li(b);b.fill();c.globalCompositeOperation="source-out";
c.drawImage(b.canvas,0,0);this.kc(a,e);a.globalCompositeOperation="source-over";a.drawImage(c.canvas,0,0);this.li(a);a.stroke()},Dz:function(b,a){b.beginPath();1!==this.Opacity&&null!==this.Opacity?this.EQ(b,a):(this.kc(b,a),this.li(b),b.fill(),b.stroke())},li:function(){},MH:function(){return this.Rt},KK:function(b){this.Rt=b},io:function(b){return f.ja.rq(b,this.StrokeThickness)},serialize:function(b,a){var c=f.Annotation.prototype.serialize.apply(this,arguments),e=f.ca,l={},n=e.yg(this.FillColor);
null!==n&&(l["interior-color"]=n);_.isUndefined(this.StrokeThickness)||_.isNull(this.StrokeThickness)||(n=this.StrokeThickness,1!==n&&(l.width=n));_.isUndefined(this.Opacity)||_.isNull(this.Opacity)||1===this.Opacity||(l.opacity=this.Opacity);(n=this.fringe)&&!n.NI()&&(l.fringe=f.ca.cC(this.fringe,a));if(n=this.DateCreated){var m;this.zB&&(n.getTime()===this.pJ?m=this.zB:(delete this.zB,delete this.pJ));m||(m=e.GC(n));l.creationdate=m}_.isUndefined(this.Style)||_.isNull(this.Style)||"solid"===this.Opacity||
(l.style=this.Style);_.isUndefined(this.Dashes)||_.isNull(this.Dashes)||"3"===this.Dashes||(l.dashes=this.Dashes);this.zb(c,"IT");null!==this.InReplyTo&&(l.inreplyto=this.InReplyTo);null!==this.ReplyType&&(l.replyType=this.ReplyType);for(var q in l)c.setAttribute(q,l[q]);!this.Rt||this instanceof f.Ga||(e=document.createElementNS("","popup"),e=this.Rt.serialize(e,a),c.appendChild(e));return c},deserialize:function(b,a,c){f.Annotation.prototype.deserialize.apply(this,arguments);var e=f.ca,l=b.getAttribute("opacity");
this.Opacity="undefined"!==typeof l&&null!==l?parseFloat(l):1;l=b.getAttribute("width");if(null!==this.StrokeThickness||"undefined"!==typeof l&&null!==l)this.Aj=parseFloat(l||"1");(l=b.getAttribute("style"))&&(this.Style=l);(l=b.getAttribute("dashes"))&&(this.Dashes=l);this.dj(b,"IT");this.BB=l=b.getAttribute("fringe");"undefined"!==typeof l&&null!==l&&(this.fringe=e.oG(l,a));l=e.Zj(b.getAttribute("interior-color"));null!==l?this.FillColor=l:null!==this.FillColor&&(this.FillColor=new f.Color(0,0,
0,0));(l=b.getAttribute("creationdate"))?(this.zB=l,e=e.qz(l),this.pJ=e.getTime(),this.DateCreated=e):this.DateCreated=null;e=b.getElementsByTagName("popup");0<e.length&&(l=new f.Tk,l.deserialize(e[0],a,c),this.KK(l));(e=b.getAttribute("inreplyto"))&&(this.InReplyTo=e);(e=b.getAttribute("replyType"))&&(this.ReplyType=e)},selectionModel:f.pa,jI:!0};f.sa.prototype=$.extend(!0,new f.Annotation,f.sa.prototype);Object.defineProperties(f.sa.prototype,{FillColor:{get:function(){return this.Yf},set:function(b){b instanceof
f.Color&&(this.Yf=b,this.kb())}},StrokeColor:{get:function(){return this.zj},set:function(b){b instanceof f.Color&&(this.zj=b,this.kb())}},StrokeThickness:{get:function(){return this.Aj},set:function(b){this.Aj=parseFloat(b);this.kb();this.adjustRect()}},Opacity:{get:function(){return this._opacity},set:function(b){this._opacity=parseFloat(b);this.kb()}},Precision:{get:function(){return f.ja.NH(this)},set:function(b){f.ja.LK(this,b)}},Scale:{get:function(){return f.ja.UH(this)},set:function(b){f.ja.PK(this,
b[0],b[1])}},DateCreated:{get:function(){return this.dE},set:function(b){this.dE=e.pH(b)}},InReplyTo:{get:function(){return this.GD},set:function(b){this.GD=b;this.kb()}},ReplyType:{get:function(){return this.OD},set:function(b){this.OD=b;this.kb()}}})})(window);
(function(a){var f=a.Annotations||{};f.Lg=function(e,c){var b=this;b.on("change",function(c,e){var f=a.Annotations.O.ub.Events.ha.create("Keystroke",b.Ha,{value:e,change:"",willCommit:!1,selStart:-1,selEnd:-1});b.Ha.Me("K",f)});f.WidgetAnnotation.call(this,e,c)};f.Lg.FORCE_SELECT=!1;f.Lg.prototype={Hm:"Ch",$j:"choice",Zh:function(){f.WidgetAnnotation.prototype.Zh.apply(this,arguments);this.rF()},ai:function(a){if(f.WidgetAnnotation.prototype.ai.call(this,a)){var c=new f.xj({mask:["Combo"]});c.deserialize(a);
if(c.get("Combo"))return!0}return!1},deserialize:function(a,c,b){f.WidgetAnnotation.prototype.deserialize.call(this,a,c,b);c=f.ca;c.getAttribute(a,"Opt")&&(a=c.getAttribute(a,"Opt"),this.Ha.options=a.split(",").map(function(b){return{value:b,displayValue:b}}),this.Hb().qg(this.Wa()),this.qg(this.Hb().Wa()))},ke:function(){return $.extend(f.WidgetAnnotation.prototype.ke.apply(this,arguments),{"overflow-y":"visible","overflow-x":"hide","z-index":"36"})},Cc:function(a){return $.extend(f.WidgetAnnotation.prototype.Cc.apply(this,
arguments),{resize:"none","min-height":"",height:this.pv(a)},this.Rl())},refresh:function(){f.WidgetAnnotation.prototype.refresh.apply(this,arguments);var a=this.innerElement,c=this.Wa();a&&(a.val(c),this.Bk(a[0]))},xi:function(){var a=this.innerElement;if(a)return a.val()},Bk:function(a){var c=!!this.fieldFlags.get("ReadOnly");a.disabled=c},createInnerElement:function(){function e(){c(50,k.length);h.off("mousedown",null,e);h.off("touchend",null,e)}function c(b,a){for(var c=document.createDocumentFragment(),
e=b;e<a;++e){var f=k[e],g=document.createElement("OPTION");g.text=_.isUndefined(f.displayValue)?f.value:f.displayValue;g.value=f.value;c.appendChild(g)}d.appendChild(c)}var b,d,g=this;!g.fieldFlags.get("Edit")||a.utils.isSafari||9===a.utils.ie||f.Lg.FORCE_SELECT?d=b=document.createElement("select"):(b=document.createElement("input"),b.setAttribute("list",g.fieldName+"_list"),$(b).on("focus",function(){this.value=""}),d=document.createElement("datalist"),d.id=g.fieldName+"_list");g.Bk(b);var k=g.options,
h=d===b?$(b):$([b,d]);50<k.length?(c(0,50),h.on("mousedown",e),h.on("touchend",e)):c(0,k.length);h.on("change",function(){g.trigger("change",[g.xi()])});return h}};f.Lg.prototype=$.extend(Object.create(f.WidgetAnnotation.prototype),f.Lg.prototype);Object.defineProperties(f.Lg.prototype,{options:{get:function(){return this.Ha.options}}})})(window);
(function(a){var f=a.Annotations||{};f.nj=function(a,c){f.WidgetAnnotation.call(this,a,c)};f.nj.prototype={Hm:"Ch",$j:"list",refresh:function(){f.WidgetAnnotation.prototype.refresh.apply(this,arguments);var a=this.innerElement;a&&(a[0].value=this.Wa())},ai:function(a){if(f.WidgetAnnotation.prototype.ai.call(this,a)){var c=new f.xj({mask:"Combo"});c.deserialize(a);if(!c.get("Combo"))return!0}return!1},deserialize:function(a,c,b){f.WidgetAnnotation.prototype.deserialize.call(this,a,c,b);c=f.ca;c.getAttribute(a,
"Opt")&&(a=c.getAttribute(a,"Opt"),this.Ha.options=a.split(",").map(function(b){return{value:b,displayValue:b}}),this.Hb().qg(this.Wa()),this.qg(this.Hb().Wa()))},ke:function(){return $.extend(f.WidgetAnnotation.prototype.ke.apply(this,arguments),{"overflow-y":"auto","overflow-x":"hidden"})},xi:function(){var a=this.innerElement;return a?a.val():null},Cc:function(){return $.extend(f.WidgetAnnotation.prototype.Cc.apply(this,arguments),{"overflow-y":"scroll","overflow-x":"hidden"},this.Rl())},createInnerElement:function(){var a=
document.createElement("select");a.name=this.fieldName.replace(/\.|\s/g,"_");a.setAttribute("size",this.options.length);this.options.forEach(function(b){var c=_.isUndefined(b.displayValue)?b.value:b.displayValue,f=document.createElement("option");f.value=b.value;f.innerHTML=c;a.appendChild(f)});this.fieldFlags.get("ReadOnly")&&(a.disabled=!0);this.fieldFlags.get("MultiSelect")&&(a.multiple=!0);var c=this;$(a).on("change",function(){c.trigger("change",[c.xi()])});return $(a)}};f.nj.prototype=$.extend(Object.create(f.WidgetAnnotation.prototype),
f.nj.prototype);Object.defineProperties(f.nj.prototype,{options:{get:function(){return this.Ha.options}}})})(window);
(function(a){var f=a.Annotations||{};f.Xf=function(a,c){f.WidgetAnnotation.call(this,a,c);this.Ct=void 0;this.sn=this.freeHandAnnot=null};f.Xf.prototype={Hm:"Sig",$j:"signature",deserialize:function(a,c,b){f.WidgetAnnotation.prototype.deserialize.call(this,a,c,b);a=a.getElementsByTagName("imagedata");0<a.length&&(this.appearances._DEFAULT={Normal:a[0].textContent},this.appearance="_DEFAULT")},CL:function(){this.sn&&(this.fieldFlags.get("ReadOnly")?(this.sn.style.background="darkgrey",this.sn.style.color=
"lightgrey"):(this.sn.style.background="darkblue",this.sn.style.color="white"))},refresh:function(){f.WidgetAnnotation.prototype.refresh.call(this);this.CL()},Cc:function(){var a=f.WidgetAnnotation.prototype.Cc.apply(this,arguments);return $.extend(a,{width:a.width,height:a.height},this.Rl())},createInnerElement:function(a){var c=this,b=document.createElement("div");this.cB().then(function(d){if(d)d=new Image,d.src=c.yH(),d.style.maxWidth="100%",d.style.maxHeight="100%",b.appendChild(d);else{d=a.u.mv("AnnotationCreateSignature");
var g=c.createSignHereElement(d);d=c.RP(g,d,a);c.sn=g;c.CL();b.appendChild(d);a.Bc().forEach(function(b){b instanceof f.FreeHandAnnotation&&c.Ev(b,{Hy:!0})&&(c.freeHandAnnot=b,g.style.display="none")});a.on("annotationChanged",function(b,a,d){b.imported&&"add"===d?a.forEach(function(b){b instanceof f.FreeHandAnnotation&&c.Ev(b,{Hy:!0})&&(c.freeHandAnnot=b,g.style.display="none")}):"delete"===d&&1===a.length&&a[0]===c.freeHandAnnot&&(c.freeHandAnnot=null,g.style.display="block")})}});return $(b)},
yH:function(){var a="",c=this.appearances[this.appearance];c&&(c=c.Normal)&&c.data&&(a=c.data);return a},cB:function(){var a=this;return new Promise(function(c){if(void 0!==a.Ct)c(a.Ct);else{var b=new Image;b.src=a.yH();b.onload=function(){a.Ct=!a.HT(this);c(a.Ct)}}})},ST:function(){return this.cB()},HT:function(a){var c=document.createElement("canvas"),b=c.getContext("2d");c.width=a.width;c.height=a.height;b.drawImage(a,0,0);a=!0;for(var d=b.getImageData(0,0,c.width,c.height).data,c=0;c<d.length;c+=
4)if(b=d[c+3],0!==b){a=!1;break}return a},WS:function(a,c,b){this.freeHandAnnot&&b.Od(this.freeHandAnnot);a.style.display="none";this.freeHandAnnot=c;a=Math.min(this.Height/c.Height,this.Width/c.Width);a=new f.Rect(this.X,this.Y,this.X+c.Width*a,this.Y+c.Height*a);c.resize(a);b.Kb(c)},SP:function(a){var c=document.createElement("div");c.style.position="absolute";c.innerHTML=a.rn();c.style.left="0px";c.style.top="0px";c.style.padding="3px";c.style.background="darkblue";c.style.color="white";return c},
RP:function(a,c,b){var d=this,f=document.createElement("div");f.style.height="100%";f.style.width="100%";f.addEventListener("click",function(f){d.freeHandAnnot||d.fieldFlags.get("ReadOnly")||(c.initAnnot(),c.mouseLeftDown(f),c.mouseLeftUp(f),c.off("annotationAdded.sigWidget").one("annotationAdded.sigWidget",function(c,f){d.Ev(f)&&d.WS(a,f,b)}))});f.appendChild(a);return f},Ev:function(a,c){c=c||{};var b;if(c.Hy)b=a.getRectPadding(),b=Math.abs(a.X-this.X)<=b&&Math.abs(a.Y-this.Y)<=b;else{b=this.Ec();
var d=a.Ec();b=!(b.x1>d.x2||d.x1>b.x2||b.y1>d.y2||d.y1>b.y2)}return b}};f.Xf.prototype=$.extend(Object.create(f.WidgetAnnotation.prototype),f.Xf.prototype)})(window);
(function(a){var f=a.Annotations||{},e=f.ja||{};f.bl=function(a,b){f.WidgetAnnotation.call(this,a,b);this.fieldFlags.Kq(["Multiline","DoNotScroll","Password"]);this.jt=!1;this.tf=this.Ha.maxLen};f.bl.prototype={Hm:"Tx",$j:"text",Zh:function(){f.WidgetAnnotation.prototype.Zh.apply(this,arguments);this.rF()},refresh:function(a){f.WidgetAnnotation.prototype.refresh.call(this);var b=this.innerElement;if(b){var d,e;a&&(d=b[0].selectionStart,e=b[0].selectionEnd);b[0].value=this.value||"";a&&b[0].setSelectionRange(d,
e);a=!!this.fieldFlags.get("ReadOnly");b[0].readOnly=a}},ke:function(){return f.WidgetAnnotation.prototype.ke.apply(this,arguments)},Cc:function(){var a=f.WidgetAnnotation.prototype.Cc.apply(this,arguments),b={"word-wrap":"break-word",resize:"none","background-color":"transparent","overflow-y":this.fieldFlags.get("Multiline")?"auto":"hidden","overflow-x":"hidden"};if(this.fieldFlags.get("Comb")){var d=f.WidgetAnnotation.prototype.ke.apply(this,arguments),d=e.IS("1",d["font-size"]+" "+d["font-family"]),
g=a.width/this.tf;b["margin-left"]=.2*g+"px";b["letter-spacing"]=g-d+"px"}return $.extend(a,b,this.Rl())},sq:function(a,b){f.WidgetAnnotation.prototype.sq.apply(this,arguments);if(this.YA()&&b["font-size"]&&a.value){var d=a.style.overflowY;a.style.overflowY="hidden";a.offsetHeight;a.style.overflowY=d}},YA:function(){return 0===this.font.size},LT:function(){return this.YA()&&this.font.Cj===this.font.JE},xi:function(){var a=this.innerElement;if(a)return a.val()},KR:function(a,b){if(a!==b){for(var d=
0;a.charAt(d)===b.charAt(d);)d++;for(var e=0;a.charAt(a.length-1-e)===b.charAt(b.length-1-e)&&e+d<a.length&&e+d<b.length;)e++;var f,h=0;a.length!==d+e&&(h=a.length-e-d,f="");b.length!==d+e&&(f=b.slice(d,b.length-e));return{result:f,start:d,end:d+h}}},createInnerElement:function(){function c(){setTimeout(function(){f.refresh(!0)},0)}function b(b){return f.YA()&&(!f.LT()||b)}function d(b,a){b.preventDefault();a.value=f.Wa();a.style.overflowY="hidden";a.offsetHeight;a.style.overflowY="auto"}var f=this,
k=this.fieldFlags,h=k.get("Multiline"),l=k.get("ReadOnly"),n=k.get("DoNotScroll"),m;h?m=document.createElement("textarea"):(m=document.createElement("input"),m.type="text");0<this.tf&&m.setAttribute("maxlength",this.tf);l&&(m.readOnly=!0);e.HQ(m,function(k){var l=0,u=0,r=k.change,v=f.Wa()||"";if(!k.DI){u=f.KR(v,r);if(!u)return;k.change=u.result;l=u.start;u=u.end}r=a.Annotations.O.ub.Events;l=r.ha.create("Keystroke",f.Hb(),{value:k.DI?"":v,change:k.change,selStart:l,selEnd:u,willCommit:!1});f.Ha.Me("K",
l);l.rc?(l=r.ri(l),v=null!==f._value&&l.length<f._value.length,u=!0,n?h?b(v)?c():m.scrollHeight-1>=Math.ceil($(m).innerHeight())&&(u=!1):v?(u=!0,b(v)&&c()):b(v)?c():u=e.measureText(l||" ",m.parentNode.style.fontSize,m.parentNode.style.fontFamily,m.parentNode.style.fontWeight).width<$(m).width():b(v)&&c(),0<f.tf&&(u=u&&l.length<=f.tf),u?(f._value=l,document.activeElement===m?f.zK():f.trigger("commit")):d(k,m)):d(k,m)},!h);return $(m)}};f.bl.prototype=$.extend(Object.create(f.WidgetAnnotation.prototype),
f.bl.prototype)})(window);
(function(a){var f=a.Annotations||{};f.xj=function(a){this.Yh={};this.xn=null;this.fq=0;_.isObject(a)&&(_.isArray(a.mask)&&this.Kq(a.mask),a.onUpdate&&(this.NE=a.onUpdate))};f.xj.prototype={lj:{ReadOnly:1,Required:2,NoExport:4,Multiline:4096,Password:8192,NoToggleToOff:16384,Radio:32768,PushButton:65536,Combo:131072,Edit:262144,DoNotScroll:8388608,RadiosInUnison:33554432},clear:function(){this.Yh={}},Kq:function(a){_.isNull(this.xn)&&(this.xn={});for(var c=a.length,b=0;b<c;++b){var d=a[b];this.xn[d]=
this.lj[d]||0}},$P:function(a){var c=[],b=this.xn||this.lj;Object.keys(b).forEach(function(d){0!==(a&b[d])&&(a&=~b[d],c.push(d))});return{result:c,TX:a}},get:function(a){return!!this.Yh[a]},MX:function(){var a=0,c;for(c in this.Yh)this.Yh.hasOwnProperty(c)&&!0===this.Yh[c]&&(a|=this.lj[c]);return a|this.fq},toArray:function(){var a=this;return Object.keys(this.Yh).filter(function(c){return a.Yh[c]})},deserialize:function(a){a=f.ca.getAttribute(a,"Ff");this.set(parseInt(a,10))},serialize:function(a){a.setAttribute("Ff",
String(this.MX()))},set:function(a,c){if(_.isArray(a))for(var b=a.length,d=0;d<b;++d)this.set(a[d]);else _.isNumber(a)?(b=this.$P(a),this.fq|=b.TX,this.set(b.result)):_.isString(a)&&(b=!0,_.isUndefined(c)||(b=!!c),this.xn?_.isUndefined(this.xn[a])?this.fq|=this.lj[a]||0:this.Yh[a]=b:this.Yh[a]=b,this.NE&&this.NE())}}})(window);
(function(a){var f=a.Annotations||{};f.sp=function(){f.sa.call(this);this["_xsi:type"]="Caret";this.Subject=f.ja.Ac("caret");this.StrokeThickness=0;this.Yf=null};f.sp.prototype={elementName:"caret",draw:function(e,c){this.kc(e,c);var b=this.Width,d=this.Height,g=Number(this.Rotation);if(90===g||270===g)g=b,b=d,d=g;e.translate(this.X,this.Y);e.rotate(-this.Rotation*Math.PI/180);g=a.utils.getRotationOffsets((360-this.Rotation)%360,this.Width,this.Height);e.translate(-g.dx,-g.dy);e.translate(-this.X,
-this.Y);e.beginPath();e.fillStyle=this.StrokeColor.toString();b=new f.Rect(this.X,this.Y,this.X+b,this.Y+d);g=(b.x1+b.x2)/2;d=b.y1+3*d/4;e.moveTo(g,b.y1);e.quadraticCurveTo(g,d,b.x1,b.y2);e.lineTo(b.x2,b.y2);e.quadraticCurveTo(g,d,g,b.y1);e.closePath();e.fill();e.stroke()},selectionModel:f.pa,deserialize:function(a){f.sa.prototype.deserialize.apply(this,arguments);var c=Number(this.Rotation);if(90===c||270===c)c=this.Width,this.Width=this.Height,this.Height=c;this.StrokeThickness=0;this.dj(a,"symbol")},
serialize:function(a){var c=Number(this.Rotation),b;if(90===c||270===c)b=this.Width,this.Width=this.Height,this.Height=b;f.sa.prototype.serialize.apply(this,arguments);if(90===c||270===c)b=this.Width,this.Width=this.Height,this.Height=b;this.zb(a,"symbol");a.removeAttribute("width");return a}};f.sp.prototype=$.extend(new f.sa,f.sp.prototype)})(window);
(function(a){var f=a.Sg,e=a.Annotations||{};e.Ok=function(){e.sa.call(this);this["_xsi:type"]="Ellipse";this.Subject=e.ja.Ac("ellipse");var a=this.getRectPadding();this.fringe=new e.Rect(a,a,a,a)};e.Ok.prototype={elementName:"circle",draw:function(a,b){this.Dz(a,b)},li:function(a){var b=this.X+this.fringe.x1,d=this.Y+this.fringe.y1,e=this.Ca()-this.fringe.x1-this.fringe.x2,f=this.xa()-this.fringe.y1-this.fringe.y2,e=Math.max(e,1),f=Math.max(f,1),h=Math.min(e,f);a.lineWidth>=h&&(a.lineWidth=Math.max(h-
1,1));a.lineWidth*=2;h=e/f;isNaN(h)||Infinity===h||(a.save(),a.translate(b+(1-h)*e/2,d),a.scale(h,1),a.beginPath(),a.arc(.5*e,.5*f,Math.max(.5*f,0),0,2*Math.PI,!1),a.closePath(),a.restore(),a.clip())},getRectPadding:function(){return 0},selectionModel:e.pa};e.Ok.prototype=$.extend(new e.sa,e.Ok.prototype);f.ls.call(e.Ok.prototype,new f.Mk)})(window);
(function(a){var f=a.Sg,e=a.Annotations||{};e.FreeHandAnnotation=function(){e.sa.call(this);this.Ia=[];this.LeftMost=Infinity;this.RightMost=0;this.TopMost=Infinity;this.BottomMost=0;this.Ya={x:0,y:0};this.Eb={x:0,y:0};this.zt=!1;this["_xsi:type"]="Free Hand";this.Subject=e.ja.Ac("freehand");this.cg=this.Yf=null};e.FreeHandAnnotation.opacityCap=.7;e.FreeHandAnnotation.Ic={InkHighlight:"InkHighlight"};e.FreeHandAnnotation.prototype={elementName:"ink",shouldSimplifyPath:!1,vb:function(a,b,d){"undefined"===
typeof d&&(d=0);if(d===this.Ia.length)this.Ia.push([]);else if(d>this.Ia.length){console.warn("FreeHandAnnotation addPathPoint: pathIndex out of bounds.");return}this.LeftMost=Math.min(this.LeftMost,a);this.RightMost=Math.max(this.RightMost,a);this.TopMost=Math.min(this.TopMost,b);this.BottomMost=Math.max(this.BottomMost,b);var f=this.getRectPadding();this.Zs=this.LeftMost-f;this.$s=this.TopMost-f;this.Pp=this.RightMost-this.LeftMost+2*f;this.Op=this.BottomMost-this.TopMost+2*f;this.Ia[d].push(new e.Point(a,
b))},Nf:function(a,b,d,e){"undefined"===typeof e&&(e=0);var f;this.Ia.length>e?(f=this.Ia[e],f.length>a?(f[a].x=b,f[a].y=d,this.adjustRect()):f.length===a&&this.vb(b,d,e)):this.Ia.length===e?this.vb(b,d,e):console.warn("FreeHandAnnotation setPathPoint: pathIndex out of bounds.")},wi:function(a,b){"undefined"===typeof b&&(b=0);return this.Ia&&this.Ia.length>b&&this.Ia[b].length>a?this.Ia[b][a]:null},xk:function(a){"undefined"===typeof a&&(a=0);var b=null;this.Ia.length>a&&(b=this.Ia[a].pop(),this.adjustRect());
return b},getPath:function(a){"undefined"===typeof a&&(a=0);return this.Ia.length>a?this.Ia[a]:null},setPath:function(a,b){"undefined"===typeof b&&(b=0);this.Ia.length<b?console.warn("FreeHandAnnotation setPath: pathIndex out of bounds."):this.Ia.length>b?this.Ia[b]=a:this.Ia.length===b&&this.Ia.push(a);this.adjustRect()},IG:function(){this.Ia=[]},finish:function(){this.zt||(this.kb(),this.zt=!0)},resize:function(a){var b=a.x1,d=a.y1,e=a.Ca(),f=a.xa();a=d-this.Y;if(!(0===b-this.X&&0===a&&e===this.Width&&
f===this.Height||1>e||1>f)){var h=a=1;"undefined"!==typeof e&&"undefined"!==typeof f&&(a=f/this.Height,h=e/this.Width,this.Width=e,this.Height=f);for(e=0;e<this.Ia.length;e++)for(f=0;f<this.Ia[e].length;f++)this.Ia[e][f].x=(this.Ia[e][f].x-this.X)*h+b,this.Ia[e][f].y=(this.Ia[e][f].y-this.Y)*a+d;this.X=b;this.Y=d}},draw:function(a,b){this.kc(a,b);this.cg===e.FreeHandAnnotation.Ic.InkHighlight&&a.globalAlpha>e.FreeHandAnnotation.opacityCap&&(a.globalAlpha=e.FreeHandAnnotation.opacityCap);a.beginPath();
for(var d=this.Ee(),f=0;f<d.length;f++)this.li(a,d[f]);a.lineCap="round";a.lineJoin="round";a.stroke()},Ee:function(){return this.Ia},sX:function(a,b){if(this.shouldSimplifyPath)for(var d=0;d<this.Ia.length;d++){var e=window.simplify(this.getPath(d),a,b);this.setPath(e,d)}},li:function(a,b){var d="undefined"===typeof b?0:b.length;if(3<=d){a.moveTo(b[0].x,b[0].y);for(d=1;d<b.length-2;d++)a.quadraticCurveTo(b[d].x,b[d].y,(b[d].x+b[d+1].x)/2,(b[d].y+b[d+1].y)/2);d+1<b.length&&a.quadraticCurveTo(b[d].x,
b[d].y,b[d+1].x,b[d+1].y)}else 2===d&&(a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y))},rotate:function(c,b){this.Ia.forEach(function(d){for(var e=0;e<d.length;++e)d[e]=a.ce.Math.MV(d[e],c,b)});this.adjustRect()},Kh:function(a){e.Annotation.prototype.Kh.apply(this,arguments);this.Ia.forEach(function(b){for(var d=0;d<b.length;++d)b[d]=a.W(b[d])})},adjustRect:function(){if(0!==this.Ia.length){this.Ya={x:Number.MAX_VALUE,y:Number.MAX_VALUE};this.Eb={x:-Number.MAX_VALUE,y:-Number.MAX_VALUE};var a,b;
for(a=0;a<this.Ia.length;a++)for(b=0;b<this.Ia[a].length;b++)if(null!==this.Ia[a][b]){var d=this.Ia[a][b].x,e=this.Ia[a][b].y;d>this.Eb.x&&(this.Eb.x=d);e>this.Eb.y&&(this.Eb.y=e);d<this.Ya.x&&(this.Ya.x=d);e<this.Ya.y&&(this.Ya.y=e)}a=this.getRectPadding();this.X=this.Ya.x-a;this.Y=this.Ya.y-a;this.Width=Math.max(0,this.Eb.x-this.Ya.x)+2*a;this.Height=Math.max(0,this.Eb.y-this.Ya.y)+2*a;this.Uw()}},getRectPadding:function(){return this.StrokeThickness},serialize:function(a,b){for(var d=e.sa.prototype.serialize.apply(this,
arguments),f=document.createElementNS("","inklist"),k=this.Ee(),h=0;h<k.length;h++)if(!(1>k[h].length)){var l=e.ca.Uo(k[h],b),n=document.createElementNS("","gesture");n.textContent=l;f.appendChild(n)}d.appendChild(f);this.cg&&(d.setAttribute("IT",this.cg),this.cg===e.FreeHandAnnotation.Ic.InkHighlight&&0!==this.Opacity&&this.Opacity>e.FreeHandAnnotation.opacityCap&&d.setAttribute("opacity",e.FreeHandAnnotation.opacityCap));return d},deserialize:function(a,b){e.sa.prototype.deserialize.apply(this,
arguments);var d=this;d.Ia=[];a.querySelectorAll("inklist gesture").forEach(function(a){a=e.ca.Gl(a.textContent,b);a=d.shouldSimplifyPath?window.simplify(a,.5):a;d.Ia.push(a)});this.kg()||this.adjustRect();this.cg=a.getAttribute("IT");this.Yf=null;this.Subject===e.ja.Ac("signature")&&(this.MaintainAspectRatio=!0)},selectionModel:e.pa};e.FreeHandAnnotation.prototype=$.extend(new e.sa,e.FreeHandAnnotation.prototype);f.ls.call(e.FreeHandAnnotation.prototype,new f.Mk);Object.defineProperties(e.FreeHandAnnotation.prototype,
{Intent:{get:function(){return this.cg},set:function(a){this.cg=a;this.kb()}}})})(window);
(function(a){var f=a.Annotations||{};f.ud=function(){f.sa.call(this);this.na=[];this.Ya={x:0,y:0};this.Eb={x:0,y:0}};f.ud.prototype={vb:function(a,c){var b=this.getRectPadding();this.na.push(new f.Point(a,c));1===this.na.length?(this.Ya={x:a,y:c},this.Eb={x:a,y:c},this.X=a-b,this.Y=c-b):(a>this.Eb.x&&(this.Width=a-this.Ya.x+2*b,this.Eb.x=a),c>this.Eb.y&&(this.Height=c-this.Ya.y+2*b,this.Eb.y=c),a<this.Ya.x&&(this.Width=this.Eb.x-a+2*b,this.X=a-b,this.Ya.x=a),c<this.Ya.y&&(this.Height=this.Eb.y-c+
2*b,this.Y=c-b,this.Ya.y=c))},Kh:function(a){f.Annotation.prototype.Kh.apply(this,arguments);for(var c=this.na,b=0;b<c.length;++b)c[b]=a.W(c[b])},Nf:function(a,c,b){this.na&&this.na.length>a?(this.na[a].x=c,this.na[a].y=b,this.adjustRect()):this.na&&this.na.length===a&&this.vb(c,b);this.kb()},wi:function(a){return this.na&&this.na.length>a?this.na[a]:null},xk:function(){var a=this.na.pop();this.adjustRect();return a},getPath:function(){return this.na},setPath:function(a){this.na=a;this.adjustRect()},
getRectPadding:function(){return this.StrokeThickness},adjustRect:function(){if(0!==this.na.length){this.Ya={x:Number.MAX_VALUE,y:Number.MAX_VALUE};this.Eb={x:-Number.MAX_VALUE,y:-Number.MAX_VALUE};for(var a=0;a<this.na.length;a++)if(null!==this.na[a]){var c=this.na[a].x,b=this.na[a].y;c>this.Eb.x&&(this.Eb.x=c);b>this.Eb.y&&(this.Eb.y=b);c<this.Ya.x&&(this.Ya.x=c);b<this.Ya.y&&(this.Ya.y=b)}a=this.getRectPadding();this.X=this.Ya.x-a;this.Y=this.Ya.y-a;this.Width=Math.max(0,this.Eb.x-this.Ya.x)+2*
a;this.Height=Math.max(0,this.Eb.y-this.Ya.y)+2*a;this.Uw()}},selectionModel:f.Ym};f.ud.prototype=$.extend(new f.sa,f.ud.prototype)})(window);
(function(a){var f=a.Sg,e=a.Annotations||{},c=e.ja||{};e.Ga=function(a){e.ud.call(this);this.na=[];this.Ya={x:0,y:0};this.Eb={x:0,y:0};this.mf=null;this["_xsi:type"]="FreeText";this.StrokeThickness=1;this.Xo(a);this.Gv="left";this.TD=new e.Color(255,0,0);this.ED="Helvetica";this.FD="9pt";this.SD="left";this.QD=0;this.hn=2;this.BF=!1;this.Subject=a!==e.Ga.Ic.FreeTextCallout?e.ja.Ac("freetext"):e.ja.Ac("callout")};e.Ga.EXPORT_CALCULATED_FONT_SIZE=!0;e.Ga.Ic={FreeText:"FreeText",FreeTextCallout:"FreeTextCallout",
FreeTextTypeWriter:"FreeTextTypeWriter"};e.Ga.prototype={elementName:"freetext",oh:function(){return this.intent},Xo:function(a){this.intent=a||e.Ga.Ic.FreeText;a!==e.Ga.Ic.FreeTextCallout?this.selectionModel=e.zp:(this.ej("OpenArrow"),this.selectionModel=e.xs)},ej:function(a){this.Cn=a},Ye:function(){return this.Cn},vb:function(a,c){5>this.na.length&&e.ud.prototype.vb.call(this,a,c)},adjustRect:function(){this.oh()===e.Ga.Ic.FreeTextCallout&&e.ud.prototype.adjustRect.apply(this,arguments)},resize:function(a){if(this.oh()===
e.Ga.Ic.FreeTextCallout){var c=a.y1-this.Y,f=a.Ca()/this.Width,k=a.xa()/this.Height;if(0!==a.x1-this.X||0!==c||1!==f||1!==k){var h=this;this.na.forEach(function(c){c.x=(c.x-h.X)*f+a.x1;c.y=(c.y-h.Y)*k+a.y1});this.adjustRect()}}else this.Ag(a),c=this.getRectPadding(),this.Bm(new e.Rect(c,c,c,c))},getRectPadding:function(){return this.oh()===e.Ga.Ic.FreeTextCallout?this.StrokeThickness/2:0},Bm:function(a){var c=0;this.oh()===e.Ga.Ic.FreeTextCallout&&(c+=this.hn+1);this.na[c]=new e.Point(this.X+a.x1,
this.Y+a.y2);this.na[c+1]=new e.Point(this.X+this.Width-a.x2,this.Y+this.Height-a.y1)},rA:function(){var a=this.na.slice(-2),c=a[0],a=a[1];return new e.Rect(c.x-this.X,this.Y+this.Height-a.y,this.X+this.Width-a.x,c.y-this.Y)},iA:function(){return this.FontSize.slice(-2)||"px"},hA:function(){var a=parseFloat(this.FontSize),c=this.iA(a);0===a&&this.AD&&e.Ga.EXPORT_CALCULATED_FONT_SIZE&&(a=this.AD,c="px");"px"===c&&(a*=.75);return a},sY:function(a,c,e,f,h,l,n){for(var m,q=f,p=a.measureText(".").width||
1,p=2*Math.ceil(h/p),u=c.split("\n"),r=0;r<u.length;r++){for(var v=u[r].split(" "),w="",z=0;z<v.length;z++){c=v[z];m=a.measureText(c);if(m.width>h){for(var C=1,A=p,x;C<=A;)if(x=Math.floor((A+C)/2),m=a.measureText(c.slice(0,x),a),m.width<h)C=x+1;else if(m.width>h)A=x-1;else break;c=c.slice(0,Math.max(1,A))}v[z]!==c&&(v.splice(z+1,0,v[z].substr(c.length)),v[z]=c);c=w+v[z];m=a.measureText(c);if(m.width>h&&0<z){a.fillText(w,e,f);w=v[z]+" ";if(f-q>=l)return;f+=n}else w=c+" "}a.fillText(w.slice(0,-1),e,
f);if(f-q>=l)break;f+=n}},uT:function(){this.mf=document.createElement("textarea");this.mf.className="freetext";this.mf.style.visibility="hidden";this.mf.style.position="absolute";this.mf.style.top="-9001px";document.getElementsByTagName("body")[0].appendChild(this.mf)},xH:function(a){return{bV:1.598*a,css:1+5/a}},draw:function(a,c){this.mf||this.uT();var f;this.kc(a,c);this.oh()===e.Ga.Ic.FreeTextCallout?(this.Yn(a,c),f=this.na.length===this.hn+3):f=2===this.na.length;if(f){f=this.ES();this.DQ(a,
f);var k=this.kh();"undefined"!==typeof k&&this.CQ(a,c,k,f)}},Yn:function(a,d){a.lineJoin="miter";var e=this.io(d);0===e&&(e=a.lineWidth=1);for(var f=Math.min(this.hn+1,this.na.length),h=0;h<f;h++){var l=this.na[h];0===h?(a.beginPath(),a.moveTo(l.x,l.y)):a.lineTo(l.x,l.y)}1<this.na.length&&c.uQ(a,this.na[0],this.na[1],e)},DQ:function(a,c){var e=c.x,f=c.y,h=c.width,l=c.height;a.save();0<this.StrokeThickness&&(a.beginPath(),a.lineWidth*=2,a.rect(e,f,h,l),a.clip(),a.stroke());a.beginPath();a.rect(e+
a.lineWidth/2,f+a.lineWidth/2,h-a.lineWidth,l-a.lineWidth);a.closePath();a.fill();a.restore()},CQ:function(a,d,e,f){var h=f.x,l=f.y,n=f.width,m=f.height;a.textBaseline="top";a.fillStyle=this.TextColor.toString();var q=a.lineWidth;f=0+q;a.save();a.beginPath();a.rect(h+q,l+q,Math.max(n-2*q,0),Math.max(m-2*q));a.clip();a.textAlign=this.TextAlign;if(this.Rotation){a.translate(h,l);a.rotate(-(Math.PI/180*this.Rotation));a.translate(-h,-l);if(90===this.Rotation||270===this.Rotation)q=n,n=m,m=q;90===this.Rotation?
a.translate(-n,0):270===this.Rotation?a.translate(0,-m):180===this.Rotation&&a.translate(-n,-m)}var q=n-2*f,m=Math.round(m-2*f),p=this.qR(d);d=p.ZQ;p=p.$Q;if(0===d){this.mf.style.width=q+"px";this.mf.style.height=m+"px";this.mf.style.fontFamily=this.Font;e=e.replace(/\s+$/g,"");this.mf.value=e;var u=this;d=c.UG(e,this.mf,m,function(a){return u.xH(a).css});p="px";this.AD=d}var r=this.xH(d).bV,v=h+f;"center"===this.TextAlign?v=h+n/2:"right"===this.TextAlign&&(v=h+n-f);a.font=d+p+" "+this.Font;this.sY(a,
e,v,l+f,q,m,r);a.restore()},qR:function(a){a=e.ja.rq(a,parseFloat(this.FontSize));var c=this.iA();"pt"===c&&(a*=.75);return{ZQ:a,$Q:c}},ES:function(){var a=this.na.slice(-2),c=a[0],a=a[1];return{x:c.x,y:c.y,width:a.x-c.x,height:a.y-c.y}},serialize:function(a,c){var f=e.sa.prototype.serialize.apply(this,arguments),k=this.getPath(),h={},l=e.ca.yg(this.FillColor);null!==l?h.color=l:f.removeAttribute("color");f.removeAttribute("interior-color");var l=this.hA(),n,m=this.rA();this.yB&&this.yB.isEqual(m)?
n=this.BB:(this.BB&&(delete this.BB,delete this.yB),m.NI()||(n=e.ca.cC(m,c)));n&&f.setAttribute("fringe",n);this.originalTextAlignCalculated!==this.TextAlign||this.originalTextColorCalculated!==e.ca.yg(this.TextColor)||this.originalStrokeColorCalculated!==e.ca.yg(this.StrokeColor)||this.originalFontSizeCalculated!==this.FontSize||this.originalFontCalculated!==this.Font?(n=this.StrokeColor.LX(),m=e.ca.WV(this.Font,l),m=n+" "+m,n=e.ca.VV(this)):(m=this.originalDefaultAppearance,n=this.originalDefaultStyle);
var q=document.createElementNS("","defaultappearance");q.textContent=m;f.appendChild(q);m=document.createElementNS("","defaultstyle");m.textContent=n;f.appendChild(m);this.Gv&&"left"!==this.Gv&&(h.justification=this.Gv);n=e.ca.yg(this.TextColor);null!==n&&f.setAttribute("TextColor",n);f.setAttribute("FontSize",l);l=this.oh();l===e.Ga.Ic.FreeTextCallout&&(k=e.ca.Uo(k.slice(0,-2),c,",",","),h.callout=k,h.head=this.Ye(),f.setAttribute("IT",l));for(var p in h)a.setAttribute(p,h[p]);return f},deserialize:function(a,
c){this.TextColor=new e.Color(0,0,0);var f=e.ca;e.sa.prototype.deserialize.apply(this,arguments);null!==f.Zj(a.getAttribute("color"))?this.FillColor=this.StrokeColor:this.FillColor=new e.Color(0,0,0,0);var k=f.jo(a,"defaultappearance","defaultappearance"),h=f.jo(a,"defaultstyle","defaultstyle"),l=f.FB(k);l.color&&(this.StrokeColor=f.Zj(l.color));l.font&&(this.Font=l.font.name,this.FontSize=l.font.size);l=f.VU(h);l.font&&(this.Font=l.font.name,this.FontSize=l.font.size);l.textAlign&&(this.TextAlign=
l.textAlign);l.color&&(this.TextColor=f.Zj(l.color));this.originalStrokeColorCalculated=f.yg(this.StrokeColor);this.originalTextAlignCalculated=this.TextAlign;this.originalTextColorCalculated=l.color?l.color:f.yg(this.TextColor);this.originalFontSizeCalculated=this.FontSize;this.originalFontCalculated=this.Font;this.originalDefaultStyle=a;this.originalDefaultAppearance=k;this.originalDefaultStyle=h;if((k=a.getAttribute("IT")||a.getAttribute("it"))&&k===e.Ga.Ic.FreeTextCallout){if(this.Xo(e.Ga.Ic.FreeTextCallout),
this.ej(a.getAttribute("head")||"OpenArrow"),h=a.getAttribute("callout"))for(k=f.Gl(h,c),3>k.length&&(h=f.Gl(h,c,",",","),4>h.length&&(k=h,this.hn=k.length-1)),h=this.getPath(),l=0;l<k.length;l++)h[l]=new e.Point(parseFloat(k[l].x),parseFloat(k[l].y))}else this.Xo(e.Ga.Ic.FreeText);this.fringe?this.Bm(this.fringe):this.Bm(new e.Rect(0,0,0,0));if(k=a.getAttribute("justification"))this.Gv=k;f=f.Zj(a.getAttribute("TextColor"));null!==f&&(this.TextColor=f);f=a.getAttribute("FontSize");_.isUndefined(f)||
_.isNull(f)||(this.FontSize=f+"pt");(f=a.getAttribute("rotation"))&&(this.Rotation=parseInt(f,10));this.kg()||this.adjustRect();this.yB=this.rA()},eW:function(a){this.BF=a},selectionModel:e.zp};e.Ga.prototype=$.extend(new e.ud,e.Ga.prototype);f.ls.call(e.Ga.prototype,new f.Mk);Object.defineProperties(e.Ga.prototype,{CalloutLineCount:{get:function(){return this.hn},set:function(a){this.hn=a;this.kb()}},TextColor:{get:function(){return this.TD},set:function(a){this.TD=a;this.kb()}},FontSize:{get:function(){return this.FD},
set:function(a){this.FD=a;this.kb()}},Font:{get:function(){return this.ED},set:function(a){this.ED=a;this.kb()}},TextAlign:{get:function(){return this.SD},set:function(a){this.SD=a;this.kb()}},Rotation:{get:function(){return this.QD},set:function(a){this.QD=a;this.kb()}}})})(window);
(function(a){var f=a.Sg,e=a.Annotations||{};e.Ed=function(){e.sa.call(this);this["_xsi:type"]="Line";this.Subject=e.ja.Ac("line");this.Cn=this.kt=this.End=this.Start=this.Yf=null};e.Ed.prototype={elementName:"line",resize:function(a){var b=a.x1;a=a.y1;var d=b-this.X,e=a-this.Y;if(0!==d||0!==e)this.Start.x+=d,this.Start.y+=e,this.End.x+=d,this.End.y+=e,this.X=b,this.Y=a},adjustRect:function(){if(!_.isNull(this.Start)||!_.isNull(this.End)){"LineDimension"===this.IT&&this.Measure&&this.kq();var a=this.getRectPadding(),
b=this.MS(),d=this.lR(),d=d.map(function(a){return b.W(a)}),e=d.map(function(a){return a.x}),d=d.map(function(a){return a.y});this.X=Math.min.apply(null,e)-a;this.Y=Math.min.apply(null,d)-a;this.Width=Math.max.apply(null,e)-this.X+2*a;this.Height=Math.max.apply(null,d)-this.Y+2*a;this.Uw()}},getRectPadding:function(){return this.StrokeThickness},oC:function(a,b){this.Start=new e.Point(a,b)},XH:function(){return this.Start},setEndPoint:function(a,b){this.End=new e.Point(a,b)},uH:function(){return this.End},
ej:function(a){this.Cn=a},Ye:function(){return this.Cn||"None"},Vo:function(a){this.kt=a},nh:function(){return this.kt||"None"},eX:function(a){a.font=this.constant.FONT_SIZE+" "+this.constant.FONT_FAMILY;a.fillStyle=this.constant.TEXT_COLOR;a.textBaseline="top";a.textAlign="center"},hX:function(a){a.translate(this.Start.x,this.Start.y);a.rotate(this.Nl());a.translate(0,this.qv())},draw:function(a,b){this.kc(a,b);if(this.Start&&this.End){var d=this.Vq(),e;a.save();this.eX(a);this.hX(a);a.beginPath();
this.leaderExtend&&this.xQ(a,d);this.leaderLength&&this.yQ(a,d);"yes"===this.caption&&(e=this.YH(this.kh(),d),this.vQ(a,d,e));this.AQ(a,d,e);this.zQ(a,d,e);a.stroke();a.closePath();a.restore()}},xQ:function(a,b){var d=this.leaderExtend;this.Xe(a,0,0,0,-this.Uq()*d);this.Xe(a,b,0,b,-this.Uq()*d)},yQ:function(a,b){var d=this.leaderLength;this.Xe(a,0,0,0,d);this.Xe(a,b,0,b,d)},vQ:function(a,b,d){var e=b/2,f;this.dB(d)?this["caption-offset-h"]&&!this.LI(b,d)&&(e=this.lH(b,d),d.left>b?this.Xe(a,b,0,e.x,
0):0>d.right&&this.Xe(a,0,0,e.x,0)):this["caption-offset-v"]&&(f=this.Xz(b,d),a.moveTo(b/2,0),a.lineTo(f.x,f.y),this["caption-offset-h"]&&(d.right<e||d.left>e)&&(e=this.lH(b,d),a.lineTo(e.x,e.y)));e=this.kh().split("\n");f=d.top;var h=d.height/e.length;this.Vy(d.width,b)||!this.dB(d)||this["caption-offset-h"]||(f-=17);for(b=0;b<e.length;b++)a.fillText(e[b],d.left+d.width/2,f),f+=h},AQ:function(a,b,d){"yes"!==this.caption||this.Vy(d.width,b)?(this.Zu(this.Ye(),"start").call(this,a),this.Zu(this.nh(),
"end").call(this,a)):(d=5*a.lineWidth+10,"None"!==this.Ye()&&(this.Zu("ROpenArrow","start").call(this,a),"None"!==this.nh()&&this.Xe(a,-d,0,0,0)),"None"!==this.nh()&&(this.Zu("ROpenArrow","end").call(this,a),"None"!==this.Ye()&&this.Xe(a,b,0,b+d,0)))},zQ:function(a,b,d){d?this.Vy(d.width,b)?this.dB(d)&&this.LI(b,d)?(this.Xe(a,0,0,d.left,0),this.Xe(a,d.right,0,b,0)):this.Xe(a,0,0,b,0):"None"!==this.Ye()&&"None"!==this.nh()||this.Xe(a,0,0,b,0):this.Xe(a,0,0,b,0)},Xe:function(a,b,d,e,f){a.moveTo(b,d);
a.lineTo(e,f)},Yn:function(a){var b=5*a.lineWidth+3,d=.2*Math.PI;a.moveTo(Math.cos(d)*b,-Math.sin(d)*b);a.lineTo(0,0);a.lineTo(Math.cos(d)*b,Math.sin(d)*b)},Kh:function(a){e.Annotation.prototype.Kh.apply(this,arguments);this.Start=a.W(this.Start);this.End=a.W(this.End)},serialize:function(a,b){a=e.sa.prototype.serialize.apply(this,arguments);var d=new e.Point(this.End.x,this.End.y),f=e.ca;a.setAttribute("start",f.Lw(new e.Point(this.Start.x,this.Start.y),b));a.setAttribute("end",f.Lw(d,b));"None"!==
this.Ye()&&a.setAttribute("head",this.Ye());"None"!==this.nh()&&a.setAttribute("tail",this.nh());"LineDimension"===this.IT&&this.Measure&&a.appendChild(f.Kw(this.Measure));this.zb(a,"leaderLength");this.zb(a,"leaderExtend");this.zb(a,"leader-offset");this.zb(a,"caption");this.zb(a,"caption-style");this.zb(a,"caption-offset-h");this.zb(a,"caption-offset-v");return a},deserialize:function(a,b){e.sa.prototype.deserialize.apply(this,arguments);var d=e.ca,f=d.pG(a.getAttribute("start"),b);null!==f?this.oC(f.x,
f.y):this.oC(this.X,this.Y);f=d.pG(a.getAttribute("end"),b);null!==f?this.setEndPoint(f.x,f.y):this.setEndPoint(this.X+this.Width,this.Y+this.Height);f=a.querySelector("measure");"LineDimension"===a.getAttribute("IT")&&f&&(this.Measure=d.Au(f));this.ej(a.getAttribute("head")||"None");this.Vo(a.getAttribute("tail")||"None");this.dj(a,"caption");this.dj(a,"caption-style");this.Yr(a,"caption-offset-h");this.Yr(a,"caption-offset-v");this.Yr(a,"leaderLength");this.Yr(a,"leaderExtend");this.Yr(a,"leader-offset");
this.kg()||this.adjustRect()},selectionModel:e.Cp,constant:{FONT_SIZE:"9px",FONT_FAMILY:"sans-serif",TEXT_COLOR:"#000000"},Zn:{None:function(){},OpenArrow:{start:function(a){this.Yn(a)},end:function(a){a.save();a.translate(this.Vq(),0);a.scale(-1,1);this.Yn(a);a.restore()}},ROpenArrow:{start:function(a){a.save();a.scale(-1,1);this.Yn(a);a.restore()},end:function(a){a.save();a.translate(this.Vq(),0);this.Yn(a);a.restore()}}},kq:function(){var a=this.Measure.distance,a=e.ja.nA(this.Vq()*this.Measure.axis[0].factor*
a[0].factor,a);this.Gh(a)},TT:function(a){return!!this.Zn[a]},Vy:function(a,b){return a+24<=b},dB:function(a){return 0>a.top&&0<a.bottom},LI:function(a,b){return 0<=b.left&&b.right<=a},MS:function(){var a=this.qv(),b=this.Nl(),d=new XODText.Matrix2D,e=new XODText.Matrix2D;d.Ea(1,0,0,1,this.Start.x,this.Start.y);e.set(Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0);d.concat(e);e.set(1,0,0,1,0,a);d.concat(e);return d},Zu:function(a,b){return _.isNull(a)?this.Zn.None:this.TT(a)?"object"===typeof this.Zn[a]?
this.Zn[a][b]:this.Zn[a]:this.Zn.OpenArrow[b]},YH:function(a,b){var d=e.ja.measureText(a,this.constant.FONT_SIZE,this.constant.FONT_FAMILY,"normal"),f=d.height,d=d.width,k=this.HS(f),h=this.FS(d,b);return{top:k,bottom:k+f,left:h,right:h+d,width:d,height:f}},HS:function(a){var b=-a/2;if("Top"===this["caption-style"]&&!this["caption-offset-v"])return-a;this["caption-offset-v"]&&(b-=this["caption-offset-v"]);return b},FS:function(a,b){var d=b/2-a/2;this["caption-offset-h"]&&(d+=this["caption-offset-h"]);
return d},Xz:function(a,b){var d=-this["caption-offset-v"],e=a/2,f={x:e,y:void 0};f.y=0>d?b.bottom:b.top;this["caption-offset-h"]&&(b.right<e||b.left>e)&&(f.y=0>d?f.y-b.height/2:f.y+b.height/2);return f},lH:function(a,b){var d={};d.y=this["caption-offset-v"]?this.Xz(a,b).y:0;d.x=0>this["caption-offset-h"]?b.right:b.left;return d},lR:function(){var a=this.Vq(),b=[{x:0,y:0},{x:a,y:0}];if("yes"===this.caption){var d=this.YH(this.kh(),a);b.push({x:d.left,y:d.top},{x:d.left,y:d.bottom},{x:d.right,y:d.top},
{x:d.right,y:d.bottom});this["caption-offset-v"]&&(d=this.Xz(a,d),b.push({x:d.x,y:d.y}))}this.leaderExtend&&(d=this.leaderExtend,b.push({x:0,y:d*-this.Uq()},{x:a,y:d*-this.Uq()}));(d=this.qv())&&b.push({x:0,y:-d},{x:a,y:-d});return b},qv:function(){var a=this.leaderLength,b=this["leader-offset"],d=0;a&&(d-=a);b&&(d+=b*-this.Uq());return d},Uq:function(){return!this.leaderLength||0<this.leaderLength?1:-1},Vq:function(){return Math.sqrt(Math.pow(this.End.x-this.Start.x,2)+Math.pow(this.End.y-this.Start.y,
2))},Nl:function(){return Math.atan2(this.End.y-this.Start.y,this.End.x-this.Start.x)},RR:function(){var a=this.qv(),b=this.Nl();return{qD:{x:this.Start.x-a*Math.sin(b),y:this.Start.y+a*Math.cos(b)},$C:{x:this.End.x-a*Math.sin(b),y:this.End.y+a*Math.cos(b)}}}};e.Ed.prototype=$.extend(new e.sa,e.Ed.prototype);f.LC.call(e.Ed.prototype,[new f.Mk])})(window);
(function(a){var f=a.Annotations||{},e=a.Sg;f.Wf=function(){f.sa.call(this);this.na=[];this.zt=!1;this.uf="solid";this.ml=2;this["_xsi:type"]="Polygon";this.Subject=f.ja.Ac("polygon");this.Ya={x:0,y:0};this.Eb={x:0,y:0}};f.Wf.prototype={elementName:"polygon",resize:function(a){var b=a.x1;a=a.y1;var d=b-this.X,e=a-this.Y;if(0!==d||0!==e){for(var f=0;f<this.na.length;f++)this.na[f].x+=d,this.na[f].y+=e;this.X=b;this.Y=a}},adjustRect:function(){"PolygonDimension"===this.IT&&this.Measure&&this.kq();f.ud.prototype.adjustRect.call(this)},
kq:function(){var a=this.kR(),b=this.Measure.axis[0],d=this.Measure.area,a=f.ja.nA(a*b.factor*b.factor*d[0].factor,d);this.Gh(a)},finish:function(){a.ce.Math.EJ(this.na)&&(this.na[this.na.length]={x:this.na[0].x,y:this.na[0].y});this.adjustRect()},draw:function(a,b){this.Dz(a,b)},li:function(a){if("cloudy"===this.Style)f.ja.wG(this,a,this.getPath());else for(var b=0;b<this.na.length;b++){var d=this.na[b];0===b?(a.beginPath(),a.moveTo(d.x,d.y)):a.lineTo(d.x,d.y)}1<this.na.length&&(a.closePath(),a.lineJoin=
"round")},kR:function(){var a=this.getPath();return 3>a.length?0:Math.abs(a.reduce(function(b,d,e){return b+d.x*a[e===a.length-1?0:e+1].y-a[e===a.length-1?0:e+1].x*d.y},0))/2},Xo:function(a){this.Intent=a},oh:function(){return this.Intent},serialize:function(a,b){var d=f.sa.prototype.serialize.apply(this,arguments);"cloudy"===this.Style&&(d.setAttribute("style",this.Style),d.setAttribute("intensity",this.Intensity));var e=this.getPath();if(e&&0<e.length){var k=document.createElementNS("","vertices");
k.textContent=f.ca.Uo(e,b);d.appendChild(k)}"PolygonDimension"===this.IT&&this.Measure&&d.appendChild(f.ca.Kw(this.Measure));return d},deserialize:function(a,b){f.sa.prototype.deserialize.apply(this,arguments);var d=a.getElementsByTagName("vertices");0<d.length&&(this.na=f.ca.Gl(d[0].textContent,b));this.uf=a.getAttribute("style");this.ml=parseInt(a.getAttribute("intensity")||0,10);this.cg=a.getAttribute("IT");d=a.querySelector("measure");"PolygonDimension"===this.cg&&d&&(this.Measure=f.ca.Au(d));
this.kg()||this.adjustRect()},selectionModel:f.Ns};f.Wf.prototype=$.extend(new f.ud,f.Wf.prototype);e.LC.call(f.Wf.prototype,[new e.Mk]);Object.defineProperties(f.Wf.prototype,{Intensity:{get:function(){return this.ml},set:function(a){this.ml=a;this.kb()}},Intent:{get:function(){return this.cg},set:function(a){this.cg=a;this.kb()}}})})(window);
(function(a){var f=a.Sg,e=a.Annotations||{};e.qj=function(){e.sa.call(this);this.na=[];this.zt=!1;this["_xsi:type"]="Polyline";this.Subject=e.ja.Ac("polyline");this.Ya={x:0,y:0};this.Eb={x:0,y:0};this.Yf=null};e.qj.prototype={elementName:"polyline",resize:function(a){var b=a.x1;a=a.y1;var d=b-this.X,e=a-this.Y;if(0!==d||0!==e){for(var f=0;f<this.na.length;f++)this.na[f].x+=d,this.na[f].y+=e;this.X=b;this.Y=a}},adjustRect:function(){"PolyLineDimension"===this.IT&&this.Measure&&this.kq();e.ud.prototype.adjustRect.call(this)},
kq:function(){var a=this.mS(),b=this.Measure.distance,a=e.ja.nA(a*this.Measure.axis[0].factor*b[0].factor,b);this.Gh(a)},finish:function(){this.adjustRect()},draw:function(a,b){this.kc(a,b);for(var d=0;d<this.na.length;d++){var e=this.na[d];0===d?(a.beginPath(),a.moveTo(e.x,e.y)):a.lineTo(e.x,e.y)}1<this.na.length&&(a.lineJoin="round",a.stroke())},ej:function(a){this.Cn=a},Ye:function(){return this.Cn||"None"},Vo:function(a){this.kt=a},nh:function(){return this.kt||"None"},mS:function(){var a=this.getPath();
return 2>a.length?0:a.reduce(function(b,d,e){if(0===e)return b;e=a[e-1];return b+Math.sqrt(Math.pow(d.x-e.x,2)+Math.pow(d.y-e.y,2))},0)},serialize:function(a,b){var d=e.sa.prototype.serialize.apply(this,arguments),f=this.getPath();if(f&&0<f.length){var k=document.createElementNS("","vertices");k.textContent=e.ca.Uo(f,b);d.appendChild(k)}d.setAttribute("head",this.Ye());d.setAttribute("tail",this.nh());"PolyLineDimension"===this.IT&&this.Measure&&d.appendChild(e.ca.Kw(this.Measure));return d},deserialize:function(a,
b){e.sa.prototype.deserialize.apply(this,arguments);var d=a.getElementsByTagName("vertices");0<d.length&&(this.na=e.ca.Gl(d[0].textContent,b));this.ej(a.getAttribute("head")||"None");this.Vo(a.getAttribute("tail")||"None");d=a.querySelector("measure");"PolyLineDimension"===a.getAttribute("IT")&&d&&(this.Measure=e.ca.Au(d));this.kg()||this.adjustRect()},selectionModel:e.Ym};e.qj.prototype=$.extend(new e.ud,e.qj.prototype);f.LC.call(e.qj.prototype,[new f.Mk])})(window);
(function(a){var f=a.Sg,e=a.Annotations||{};e.sj=function(){e.sa.call(this);this["_xsi:type"]="Rectangle";this.Subject=e.ja.Ac("rectangle");var a=this.getRectPadding();this.fringe=new e.Rect(a,a,a,a);this.ml=2;this.uf="solid"};e.sj.prototype={elementName:"square",draw:function(a,b){this.Dz(a,b)},li:function(a){var b=this.Ec();b.x1+=this.fringe.x1;b.y1+=this.fringe.y1;b.x2-=this.fringe.x2;b.y2-=this.fringe.y2;if("cloudy"===this.Style)e.ja.wG(this,a,[new e.Point(b.x1,b.y1),new e.Point(b.x2,b.y1),new e.Point(b.x2,
b.y2),new e.Point(b.x1,b.y2),new e.Point(b.x1,b.y1)]),a.closePath(),a.lineJoin="round";else{var d=1<=this.Ca()&&1<=this.xa();a.lineWidth*=d?2:.5;a.beginPath();a.moveTo(b.x1,b.y1);a.lineTo(b.x2,b.y1);a.lineTo(b.x2,b.y2);a.lineTo(b.x1,b.y2);a.closePath();d&&a.clip()}},getRectPadding:function(){return 0},serialize:function(){var a=e.sa.prototype.serialize.apply(this,arguments);"cloudy"===this.Style&&(a.setAttribute("style",this.Style),a.setAttribute("intensity",this.Intensity));return a},deserialize:function(a){e.sa.prototype.deserialize.apply(this,
arguments);this.uf=a.getAttribute("style");this.ml=a.getAttribute("intensity")}};e.sj.prototype=$.extend(new e.sa,e.sj.prototype);f.ls.call(e.sj.prototype,new f.Mk);Object.defineProperties(e.sj.prototype,{Intensity:{get:function(){return this.ml},set:function(a){this.ml=a;this.kb()}}})})(window);
(function(a){var f,e=a.Annotations||{};e.Yk=function(){e.sa.call(this);this["_xsi:type"]="Stamp";this.Subject=e.ja.Ac("stamp");this.Icon="Draft";this.Aj=this.zj=this.Yf=null;this.gr=1;this.bQ="bold italic "+this.oL+"px Verdana"};e.Yk.prototype={elementName:"stamp",padding:20,oL:30,lz:10,draw:function(c,b){this.kc(c,b);c.translate(this.X,this.Y);c.rotate(-this.Rotation*Math.PI/180);var d=a.utils.getRotationOffsets((360-this.Rotation)%360,this.Width,this.Height);c.translate(-d.dx,-d.dy);if(this.image){var d=
this.Width,e=this.Height;if(this.Rotation&&(90===Number(this.Rotation)||270===Number(this.Rotation)))var f=d,d=e,e=f;1!==this.gr&&(c.globalAlpha=1);c.drawImage(this.image,0,0,d,e)}else if("SHAccepted"===this.Icon)c.lineWidth=.2*Math.min(this.Width,this.Height),c.strokeStyle="#426922",c.beginPath(),c.moveTo(.05*this.Width,.5*this.Height),c.lineTo(.4*this.Width,.85*this.Height),c.lineTo(.95*this.Width,.05*this.Height),c.stroke();else if("SBRejected"===this.Icon)c.lineWidth=.2*Math.min(this.Width,this.Height),
c.strokeStyle="#8F110F",c.beginPath(),c.moveTo(.05*this.Width,.05*this.Height),c.lineTo(.95*this.Width,.95*this.Height),c.moveTo(.95*this.Width,.05*this.Height),c.lineTo(.05*this.Width,.95*this.Height),c.stroke();else{d=this.sR();c.fillStyle=d.fill;c.strokeStyle=d.Ov;c.lineWidth=1;e=this.lz;if(this.Ca()<=2*this.lz||this.xa()<=2*this.lz)e=Math.min(this.Ca()/2,this.xa()/2);this.BQ(c,0,0,this.Ca(),this.xa(),e);c.font=this.bQ;c.fillStyle=d.Ov;d=this.iL.toUpperCase();e=c.measureText(d).width+2*this.padding;
c.save();e=this.Ca()/e;f=this.xa()/(1.5*this.oL);c.scale(e,f);c.textBaseline="middle";c.textAlign="center";c.fillText(d,this.Ca()/(2*e),this.xa()/(2*f));c.restore()}},NS:function(){var a=this.Icon;if(this.Zc[a])return this.Zc[a];if(0===a.indexOf("SB")||0===a.indexOf("SH")){var b=this.Zc[a.substring(2)];if(b)return b}return a},sR:function(){var a=_.isUndefined(this.opacity)?1:parseFloat(this.opacity),b={Ov:"rgba(145, 15, 5, "+a+")",fill:"rgba(242, 230, 227, "+.7*a+")"},d={Ov:"rgba(65, 106, 28, "+a+
")",fill:"rgba(215, 226, 207, "+.7*a+")"},a={Ov:"rgba(24, 37, 100, "+a+")",fill:"rgba(224, 235, 246, "+.7*a+")"};switch(this.iL){case this.Zc.Approved:case this.Zc.Completed:case this.Zc.Final:return d;case this.Zc.Asis:case this.Zc.Confidential:case this.Zc.Departmental:case this.Zc.Draft:case this.Zc.Experimental:case this.Zc.ForComment:case this.Zc.ForPublicRelease:case this.Zc.NotForPublicRelease:case this.Zc.Sold:case this.Zc.TopSecret:return a;case this.Zc.Expired:case this.Zc.NotApproved:case this.Zc.Void:return b;
default:return a}},Zc:{Approved:"Approved",AsIs:"As Is",Completed:"Completed",Confidential:"Confidential",Departmental:"Departmental",Draft:"Draft",Experimental:"Experimental",Expired:"Expired",Final:"Final",ForComment:"For Comment",ForPublicRelease:"For Public Release",InformationOnly:"Information Only",NotApproved:"Not Approved",NotForPublicRelease:"Not For Public Release",PreliminaryResults:"Preliminary Results",Sold:"Sold",TopSecret:"Top Secret",Void:"Void"},BQ:function(a,b,d,e,f,h){a.beginPath();
a.moveTo(b+h,d);a.lineTo(b+e-h,d);a.quadraticCurveTo(b+e,d,b+e,d+h);a.lineTo(b+e,d+f-h);a.quadraticCurveTo(b+e,d+f,b+e-h,d+f);a.lineTo(b+h,d+f);a.quadraticCurveTo(b,d+f,b,d+f-h);a.lineTo(b,d+h);a.quadraticCurveTo(b,d,b+h,d);a.closePath();a.fill();a.stroke()},BL:function(a){f=f||document.createElement("canvas");f.width=this.image.width;f.height=this.image.height;var b=f.getContext("2d");b.drawImage(this.image,0,0);for(var d=b.getImageData(0,0,this.image.width,this.image.height),e=d.data,k=e.length,
h=3;h<k;h+=4)0!==e[h]&&(0===a&&(a=.01),e[h]=255*a);b.putImageData(d,0,0);return f.toDataURL()},serialize:function(){var a=e.sa.prototype.serialize.apply(this,arguments);this.nJ&&this.Icon===this.nJ||a.setAttribute("icon",this.Icon);if(this.image){var b=document.createElementNS("","imagedata");b.textContent=this.image.src.split("%0A").join("");this.Opacity!==this.gr&&(b.textContent=this.BL(this.Opacity));a.appendChild(b)}return a},deserialize:function(a){e.sa.prototype.deserialize.apply(this,arguments);
var b=a.getAttribute("icon");b?this.Icon=b:this.Subject&&(this.Icon=this.Subject);b||(this.nJ=this.Icon);b=a.getElementsByTagName("imagedata");0<b.length&&(this.ImageData=b[0].textContent)}};e.Yk.prototype=$.extend(new e.sa,e.Yk.prototype,a.utils.eventHandler);Object.defineProperties(e.Yk.prototype,{Icon:{get:function(){return this.EN},set:function(a){this.EN=a;this.iL=this.NS();this.kb()}},ImageData:{get:function(){return this.image.src},set:function(a){this.image||(this.image=new Image);var b=this;
this.UE=new Promise(function(d){var e=new Image,f=b.Opacity;e.onload=function(){b.image=e;b.gr=f;d()};e.onerror=d;e.src=a;b.kb()})}},Opacity:{get:function(){return Object.getOwnPropertyDescriptor(e.sa.prototype,"Opacity").get.call(this)},set:function(a){Object.getOwnPropertyDescriptor(e.sa.prototype,"Opacity").set.call(this,a);if(this.image&&1>this.gr){var b=this;this.Ew().then(function(){b.ImageData=b.BL(1);b.Ew().then(function(){b.gr=1})})}}}})})(window);
(function(a){var f=a.Annotations||{};f.vp=function(a){f.Annotation.call(this);this["_xsi:type"]="Custom";this.Subject=f.ja.Ac("custom");this.Opacity=1;if(_.isObject(a)&&(_.isUndefined(a.page)||(this.PageNumber=parseInt(a.page,10)+1),_.isUndefined(a.appearances)||(this.appearances=a.appearances),!_.isUndefined(a.rect))){var c=new f.Rect(a.rect.x1,a.rect.y1,a.rect.x2,a.rect.y2);0>c.Ca()&&(a=c.x1,c.x1=c.x2,c.x2=a);0>c.xa()&&(a=c.y1,c.y1=c.y2,c.y2=a);this.X=c.x1;this.Y=c.y1;this.Pp=c.Ca();this.Op=c.xa()}};
f.vp.prototype={elementName:"custom",draw:function(){},serialize:function(a,c){return f.Annotation.prototype.serialize.apply(this,arguments)},deserialize:function(a,c){f.Annotation.prototype.deserialize.apply(this,arguments)}};f.vp.prototype=$.extend(new f.Annotation,f.vp.prototype)})(window);
(function(a){var f=a.Annotations||{};f.Zk=function(){f.sa.call(this);this["_xsi:type"]="Sticky";this.Subject=f.ja.Ac("stickyNote");this.Height=this.Width=20;this.IsClickableOutsideRect=this.NoRotate=this.NoZoom=this.NoResize=!0;this.Yf=this.Aj=null;this.zj=new f.Color(255,255,0);this.Icon="Comment"};f.Zk.prototype={SIZE:31,elementName:"text",kg:function(){return null},draw:function(a){if(!this.Ii()){var c=this.SIZE,b=this.SIZE,c=c<b?c:b,b=.75*c,d=.48*c,f=.29*c,k=.19*c,h=c-k;a.strokeStyle="rgb(0, 0, 0)";
a.fillStyle=this.StrokeColor.toString();a.globalAlpha=0===this.Opacity?0:this.Opacity||1;a.beginPath();a.moveTo(7,2);a.lineTo(c-5-2,2);a.quadraticCurveTo(c-2,2,c-2,7);a.lineTo(c-2,b-5);a.quadraticCurveTo(c-2,b,c-5-2,b);a.lineTo(d,b);a.lineTo(f,c-2);a.lineTo(f,b);a.lineTo(7,b);a.quadraticCurveTo(2,b,2,b-5);a.lineTo(2,7);a.quadraticCurveTo(2,2,7,2);a.fill();a.moveTo(k,.25*c);a.lineTo(h,.25*c);a.moveTo(k,.41*c);a.lineTo(h,.41*c);a.moveTo(k,.57*c);a.lineTo(.68*c,.57*c);a.stroke()}},serialize:function(){var a=
f.sa.prototype.serialize.apply(this,arguments),c={};this.Icon&&(c.icon=this.Icon);for(var b in c)a.setAttribute(b,c[b]);this.zb(a,"state");this.zb(a,"statemodel");return a},deserialize:function(a){f.sa.prototype.deserialize.apply(this,arguments);this.Yf=null;this.Icon=a.getAttribute("icon");this.dj(a,"state");this.dj(a,"statemodel");this.NoRotate=this.NoZoom=!0;this.Height=this.Width=20;this.Uw()},selectionModel:f.Lp};f.Zk.prototype=$.extend(!0,new f.sa,f.Zk.prototype)})(window);
(function(a){var f=a.Annotations||{},e=f.ja||{};f.Cb=function(){f.sa.call(this);this.Yf=null;this.zj=new f.Color(255,0,0);this.Aj=null;this.LD=!0;this.MD=!1;this.eb=[];this.ag=!1;this.SurroundingTexts=this.TextIndices=null;this["_xsi:type"]="Text Markup";this.Subject=this["_xsi:type"]};f.Cb.prototype={Sw:function(a){if(!a||"undefined"===typeof a.length||0===a.length)throw Error("Argument quads requires an array of at least one element");this.eb=a;for(var b=Infinity,d=Infinity,e=0,f=0,h=0;h<this.eb.length;h++)a=
this.eb[h],b=Math.min(b,a.x1,a.x2,a.x3,a.x4),d=Math.min(d,a.y1,a.y2,a.y3,a.y4),e=Math.max(e,a.x1,a.x2,a.x3,a.x4),f=Math.max(f,a.y1,a.y2,a.y3,a.y4);this.X=b;this.Y=d;this.Width=e-b;this.Height=f-d},he:function(){return this.eb},Kh:function(a){f.Annotation.prototype.Kh.apply(this,arguments);var b=[];this.eb.forEach(function(d){var e={x:d.x1,y:d.y1},k={x:d.x2,y:d.y2},h={x:d.x3,y:d.y3};d={x:d.x4,y:d.y4};e=a.W(e);k=a.W(k);h=a.W(h);d=a.W(d);b.push(new f.$a(e.x,e.y,k.x,k.y,h.x,h.y,d.x,d.y))});this.Sw(b)},
serialize:function(c,b){var d=f.sa.prototype.serialize.apply(this,arguments),g,k=[];for(g=0;g<this.Quads.length;g++){var h=this.Quads[g];k.push(new f.Point(h.x4,h.y4));k.push(new f.Point(h.x3,h.y3));k.push(new f.Point(h.x1,h.y1));k.push(new f.Point(h.x2,h.y2))}0<this.Quads.length&&(g=f.ca.Uo(k,b,",",","),d.setAttribute("coords",g));if(e.Lq){k={};this.TextIndices?k.selidxs=f.ca.YV(this.TextIndices):a.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.serialize: no idxs to serialize.");
if(this.SurroundingTexts)for(h=f.ca.XV(this.SurroundingTexts),g=0;g<h.length;g++)k["surrtxts_"+g+"_0"]=h[g][0],k["surrtxts_"+g+"_1"]=h[g][1];else a.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.serialize: no surrtxts to serialize.");for(var l in k)d.setAttribute(l,k[l])}return d},deserialize:function(c,b,d){f.sa.prototype.deserialize.apply(this,arguments);this.eb=[];for(var g=c.getAttribute("coords"),g=f.ca.Gl(g,b,",",","),k=0;k+3<g.length;k+=4){if(a.ce.Math.dU(g[k],g[k+3],
g[k+1],g[k+2])){var h=g[k+2];g[k+2]=g[k+3];g[k+3]=h}this.eb.push(new f.$a(g[k+3].x,g[k+3].y,g[k+2].x,g[k+2].y,g[k+1].x,g[k+1].y,g[k].x,g[k].y))}d?f.ja.gQ(this,c,d):(this instanceof f.Cb&&a.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.deserialize: no annotManager provided; could not attempt to deserialize extra selector data."),this.ag=!1);var l=function(b){var c=!1,d;if(this.vf&&this.eb.length===this.vf.length)for(c=!0,k=0;k<this.eb.length;k++)for(d=0;8>d;d++)if(5<=Math.abs(this.eb[k].Vz()[d]-
this.vf[k][d])){c=!1;k=this.eb.length;break}var e=!1;if(this.Xg&&this.eb.length===this.Xg.length)for(e=!0,k=0;k<this.eb.length;k++)for(d=0;8>d;d++)if(5<=Math.abs(this.eb[k].Vz()[d]-this.Xg[k][d])){e=!1;k=this.eb.length;break}c||a.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.deserialize: absolute position selector DOES NOT agree with surrtxt selector.");e||a.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.deserialize: absolute position selector DOES NOT agree with index-based selector.");
d=null!==this.Xg&&(0<this.Xg.length||0===this.eb.length&&0===this.Xg.length);var g=null!==this.vf&&(0<this.vf.length||0===this.eb.length&&0===this.vf.length),h=[],l=Array(8);if(d&&g)if(c||e)a.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.deserialize: using absolute coordinates.");else{for(k=0;k<this.vf.length;k++){for(d=0;8>d;d++)l[d]=Math.round(this.vf[k][d]);h.push(new f.$a(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7]))}this.eb=h}else if(d)if(e)a.utils.warn("annot_extra_selectors",
"Annotations.TextMarkupAnnotation.deserialize: using absolute coordinates.");else{for(k=0;k<this.Xg.length;k++){for(d=0;8>d;d++)l[d]=Math.round(this.Xg[k][d]);h.push(new f.$a(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7]))}this.eb=h}else if(g)if(c)a.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.deserialize: using absolute coordinates.");else{for(k=0;k<this.vf.length;k++){for(d=0;8>d;d++)l[d]=Math.round(this.vf[k][d]);h.push(new f.$a(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7]))}this.eb=
h}else a.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.deserialize: using absolute coordinates.");e=c=9007199254740991;for(k=l=h=0;k<this.eb.length;k++)d=this.eb[k].Vz(),d[0]<c&&(c=d[0]),d[7]<e&&(e=d[7]),d[2]>h&&(h=d[2]),d[3]>l&&(l=d[3]);this.NK(new f.Rect(c,e,h,l));b.Kb(this);this.trigger("extraSelectorsUsedForAdjustments");this.Sp=!0}.bind(this);if(e.Lq&&this.ag&&d)if(this.RE)l(d);else this.one("quadsCalculatedFromExtraSelectors",function(){l(d)});else a.utils.warn("annot_extra_selectors",
"Annotations.TextMarkupAnnotation.deserialize: NOT taking extra selectors path.")},Ak:function(){return!0},selectionModel:f.vj};f.Cb.prototype=$.extend(new f.sa,f.Cb.prototype);Object.defineProperties(f.Cb.prototype,{Quads:{get:function(){return this.eb},set:function(a){this.Sw(a)}}})})(window);
(function(a){var f=a.Annotations||{},e=f.ja||{};f.Qh=function(){f.Cb.call(this);this.zj=new f.Color(255,255,0);this["_xsi:type"]="Highlight";this.Subject=f.ja.Ac("highlight");this.Opacity=1};f.Qh.opacityCap=.3;f.Qh.prototype={elementName:"highlight",draw:function(a,b){var d=function(){this.kc(a,b);if(_.isUndefined(this.Opacity)||_.isNull(this.Opacity)||this.Opacity>f.Qh.opacityCap)a.globalAlpha=f.Qh.opacityCap;a.fillStyle=this.StrokeColor.toString();for(var d,e=0;e<this.Quads.length;e++)d=this.Quads[e],
a.beginPath(),a.moveTo(d.x1,d.y1),a.lineTo(d.x2,d.y2),a.lineTo(d.x3,d.y3),a.lineTo(d.x4,d.y4),a.closePath(),a.fill()}.bind(this);if(e.Lq&&this.ag)if(this.Sp)d();else this.one("extraSelectorsUsedForAdjustments",function(){d()});else d()}};f.Qh.prototype=$.extend(new f.Cb,f.Qh.prototype)})(window);
(function(a){var f=a.Annotations||{},e=f.ja||{};f.cn=function(){f.Cb.call(this);this["_xsi:type"]="Squiggly";this.Subject=f.ja.Ac("squiggly")};f.cn.prototype={elementName:"squiggly",draw:function(a,b){var d=function(){var d,e,f,l,n,m,q;this.kc(a,b);for(var p=0;p<this.eb.length;p++){e=this.eb[p];d=Math.sqrt((e.x1-e.x2)*(e.x1-e.x2)+(e.y1-e.y2)*(e.y1-e.y2));var u=5/3,r=d/10;a.save();a.translate(e.x1,e.y1-1.25);a.rotate(Math.atan2(e.y2-e.y1,e.x2-e.x1));e=Math.abs(e.y1-e.y4);a.beginPath();a.rect(0,-e,
d,e+1.25+1);a.clip();a.beginPath();for(var v=0;v<2*r;v+=2)q=5*v,n=5*v+u/2,m=u,f=5*(v+1)-u/2,l=u,d=5*(v+1),e=0,a.moveTo(q,0),a.bezierCurveTo(n,m,f,l,d,e),n=5*(v+1)+u/2,m=-u,f=5*(v+2)-u/2,l=-u,d=5*(v+2),e=0,a.bezierCurveTo(n,m,f,l,d,e);a.stroke();a.restore()}}.bind(this);if(e.Lq&&this.ag)if(this.Sp)d();else this.one("extraSelectorsUsedForAdjustments",function(){d()});else d()}};f.cn.prototype=$.extend(new f.Cb,f.cn.prototype)})(window);
(function(a){var f=a.Annotations||{},e=f.ja||{};f.dn=function(){f.Cb.call(this);this["_xsi:type"]="Strikeout";this.Subject=f.ja.Ac("strikeout")};f.dn.prototype={elementName:"strikeout",draw:function(a,b){var d=function(){this.kc(a,b);0===this.StrokeThickness&&(a.lineWidth=1);for(var d,e=0;e<this.eb.length;e++){d=this.eb[e];var f=(d.x1+d.x4)/2,l=(d.y1+d.y4)/2,n=(d.x2+d.x3)/2;d=(d.y2+d.y3)/2;a.beginPath();a.moveTo(f,l);a.lineTo(n,d);a.stroke()}}.bind(this);if(e.Lq&&this.ag)if(this.Sp)d();else this.one("extraSelectorsUsedForAdjustments",
function(){d()});else d()}};f.dn.prototype=$.extend(new f.Cb,f.dn.prototype)})(window);
(function(a){var f=a.Annotations||{},e=f.ja||{};f.en=function(){f.Cb.call(this);this["_xsi:type"]="Underline";this.Subject=f.ja.Ac("underline")};f.en.prototype={elementName:"underline",draw:function(a,b){var d=function(){this.kc(a,b);for(var d,e=0;e<this.eb.length;e++)d=this.eb[e],a.beginPath(),a.moveTo(d.x1,d.y1),a.lineTo(d.x2,d.y2),a.closePath(),a.stroke()}.bind(this);if(e.Lq&&this.ag)if(this.Sp)d();else this.one("extraSelectorsUsedForAdjustments",function(){d()});else d()}};f.en.prototype=$.extend(new f.Cb,
f.en.prototype)})(window);
(function(a){var f=a.Annotations||{},e=new f.Color(0,0,0,0),c=new f.Color(0,0,0,1),b=new f.Color(255,0,0,1);f.Gd=function(a){a=a||{};f.TextMarkupAnnotation.call(this);this["_xsi:type"]="Redact";this.Subject=f.ja.Ac("redact");this.Opacity=1;this.IsHoverable=!0;this.IsHovering=!1;this.PageNumber=a.PageNumber||this.PageNumber;this.StrokeThickness=1.5;this.Color=a.StrokeColor||new f.Color(b);this.FillColor=a.FillColor||new f.Color(c);this.FillDisplayColor=new f.Color(e);a.Rect&&this.Ag(a.Rect);a.Quads?
(this.Quads=a.Quads,this.IsText=!0):a.Rect&&(this.nC(),this.NoMove=this.IsText=!1)};f.Gd.prototype={elementName:"redact",draw:function(a,b){this.kc(a,b);this.ar().forEach(function(b){var c=b.x2-b.x1,e=b.y2-b.y1;a.save();a.beginPath();a.rect(b.x1,b.y1,c,e);a.clip();a.stroke();a.fill();a.closePath();a.restore()})},ar:function(){var a=this.he();return a=0===a.length?[this.Ec()]:a.map(function(a){return{x1:a.x4,y1:a.y4,x2:a.x2,y2:a.y2}})},Ag:function(a){f.Cb.prototype.Ag.call(this,a);this.IsText||(this.nC(!0),
this.NoMove=!1)},kc:function(a,b){var c=this.ke();a.globalAlpha=1;a.fillStyle=c.fillColor.toString();c.strokeColor&&(a.strokeStyle=c.strokeColor.toString());a.lineWidth=2*f.ja.rq(b,c.kL)},ke:function(){return this.IsHovering?{fillColor:this.FillColor,kL:0,strokeColor:this.FillColor}:{fillColor:this.FillDisplayColor,kL:this.StrokeThickness,strokeColor:this.StrokeColor}},nC:function(){if(!this.IsText){var a=this.Ec();this.Quads=[{x1:a.x1,x2:a.x2,x3:a.x2,x4:a.x1,y1:a.y2,y2:a.y2,y3:a.y1,y4:a.y1}]}},selectionModel:f.Os,
serialize:function(){var a=f.Cb.prototype.serialize.apply(this,arguments);this.zb(a,"overlay-text");this.zb(a,"overlay-text-repeat");this.zb(a,"justification");this.zb(a,"defaultappearance");this.IsText||a.removeAttribute("coords");return a},deserialize:function(a){f.Cb.prototype.deserialize.apply(this,arguments);this.dj(a,"overlay-text");this.dj(a,"overlay-text-repeat");this.dj(a,"justification");this.defaultappearance=f.ca.jo(a,"defaultappearance","defaultappearance");this.Quads.length?this.NoMove=
this.IsText=!0:(this.NoMove=this.IsText=!1,this.nC())}};f.Gd.prototype=$.extend(new f.Cb,f.Gd.prototype)})(window);
(function(a){function f(){}function e(b){this.size=b;this.pc=Array(this.size);for(b=0;b<this.size;b++)this.pc[b]={gh:a.o.za.hl(1,1,1),ew:a.o.za.hl(1,1,1),Nn:null,Oi:[],hr:!1}}function c(a){var b=a.width;a.width=1;a.width=b}var b={Us:"ViewportCanvas",Jx:"PageCanvas"};e.prototype={fk:function(a,b,c){return c&&1<b?0===a?0:Math.floor((a+1)/b):Math.floor(a/b)},av:function(a,b,c){b=this.fk(a,b,c);c=null;for(var d=0;d<this.size;d++){if(this.pc[d].Nn===b)return-1===this.pc[d].Oi.indexOf(a)&&this.pc[d].Oi.push(a),
this.pc[d].hr=!0,this.pc[d];this.pc[d].hr||(c=this.pc[d])}return c?(c.Nn=b,c.Oi.push(a),c.hr=!0,c):null},AR:function(a,b,c){b=this.fk(a,b,c);for(c=0;c<this.size;c++)if(this.pc[c].Nn===b)return-1===this.pc[c].Oi.indexOf(a)&&this.pc[c].Oi.push(a),this.pc[c].hr=!0,this.pc[c];return null},Mo:function(a){for(var b=0;b<this.size;b++){var c=this.pc[b].Oi,d=c.indexOf(a),e=!1;-1<d&&(c.splice(d,1),e=!0);if(e&&0===c.length){this.NF(this.pc[b]);break}}},Pr:function(){for(var a=0;a<this.size;a++)this.NF(this.pc[a])},
NF:function(a){a.Nn=null;a.hr=!1;$(a.gh).removeAttr("style").removeClass();$(a.ew).removeAttr("style").removeClass();c(a.gh);a.gh.getContext("2d").clearRect(0,0,a.gh.width,a.gh.height);a.Oi=[]},EX:function(a,b,c){a=this.av(a,c,this.Ao);_.isNull(b)&&(b=a.ew);a.ew=a.gh;a.gh=b}};f.prototype={Ek:!1,wK:function(){},init:function(){var b=a.innerWidth,c=a.innerHeight;this.pc=new e(3);this.Jn=new e(3);this.Bh=this.hl(b,c,1);this.uk=1},Zy:function(){},fk:function(a){return this.Jn.fk(a,this.uk,this.Ao)},Rw:function(a,
b){this.uk=a;this.Ao=b},bz:function(){this.Bh.getAttribute("style");this.Bh.removeAttribute("style")},Hw:function(a,b){this.pc.EX(a,b,this.uk)},Mo:function(a){this.pc.Mo(a);this.Jn.Mo(a)},Pr:function(){this.pc.Pr();this.Jn.Pr()},Bn:function(b,c,d){var e=$(b);c=Math.floor(c);d=Math.floor(d);var f=parseInt(b.style.width,10),g=parseInt(b.style.height,10),p=""===b.style.width||1<Math.abs(f-c),g=""===b.style.height||1<Math.abs(g-d),f=.01<Math.abs(b.width/f-a.utils.getCanvasMultiplier());if(p||g||f)p=a.utils.getCanvasMultiplier(),
f=Math.floor(d*p),b.setAttribute("width",Math.floor(c*p)),b.setAttribute("height",f),e.css("width",c),e.css("height",d)},hl:function(a,b,c,d){if("undefined"===typeof d||null===d)d=document.createElement("canvas");this.Bn(d,a,b);return"undefined"===typeof d.getContext("2d")?null:d},PN:function(a,b,c,d){var e=1,f=null,g=a;if(1>=a*c||1>=b*c)f=this.hl(1,1,1);if(4E6>a*b)return this.hl(a,b,c);var u=a/b;64E6<a*b&&(b=Math.sqrt(64E6/u),e=u*b/a,a=u*b);u=null;for("undefined"===typeof d&&(d=.25);null===f;){var u=
this.hl(Math.ceil(a*e),Math.ceil(b*e),c,u),r=u.getContext("2d");r.fillStyle="white";r.fillRect(u.width-1,u.height-1,1,1);r=!(1>window.devicePixelRatio)&&(u.width<parseFloat(u.style.width)||u.height<parseFloat(u.style.height));if(null!==u&&0<this.UN(u)&&!r)f=u;else if(e-=d,0>=e)return console.error("No canvas could be created"),null}1>e&&(a="scale("+g/parseFloat(f.style.width)+")",$(f).css({transform:a,"transform-origin":"top left","ms-transform":a,"ms-transform-origin":"top left","-moz-transform":a,
"-moz-transform-origin":"top left","-webkit-transform-origin":"top left","-webkit-transform":a,"-o-transform":a,"-o-transform-origin":"top left"}));$(f).css("position","absolute");f.getContext("2d").clearRect(f.width-1,f.height-1,1,1);return f},UN:function(a){return a.getContext("2d").getImageData(a.width-1,a.height-1,1,1).data[3]},zq:function(a,b,c){if(!a)throw Error("Canvas not defined");b=b||a.width;c=c||a.height;a.getContext("2d").clearRect(0,0,b,c)},vH:function(b,c,d,e,f,g){if(b!==this.Bh)throw Error("Canvas drawing error");
var p=this.pc.av(c,this.uk,this.Ao);b=p.gh;this.Bn(b,parseFloat(this.Bh.style.width),parseFloat(this.Bh.style.height));p=p.Oi.sort(function(a,b){return a-b});c<=p[0]&&(b.width=b.width);c=a.utils.getCanvasMultiplier();d=a.Dd(d,e,g,f,!0,c);e=b.getContext("2d");e.save();e.transform(d.m_a,d.m_b,d.m_c,d.m_d,d.m_h,d.m_v);e.fillStyle="white";e.fillRect(0,0,g.width,g.height);e.restore();e.drawImage(this.Bh,0,0);this.bz();return b},Zo:function(b,c,d,e,f,q,p){if(p)return g.Zo.apply(g,arguments);this.Bn(this.Bh,
a.innerWidth,a.innerHeight);var u=a.utils.getCanvasMultiplier(),u=a.Dd(c,d,b,e,!0,u),r=this.Bh.getContext("2d");r.restore();r.save();r.transform(u.m_a,u.m_b,u.m_c,u.m_d,u.m_h,u.m_v);a.utils.canvasClipBug||(r.beginPath(),r.rect(0,0,b.width,b.height),r.clip());return{canvas:this.Bh,ctx:r,t:u}},qq:function(a,b){var c=document.getElementById("pageContainer"+b);if(!c)return null;var d=$(a);d.css({"z-index":"20"});d.addClass("hacc canvas"+b);return c.parentNode},cO:function(a,b,c,d){a=d?this.Jn.av(a,this.uk,
this.Ao):this.Jn.AR(a,this.uk,this.Ao);if(!a)return null;d=d?a.gh:a.ew;this.Bn(d,b,c);return d},$o:function(b,c,d,e,f,g,p){g=b[0].getContext("2d");g.restore();g.save();var u=a.utils.getCanvasMultiplier();if(1===p||3===p)c={width:c.height,height:c.width};d=a.Dd(d,(e+p||0)%4,c,f,!0,u);g.setTransform(d.m_a,d.m_b,d.m_c,d.m_d,d.m_h,d.m_v);a.utils.canvasClipBug||(g.beginPath(),g.rect(0,0,c.width,c.height),g.clip());return b[0]},dk:function(a,b,c,d,e,f,g){a=$("#pageContainer"+a).parent().find(".auxiliary");
return 0===a.length?null:this.$o(a,b,c,d,e,f,g)},Sn:function(b,c,d,e,f){var g=a.innerWidth,p=this.cO(b,g,a.innerHeight,f);if(!p)return null;b=$(p);b.addClass("auxiliary");b.css({"z-index":"30",position:"absolute",display:""});f=p.getContext("2d");d*=parseFloat(p.style.width)/g;g=a.utils.getCanvasMultiplier();c=a.Dd(d,e,c,null,!0,g);f.transform(c.m_a,c.m_b,c.m_c,c.m_d,c.m_h,c.m_v);return b[0]},iu:function(a,b,d,e){var f=document.getElementById("pageContainer"+a);if(!f)return null;f=$(f).parent();0<
f.find(".auxiliary").length?(b=this.Jn.av(a,this.uk,this.Ao),d=b.Oi.sort(function(a,b){return a-b}),a<=d[0]&&c(b.gh)):(a=this.Sn(a,b,d,e,!0),f.append(a))},uw:function(b,c,d){if(b=document.querySelector("#pageContainer"+b).parentNode.querySelector(".auxiliary"))a.o.za.zq(b,d.width,d.height),d=b.getContext("2d"),d.setTransform(1,0,0,1,0,0),d.drawImage(c,0,0)},dI:function(a){return $("#pageContainer"+a).parent()},KA:function(a){return $("#pageWidgetContainer"+a)}};var d=new f,g=new f;$.extend(g,{Ek:!0,
wK:function(a){this.Ek=1<a},init:function(){this.zl={}},Zy:function(a){this.zl[a]&&(this.zl[a].width=0,this.zl[a].height=0);delete this.zl[a]},fk:function(a){return a},Rw:function(){},bz:function(){},Hw:function(){},Mo:function(){},Pr:function(){},zq:function(a){if(!a)throw Error("Canvas not defined");var b=a.getContext("2d");b.save();b.setTransform(1,0,0,1,0,0);b.clearRect(0,0,a.width,a.height);b.restore()},vH:function(a){return a},Zo:function(b,c,d,e,f,g){var p=!1;if(d===a.o.La.Ce||d===a.o.La.zf)p=
!0;(e=!_.isUndefined(g))?(f=(p?g.y2-g.y1:g.x2-g.x1)*c,p=(p?g.x2-g.x1:g.y2-g.y1)*c):(f=p?b.height*c:b.width*c,p=p?b.width*c:b.height*c);var u,p=this.hl(f,p,c);u=parseFloat(p.style.width);var r=a.utils.getCanvasMultiplier();b=a.Dd(u/f*c,d,e?g:b,{x:0,y:0},!0,r);c=p.getContext("2d");a.Oz||(p.style.backgroundColor="white");c.transform(b.m_a,b.m_b,b.m_c,b.m_d,b.m_h,b.m_v);return{canvas:p,ctx:c,t:b}},qq:function(a,b){var c=document.getElementById("pageContainer"+b);if(!c)return null;$(c).find(".canvas"+
b).remove();var d=a.z0,e=$(a);e.css({"z-index":"20",position:"absolute"});e.addClass("hacc canvas"+b);_.isUndefined(d)||e.css("top",function(a){return a*d});$(c).append(e);return c},rE:function(a){return{width:a.x2-a.x1,height:a.y2-a.y1}},VE:function(b,c){var d=!1;if(c===a.o.La.Ce||c===a.o.La.zf)d=!0;return{width:d?b.height:b.width,height:d?b.width:b.height}},$o:function(b,c,d,e,f,g,p){if(g){var u=b[0].getContext("2d");u.restore();u.save();var r=a.utils.getCanvasMultiplier(),v=this.VE(this.rE(g),
e),w=Math.round(v.width*d),v=Math.round(v.height*d),z=Math.round(parseFloat(b.css("width"))),C=Math.round(parseFloat(b.css("height")));b.css({left:f.x,top:f.y});(1<Math.abs(z-w)||1<Math.abs(C-v))&&b.attr({width:w*r,height:v*r}).css({width:w,height:v});if(g&&p){f=c.width;w=c.height;if(1===p||3===p)f=c.height,w=c.width;c=a.Dd(1,p,{width:f,height:w},null,!1).inverse();g=a.utils.normalizeRect(c.W({x:g.x1,y:g.y1}),c.W({x:g.x2,y:g.y2}))}d=a.Dd(d,(e+(p||0))%4,g,null,!0,r);u.setTransform(d.m_a,d.m_b,d.m_c,
d.m_d,d.m_h,d.m_v)}else b.css({top:"",left:""});return b[0]},dk:function(a,b,c,d,e,f,g){a=$("#pageContainer"+a).find(".auxiliary");return 0<a.length?this.$o(a,b,c,d,e,f,g):null},Sn:function(b,c,d,e,f,g){var p;f?(p=this.rE(f),f=p.width,p=p.height):(f=c.width,p=c.height);p=this.VE({width:f,height:p},e);f=p.width*d;var u=p.height*d;!g&&this.zl[b]?(p=this.zl[b],this.Bn(p,f,u),p.getContext("2d").setTransform(1,0,0,1,0,0)):p=this.PN(f,u,d,.2);g||(this.zl[b]=p);b=$(p);b.addClass("auxiliary");b.css({"z-index":"30",
position:"absolute"});b=p.getContext("2d");b.clearRect(0,0,p.width,p.height);c=a.Dd(parseFloat(p.style.width)/f*d,e,c);b.transform(c.m_a,c.m_b,c.m_c,c.m_d,c.m_h,c.m_v);return p},iu:function(a,b,c,d,e){var f=document.getElementById("pageContainer"+a);if(!f)return null;f=$(f);0<f.find(".auxiliary").length||(a=this.Sn(a,b,c,d,e,!0),f.prepend(a))},uw:function(b,c){var d=document.querySelector("#pageContainer"+b+" .auxiliary");d&&(a.o.za.zq(d),d.width=c.width,d.height=c.height,d.style.width=c.style.width,
d.style.height=c.style.height,d.style.top=c.style.top,d.style.left=c.style.left,d=d.getContext("2d"),d.setTransform(1,0,0,1,0,0),d.drawImage(c,0,0))},dI:function(a){return $("#pageContainer"+a)},KA:function(a){return $("#pageWidgetContainer"+a)}});a.o.nN=function(c){if(c===b.Us)a.o.za=d;else if(c===b.Jx)a.o.za=g;else throw Error("Invalid Canvas Manager type");a.o.dG=c;a.o.za.init()};a.o.Qm=b;a.o.dG=b.Jx;a.o.za=g;a.o.za.init()})(window);
(function(a){function f(b,d,f,k){for(var h=d.password||d.p,l=d.type.toUpperCase(),n=e.length,m,q=0;q<n;q++)e[q].done&&(m=e[q]);!m&&4>n&&(m={done:!1,worker:new Worker(a.o.yi()+"DecryptWorker.js"),callback:k},e[n]=m,m.worker.addEventListener("message",function(a){if(a.data.error)throw d.error&&d.error(a.data.error),Error(a.data.error);m.callback(a.data);0<c.length?(a=c[0],c.shift(),m.done=!1,m.callback=a.callback,m.worker.postMessage({data:a.data,password:a.password,partName:a.nm,type:l})):(m.callback=
null,m.done=!0)}));m?(m.done=!1,m.callback=k,m.worker.postMessage({data:b,password:h,partName:f,type:l})):c.push({data:b,password:h,nm:f,type:l,callback:k})}var e=[],c=[];a.o=a.o||{};a.o.Nh=a.o.Nh||{};a.o.Nh.decrypt=function(b,c,e,k){b=a.ek(b);f(b,c,e,k)};a.o.Nh.lG=function(b,c,e){b=a.ek(b);var f=c.password||c.p;switch(c.type.toUpperCase()){case "AES":b=a.kG(b,f,e);break;default:b=a.kG(b,f,e)}if(b.error)throw c.error&&c.error(b.error),Error(b.error);return b}})(window);
(function(a){a.kG=function(a,e,c){for(var b=[],d=0;16>d;++d){b[d]=d;d<e.length&&(b[d]|=e.charCodeAt(d));var g=c.length+d-16;0<=g&&(b[d]|=c.charCodeAt(g))}e=[];for(c=0;16>c;++c)e.push(a.charCodeAt(c));a=a.slice(16);b=forge.aes.startDecrypting(b,e);b.update(forge.util.createBuffer(a));return b.finish()?b.output.data:{error:"Bad password or file corrupt"}}})(self);
(function(a){var f,e,c,b={},d=a.o;d.GW=function(a){a.lastIndexOf("/")!==a.length-1&&(a+="/");e=a};d.pA=function(){return e||d.yi()+"office/"};d.FW=function(a){a.lastIndexOf("/")!==a.length-1&&(a+="/");c=a};d.ZR=function(){return c||d.yi()+"office/"};d.Zz=function(){return b.tq};d.HJ=function(e,k,h){_.isUndefined(h)&&(h={});d.Ff().Fr&&e===d.Zz()||(h.workerId="office_pnacl_module",h.pnaclWorkerPath=window.o.pA()+(a.Vw?"WebOfficeWorkerSubzero.nmf":"WebOfficeWorker.nmf"),h.emsWorkerPath=window.o.pA()+
"OfficeWorker.js",h.externalPath=window.o.dA(),h.QC=b,c&&(h.pdfWorkerPath=c),f=d.JJ(e,k,h))};d.EV=function(a){f=Promise.resolve(a);d.Tw({office:null})};d.BI=function(){};d.uI=function(b,c,e){f||d.Ff().Fr||d.HJ(b,c);d.Yu()||d.EK(e);e=e||d.Yu();if(!d.Ff().Fr){var l;b=Promise.all([d.BH(e),f]).then(function(b){var c=b[0],e=b[1];return new Promise(function(b,f){d.aP(function(){f(new a.cl("The worker has encountered an error",a.utils.ie?"error.EmsWorkerErrorIE":"error.EmsWorkerError"))});l=new d.HM(e,d.pS(),
{l:c});l.PC.then(function(){b(l)},function(a){f(a)})})});d.Tw({office:b})}return d.Ff().Fr}})("undefined"===typeof window?this:window);
(function(a){a.GetPageMatrix=a.Dd;a.CoreControls=function(){};a.CoreControls.setWorkerPath=a.o.jX;a.CoreControls.getWorkerPath=a.o.yi;a.CoreControls.setPDFWorkerPath=a.o.JW;a.CoreControls.getPDFWorkerPath=a.o.qA;a.CoreControls.setPDFResourcePath=a.o.IW;a.CoreControls.getPDFResourcePath=a.o.gv;a.CoreControls.setExternalPath=a.o.lW;a.CoreControls.getExternalPath=a.o.dA;a.CoreControls.setPDFAsmPath=a.o.HW;a.CoreControls.getPDFAsmPath=a.o.aS;a.CoreControls.setLocalWorkerPath=a.o.yW;a.CoreControls.getLocalWorkerPath=
a.o.mA;a.CoreControls.setOfficeWorkerPath=a.o.GW;a.CoreControls.getOfficeWorkerPath=a.o.pA;a.CoreControls.setOfficeResourcePath=a.o.FW;a.CoreControls.getOfficeResourcePath=a.o.ZR;a.CoreControls.setResourcesPath=a.o.WW;a.CoreControls.getResourcesPath=a.o.br;a.CoreControls.setAdvancedImageScaling=a.o.$V;a.CoreControls.setProgressiveTime=a.o.TW;a.CoreControls.preloadPDFWorker=a.o.IJ;a.CoreControls.initPDFWorkerTransports=a.o.uv;a.CoreControls.forceBackendType=a.o.aR;a.CoreControls.getDefaultBackendType=
a.o.aA;a.CoreControls.getDefaultPdfBackendType=a.o.aA;a.CoreControls.getCurrentPDFBackendType=a.o.$z;a.CoreControls.getCurrentOfficeBackendType=a.o.Zz;a.CoreControls.resetWorker=a.o.FV;a.CoreControls.resetOfficeWorker=a.o.EV;a.CoreControls.isDemoMode=a.o.BI;a.CoreControls.setEmscriptenHeapSize=a.o.hW;a.CoreControls.setCustomFontURL=a.o.Mw;a.CoreControls.disableEmbeddedJavaScript=a.o.jQ;a.CoreControls.enableSubzero=a.o.KQ;a.CoreControls.isSubzeroEnabled=a.o.KI;a.CoreControls.enableFullPDF=a.o.IQ;a.CoreControls.isFullPDFEnabled=
a.o.Hi;a.CoreControls.preloadOfficeWorker=a.o.HJ;a.CoreControls.initOfficeWorkerTransports=a.o.uI;a.CoreControls.setWorkerTransportPromise=a.o.Tw;a.CoreControls.BlackBoxAnnotationManager=a.o.Om;a.CoreControls.BlackBoxAnnotationManager.prototype.initiateCollaboration=a.o.Om.prototype.wT;a.CoreControls.BlackBoxAnnotationManager.prototype.disableCollaboration=a.o.Om.prototype.uz;a.CoreControls.BlackBoxAnnotationManager.prototype.preloadAnnotations=a.o.Om.prototype.fV;a.XODText=XODText;a.XODText.ResultCode=
XODText.lc;a.XODText.ResultCode.e_done=XODText.lc.Il;a.XODText.ResultCode.e_page=XODText.lc.Hu;a.XODText.ResultCode.e_found=XODText.lc.Gq;a.XODText.Quad=XODText.$a;a.XODText.Quad.prototype.getPoints=XODText.$a.prototype.rh;a.XODText.Quad.prototype.getNormalizedPoints=XODText.$a.prototype.XR;a.XODText.Matrix2D=XODText.Matrix2D;a.XODText.Matrix2D.prototype.initMatrix=XODText.Matrix2D.prototype.initMatrix;a.XODText.Matrix2D.prototype.initCoordinates=XODText.Matrix2D.prototype.Ea;a.XODText.Matrix2D.prototype.mult=
XODText.Matrix2D.prototype.W;a.XODText.Point2D=XODText.Fd;a.XODText.SelectionInfo=XODText.ve;a.XODText.SelectionInfo.prototype.parseFromOld=XODText.ve.prototype.Lr;a.CoreControls.Encryption=a.o.Nh;a.CoreControls.Encryption.decrypt=a.o.Nh.decrypt;a.CoreControls.Encryption.decryptSynchronous=a.o.Nh.lG;a.CoreControls.PartRetrievers=function(){};a.CoreControls.PartRetrievers.PartRetriever=a.o.V.lf;a.CoreControls.PartRetrievers.PartRetriever.prototype.setErrorCallback=a.o.V.lf.prototype.jW;a.CoreControls.PartRetrievers.PartRetriever.prototype.setCustomHeaders=
a.o.V.lf.prototype.ym;a.CoreControls.PartRetrievers.PartRetriever.prototype.setWithCredentials=a.o.V.lf.prototype.$r;a.CoreControls.PartRetrievers.CacheHinting=a.o.V.kj;a.CoreControls.PartRetrievers.CacheHinting.NEVER_CACHE=a.o.V.kj.Is;a.CoreControls.PartRetrievers.CacheHinting.CACHE=a.o.V.kj.XC;a.CoreControls.PartRetrievers.CacheHinting.NO_HINT=a.o.V.kj.zM;a.CoreControls.PartRetrievers.LocalPartRetriever=a.o.V.eD;a.CoreControls.PartRetrievers.HttpPartRetriever=a.o.V.Pk;a.CoreControls.PartRetrievers.HttpPartRetriever.prototype.requestDocument=
a.o.V.lf.prototype.sm;a.CoreControls.PartRetrievers.HttpPartRetriever.prototype.request=a.o.V.lf.prototype.request;a.CoreControls.PartRetrievers.ExternalHttpPartRetriever=a.o.V.Dx;a.CoreControls.PartRetrievers.ExternalPdfPartRetriever=a.o.V.Es;a.CoreControls.PartRetrievers.ExternalPdfPartRetriever.prototype.setCustomHeaders=a.o.V.Es.prototype.ym;a.CoreControls.PartRetrievers.ExternalPdfPartRetriever.prototype.getFileData=a.o.V.Es.prototype.getFileData;a.CoreControls.PartRetrievers.ArrayBufferPdfPartRetriever=
a.o.V.UL;a.CoreControls.PartRetrievers.LocalPdfPartRetriever=a.o.V.wM;a.CoreControls.PartRetrievers.StreamingPartRetriever=a.o.V.sD;a.CoreControls.PartRetrievers.RangeStreamingPartRetriever=a.o.V.XM;a.CoreControls.PartRetrievers.BlackBoxPartRetriever=a.o.V.vs;a.CoreControls.PartRetrievers.BlackBoxPartRetriever.prototype.setCustomHeaders=a.o.V.vs.prototype.ym;a.CoreControls.PartRetrievers.BlackBoxPartRetriever.prototype.getFileData=a.o.V.vs.prototype.getFileData;a.CoreControls.PartRetrievers.BlackBoxPartRetriever.prototype.setWithCredentials=
a.o.V.vs.prototype.$r;a.CoreControls.PartRetrievers.WebDBPartRetriever=a.o.V.Mp;a.CoreControls.PartRetrievers.AndroidContentPartRetriever=a.o.V.TL;a.CoreControls.PartRetrievers.AzurePartRetriever=a.o.V.XL;a.CoreControls.PartRetrievers.IOSPartRetriever=a.o.V.Ap;a.CoreControls.PartRetrievers.IOSPartRetriever.partSuccess=a.o.V.Ap.HB;a.CoreControls.PartRetrievers.IOSPartRetriever.partFail=a.o.V.Ap.GB;a.CoreControls.PartRetrievers.WinRTPartRetriever=a.o.V.Np;a.CoreControls.PartRetrievers.WinRTPartRetriever.partSuccess=
a.o.V.Np.HB;a.CoreControls.PartRetrievers.WinRTPartRetriever.partFail=a.o.V.Np.GB;a.CoreControls.CanvasMode=a.o.Qm;a.CoreControls.CanvasMode.ViewportCanvas=a.o.Qm.Us;a.CoreControls.CanvasMode.PageCanvas=a.o.Qm.Jx;a.CoreControls.SetCanvasMode=a.o.nN;a.CoreControls.Bookmark=a.o.df;a.CoreControls.Bookmark.prototype.getName=a.o.df.prototype.getName;a.CoreControls.Bookmark.prototype.getVPos=a.o.df.prototype.PS;a.CoreControls.Bookmark.prototype.getHPos=a.o.df.prototype.HR;a.CoreControls.Bookmark.prototype.getPageNumber=
a.o.df.prototype.rb;a.CoreControls.Bookmark.prototype.getURL=a.o.df.prototype.OS;a.CoreControls.Bookmark.prototype.getParent=a.o.df.prototype.getParent;a.CoreControls.Bookmark.prototype.getChildren=a.o.df.prototype.mH;a.CoreControls.Bookmark.prototype.isValid=a.o.df.prototype.isValid;a.CoreControls.BaseDocument=a.o.jj;a.CoreControls.BaseDocument.prototype.calculateBoundingBox=a.o.jj.prototype.Ln;a.CoreControls.BaseDocument.prototype.addPage=a.o.jj.prototype.EO;a.CoreControls.BaseDocument.prototype.getPage=
a.o.jj.prototype.no;a.PageInfo=a.Sk;a.PageInfo.prototype.setFromPageData=a.Sk.prototype.DK;a.CoreControls.Document=a.o.Document;a.CoreControls.Document.registerDocumentType=a.o.Document.Qr;a.CoreControls.Document.unregisterDocumentType=a.o.Document.SX;a.CoreControls.Document.prototype.getType=a.o.Document.prototype.HA;a.CoreControls.Document.prototype.isWebViewerServerDocument=a.o.Document.prototype.tg;a.CoreControls.Document.prototype.getMetadata=a.o.Document.prototype.getMetadata;a.CoreControls.Document.prototype.getBookmarks=
a.o.Document.prototype.gH;a.CoreControls.Document.prototype.getLayers=a.o.Document.prototype.x_;a.CoreControls.Document.prototype.getLinks=a.o.Document.prototype.lo;a.CoreControls.Document.prototype.loadThumbnailAsync=a.o.Document.prototype.nB;a.CoreControls.Document.prototype.includesThumbnails=a.o.Document.prototype.ik;a.CoreControls.Document.prototype.loadPageText=a.o.Document.prototype.kU;a.CoreControls.Document.prototype.refreshTextData=a.o.Document.prototype.VJ;a.CoreControls.Document.prototype.getTextPosition=
a.o.Document.prototype.GS;a.CoreControls.Document.prototype.extractXFDF=a.o.Document.prototype.Jz;a.CoreControls.Document.prototype.loadCanvasAsync=a.o.Document.prototype.Mv;a.CoreControls.Document.prototype.pauseLoadCanvas=a.o.Document.prototype.kw;a.CoreControls.Document.prototype.resumeLoadCanvas=a.o.Document.prototype.Gw;a.CoreControls.Document.prototype.cancelLoadCanvas=a.o.Document.prototype.bi;a.CoreControls.Document.prototype.cancelLoadThumbnail=a.o.Document.prototype.Tj;a.CoreControls.Document.prototype.unloadCanvasResources=
a.o.Document.prototype.gp;a.CoreControls.Document.prototype.getPageInfo=a.o.Document.prototype.gc;a.CoreControls.Document.prototype.getPageMatrix=a.o.Document.prototype.Dc;a.CoreControls.Document.prototype.getPageCount=a.o.Document.prototype.wb;a.CoreControls.Document.prototype.getPDFCoordinates=a.o.Document.prototype.Ul;a.CoreControls.Document.prototype.getXODCoordinates=a.o.Document.prototype.sv;a.CoreControls.Document.prototype.getViewerCoordinates=a.o.Document.prototype.rv;a.CoreControls.Document.prototype.loadAsync=
a.o.Document.prototype.ur;a.CoreControls.Document.prototype.unloadResources=a.o.Document.prototype.Mb;a.CoreControls.Document.prototype.initOfflineDB=a.o.Document.prototype.Xl;a.CoreControls.Document.prototype.storeOffline=a.o.Document.prototype.ep;a.CoreControls.Document.prototype.isDownloaded=a.o.Document.prototype.jk;a.CoreControls.Document.prototype.getOfflineModeEnabled=a.o.Document.prototype.mo;a.CoreControls.Document.prototype.setOfflineModeEnabled=a.o.Document.prototype.Yo;a.CoreControls.Document.prototype.cancelOfflineModeDownload=
a.o.Document.prototype.Mn;a.CoreControls.Document.prototype.getPrintablePDF=a.o.Document.prototype.qo;a.CoreControls.Document.prototype.getDownloadLink=a.o.Document.prototype.Qq;a.CoreControls.Document.prototype.submitRedactions=a.o.Document.prototype.bs;a.CoreControls.Document.prototype.getFileData=a.o.Document.prototype.getFileData;a.CoreControls.Document.prototype.onJSCompletion=a.o.Document.prototype.KU;a.CoreControls.Document.prototype.insertPages=a.o.Document.prototype.Fi;a.CoreControls.Document.prototype.getPDFDoc=
a.o.Document.prototype.mg;a.CoreControls.Document.prototype.getLayersArray=a.o.Document.prototype.si;a.CoreControls.Document.prototype.setLayersArray=a.o.Document.prototype.Am;a.CoreControls.Document.prototype.setOverprintPreviewMode=a.o.Document.prototype.Pw;a.CoreControls.Document.prototype.extractPDFNetLayersContext=a.o.Document.prototype.oi;a.CoreControls.Document.prototype.insertBlankPages=a.o.Document.prototype.ir;a.CoreControls.Document.prototype.removePages=a.o.Document.prototype.Xi;a.CoreControls.Document.prototype.movePages=
a.o.Document.prototype.mk;a.CoreControls.Document.prototype.rotatePages=a.o.Document.prototype.aj;a.CoreControls.Document.prototype.extractPages=a.o.Document.prototype.ih;a.CoreControls.Document.prototype.cropPages=a.o.Document.prototype.ii;a.CoreControls.Document.prototype.print=a.o.Document.prototype.print;a.CoreControls.Document.prototype.documentCompletePromise=a.o.Document.prototype.bc;a.CoreControls.Document.prototype.setWatermark=a.o.Document.prototype.Dm;a.CoreControls.Document.prototype.requirePage=
a.o.Document.prototype.um;a.CoreControls.Document.prototype.supportsExtraSelectorPositioning=a.o.Document.prototype.Ak;a.CoreControls.Document.prototype.getOfficeDocInfo=a.o.Document.prototype.y_;a.CoreControls.Document.prototype.getOfficeResources=a.o.Document.prototype.z_;a.CoreControls.Document.prototype.enableColorSeparations=a.o.Document.prototype.Ju;a.CoreControls.Document.prototype.getColorSeparations=a.o.Document.prototype.Xu;a.CoreControls.Document.prototype.enableSeparation=a.o.Document.prototype.Ku;
a.CoreControls.Document.prototype.isLinearized=a.o.Document.prototype.KT;a.CoreControls.PageRotation=a.o.La;a.CoreControls.PageRotation.e_0=a.o.La.ni;a.CoreControls.PageRotation.e_90=a.o.La.Ce;a.CoreControls.PageRotation.e_180=a.o.La.ao;a.CoreControls.PageRotation.e_270=a.o.La.zf;a.CoreControls.OverprintPreviewMode=a.o.Ep;a.CoreControls.OverprintPreviewMode.OFF=a.o.Ep.BM;a.CoreControls.OverprintPreviewMode.ON=a.o.Ep.DM;a.CoreControls.OverprintPreviewMode.PDFX_ON=a.o.Ep.VM;a.CoreControls.SaveOptions=
a.o.Xk;a.CoreControls.SaveOptions.INCREMENTAL=a.o.Xk.qM;a.CoreControls.SaveOptions.REMOVE_UNUSED=a.o.Xk.WM;a.CoreControls.SaveOptions.HEX_STRINGS=a.o.Xk.lM;a.CoreControls.SaveOptions.OMIT_XREF=a.o.Xk.CM;a.CoreControls.SaveOptions.LINEARIZED=a.o.Xk.vM;a.CoreControls.SaveOptions.COMPATIBILITY=a.o.Xk.YL;a.CoreControls.DocumentViewer=a.o.aa;a.CoreControls.DocumentViewer.prototype.loadAsync=a.o.aa.prototype.ur;a.CoreControls.DocumentViewer.prototype.dispose=a.o.aa.prototype.ed;a.CoreControls.DocumentViewer.prototype.FitMode=
function(){};a.CoreControls.DocumentViewer.prototype.FitMode.FitWidth=a.o.aa.prototype.Og.cD;a.CoreControls.DocumentViewer.prototype.FitMode.FitPage=a.o.aa.prototype.Og.Gx;a.CoreControls.DocumentViewer.prototype.FitMode.Zoom=a.o.aa.prototype.Og.Zoom;a.CoreControls.DocumentViewer.prototype.displayLastPage=a.o.aa.prototype.pQ;a.CoreControls.DocumentViewer.prototype.displayFirstPage=a.o.aa.prototype.oQ;a.CoreControls.DocumentViewer.prototype.setCurrentPage=a.o.aa.prototype.Ke;a.CoreControls.DocumentViewer.prototype.getCurrentPage=
a.o.aa.prototype.Pl;a.CoreControls.DocumentViewer.prototype.setRightToLeftPages=a.o.aa.prototype.XW;a.CoreControls.DocumentViewer.prototype.getRightToLeftPages=a.o.aa.prototype.AA;a.CoreControls.DocumentViewer.prototype.getZoom=a.o.aa.prototype.Ze;a.CoreControls.DocumentViewer.prototype.getPageCount=a.o.aa.prototype.wb;a.CoreControls.DocumentViewer.prototype.setFitMode=a.o.aa.prototype.jC;a.CoreControls.DocumentViewer.prototype.getFitMode=a.o.aa.prototype.CR;a.CoreControls.DocumentViewer.prototype.zoomTo=
a.o.aa.prototype.ox;a.CoreControls.DocumentViewer.prototype.zoomToMouse=a.o.aa.prototype.SL;a.CoreControls.DocumentViewer.prototype.setToolMode=a.o.aa.prototype.qC;a.CoreControls.DocumentViewer.prototype.getToolMode=a.o.aa.prototype.nv;a.CoreControls.DocumentViewer.prototype.getToolModeMap=a.o.aa.prototype.KS;a.CoreControls.DocumentViewer.prototype.getTool=a.o.aa.prototype.mv;a.CoreControls.DocumentViewer.prototype.rotateClockwise=a.o.aa.prototype.KV;a.CoreControls.DocumentViewer.prototype.rotateCounterClockwise=
a.o.aa.prototype.LV;a.CoreControls.DocumentViewer.prototype.textSearchInit=a.o.aa.prototype.DC;a.CoreControls.DocumentViewer.prototype.SearchMode=function(){};a.CoreControls.DocumentViewer.prototype.SearchMode.e_case_sensitive=XODText.gb.BG;a.CoreControls.DocumentViewer.prototype.SearchMode.e_whole_word=XODText.gb.FG;a.CoreControls.DocumentViewer.prototype.SearchMode.e_search_up=XODText.gb.Ez;a.CoreControls.DocumentViewer.prototype.SearchMode.e_page_stop=XODText.gb.DG;a.CoreControls.DocumentViewer.prototype.SearchMode.e_highlight=
XODText.gb.CG;a.CoreControls.DocumentViewer.prototype.SearchMode.e_ambient_string=XODText.gb.AG;a.CoreControls.DocumentViewer.prototype.SearchMode.e_wild_card=XODText.gb.GG;a.CoreControls.DocumentViewer.prototype.SearchMode.e_regex=XODText.gb.EG;a.CoreControls.DocumentViewer.prototype.displayBookmark=a.o.aa.prototype.nQ;a.CoreControls.DocumentViewer.prototype.displayPageLocation=a.o.aa.prototype.Un;a.CoreControls.DocumentViewer.prototype.getDocument=a.o.aa.prototype.getDocument;a.CoreControls.DocumentViewer.prototype.getSelectedText=
a.o.aa.prototype.lv;a.CoreControls.DocumentViewer.prototype.getSelectedTextQuads=a.o.aa.prototype.CA;a.CoreControls.DocumentViewer.prototype.setTextHighlightColor=a.o.aa.prototype.dX;a.CoreControls.DocumentViewer.prototype.setSearchHighlightColors=a.o.aa.prototype.ZW;a.CoreControls.DocumentViewer.prototype.displaySearchResult=a.o.aa.prototype.wz;a.CoreControls.DocumentViewer.prototype.displayAdditionalSearchResult=a.o.aa.prototype.mQ;a.CoreControls.DocumentViewer.prototype.setActiveSearchResult=a.o.aa.prototype.ZV;
a.CoreControls.DocumentViewer.prototype.clearSearchResults=a.o.aa.prototype.BP;a.CoreControls.DocumentViewer.prototype.getColorSeparationsAtPoint=a.o.aa.prototype.rR;a.CoreControls.DocumentViewer.prototype.scrollViewUpdated=a.o.aa.prototype.UV;a.CoreControls.DocumentViewer.prototype.closeDocument=a.o.aa.prototype.TF;a.CoreControls.DocumentViewer.prototype.setOptions=a.o.aa.prototype.pe;a.CoreControls.DocumentViewer.prototype.recalculateLayout=a.o.aa.prototype.PJ;a.CoreControls.DocumentViewer.prototype.refreshAll=
a.o.aa.prototype.rV;a.CoreControls.DocumentViewer.prototype.refreshPage=a.o.aa.prototype.SJ;a.CoreControls.DocumentViewer.prototype.getAnnotationsLoadedPromise=a.o.aa.prototype.jR;a.CoreControls.DocumentViewer.prototype.printCurrentDocument=a.o.aa.prototype.r0;a.CoreControls.DocumentViewer.prototype.getRenderingPipeline=a.o.aa.prototype.QH;a.CoreControls.DocumentViewer.prototype.setWatermark=a.o.aa.prototype.Dm;a.CoreControls.DocumentViewer.prototype.getWatermark=a.o.aa.prototype.aI;a.CoreControls.DocumentViewer.prototype.getViewer=
a.o.aa.prototype.Vc;a.CoreControls.DocumentViewer.prototype.getViewerElement=a.o.aa.prototype.$H;a.CoreControls.DocumentViewer.prototype.setViewerElement=a.o.aa.prototype.UK;a.CoreControls.DocumentViewer.prototype.getScrollView=a.o.aa.prototype.yb;a.CoreControls.DocumentViewer.prototype.getScrollViewElement=a.o.aa.prototype.iv;a.CoreControls.DocumentViewer.prototype.setScrollViewElement=a.o.aa.prototype.QK;a.CoreControls.RenderingPipeline=a.o.$m;a.CoreControls.RenderingPipeline.PipelineManager=a.o.$m.Hp;
a.CoreControls.RenderingPipeline.PipelineManager.prototype.registerHandlers=a.o.$m.Hp.prototype.WJ;a.CoreControls.RenderingPipeline.PipelineManager.prototype.pushChange=a.o.$m.Hp.prototype.Ui;a.CoreControls.RenderingPipeline.PipelineManager.prototype.hasPipeline=a.o.$m.Hp.prototype.bT;a.CoreControls.SetCachingLevel=a.o.Px;a.CoreControls.SetPreRenderLevel=a.o.oD;a.CoreControls.DocumentViewer.prototype.getMargin=a.o.aa.prototype.dv;a.CoreControls.DocumentViewer.prototype.setMargin=a.o.aa.prototype.zW;
a.CoreControls.DocumentViewer.prototype.updateView=a.o.aa.prototype.Ck;a.CoreControls.DocumentViewer.prototype.updateVisiblePages=a.o.aa.prototype.ip;a.CoreControls.DocumentViewer.prototype.stopPageRender=a.o.aa.prototype.cp;a.CoreControls.DocumentViewer.prototype.setPagesPerCanvas=a.o.aa.prototype.Rw;a.CoreControls.DocumentViewer.prototype.returnCanvas=a.o.aa.prototype.Hw;a.CoreControls.DocumentViewer.prototype.drawSelection=a.o.aa.prototype.Cz;a.CoreControls.DocumentViewer.prototype.clearSelection=
a.o.aa.prototype.Bq;a.CoreControls.DocumentViewer.prototype.removeContent=a.o.aa.prototype.Ch;a.CoreControls.DocumentViewer.prototype.select=a.o.aa.prototype.select;a.CoreControls.DocumentViewer.prototype.getPageHeight=a.o.aa.prototype.jd;a.CoreControls.DocumentViewer.prototype.getPageWidth=a.o.aa.prototype.kd;a.CoreControls.DocumentViewer.prototype.setPageZoom=a.o.aa.prototype.Qw;a.CoreControls.DocumentViewer.prototype.getPageZoom=a.o.aa.prototype.sb;a.CoreControls.DocumentViewer.prototype.getRotation=
a.o.aa.prototype.je;a.CoreControls.DocumentViewer.prototype.setRotation=a.o.aa.prototype.YW;a.CoreControls.DocumentViewer.prototype.getCompleteRotation=a.o.aa.prototype.gd;a.CoreControls.DocumentViewer.prototype.getPageRotations=a.o.aa.prototype.gS;a.CoreControls.DocumentViewer.prototype.setPageRotations=a.o.aa.prototype.LW;a.CoreControls.DocumentViewer.prototype.getAnnotationManager=a.o.aa.prototype.Ba;a.CoreControls.DocumentViewer.prototype.setAnnotationImportOptions=a.o.aa.prototype.bW;a.CoreControls.DocumentViewer.prototype.setInternalAnnotationsTransform=
a.o.aa.prototype.rW;a.CoreControls.DocumentViewer.prototype.setPagesUpdatedInternalAnnotationsTransform=a.o.aa.prototype.QW;a.CoreControls.DocumentViewer.prototype.setLoadAnnotationsFromVisiblePages=a.o.aa.prototype.xW;a.CoreControls.DocumentViewer.prototype.setPageVisibilityCallback=a.o.aa.prototype.PW;a.CoreControls.DocumentViewer.prototype.getDisplayModeManager=a.o.aa.prototype.Sl;a.CoreControls.DocumentViewer.prototype.snapToNearest=a.o.aa.prototype.uX;a.CoreControls.DocumentViewer.prototype.setViewportRenderMode=
a.o.aa.prototype.sC;a.CoreControls.DocumentViewer.prototype.getViewportRegionRect=a.o.aa.prototype.QS;a.CoreControls.DocumentViewer.prototype.setRenderBatchSize=a.o.aa.prototype.OK;a.CoreControls.DisplayMode=a.o.Cd;a.CoreControls.DisplayMode.prototype.setParameters=a.o.Cd.prototype.RW;a.CoreControls.DisplayMode.prototype.isContinuous=a.o.Cd.prototype.ZA;a.CoreControls.DisplayMode.prototype.windowToPage=a.o.Cd.prototype.Fk;a.CoreControls.DisplayMode.prototype.windowToPageNoRotate=a.o.Cd.prototype.qY;
a.CoreControls.DisplayMode.prototype.pageToWindow=a.o.Cd.prototype.cf;a.CoreControls.DisplayMode.prototype.pageToWindowNoRotate=a.o.Cd.prototype.RU;a.CoreControls.DisplayMode.prototype.getSelectedPages=a.o.Cd.prototype.kv;a.CoreControls.DisplayMode.prototype.getVisiblePages=a.o.Cd.prototype.Td;a.CoreControls.DisplayMode.prototype.getPageTransform=a.o.Cd.prototype.po;a.CoreControls.DisplayMode.prototype.getPageOffset=a.o.Cd.prototype.sA;a.CoreControls.DisplayMode.prototype.createPageSections=a.o.Cd.prototype.VZ;
a.CoreControls.DisplayMode.prototype.setCustomFunctions=a.o.Cd.prototype.gW;a.CoreControls.DisplayModes=a.o.ae;a.CoreControls.DisplayModes.Single=a.o.ae.pD;a.CoreControls.DisplayModes.Continuous=a.o.ae.tp;a.CoreControls.DisplayModes.Facing=a.o.ae.aD;a.CoreControls.DisplayModes.FacingContinuous=a.o.ae.Fx;a.CoreControls.DisplayModes.Cover=a.o.ae.ys;a.CoreControls.DisplayModes.CoverFacing=a.o.ae.zs;a.CoreControls.DisplayModes.Custom=a.o.ae.Mg;a.CoreControls.DisplayModeManager=a.o.xp;a.CoreControls.DisplayModeManager.prototype.setDisplayMode=
a.o.xp.prototype.AK;a.CoreControls.DisplayModeManager.prototype.getDisplayMode=a.o.xp.prototype.ec;a.CoreControls.AnnotationManager=a.o.ga;a.CoreControls.AnnotationManager.prototype.addAnnotation=a.o.ga.prototype.bh;a.CoreControls.AnnotationManager.prototype.addAnnotations=a.o.ga.prototype.dh;a.CoreControls.AnnotationManager.prototype.deleteAnnotation=a.o.ga.prototype.Od;a.CoreControls.AnnotationManager.prototype.deleteAnnotations=a.o.ga.prototype.zu;a.CoreControls.AnnotationManager.prototype.applyRedactions=
a.o.ga.prototype.Py;a.CoreControls.AnnotationManager.prototype.isApplyRedactionEnabled=a.o.ga.prototype.XA;a.CoreControls.AnnotationManager.prototype.isCreateRedactionEnabled=a.o.ga.prototype.FT;a.CoreControls.AnnotationManager.prototype.isAnnotationRedactable=a.o.ga.prototype.DT;a.CoreControls.AnnotationManager.prototype.enableRedaction=a.o.ga.prototype.JQ;a.CoreControls.AnnotationManager.prototype.selectAnnotation=a.o.ga.prototype.vm;a.CoreControls.AnnotationManager.prototype.selectAnnotations=
a.o.ga.prototype.Iw;a.CoreControls.AnnotationManager.prototype.deselectAnnotation=a.o.ga.prototype.Fl;a.CoreControls.AnnotationManager.prototype.deselectAllAnnotations=a.o.ga.prototype.Pd;a.CoreControls.AnnotationManager.prototype.isAnnotationSelected=a.o.ga.prototype.Gi;a.CoreControls.AnnotationManager.prototype.getSelectedAnnotations=a.o.ga.prototype.Fe;a.CoreControls.AnnotationManager.prototype.updateCopiedAnnotations=a.o.ga.prototype.XX;a.CoreControls.AnnotationManager.prototype.pasteCopiedAnnotations=
a.o.ga.prototype.$U;a.CoreControls.AnnotationManager.prototype.getAnnotationCopy=a.o.ga.prototype.Tz;a.CoreControls.AnnotationManager.prototype.drawAnnotations=a.o.ga.prototype.Qd;a.CoreControls.AnnotationManager.prototype.redrawAnnotation=a.o.ga.prototype.Kb;a.CoreControls.AnnotationManager.prototype.drawAnnotationsFromList=a.o.ga.prototype.ki;a.CoreControls.AnnotationManager.prototype.updateAnnotation=a.o.ga.prototype.yL;a.CoreControls.AnnotationManager.prototype.jumpToAnnotation=a.o.ga.prototype.aU;
a.CoreControls.AnnotationManager.prototype.hasAnnotation=a.o.ga.prototype.Bi;a.CoreControls.AnnotationManager.prototype.getAnnotationsList=a.o.ga.prototype.Bc;a.CoreControls.AnnotationManager.prototype.setNoteContents=a.o.ga.prototype.lC;a.CoreControls.AnnotationManager.prototype.getCurrentUser=a.o.ga.prototype.Ql;a.CoreControls.AnnotationManager.prototype.setCurrentUser=a.o.ga.prototype.iC;a.CoreControls.AnnotationManager.prototype.getIsAdminUser=a.o.ga.prototype.NR;a.CoreControls.AnnotationManager.prototype.setIsAdminUser=
a.o.ga.prototype.sW;a.CoreControls.AnnotationManager.prototype.setReadOnly=a.o.ga.prototype.UW;a.CoreControls.AnnotationManager.prototype.getReadOnly=a.o.ga.prototype.PH;a.CoreControls.AnnotationManager.prototype.canModify=a.o.ga.prototype.Rc;a.CoreControls.AnnotationManager.prototype.canModifyContents=a.o.ga.prototype.Uy;a.CoreControls.AnnotationManager.prototype.setPermissionCheckCallback=a.o.ga.prototype.SW;a.CoreControls.AnnotationManager.prototype.setSubmitFormActionCallback=a.o.ga.prototype.cX;
a.CoreControls.AnnotationManager.prototype.getAnnotCommand=a.o.ga.prototype.Vu;a.CoreControls.AnnotationManager.prototype.importAnnotCommand=a.o.ga.prototype.zo;a.CoreControls.AnnotationManager.prototype.exportAnnotations=a.o.ga.prototype.Nu;a.CoreControls.AnnotationManager.prototype.importAnnotations=a.o.ga.prototype.nT;a.CoreControls.AnnotationManager.prototype.importAnnotationsAsync=a.o.ga.prototype.sI;a.CoreControls.AnnotationManager.prototype.useFreeTextEditing=a.o.ga.prototype.iY;a.CoreControls.AnnotationManager.prototype.disableFreeTextEditing=
a.o.ga.prototype.kQ;a.CoreControls.AnnotationManager.prototype.registerAnnotationType=a.o.ga.prototype.sV;a.CoreControls.AnnotationManager.prototype.deregisterAnnotationType=a.o.ga.prototype.fQ;a.CoreControls.AnnotationManager.prototype.getRegisteredAnnotationTypes=a.o.ga.prototype.vS;a.CoreControls.AnnotationManager.prototype.getAnnotationFromPopup=a.o.ga.prototype.hR;a.CoreControls.AnnotationManager.prototype.getAnnotationByMouseEvent=a.o.ga.prototype.Oq;a.CoreControls.AnnotationManager.prototype.getAnnotationById=
a.o.ga.prototype.Bf;a.CoreControls.AnnotationManager.prototype.getRootAnnotation=a.o.ga.prototype.Vl;a.CoreControls.AnnotationManager.prototype.createAnnotationReply=a.o.ga.prototype.MP;a.CoreControls.AnnotationManager.prototype.hideAnnotation=a.o.ga.prototype.hT;a.CoreControls.AnnotationManager.prototype.hideAnnotations=a.o.ga.prototype.nI;a.CoreControls.AnnotationManager.prototype.showAnnotation=a.o.ga.prototype.qX;a.CoreControls.AnnotationManager.prototype.showAnnotations=a.o.ga.prototype.dL;a.CoreControls.AnnotationManager.prototype.setRedrawThrottle=
a.o.ga.prototype.VW;a.CoreControls.AnnotationManager.prototype.getFieldManager=a.o.ga.prototype.fe;a.CoreControls.AnnotationManager.prototype.getEditBoxManager=a.o.ga.prototype.cA;a.CoreControls.AnnotationManager.prototype.setAnnotationStyles=a.o.ga.prototype.cW;a.CoreControls.AnnotationManager.prototype.setAnnotationDisplayAuthorMap=a.o.ga.prototype.vK;a.CoreControls.AnnotationManager.prototype.getDisplayAuthor=a.o.ga.prototype.xR;a.CoreControls.AnnotationManager.prototype.groupAnnotations=a.o.ga.prototype.US;
a.CoreControls.AnnotationManager.prototype.ungroupAnnotations=a.o.ga.prototype.RX;a.CoreControls.AnnotationManager.prototype.getNumberOfGroups=a.o.ga.prototype.YR;a.CoreControls.AnnotationManager.prototype.getGroupAnnotations=a.o.ga.prototype.jA;a.Actions=a.Actions;a.Actions.GoTo=a.Actions.gf;a.Actions.GoTo.Dest=a.Actions.gf.wp;a.Actions.GoToR=a.Actions.Um;a.Actions.URI=a.Actions.wj;a.Actions.Named=a.Actions.Xm;a.Actions.JavaScript=a.Actions.Wm;a.Actions.ResetForm=a.Actions.Vk;a.Actions.SubmitForm=
a.Actions.$k;a.Actions.Hide=a.Actions.Vm;a.Annotations=a.Annotations;a.Annotations.Color=a.Annotations.Color;a.Annotations.Color.prototype.toHexString=a.Annotations.Color.prototype.toHexString;a.Annotations.Forms=a.Annotations.O;a.Annotations.Forms.FieldManager=a.Annotations.O.Ng;a.Annotations.Forms.FieldManager.prototype.getField=a.Annotations.O.Ng.prototype.Hb;a.Annotations.Forms.FieldManager.prototype.addField=a.Annotations.O.Ng.prototype.cu;a.Annotations.Forms.FieldManager.prototype.forEachField=
a.Annotations.O.Ng.prototype.ho;a.Annotations.Forms.FieldManager.prototype.setAlertHandler=a.Annotations.O.Ng.prototype.aW;a.Annotations.Forms.FieldManager.prototype.getOrCreateField=a.Annotations.O.Ng.prototype.Yq;a.Annotations.Forms.FieldManager.prototype.setCalculationOrder=a.Annotations.O.Ng.prototype.xK;a.Annotations.Forms.Field=a.Annotations.O.ha;a.Annotations.Forms.Field.prototype.getValue=a.Annotations.O.ha.prototype.Wa;a.Annotations.Forms.Field.prototype.setValue=a.Annotations.O.ha.prototype.Lb;
a.Annotations.Forms.Field.prototype.setVisible=a.Annotations.O.ha.prototype.Pf;a.Annotations.Forms.Field.prototype.on=a.Annotations.O.ha.prototype.on;a.Annotations.Forms.Field.prototype.off=a.Annotations.O.ha.prototype.off;a.Annotations.Forms.Field.prototype.trigger=a.Annotations.O.ha.prototype.trigger;a.Annotations.Forms.Field.prototype.getActions=a.Annotations.O.ha.prototype.ck;a.Annotations.Forms.EmbeddedJS=a.Annotations.O.Cx;a.Annotations.Forms.EmbeddedJS.update=a.Annotations.O.Cx.update;a.Annotations.Forms.EmbeddedJS.getFinalKeypressValue=
a.Annotations.O.Cx.ri;a.Annotations.HTMLAnnotation=a.Annotations.HTMLAnnotation;a.Annotations.HTMLAnnotation.prototype.addAction=a.Annotations.HTMLAnnotation.prototype.Nj;a.Annotations.HTMLAnnotation.prototype.getActions=a.Annotations.HTMLAnnotation.prototype.ck;a.Annotations.HTMLAnnotation.prototype.triggerAction=a.Annotations.HTMLAnnotation.prototype.Me;a.Annotations.HTMLAnnotation.prototype.getInnerElement=a.Annotations.HTMLAnnotation.prototype.AH;a.Annotations.HTMLAnnotation.prototype.getElement=
a.Annotations.HTMLAnnotation.prototype.rH;a.Annotations.WidgetAnnotation=a.Annotations.WidgetAnnotation;a.Annotations.WidgetAnnotation.prototype.setValue=a.Annotations.WidgetAnnotation.prototype.Lb;a.Annotations.WidgetAnnotation.prototype.getValue=a.Annotations.WidgetAnnotation.prototype.Wa;a.Annotations.WidgetAnnotation.prototype.addAction=a.Annotations.WidgetAnnotation.prototype.Nj;a.Annotations.WidgetAnnotation.prototype.getField=a.Annotations.WidgetAnnotation.prototype.Hb;a.Annotations.WidgetAnnotation.prototype.setField=
a.Annotations.WidgetAnnotation.prototype.CK;a.Annotations.WidgetAnnotation.prototype.on=a.Annotations.WidgetAnnotation.prototype.on;a.Annotations.WidgetAnnotation.prototype.off=a.Annotations.WidgetAnnotation.prototype.off;a.Annotations.WidgetAnnotation.prototype.trigger=a.Annotations.WidgetAnnotation.prototype.trigger;a.Annotations.WidgetAnnotation.prototype.setValueInternally=a.Annotations.WidgetAnnotation.prototype.Of;a.Annotations.TextWidgetAnnotation=a.Annotations.bl;a.Annotations.ChoiceWidgetAnnotation=
a.Annotations.Lg;a.Annotations.ListWidgetAnnotation=a.Annotations.nj;a.Annotations.ButtonWidgetAnnotation=a.Annotations.sc;a.Annotations.PushButtonWidgetAnnotation=a.Annotations.rj;a.Annotations.CheckButtonWidgetAnnotation=a.Annotations.Lh;a.Annotations.RadioButtonWidgetAnnotation=a.Annotations.Uk;a.Annotations.SignatureWidgetAnnotation=a.Annotations.Xf;a.Annotations.SignatureWidgetAnnotation.prototype.createSignHereElement=a.Annotations.Xf.prototype.SP;a.Annotations.SignatureWidgetAnnotation.prototype.isSignedDigitally=
a.Annotations.Xf.prototype.cB;a.Annotations.SignatureWidgetAnnotation.prototype.isSignedInitially=a.Annotations.Xf.prototype.ST;a.Annotations.Annotation=a.Annotations.Annotation;a.Annotations.Annotation.prototype.getPageNumber=a.Annotations.Annotation.prototype.rb;a.Annotations.Annotation.prototype.setPageNumber=a.Annotations.Annotation.prototype.IK;a.Annotations.Annotation.prototype.getX=a.Annotations.Annotation.prototype.zi;a.Annotations.Annotation.prototype.setX=a.Annotations.Annotation.prototype.VK;
a.Annotations.Annotation.prototype.getY=a.Annotations.Annotation.prototype.Ai;a.Annotations.Annotation.prototype.setY=a.Annotations.Annotation.prototype.WK;a.Annotations.Annotation.prototype.getTop=a.Annotations.Annotation.prototype.ov;a.Annotations.Annotation.prototype.getBottom=a.Annotations.Annotation.prototype.hH;a.Annotations.Annotation.prototype.getLeft=a.Annotations.Annotation.prototype.bv;a.Annotations.Annotation.prototype.getRight=a.Annotations.Annotation.prototype.SH;a.Annotations.Annotation.prototype.getWidth=
a.Annotations.Annotation.prototype.Ca;a.Annotations.Annotation.prototype.setWidth=a.Annotations.Annotation.prototype.tC;a.Annotations.Annotation.prototype.getHeight=a.Annotations.Annotation.prototype.xa;a.Annotations.Annotation.prototype.setHeight=a.Annotations.Annotation.prototype.Wo;a.Annotations.Annotation.prototype.getCustom=a.Annotations.Annotation.prototype.vR;a.Annotations.Annotation.prototype.setCustom=a.Annotations.Annotation.prototype.fW;a.Annotations.Annotation.prototype.draw=a.Annotations.Annotation.prototype.draw;
a.Annotations.Annotation.prototype.serialize=a.Annotations.Annotation.prototype.serialize;a.Annotations.Annotation.prototype.deserialize=a.Annotations.Annotation.prototype.deserialize;a.Annotations.Annotation.prototype.setRect=a.Annotations.Annotation.prototype.Ag;a.Annotations.Annotation.prototype.getRect=a.Annotations.Annotation.prototype.Ec;a.Annotations.Annotation.prototype.getRectPadding=a.Annotations.Annotation.prototype.getRectPadding;a.Annotations.Annotation.prototype.adjustRect=a.Annotations.Annotation.prototype.adjustRect;
a.Annotations.Annotation.prototype.setContents=a.Annotations.Annotation.prototype.Gh;a.Annotations.Annotation.prototype.getContents=a.Annotations.Annotation.prototype.kh;a.Annotations.Annotation.prototype.isReply=a.Annotations.Annotation.prototype.Ii;a.Annotations.Annotation.prototype.isGrouped=a.Annotations.Annotation.prototype.EI;a.Annotations.Annotation.prototype.getReplies=a.Annotations.Annotation.prototype.hv;a.Annotations.Annotation.prototype.isWidget=a.Annotations.Annotation.prototype.kk;a.Annotations.Annotation.prototype.isVisible=
a.Annotations.Annotation.prototype.dm;a.Annotations.Annotation.prototype.getInternal=a.Annotations.Annotation.prototype.MR;a.Annotations.Annotation.prototype.resourcesLoaded=a.Annotations.Annotation.prototype.Ew;a.Annotations.Annotation.prototype.selectionModel=a.Annotations.Annotation.prototype.selectionModel;a.Annotations.Annotation.prototype.elementName=a.Annotations.Annotation.prototype.elementName;a.Annotations.Point=a.Annotations.Point;a.Annotations.Quad=a.Annotations.$a;a.Annotations.Border=
a.Annotations.pp;a.Annotations.Font=a.Annotations.Pg;a.Annotations.Rect=a.Annotations.Rect;a.Annotations.Rect.prototype.getWidth=a.Annotations.Rect.prototype.Ca;a.Annotations.Rect.prototype.getHeight=a.Annotations.Rect.prototype.xa;a.Annotations.Rect.prototype.translate=a.Annotations.Rect.prototype.translate;a.Annotations.Rect.prototype.fitTo=a.Annotations.Rect.prototype.Pu;a.Annotations.Rect.prototype.normalize=a.Annotations.Rect.prototype.normalize;a.Annotations.Rect.prototype.exportNormalize=a.Annotations.Rect.prototype.MG;
a.Annotations.Link=a.Annotations.vd;a.Annotations.PopupAnnotation=a.Annotations.Tk;a.Annotations.PopupAnnotation.prototype.isOpen=a.Annotations.Tk.prototype.isOpen;a.Annotations.PopupAnnotation.prototype.setOpen=a.Annotations.Tk.prototype.HK;a.Annotations.MarkupAnnotation=a.Annotations.sa;a.Annotations.MarkupAnnotation.prototype.setStyles=a.Annotations.sa.prototype.kc;a.Annotations.MarkupAnnotation.prototype.selectionModel=a.Annotations.sa.prototype.selectionModel;a.Annotations.MarkupAnnotation.prototype.getPopup=
a.Annotations.sa.prototype.MH;a.Annotations.MarkupAnnotation.prototype.setPopup=a.Annotations.sa.prototype.KK;a.Annotations.IPathAnnotation=a.Annotations.ud;a.Annotations.IPathAnnotation.prototype.addPathPoint=a.Annotations.ud.prototype.vb;a.Annotations.IPathAnnotation.prototype.setPathPoint=a.Annotations.ud.prototype.Nf;a.Annotations.IPathAnnotation.prototype.getPathPoint=a.Annotations.ud.prototype.wi;a.Annotations.IPathAnnotation.prototype.popPath=a.Annotations.ud.prototype.xk;a.Annotations.IPathAnnotation.prototype.getPath=
a.Annotations.ud.prototype.getPath;a.Annotations.LineAnnotation=a.Annotations.Ed;a.Annotations.LineAnnotation.prototype.setStartPoint=a.Annotations.Ed.prototype.oC;a.Annotations.LineAnnotation.prototype.getStartPoint=a.Annotations.Ed.prototype.XH;a.Annotations.LineAnnotation.prototype.setEndPoint=a.Annotations.Ed.prototype.setEndPoint;a.Annotations.LineAnnotation.prototype.getEndPoint=a.Annotations.Ed.prototype.uH;a.Annotations.LineAnnotation.prototype.setStartStyle=a.Annotations.Ed.prototype.ej;
a.Annotations.LineAnnotation.prototype.getStartStyle=a.Annotations.Ed.prototype.Ye;a.Annotations.LineAnnotation.prototype.setEndStyle=a.Annotations.Ed.prototype.Vo;a.Annotations.LineAnnotation.prototype.getEndStyle=a.Annotations.Ed.prototype.nh;a.Annotations.RectangleAnnotation=a.Annotations.sj;a.Annotations.EllipseAnnotation=a.Annotations.Ok;a.Annotations.FreeHandAnnotation=a.Annotations.FreeHandAnnotation;a.Annotations.FreeHandAnnotation.prototype.addPathPoint=a.Annotations.FreeHandAnnotation.prototype.vb;
a.Annotations.FreeHandAnnotation.prototype.setPathPoint=a.Annotations.FreeHandAnnotation.prototype.Nf;a.Annotations.FreeHandAnnotation.prototype.getPathPoint=a.Annotations.FreeHandAnnotation.prototype.wi;a.Annotations.FreeHandAnnotation.prototype.popPath=a.Annotations.FreeHandAnnotation.prototype.xk;a.Annotations.FreeHandAnnotation.prototype.getPath=a.Annotations.FreeHandAnnotation.prototype.getPath;a.Annotations.FreeHandAnnotation.prototype.setPath=a.Annotations.FreeHandAnnotation.prototype.setPath;
a.Annotations.FreeHandAnnotation.prototype.getPaths=a.Annotations.FreeHandAnnotation.prototype.Ee;a.Annotations.FreeHandAnnotation.prototype.emptyPaths=a.Annotations.FreeHandAnnotation.prototype.IG;a.Annotations.FreeHandAnnotation.prototype.shouldSimplifyPath=a.Annotations.FreeHandAnnotation.prototype.shouldSimplifyPath;a.Annotations.TextMarkupAnnotation=a.Annotations.Cb;a.Annotations.TextMarkupAnnotation.prototype.setQuads=a.Annotations.Cb.prototype.Sw;a.Annotations.TextMarkupAnnotation.prototype.getQuads=
a.Annotations.Cb.prototype.he;a.Annotations.TextMarkupAnnotation.SurroundingTexts=a.Annotations.Cb.dZ;a.Annotations.TextMarkupAnnotation.TextIndices=a.Annotations.Cb.eZ;a.Annotations.TextHighlightAnnotation=a.Annotations.Qh;a.Annotations.TextUnderlineAnnotation=a.Annotations.en;a.Annotations.TextStrikeoutAnnotation=a.Annotations.dn;a.Annotations.TextSquigglyAnnotation=a.Annotations.cn;a.Annotations.CaretAnnotation=a.Annotations.sp;a.Annotations.StickyAnnotation=a.Annotations.Zk;a.Annotations.StampAnnotation=
a.Annotations.Yk;a.Annotations.RedactionAnnotation=a.Annotations.Gd;a.Annotations.RedactionAnnotation.prototype.setRect=a.Annotations.Gd.prototype.Ag;a.Annotations.PolylineAnnotation=a.Annotations.qj;a.Annotations.PolygonAnnotation=a.Annotations.Wf;a.Annotations.FreeTextAnnotation=a.Annotations.Ga;a.Annotations.FreeTextAnnotation.prototype.getPadding=a.Annotations.Ga.prototype.rA;a.Annotations.FreeTextAnnotation.prototype.setPadding=a.Annotations.Ga.prototype.Bm;a.Annotations.FreeTextAnnotation.prototype.getIntent=
a.Annotations.Ga.prototype.oh;a.Annotations.FreeTextAnnotation.prototype.setIntent=a.Annotations.Ga.prototype.Xo;a.Annotations.FreeTextAnnotation.prototype.addPathPoint=a.Annotations.Ga.prototype.vb;a.Annotations.FreeTextAnnotation.prototype.setStartStyle=a.Annotations.Ga.prototype.ej;a.Annotations.FreeTextAnnotation.prototype.getStartStyle=a.Annotations.Ga.prototype.Ye;a.Annotations.FreeTextAnnotation.Intent=a.Annotations.Ga.Ic;a.Annotations.ControlHandle=a.Annotations.ControlHandle;a.Annotations.ControlHandle.prototype.testSelection=
a.Annotations.ControlHandle.prototype.testSelection;a.Annotations.BoxControlHandle=a.Annotations.Qe;a.Annotations.LineControlHandle=a.Annotations.mj;a.Annotations.PathControlHandle=a.Annotations.Tg;a.Annotations.TextControlHandle=a.Annotations.al;a.Annotations.SelectionModel=a.Annotations.SelectionModel;a.Annotations.SelectionModel.prototype.testSelection=a.Annotations.SelectionModel.prototype.testSelection;a.Annotations.SelectionModel.prototype.testControlHandles=a.Annotations.SelectionModel.prototype.cs;
a.Annotations.SelectionModel.prototype.getControlHandles=a.Annotations.SelectionModel.prototype.uR;a.Annotations.SelectionModel.prototype.canModify=a.Annotations.SelectionModel.prototype.Rc;a.Annotations.SelectionModel.prototype.draw=a.Annotations.SelectionModel.prototype.draw;a.Annotations.BoxSelectionModel=a.Annotations.pa;a.Annotations.LineSelectionModel=a.Annotations.Cp;a.Annotations.PathSelectionModel=a.Annotations.Ym;a.Annotations.RedactionSelectionModel=a.Annotations.Os;a.Annotations.TextSelectionModel=
a.Annotations.vj;a.Annotations.StickySelectionModel=a.Annotations.Lp;a.Annotations.XfdfUtils=a.Annotations.ca;a.Annotations.XfdfUtils.serializePoint=a.Annotations.ca.Lw;a.Annotations.XfdfUtils.deserializePoint=a.Annotations.ca.Lw;a.Annotations.XfdfUtils.serializePointArray=a.Annotations.ca.Uo;a.Annotations.XfdfUtils.deserializePointArray=a.Annotations.ca.Gl;a.Annotations.XfdfUtils.serializeRect=a.Annotations.ca.eC;a.Annotations.XfdfUtils.deserializeRect=a.Annotations.ca.Bu;a.Annotations.XfdfUtils.serializeFringeRect=
a.Annotations.ca.cC;a.Annotations.XfdfUtils.deserializeFringeRect=a.Annotations.ca.oG;a.Annotations.XfdfUtils.serializeMeasure=a.Annotations.ca.Kw;a.Annotations.XfdfUtils.deserializeMeasure=a.Annotations.ca.Au;a.Annotations.XfdfUtils.toXmlDate=a.Annotations.ca.GC;a.Annotations.XfdfUtils.parseDefaultAppearance=a.Annotations.ca.FB;a.Annotations.SelectionAlgorithm=a.Annotations.Bb;a.Annotations.SelectionAlgorithm.boundingRectTest=a.Annotations.Bb.Al;a.Annotations.SelectionAlgorithm.canvasVisibilityTest=
a.Annotations.Bb.Cl;a.Annotations.SelectionAlgorithm.textQuadTest=a.Annotations.Bb.CC;a.Annotations.Utilities=a.Annotations.ja;a.Annotations.Utilities.setExtraSelectors=a.Annotations.ja.mW;a.Annotations.Utilities.setAnnotationSubjectHandler=a.Annotations.ja.dW;a.Tool=a.Tool;a.Tools=a.ba;a.Tools.Tool=a.ba.Tool;a.Tools.Tool.prototype.getDocumentViewer=a.ba.Tool.prototype.mh;a.Tools.Tool.prototype.getMouseLocation=a.ba.Tool.prototype.Cf;a.Tools.Tool.prototype.setStyles=a.ba.Tool.prototype.kc;a.Tools.Tool.prototype.setName=
a.ba.Tool.prototype.DW;a.Tools.AnnotationSelectTool=a.ba.AnnotationSelectTool;a.Tools.TextTool=a.ba.Yb;a.Tools.GenericAnnotationCreateTool=a.ba.GenericAnnotationCreateTool;a.Tools.PanTool=a.ba.Gp;a.Tools.TextSelectTool=a.ba.bn;a.Tools.AnnotationEditTool=a.ba.Kk;a.Tools.LineCreateTool=a.ba.Rg;a.Tools.ArrowCreateTool=a.ba.rx;a.Tools.DistanceMeasurementCreateTool=a.ba.Bs;a.Tools.DistanceMeasurementCreateTool.prototype.setEnableLeaderLines=a.ba.Bs.prototype.iW;a.Tools.PerimeterMeasurementCreateTool=a.ba.Kx;
a.Tools.AreaMeasurementCreateTool=a.ba.qx;a.Tools.RectangleCreateTool=a.ba.Lx;a.Tools.RedactionCreateTool=a.ba.Jp;a.Tools.EllipseCreateTool=a.ba.Bx;a.Tools.FreeHandCreateTool=a.ba.FreeHandCreateTool;a.Tools.EraserTool=a.ba.Cs;a.Tools.SignatureCreateTool=a.ba.SignatureCreateTool;a.Tools.MarqueeZoomTool=a.ba.jf;a.Tools.MarqueeZoomTool.setZoomHandler=a.ba.jf.kX;a.Tools.MarqueeZoomTool.setMaxZoomLevel=a.ba.jf.AW;a.Tools.MarqueeZoomTool.setMinZoomLevel=a.ba.jf.BW;a.Tools.SignatureCreateTool.setTextHandler=
a.ba.SignatureCreateTool.pC;a.Tools.SignatureCreateTool.prototype.setSignatureCanvas=a.ba.SignatureCreateTool.prototype.aX;a.Tools.SignatureCreateTool.prototype.clearSignatureCanvas=a.ba.SignatureCreateTool.prototype.DP;a.Tools.SignatureCreateTool.prototype.initDefaultSignature=a.ba.SignatureCreateTool.prototype.tI;a.Tools.SignatureCreateTool.prototype.saveDefaultSignature=a.ba.SignatureCreateTool.prototype.QV;a.Tools.SignatureCreateTool.prototype.setUpSignature=a.ba.SignatureCreateTool.prototype.TK;
a.Tools.SignatureCreateTool.prototype.getSignaturePreview=a.ba.SignatureCreateTool.prototype.BS;a.Tools.SignatureCreateTool.prototype.drawAnnot=a.ba.SignatureCreateTool.prototype.yz;a.Tools.SignatureCreateTool.prototype.hasLocation=a.ba.SignatureCreateTool.prototype.aT;a.Tools.SignatureCreateTool.prototype.clearLocation=a.ba.SignatureCreateTool.prototype.xP;a.Tools.SignatureCreateTool.prototype.hasDefaultSignature=a.ba.SignatureCreateTool.prototype.XS;a.Tools.SignatureCreateTool.prototype.addDefaultSignature=
a.ba.SignatureCreateTool.prototype.zO;a.Tools.SignatureCreateTool.prototype.openSignature=a.ba.SignatureCreateTool.prototype.NU;a.Tools.SignatureCreateTool.prototype.addSignature=a.ba.SignatureCreateTool.prototype.oF;a.Tools.SignatureCreateTool.prototype.isEmptySignature=a.ba.SignatureCreateTool.prototype.CI;a.Tools.StickyCreateTool=a.ba.Ss;a.Tools.StickyCreateTool.prototype.setAllowCreationOverAnnotation=Tools.Ss.prototype.gC;a.Tools.TextAnnotationCreateTool=a.ba.Jc;a.Tools.TextHighlightCreateTool=
a.ba.Sx;a.Tools.TextUnderlineCreateTool=a.ba.Vx;a.Tools.TextStrikeoutCreateTool=a.ba.Ux;a.Tools.TextSquigglyCreateTool=a.ba.Tx;a.Tools.PolylineCreateTool=a.ba.Vg;a.Tools.PolylineCreateTool.prototype.setAllowCreationOverAnnotation=a.ba.Vg.prototype.gC;a.Tools.PolygonCreateTool=a.ba.Ug;a.Tools.PolygonCloudCreateTool=a.ba.Ip;a.Tools.CalloutCreateTool=a.ba.CalloutCreateTool;a.Tools.FreeTextCreateTool=a.ba.Tm;a.Tools.FreeTextCreateTool.setTextHandler=a.ba.Tm.pC;a.Tools.StampCreateTool=a.ba.Kp})(window);
(function(){function a(a,c,b){function d(a,b){var c=b<<1;return 128>b?a*(c+(a*(255-c)>>8))>>8:a*(511-c)+Math.sqrt(a<<8)*(c-255)>>8}function g(a,b){return 128>a?a*b>>7:255-((255-b)*(255-a)>>7)}function k(a,b){return 255==b&&0==a?255:Math.min(255,(a<<8)/(255-b))}function h(a,b){return 255==b&&0==a?0:255-Math.min(255,(255-a<<8)/b)}function l(a,b,c){return{r:.299*a+.587*b+.114*c,g:-.1687*a-.3313*b+.5*c,b:.5*a-.4187*b-.0813*c}}function n(a,b,c){return{r:a+1.402*c,g:a-.3441*b-.7141*c,b:a+1.772*b}}function m(a,
b,c){a=l(a,b,c);return{Gf:Math.atan2(a.g,a.b),s:Math.sqrt(a.g*a.g+a.b*a.b),FL:a.r}}function q(a,b,c){return n(c,b*Math.sin(a),b*Math.cos(a))}var p={},u;for(u in f)f.hasOwnProperty(u)&&(p[u]=b&&b[u]||f[u]);"auto"==p.width&&(p.width=this.canvas.width);"auto"==p.height&&(p.height=this.canvas.height);p.width=Math.min(p.width,this.canvas.width-p.gL,a.canvas.width-p.x);p.height=Math.min(p.height,this.canvas.height-p.hL,a.canvas.height-p.y);u=this.getImageData(p.gL,p.hL,p.width,p.height);b=a.getImageData(p.x,
p.y,p.width,p.height);u=u.data;for(var r=b.data,v,w,z=r.length,C,A,x,y,F,L,E,H,G,J,O,M,N,I,D=0;D<z;D+=4)if(v=u[D+3]/255,w=r[D+3]/255,E=v+w-v*w,r[D+3]=255*E,0!=v)if(0==w)r[D]=u[D],r[D+1]=u[D+1],r[D+2]=u[D+2];else{H=r[D];G=r[D+1];J=r[D+2];O=u[D];M=u[D+1];N=u[D+2];C=O/255*v;y=H/255*w;A=M/255*v;F=G/255*w;x=N/255*v;L=J/255*w;I=255/E;E=w*v;var B=w-E,Q=v-E;switch(c){case "normal":case "src-over":r[D]=(C+y-y*v)*I;r[D+1]=(A+F-F*v)*I;r[D+2]=(x+L-L*v)*I;break;case "screen":r[D]=(C+y-C*y)*I;r[D+1]=(A+F-A*F)*
I;r[D+2]=(x+L-x*L)*I;break;case "multiply":r[D]=(C*y+C*(1-w)+y*(1-v))*I;r[D+1]=(A*F+A*(1-w)+F*(1-v))*I;r[D+2]=(x*L+x*(1-w)+L*(1-v))*I;break;case "difference":r[D]=(C+y-2*Math.min(C*w,y*v))*I;r[D+1]=(A+F-2*Math.min(A*w,F*v))*I;r[D+2]=(x+L-2*Math.min(x*w,L*v))*I;break;case "src-in":E=v*w;I=255/E;r[D]=C*w*I;r[D+1]=A*w*I;r[D+2]=x*w*I;r[D+3]=255*E;break;case "plus":case "add":r[D]=Math.min(C+y,1)*I;r[D+1]=Math.min(A+F,1)*I;r[D+2]=Math.min(x+L,1)*I;break;case "overlay":r[D]=E*g(H,O)+B*H+Q*O;r[D+1]=E*g(G,
M)+B*G+Q*M;r[D+2]=E*g(J,N)+B*J+Q*N;break;case "hard-light":r[D]=E*g(O,H)+B*H+Q*O;r[D+1]=E*g(M,G)+B*G+Q*M;r[D+2]=E*g(N,J)+B*J+Q*N;break;case "color-dodge":case "dodge":r[D]=E*k(H,O)+B*H+Q*O;r[D+1]=E*k(G,M)+B*G+Q*M;r[D+2]=E*k(J,N)+B*J+Q*N;break;case "color-burn":case "burn":r[D]=E*h(H,O)+B*H+Q*O;r[D+1]=E*h(G,M)+B*G+Q*M;r[D+2]=E*h(J,N)+B*J+Q*N;break;case "darken":case "darker":r[D]=E*(H<O?H:O)+B*H+Q*O;r[D+1]=E*(G<M?G:M)+B*G+Q*M;r[D+2]=E*(J<N?J:N)+B*J+Q*N;break;case "lighten":case "lighter":r[D]=(C<y?
y:C)*I;r[D+1]=(A<F?F:A)*I;r[D+2]=(x<L?L:x)*I;break;case "exclusion":r[D]=(y+C-2*y*C)*I;r[D+1]=(F+A-2*F*A)*I;r[D+2]=(L+x-2*L*x)*I;break;case "soft-light":r[D]=E*d(H,O)+B*H+Q*O;r[D+1]=E*d(G,M)+B*G+Q*M;r[D+2]=E*d(J,N)+B*J+Q*N;break;case "luminosity":v=l(H,G,J);w=l(O,M,N);v=n(w.r,v.g,v.b);r[D]=E*v.r+B*H+Q*O;r[D+1]=E*v.g+B*G+Q*M;r[D+2]=E*v.b+B*J+Q*N;break;case "color":v=l(H,G,J);w=l(O,M,N);v=n(v.r,w.g,w.b);r[D]=E*v.r+B*H+Q*O;r[D+1]=E*v.g+B*G+Q*M;r[D+2]=E*v.b+B*J+Q*N;break;case "hue":v=m(H,G,J);w=m(O,M,
N);v=q(w.Gf,v.s,v.FL);r[D]=E*v.r+B*H+Q*O;r[D+1]=E*v.g+B*G+Q*M;r[D+2]=E*v.b+B*J+Q*N;break;case "saturation":v=m(H,G,J);w=m(O,M,N);v=q(v.Gf,w.s,v.FL);r[D]=E*v.r+B*H+Q*O;r[D+1]=E*v.g+B*G+Q*M;r[D+2]=E*v.b+B*J+Q*N;break;case "lighter-color":v=0<2.623*(H-O)+5.15*(G-M)+J-N?{r:H,g:G,b:J}:{r:O,g:M,b:N};r[D]=E*v.r+B*H+Q*O;r[D+1]=E*v.g+B*G+Q*M;r[D+2]=E*v.b+B*J+Q*N;break;case "darker-color":v=0>2.623*(H-O)+5.15*(G-M)+J-N?{r:H,g:G,b:J}:{r:O,g:M,b:N};r[D]=E*v.r+B*H+Q*O;r[D+1]=E*v.g+B*G+Q*M;r[D+2]=E*v.b+B*J+Q*N;
break;default:H=D/4%this.canvas.width,G=Math.floor(D/4/this.canvas.width),H=4>H%8&&4>G%8||3<H%8&&3<G%8,r[D]=r[D+3]=255,r[D+1]=H?255:0,r[D+2]=H?0:255}}a.putImageData(b,p.x,p.y)}var f={x:0,y:0,gL:0,hL:0,width:"auto",height:"auto"};(function(e){if(!e||"function"!==typeof e.getImageData)return console.error("context blender called without a valid context prototype");Object.defineProperty(e,"bO",{value:a});for(var c=a.H0="normal src-over screen multiply difference src-in plus add overlay hardlight colordodge dodge colorburn burn darken darker lighten lighter exclusion softlight luminosity color hue saturation lightercolor darkercolor".split(" "),
b=a.supports={},d=c.length;d--;)b[c[d]]=!0;a.HZ={"src-over":"normal",Lo:"add",m_:"colordodge",LZ:"colorburn",g_:"darken",W_:"lighten"};return e})(CanvasRenderingContext2D&&CanvasRenderingContext2D.prototype)})();("undefined"===typeof window?this:window).p_=0;
(function(a){a.Hs=function(f,e){this.name=f;this.Pn=e;this.mP=1;this.qm=!0;this.$h={};var c=this.$t={};this.wO={};this.Tv=null;c.console_log=[function(b){a.utils.log(b)}];c.console_error=[function(b){a.utils.error(b)}];c.workerLoaded=[function(){}];e.addEventListener("message",this.hI.bind(this))};a.Hs.prototype={on:function(f,e,c){var b=this.$t;b[f]&&a.utils.error('There is already an actionName called "'+f+'"');b[f]=[e,c]},replace:function(a,e,c){this.$t[a]=[e,c]},send:function(a,e){this.postMessage({action:a,
data:e})},Xq:function(){return this.mP++},Ua:function(a,e,c){var b=this.Xq();a={action:a,data:e,callbackId:b,priority:c};e=createPromiseCapability();this.$h[b]=e;try{this.postMessage(a)}catch(d){e.reject(d)}return e.promise},Jw:function(a,e,c){var b=this.Xq();a={action:a,data:e,callbackId:b,priority:c};e=createPromiseCapability();this.$h[b]=e;try{this.postMessage(a)}catch(d){e.reject(d)}return{promise:e.promise,lP:b}},bC:function(a,e){if(a.message||a.QQ){a.message&&a.message.message&&(a.message=a.message.message);
var c=a.QQ;a={type:a.type?a.type:"JavascriptError",message:a.message};if(c)for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b])}this.postMessage({isReply:!0,callbackId:e,error:a})},xA:function(f){if(f in this.$h)return this.$h[f];a.utils.error("Cannot get promise for callback "+f)},IF:function(f){if(f in this.$h){var e=this.$h[f];delete this.$h[f];e.reject({type:"Cancelled",message:"Request has been cancelled."});this.postMessage({action:"actionCancel",data:{callbackId:f}})}else a.utils.warn("Cannot cancel callback "+
f)},postMessage:function(a){if(this.qm){var e=this.LS(a);this.Pn.postMessage(a,e)}else this.Pn.postMessage(a)},FH:function(a,e){if("object"===typeof a)if(a instanceof Uint8Array)e.push(a.buffer);else if(a instanceof ArrayBuffer)e.push(a);else for(var c in a)a.hasOwnProperty(c)&&this.FH(a[c],e)},LS:function(a){var e=[];this.FH(a,e);return 0===e.length?void 0:e},hI:function(f){var e=this,c=f.data,b=this.$t,d=this.wO;f=this.$h;var g;c.isReply?(b=c.callbackId,b in f?(d=f[b],delete f[b],"error"in c?d.reject(c.error):
d.resolve(c.data)):a.utils.warn("Cannot resolve callback "+b)):c.action in b?(g=b[c.action],c.callbackId?Promise.resolve().then(function(){return g[0].call(g[1],c.data)}).then(function(a){e.postMessage({isReply:!0,callbackId:c.callbackId,data:a})},function(a){e.bC(a,c.callbackId)}):g[0].call(g[1],c.data)):c.action in d?(g=d[c.action],c.callbackId?g[0].call(g[1],c).then(function(a){e.postMessage({isReply:!0,callbackId:c.callbackId,data:a});e.Tv()},function(a){e.bC(a,c.callbackId);e.Tv()}):g[0].call(g[1],
c).then(function(){e.Tv()},function(){e.Tv()})):a.utils.error("Unknown action from worker: "+c.action)}}})("undefined"===typeof window?this:window);var na=this;
na.vN=function(){function a(a,e,c){var b=this;this.sk=[];this.eo={};this.bo={};createPromiseCapability();this.PC=new Promise(function(d,g){if("undefined"!==typeof Worker)try{var k=new na.Hs("main",a);k.qm=e;b.qa=k;k.on("test",function(a){a&&a.supportTypedArray?(a.supportTransfers||(k.qm=!1),b.mX(k),d()):g(new na.cl("Typed arrays are not supported. Can't start a worker.","error.WorkerInitError"))});var h={array:new Uint8Array([255])};try{h.options=c?c:{},h.options.chunkMax=na.$L,k.send("test",h)}catch(l){na.utils.log("Cannot use postMessage transfers"),
k.qm=!1,h.array[0]=0,k.send("test",h)}return}catch(l){g(new na.cl("The worker has been disabled. This may be the result of using PNaCl on an unsupported browser.","error.PNaClSupportError"))}g(new na.cl("Can't start a worker","error.WorkerInitError"))})}a.prototype={Oo:0,qL:1,pd:2,pg:3,mX:function(a){this.qa=a;a.on("event",this.lK,this)},lK:function(a){var e=a.docId;if(this.eo[e])this.eo[e](a);else e in this.bo?this.bo[e].push(a):this.bo[e]=[a]},addEventListener:function(a,e){if(this.eo[a])na.utils.error("Event listener already set for "+
a);else if(this.eo[a]=e,a in this.bo){for(var c=this.bo[a],b=0;b<c.length;++b)this.lK(c[b]);delete this.bo[a]}},vP:function(a){delete this.eo[a]},RQ:function(a){return this.qa.Ua("NewDoc",a,this.pg)},lU:function(a,e){var c={array:a,workerPath:na.o.yi()};e&&(c.l=e);return this.qa.Ua("LoadRes",c,this.pg)},mU:function(a,e){var c={path:a};e&&(c.l=e);return this.qa.Ua("LoadResFromPath",c,this.pg)},oR:function(a,e,c,b,d,g,k,h){return"undefined"===typeof h?this.qa.Jw("GetCanvas",{docId:a,pageIndex:e,width:c,
height:b,rotation:d,layers:g,overprintMode:k},this.Oo):this.qa.Jw("GetCanvasPartial",{docId:a,pageIndex:e,width:c,height:b,rotation:d,layers:g,bbox:[h.x1,h.y1,h.x2,h.y2],overprintMode:k},this.Oo)},pR:function(a,e,c,b,d,g,k,h,l){return"undefined"===typeof h?this.qa.Jw("GetCanvas",{docId:a,pageIndex:e,width:c,height:b,rotation:d,layers:g,filePath:l,overprintMode:k},this.Oo):this.qa.Jw("GetCanvasPartial",{docId:a,pageIndex:e,width:c,height:b,rotation:d,layers:g,bbox:[h.x1,h.y1,h.x2,h.y2],filePath:l,
overprintMode:k},this.Oo)},kH:function(a,e){return"undefined"!==typeof e?this.qa.Ua("GetCanvasProgressive",{callbackId:a,filePath:e},this.Oo):this.qa.Ua("GetCanvasProgressive",{callbackId:a},this.Oo)},wh:function(a,e){return this.qa.Ua("LoadText",{docId:a,pageIndex:e},this.qL)},gU:function(a){return this.qa.Ua("LoadBookmarks",{docId:a},this.pg)},eU:function(a,e){var c={docId:a};e&&(c.pages=e);return this.qa.Ua("LoadAnnotations",c,this.pg)},zr:function(a,e){return this.qa.Ua("MergeXFDF",{docId:a,xfdf:e},
this.pd)},mK:function(a){return this.qa.Ua("SaveDoc",a,this.pd)},RV:function(a){return this.qa.Ua("SaveDocFromFixedElements",a,this.pd)},SV:function(a){return this.qa.Ua("SaveDocAs",a,this.pd)},bY:function(a,e){return this.qa.Ua("UpdatePassword",{docId:a,password:e},this.pg)},ir:function(a,e,c,b){return this.qa.Ua("InsertBlankPages",{docId:a,width:c,height:b,pageArray:e},this.pd)},Fi:function(a,e,c,b,d){return this.qa.Ua("InsertPages",{docId:a,doc:e,pageArray:c,destPos:b,insertBookmarks:d},this.pd)},
mk:function(a,e,c){return this.qa.Ua("MovePages",{docId:a,pageArray:e,destPos:c},this.pd)},Xi:function(a,e){return this.qa.Ua("RemovePages",{docId:a,pageArray:e},this.pd)},aj:function(a,e,c){return this.qa.Ua("RotatePages",{docId:a,pageArray:e,rotation:c},this.pd)},mg:function(a){return this.qa.Ua("GetPDFDoc",{docId:a},this.pd)},ih:function(a,e,c,b){return this.qa.Ua("ExtractPages",{docId:a,pageArray:e,xfdfString:c,watermarks:b},this.pd)},ii:function(a,e,c,b,d,g){return this.qa.Ua("CropPages",{docId:a,
pageArray:e,topMargin:c,botMargin:b,leftMargin:d,rightMargin:g},this.pd)},xm:function(a,e){return this.qa.Ua("DownloaderHint",{docId:a,hint:e},this.pd)},JT:function(a){return this.qa.Ua("IsLinearized",{docId:a},this.pd)},si:function(a){return this.qa.Ua("GetLayers",{docId:a},this.pd)},oi:function(a,e){return this.qa.Ua("ExtractPDFNetLayersContext",{docId:a,layers:e},this.pd)},Xq:function(){return this.qa.Xq()},nz:function(a){return this.qa.Ua("DeleteDocument",{docId:a},this.pd)},hC:function(a){return this.qa.Ua("SetColorManagement",
{value:a},this.pg)},Mw:function(a){return this.qa.Ua("SetCustomFontURL",{fontURL:a},this.pg)},getWorkerType:function(){return this.qa.Pn&&"function"===typeof this.qa.Pn.getWorkerType?this.qa.Pn.getWorkerType():na.uM(this.qa.Pn)?"ems":"pnacl"},um:function(a,e){return this.qa.Ua("RequirePage",{docId:a,pageNum:e},this.pg)},sendWithPromise:function(a,e,c){return this.qa.Ua(a,e,c)},nu:function(a){this.qa.IF(a)},Uz:function(a,e){return this.qa.Ua("GetAnnotationAppearances",{docId:a,references:e},this.qL)}};
return a}();
(function(a){function f(){var a=document.createElement("embed");a.type="application/pdf";a.style.position="fixed";a.style.width="9px";a.style.height="9px";a.style.top="-9990px;";a.style.left="-999px";return a}function e(a,c){for(var e=!1,f=0,h=navigator.plugins;f<h.length;++f){var l=h[f].name;if("Chrome PDF Viewer"===l||"Chromium PDF Viewer"===l){e=!0;break}}e?a():c()}var c;a.isPDFiumSupported=function(){c||(c=new Promise(function(a){e(function(){a(!0)},function(){a(!1)})}));return c};a.pdfiumPrint=
function(a){var c={co:null,lw:"",handleEvent:function(){var a=c;window.removeEventListener("focus",a);a.co&&a.co.remove();a.lw&&URL.revokeObjectURL(a.lw)}};c.lw=URL.createObjectURL(a);c.co=f();c.co.src=c.lw;c.co.addEventListener("message",function(){console.log("I actually got a message")});document.body.appendChild(c.co);window.addEventListener("focus",c)}})(window);
(function(a){function f(e,c){a.Hs.call(this,e,c);this.ji={};this.Tr={};this.Ri=[]}f.prototype={du:function(a){this.Ri.push(a)},Jy:function(a,c){a in this.ji?this.ji[a].push(c):this.ji[a]=[c];a in this.Tr&&delete this.Tr[a]},ww:function(a){a in this.ji&&delete this.ji[a];this.Tr[a]=a;this.Ri=[]},hI:function(e){var c=this,b=e.data,d=this.$t;e=this.$h;if("object"===typeof b){if("type"in b&&0<this.Ri.length&&"onloaddocument"===b.type)for(;0<this.Ri.length;)this.Jy(b.data.docId,this.Ri.shift());if("callbackId"in
b)if(d=b.callbackId,d in e){var f=e[d];delete e[d];"type"in b&&"error"===b.type?f.reject(b):f.resolve(b.data)}else a.utils.warn("Cannot resolve callback "+d);else if(b.action in d){var k=d[b.action];b.callbackId?Promise.resolve().then(function(){return k[0].call(k[1],b.data)}).then(function(a){c.postMessage({isReply:!0,callbackId:b.callbackId,data:a})},function(a){c.bC(a)}):k[0].call(k[1],b.data)}else if(b.type)if("page"===b.type)e=b.meta.docId,this.ji[e]?this.ji[e].forEach(function(a){a(b)}):0<this.Ri.length&&
!(e in this.Tr)?this.Ri.forEach(function(a){a(b)}):a.utils.warn("load","No doc listeners for this docId: "+JSON.stringify(b));else{if("documentComplete"===b.type||"error"===b.type)e=b.docId,this.ji[e]?this.ji[e].forEach(function(a){a(b)}):0<this.Ri.length&&!(e in this.Tr)?this.Ri.forEach(function(a){a(b)}):a.utils.warn("load","No doc listeners for this docId: "+JSON.stringify(b))}else a.utils.error("Unknown action from worker: "+b.action)}}};f.prototype=$.extend(Object.create(a.Hs.prototype),f.prototype);
a.GM=f})("undefined"===typeof window?this:window);
(function(a){function f(e,c,b){var d=this;this.sk=[];this.eo={};createPromiseCapability();this.PC=new Promise(function(f,k){if("undefined"!==typeof Worker)try{if(d.qa)f();else{var h=new a.GM("main",e);h.qm=c;d.qa=h;h.on("test",function(b){if(b.ready){var c=b&&b.supportTypedArray;b&&b.info&&a.utils.log("load","Office worker info: "+b.info);c?(b.supportTransfers||(h.qm=!1),f()):k(new a.cl("Typed arrays are not supported. Can't start a worker.","error.WorkerInitError"))}else k("License Key Error: "+b.license)});
var l={array:new Uint8Array([255])};try{b&&(l=$.extend({},l,b)),h.send("test",l)}catch(n){h.qm=!1,l.array[0]=0,h.send("test",l)}}return}catch(n){k(new a.cl("The worker has been disabled. This may be the result of using PNaCl on an unsupported browser.","error.PNaClSupportError"))}k(new a.cl("Can't start a worker","error.WorkerInitError"))})}f.prototype={WI:function(a){return this.qa.Ua("loadDocument",a,this.pg)},du:function(a){this.qa.du(a)},Jy:function(a,c){this.qa.Jy(a,c)},ww:function(a){this.qa.ww(a)},
nz:function(a){this.qa.ww(a);return this.qa.Ua("unloadDocument",{docId:a},this.pd)},nu:function(a){this.qa.IF(a)},yR:function(a){return this.qa.Ua("getDocBuffer",{docId:a},this.pg)}};a.o.HM=f})("undefined"===typeof window?this:window);
(function(a){function f(a){this.Zv=!1;this.tb=[];this.ds={};this.ju={};this.xu={};this.Tu=[];this.Ml={};this.Ta={};this.He=a}function e(){}function c(a,c){this.Kf=a;this.Ta={};this.pb=null;this.Ja=c}e.prototype={bH:function(a){var c=this;c.functions=[];a.forEach(function(a){c.functions.push(new Function("c","t",a))});this.index=0},run:function(a,c,e){var f=this.functions[this.index];e&&this.index++;return f?(f(a,c),!1):!0},clone:function(){var a=new e;a.functions=this.functions;a.index=0;return a},
Hr:function(){return Promise.resolve()},cancel:function(){}};f.prototype={EA:function(a,c){var f=a+1;if(f in this.tb){var f=this.tb[f],k=$.extend({},f);if(!f.pb){var h=new e;h.bH(f.pr);f.pb=h}k.pb=f.pb.clone();c(null,k)}else c(Error("The page "+f+" does not exist yet."))},tA:function(b,c,f){b+=1;if(b in this.tb){c=this.tb[b];b=$.extend({},c);if(!c.pb){var k=new e;k.bH(c.pr);c.pb=k}b.pb=c.pb.clone();b.Ta=$.extend(!0,{},b.Ta);for(var h in b.Ta)if(c=b.Ta[h],"jpg"===c.type)b.Ta[h].data=a.o.oA(c.data.type,
c.data.data);else{if(a.Nq)k=a.o.oA(c.data.type,c.data.data),k=new a.ef.FontFace(c.name,"","sfnt",k);else{for(var k="",l=new Uint8Array(c.data.data),n=l.byteLength,m=0;m<n;m++)k+=String.fromCharCode(l[m]);k=new a.ef.FontFace(c.name,k,"sfnt",void 0)}this.He.$A(c.name)||k.insert();b.Ta[h].data=k}f(null,b)}else f(Error("The page "+b+" does not exist yet."))},FO:function(a){var d=a.meta.page,e=new c(d,this),f=a.img,h=a.text_structure,l={},n="",m;for(n in f)f[n]&&f[n].data?(m={data:f[n],type:"jpg",name:n},
l[n]=m,this.Ta[n]=m):l[n]=this.Ta[n];f=a.embeddedFonts;for(n in f)(m=f[n])&&m.data?(m={data:m,type:"font",name:n},l[n]=m,this.Ta[n]=m):l[n]=this.Ta[n];e.pr=a.js;e.Ta=l;e.text=h;this.tb[d]=e},xq:function(){}};_(f.prototype).extend(Backbone.Events);a.o.FM=f})(window);
(function(a){function f(){}var e=a.o;e.Ls=function(c){this.wf=[];this.Md=[];this.le={};this.J=[];this.hw={};this.Di={};this.te={};this.Mq={};this.ma=null;this.An=new a.hf.Ps;this.id=c;this.tB=[]};e.Ls.prototype=Object.create(e.Te.prototype);e.Ls.prototype.constructor=e.Oh;e.Document.Qr("office",e.Ls);$.extend(e.Ls.prototype,{DO:function(c){this.Ja.FO(c);var b=new a.Sk(c.meta.width,c.meta.height);b.bb=new XODText.Matrix2D;b.bb.Ea(1,0,0,-1,0,c.meta.height);b.rotation=0;this.J.push(b);this.yr=this.vq();
c=c.fonts;for(var d in c){var e=c[d];d in this.Mq?b=this.Mq[d]:(b=new XODText.Pg,b.Wo(-e.ascent,e.descent),b.SK(500),this.Mq[d]=b);for(var e=e.charX,f=e.length,h=0;h<f;h+=3)b.bu(e[h],e[h+1],e[h+2])}},loadAsync:function(c,b,d){var f=this;this.Va=c;this.J=[];f.le={};var k=d.annotsLoadedCallback;f.bc=new Promise(function(a){f.bind("documentComplete",function(){f.unbind("documentComplete");a()})});var h=d.workerTransportPromise;c.getFileData(function(d){f.bind("documentReady",b);var n={outputFormat:"canvasCommands"};
c.file?(n.type="file",n.value={bytes:d.buffer,name:c.file.name},f.Ou=c.file.name):c.url?(n.type="file",n.value={bytes:d.buffer,name:c.filename||c.url},f.Ou=n.value.name):(n.type="array",n.value=d.buffer,f.Ou="");f.Ja=new e.FM(f.An);var m=!1;h.then(function(c){f.ya=c;a.utils.log("load","Worker Initialized");f.ya.du(function(c){switch(c.type){case "page":var d=150,e=function(){var a;13<f.pk.length?a=f.pk.splice(0,13):(a=f.pk,f.pk=[]);return a},h=function(){for(var c=e(),n=0;n<c.length;++n)a.utils.log("load",
"page "+c[n].meta.page+": "+c[n].meta.elapsedTime+"ms"),f.DO(c[n]);for(n=0;n<c.length;++n)if(c[n].annotations)for(var l=0;l<c[n].annotations.length;++l){var p=c[n].annotations[l],q=new Annotations.Rect(parseInt(p.x1,10),parseInt(p.y1,10),parseInt(p.x2,10),parseInt(p.y2,10)),q=new Annotations.vd({rect:q});q.Nj("U",new Actions.wj({uri:p.URI}));q.PageNumber=c[n].meta.page;f.tB.push(q)}f.bc.then(function(a){f.bk({type:"officeAnnotationsUpdated",data:a})}.bind(null,f.tB));f.tB=[];m||(m=!0,b(),k&&k('<?xml version="1.0" encoding="UTF-8"?><xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">  <pdf-info version="2" xmlns="http://www.pdftron.com/pdfinfo" /></xfdf>'));
f.bk({type:"pagesUpdated",data:f.J.slice()});a.utils.log("load","processed "+c.length+" pages, "+f.pk.length+" remaining");0<f.pk.length?(f.xo=setTimeout(h,d),d=30):(f.xo=null,f.qQ&&f.trigger("documentComplete"))};f.pk?(f.pk.push(c),f.xo||(f.xo=setTimeout(h,d),d=30)):(a.utils.log("load","Received first page data"),f.pk=[c],h());break;case "error":m?console.error(c.message):b(c);break;case "documentComplete":f.xo?f.qQ=!0:f.trigger("documentComplete")}});f.ya.WI(n).then(function(b){f.ma=b.docId;a.utils.log("load",
"Document initialized")})["catch"](function(a){b(a)})})})},loadTextData:function(a,b){var d=this;this.J[a].text?b(this.J[a].text):this.Ja.EA(a,function(e,f){if(!e&&"undefined"!==typeof f.text){var h=new XODText.ve,l=new XODText.Matrix2D;l.Ea(1,0,0,1,0,0);var n=new XODText.an(d.Mq),m=f.pb.clone(),q=!1;try{do q=m.run(n,l,!0);while(!q)}catch(p){console.warn("Custom Canvas has encountered an error: "+p.message);return}h.IP(f.text,n);d.J[a].text=h;b(h)}})},am:function(){return!1},Xl:f,ep:f,jk:function(){return!1},
extractXFDF:function(){return{xfdfString:'<?xml version="1.0" encoding="UTF-8"?><xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">  <pdf-info version="2" xmlns="http://www.pdftron.com/pdfinfo" /></xfdf>',pages:_.range(1,this.J.length+1)}},Mn:f,mo:function(){return!1},Yo:f,zC:f,lo:function(){return[]},wb:function(){return this.J.length},gc:function(a){var b={};b.width=this.J[a].width;b.height=this.J[a].height;return b},Mb:function(){e.Te.prototype.Mb.call(this);clearTimeout(this.xo);this.Ja=
this.xo=null;this.ya&&this.ma&&this.ya.nz(this.ma)},it:function(){},vx:function(c){var b=new a.Sk(c.width,c.height);b.bb=new XODText.Matrix2D;c=c.matrix;b.bb.Ea(c[0],c[1],c[2],c[3],c[4],c[5]);c=this.Sj(b.bb);b.bb=this.YB({w:b.width,Gf:b.height});b.rotation=c;return b},getBookmarks:function(){return Promise.resolve([])},uO:function(){var a=this,b={outputFormat:"binaryStream"};a.Ou?(b.type="file",b.value={bytes:null,name:a.Ou}):(b.type="array",b.value=null);var d=0,e=[];return new Promise(function(f,
h){a.bc.then(function(){a.ya.ww(a.ma);a.ya.du(function(a){switch(a.type){case "page":"binaryStream"===a.format&&a.bytes||h("Expected binaryStream data");e.push(new Uint8Array(a.bytes));d+=a.bytes.byteLength;break;case "error":console.error(a.message);h(a.message);break;case "documentComplete":a=new Uint8Array(d);for(var b=0,c=0;c<e.length;++c)a.set(e[c],b),b+=e[c].length,e[c]=null;f(a);break;default:h("Unable to export data")}});a.ya.WI(b).then(function(b){a.ma=b.docId})})})},getFileData:function(a){var b=
"pdf"===a.downloadType;if(this.ya&&this.ma){var d=this.ma;return b?(b=e.uv(e.Zz(),{}),Promise.all([b,this.uO()]).then(function(b){var d=b[0];a.bytes=b[1].buffer;return d.RV(a).then(function(a){return a.fileData&&0!==a.fileData.byteLength?Promise.resolve(a.fileData):Promise.reject("Failed to convert document to PDF")},function(a){console.error(a);return Promise.resolve(a)})})):this.ya.yR(this.ma).then(function(a){return a&&"array"===a.type&&d===a.docId?a.value:Promise.reject()})}return Promise.reject()},
ik:function(){return!1},LH:function(a){return this.J[a].links},Ak:function(){return!0}})})(window);
(function(a){function f(a){return new Promise(function(b,d){var e=indexedDB.open("wasm-cache",a);e.onerror=d.bind(null,"Error opening wasm cache database");e.onsuccess=function(){b(e.result)};e.onupgradeneeded=function(a){var b=e.result;b.objectStoreNames.contains("wasm-cache")&&(console.log("Clearing out version "+a.oldVersion+" wasm cache"),b.deleteObjectStore("wasm-cache"));console.log("Creating version "+a.newVersion+" wasm cache");b.createObjectStore("wasm-cache")}})}function e(a,b){return new Promise(function(d,
e){var f=a.transaction(["wasm-cache"]).objectStore("wasm-cache").get(b);f.onsuccess=function(){f.result?d(f.result):e("Module "+b+" was not found in wasm cache")};f.onerror=e.bind(null,"Error getting wasm module "+b)})}a.WT=function(){return f(24).then(function(a){return e(a,"PDFNetCWasm.wasm").then(function(){return!0})})["catch"](function(){return!1})};a.N_=function(c,b,d,g){function k(a,c){var d=a.transaction(["wasm-cache"],"readwrite").objectStore("wasm-cache").put(c,b);d.onerror=function(a){console.log("Failed to store in wasm cache: "+
a)};d.onsuccess=function(){console.log("Successfully stored "+b+" in wasm cache")}}function h(c){n=n||Date.now();return c?(a.utils.log("load","Try instantiateStreaming"),fetch(a.s_(b)).then(function(a){return WebAssembly.zT(a,d)})["catch"](function(c){a.utils.log("load","instantiateStreaming Failed "+b+" message "+c.message);return h(!1)})):a.X_(b,g,!0,!0).then(function(b){l=Date.now();a.utils.log("load","Request took "+(l-n)+" ms");return WebAssembly.UA(b,d)})}var l,n;return f(c).then(function(c){return e(c,
b).then(function(c){a.utils.log("Found "+b+" in wasm cache");return WebAssembly.UA(c,d)},function(b){a.utils.log(b);return h(!!WebAssembly.zT).then(function(b){try{a.utils.log("load","WASM compilation took "+(Date.now()-(l||n))+" ms"),k(c,b.b0)}catch(d){}return b.instance})})},function(a){console.log(a);return h().then(function(a){return a.instance})})}})(this);
(function(a){function f(){this.Jr=this.Ei=null;this.zoom=0;this.mT=!0;this.$v=0;this.Jh=null}function e(a,b){this.Kf=a;this.Ta={};this.text=this.pb=null;this.Ja=b;this.Gm=this.Ei=null}function c(a,b){var c=a.lastIndexOf(".");return a.substring(0,c)+"-"+b+a.substring(c)}function b(a,b,c,d){this.w=b;this.Gf=c;this.Jb=a;this.fj=d;this.op={}}function d(a,b,d){var e=b.split(".").slice(-2,-1)[0].split("_");return{counter:d,url:b,fj:a,zw:(5<e.length?parseInt(e[5],10):1)/parseInt(e[0],10),NL:parseInt(e[1],
10),QL:parseInt(e[2],10),ML:parseInt(e[3],10),PL:parseInt(e[4],10),getName:function(){return c("tile_"+b.substring(b.lastIndexOf("/")+1),d)},zG:function(a){var b=this.zw*this.fj*this.ML,c=this.zw*this.fj*this.PL,d=this.zw*this.NL,e=this.zw*this.QL,f=this.getName();a.pY=!0;a.DU=!0;a.EU=!0;a.lT="high";a.kT=!0;window.ci[f]&&a.I(window.ci[f],0,0,this.NL,this.QL,b,c,d,e)}}}function g(){}var k=0;e.prototype={clone:function(){var a=new e(this.Kf,this.Ja);a.Ta=JSON.parse(JSON.stringify(this.Ta));a.pb=this.pb.clone();
a.Gm=this.Gm;return a}};b.prototype={EP:function(){this.op={}},JO:function(a,b){var c=Math.ceil(1*this.w*b/this.fj)|0;this.op[b]=this.op[b]||[];for(var d=this.op[b],e=0;e<a.length;e++)d[a[e].PL*c+a[e].ML]=a[e]},JS:function(a,b){var c=Math.max(Math.min(30,Math.round(3*b)|0),1),d=c/b,e=Math.ceil(1*this.w*c/this.fj)|0,f;if(!(c in this.op))return null;var g=[],h={tiles:g,p:this.Jb,z:c,missing:0},k=Math.floor(a[0]*d/this.fj)|0,l=Math.ceil(a[2]*d/this.fj)|0,A=Math.ceil(a[3]*d/this.fj)|0,c=this.op[c];for(f=
Math.floor(a[1]*d/this.fj)|0;f<A;f++)for(d=k;d<l;d++)c[f*e+d]?g.push(c[f*e+d]):h.missing+=1;return h}};f.prototype={create:function(a,b,c,d,e){this.Ei=b;this.Jr=c;this.Jb=a;this.es=d;this.sr=e;this.Gr=this.Jh;this.$v=this.zoom;this.gm=this.Jh=null;this.Zl=!1},gX:function(a){this.Jh=a},run:function(a,b){var c=this;if(c.Zl)return!0;this.zoom=Math.sqrt(b.m_a*b.m_a+b.m_c*b.m_c);var d=0,e=this.zoom.toFixed(5)===this.$v.toFixed(5);if(!c.Jh){a.S();a.pY=!0;a.DU=!0;a.EU=!0;a.lT="high";a.kT=!0;a.I(window.ci[this.Ei],
0,0,this.Jr.width,this.Jr.height);a.r();if(this.Gr)for(d=0;d<this.Gr.length;d++)this.Gr[d].zG(a,b,e?"rgba(0, 0, 255, 0.5)":"rgba(255, 0, 0, 0.5)");if(d=this.es&&this.sr){var e=new XODText.Matrix2D,f=1/this.zoom;e.Ea(b.m_a*f,b.m_b*f,b.m_c*f,b.m_d*f,b.m_h,b.m_v);e=e.inverse();f=new XODText.Ma;f.Ea(0,0,a.canvas.width,a.canvas.height);e.IC(f);var e=[f.x1,f.y1,f.x2,f.y2],g=c.sr,f=c.es;c.sr=null;c.es=null;this.gm=createPromiseCapability();var h=function(){c.Zl||c.gm&&c.gm.resolve()};f(c.Jb,c.zoom,e,960).then(function(a){!c.Zl&&
a&&g(a,c,h)})}return!d}if(this.Jh&&this.Jh.length)for(d=0;d<this.Jh.length;d++)this.Jh[d].zG(a,b,"rgba(0, 255, 0, 0.5)");return!0},clone:function(){var a=new f;a.Ei=this.Ei;a.Jr=this.Jr;a.Jb=this.Jb;a.es=this.es;a.sr=this.sr;a.Jh=this.Jh;a.Gr=this.Gr;a.zoom=this.zoom;a.$v=this.$v;return a},Hr:function(){return this.gm?this.gm.promise:Promise.resolve()},cancel:function(){this.Zl=!0;this.gm&&this.gm.resolve()}};var h=a.o;h.us=function(b){this.wf=[];this.Md={};this.le={};this.hw={};this.Di={};this.te=
{};this.Mq={};this.ma=null;this.An=this.He=new a.hf.Ps;this.id=b;this.Ja=this;this.tb=[];this.EC=[];this.Cg={};this.FJ=this.J=[];this.page=[];this.wd=null;this.rk={};this.ms=createPromiseCapability();this.jw=createPromiseCapability();this.Jo=null;this.mw=[];this.Dq=null;this.Xw=this.Ww=!0;this.bU=0;this.KX=1;this.pq=null;this.vG=this.AC=!1;this.Aw=[];this.RF=createPromiseCapability();this.counter=k++};h.us.prototype=Object.create(h.Te.prototype);h.us.prototype.constructor=h.Oh;h.Document.Qr("blackbox",
h.us);var l={Md:!0,Mb:!0,loadThumbnailAsync:!0,Tj:!0,qo:!0,Qq:!0,getFileData:!0,extractXFDF:!0,bp:!0,Ol:!0,oo:!0,Zq:!0,tg:!0,mg:!0,Fi:!0,mk:!0,Xi:!0,aj:!0,ih:!0,ii:!0,si:!0,Am:!0,oi:!0};$.extend(h.us.prototype,{eT:function(a){return a.fI().then(function(a){return Promise.resolve(!!a.url)})},TP:function(a){return a.CV()},Tj:function(a){2===this.Cg[a]?(delete this.Cg[a],this.xq(0,a)):this.Cg[a]&&delete this.Cg[a]},loadThumbnailAsync:function(a,b){if(!this.J||this.J.length<a)throw Error("Document is not initialized!");
var c=this,d=c,e,f=null;c.EC[a]?f=Promise.resolve(c.EC[a]):this.Wj||(f=c.wd.Cw(a));f?(e=c.aG(),d.Cg[e]=1,f.then(function(f){var g=new Image;c.EC[a]=f;g.onload=function(){URL.revokeObjectURL(f.url);d.Cg[e]&&(b(g),delete d.Cg[e]);g=g.onload=null};g.src=f.url})):(c=this.Wj,f=c.J[a],e=c.loadCanvasAsync({pageIndex:a,zoom:f.width>f.height?450/f.width:450/f.height,drawComplete:function(a){a.style.backgroundColor="white";d.Cg[e]&&(c.gp(e),b(a),delete d.Cg[e])},pageCanvas:!0}),d.Cg[e]=2);return e},wC:function(){return!0===
this.vz?!1:this.Xw&&(a.utils.ie||a.utils.isEdge||!this.Ww||a.utils.isMobileDevice)},nP:function(){return!a.utils.isMobileDevice||this.vz},tg:function(){return!this.vz},mL:function(b){function c(h){l[h]||("function"===typeof b[h]?(a.utils.log("load","Redirected function name "+h),g[h]=f(h)):(a.utils.log("load","Redirected property name "+h),Object.defineProperty(g,h,{get:d(h),set:e(h)})))}function d(a){return function(){return g.Wj[a]}}function e(a){return function(b){g.Wj[a]=b}}function f(a){return function(){return g.Wj[a].apply(g.Wj,
arguments)}}if(null===b)return a.utils.log("load","Not switching backends because the server gave us nothing to use"),!1;var g=this,k=this.wC();a.utils.log("load","Switching backend XOD: "+k);var w=k?h.Te.prototype:h.Oh.prototype;g.AC=k;if(g.Jo&&g.AC&&(k=g.Jo.mh().Ba().Bc())){g.FJ=g.J;g.mw=[];for(var z=0;z<k.length;++z)g.mw.push(k[z])}g.Wj=b;b.Ra=g.Ra;for(var C in b)(b.hasOwnProperty(C)||w.hasOwnProperty(C))&&c(C);g.cx();b.OU=b.KB;b.KB=function(a){if("pagesUpdated"===a.type){var c=a.data.pageDimensions;
Object.keys(c).forEach(function(a){var b=parseInt(a,10)-1;a=c[a];a.id=""+b;a.contentChanged&=!g.Aw[b];g.Aw[b]=0})}b.OU(a)};b.Mu=g.Mu;try{localStorage.setItem("isCached",!0)}catch(A){a.utils.log("load","Couldn't add the loaded marker to localStorage")}this.RF.resolve(b);return!0},O0:function(){return Promise.resolve(a.WebAssembly?a.WT():!0)},pX:function(a){return this.wC()?this.eT(a):a.nH().then(function(a){return Promise.resolve(a.unhealthy)})},YF:function(b,c,d){function e(a,b){return new Promise(function(c,
e){b.loadAsync(a,function(a){a?e(a):c(b)},d)})}var f=c.wR(),g=c.vo();if(this.wC()){var k=function(c){if(c.flat||!c.url)return Promise.resolve(null);c=new a.o.V.Pk(c.url);c.$r(g);c.ym(f);var d=new h.Te(b);return e(c,d)};return d.lI?k(d.lI):this.TP(c).then(k)}if(!this.nP())return Promise.resolve(null);var l=h.aA().then(function(a){return h.uv(a,d.workerHandlers?d.workerHandlers:{},d.l)});return Promise.all([c.fK(),l]).then(function(a){a=new h.V.Es(a[0].url,{useDownloader:!0,withCredentials:g});a.ym(f);
var b=new h.Oh;d.workerTransportPromise=l;d.extension="pdf";return e(a,b)})},GO:function(a){if(0!==a.length){for(var b=0;b<a.length;++b)for(var c=a[b],d=Math.min(this.J.length,c.i-1),e=c.i+c.n-2;e>=d;--e){var f=this.vx(c);this.J[e]=f}this.yr=this.vq();this.bk({type:"pagesUpdated",data:this.J.slice()})}},yO:function(a){function b(a){var c=[];a.children.forEach(function(a){c.push(b(a))});return new h.df(c,a.name,a.pageNumber,a.parent,a.verticalOffset,a.horizontalOffset,a.url)}for(var c=0;c<a.length;++c)this.wf.push(b(a[c]))},
loadAsync:function(b,c,d){var e=this;e.wd=e.Va=b;e.J=[];e.Ja=e;e.vz=d.forceClientSideInit;a.utils.log("load","Request Document");e.wd.wW(function(){e.BT()},null);e.wd.nH().then(function(f){e.Ww&=f.hasPDF;e.Xw&=f.hasXOD;"tileScale"in f&&(e.KX=f.tileScale);e.wd.fY().then(function(){e.wd.sm(d.extension).then(function(f){a.utils.log("load","Document response received.");f&&("pages"in f&&e.GO(f.pages),"bookmarks"in f&&(e.wf=[],e.yO(f.bookmarks)));e.pq=e.wd.fH();e.pX(b).then(function(f){a.utils.log("load",
"Should we use client side rendering? "+f);if(f)"object"===typeof f&&(d.lI=f),e.YF(e.id,b,d).then(function(a){e.mL(a);e.cx().then(function(){e.Jo=c();e.jw.resolve(e.Jo)})});else{e.cx().then(function(){e.Jo=c();e.jw.resolve(e.Jo)});if(e.Ww||e.Xw)a.utils.log("load","Load client side document"),e.ms.resolve(!0),e.ms.promise.then(function(){e.YF(e.id,b,d).then(function(a){var b=e.J[0].height,c;e.mL(a)&&e.jw.promise.then(function(a){if(a=a.mh()){for(var d=0;d<e.J.length;d++)e.J[d].zg(a);for(var f=!1,g=
(e.J[0].height|0)===(b|0),h=b/e.J[0].height,k=a.N.Td(),d=0;d<k.length;d++)!g&&a.N.cS(k[d].Sa-1)&&(f=!0,a.N.Qw(k[d].Sa-1,k[d].zoom*h),a.dk(k[d].Sa-1)),(c=a.Fa.Tc(k[d].id))&&c.Gc&&(c.Gc=null);g||a.N.cj(a.N.og*h);f||g||(a.Ch(),a.ea.Dg());a.trigger("backendSwitch")}})})});e.bc=new Promise(function(a){e.bind("documentComplete",function(){e.unbind("documentComplete");a()})})}})},function(a){c(a)})})},function(a){c(a)})},loadTextData:function(a,b){a in this.tb&&this.tb[a].text?b(this.tb[a].text):this.EA(a,
b)},lg:function(a,b){if(this.tg())throw Error('Client side document is not instantiated. Please pass the "forceClientSideInit: true" option into the WebViewer constructor or loadAsync.');return this.RF.promise.then(function(c){return a(c).apply(c,b)})},mg:function(){return this.lg(function(a){return a.mg},arguments)["catch"](function(a){throw a;})},Fi:function(){return this.lg(function(a){return a.Fi},arguments)},mk:function(){return this.lg(function(a){return a.mk},arguments)},Xi:function(){return this.lg(function(a){return a.Xi},
arguments)},aj:function(){return this.lg(function(a){return a.aj},arguments)},ih:function(){return this.lg(function(a){return a.ih},arguments)},ii:function(){return this.lg(function(a){return a.ii},arguments)},si:function(){return this.lg(function(a){return a.si},arguments)},Am:function(){return this.lg(function(a){return a.Am},arguments)},oi:function(){return this.lg(function(a){return a.oi},arguments)},hi:function(a){return a},tA:function(g,h,k){if(g in this.J){var l=this;l.bU=g;this.tb[g]=this.tb[g]||
new e(g,this);var u=this.tb[g],r=null,v=null;u.pb?r=Promise.resolve(u):(a.utils.log("load","blackbox(pgi: "+g+") request image"),r=(0!==g?l.ms.promise.then(function(){return l.wd.Cw(g)}):l.wd.Cw(g)).then(function(a){u.Gm=new b(g,l.J[g].width,l.J[g].height,960);l.J[g].Ei=c(a.name,l.counter);u.pb=new f;u.Ta[l.J[g].Ei]={data:a.url,type:"jpg",name:l.J[g].Ei};return u},function(b){v=b;a.utils.log("load","blackbox(pgi "+g+") error requesting image: "+b);u.Ta.img_error={data:"",type:"jpg",name:"img_error"};
u.pb=new f;u.pb.create(g,"img_error",l.J[g],null,null);return u}));var w=function(a,b,c,e){var f=u.Gm.JS(c,b);return f&&0===f.missing?Promise.resolve(f):l.wd?l.wd.BV(a,b,c,e).then(function(a){for(var b=a.tiles,c=0;c<b.length;c++)b[c]=d(a.size,b[c],l.counter);return Promise.resolve(a)}):Promise.resolve(null)};r.then(function(b){a.utils.log("load","blackbox(pg "+g+") has image URL");var c=null,d=l.Aw[g];l.Aw[g]=d?d+1:1;b.pb.create(g,l.J[g].Ei,l.J[g],w,function(d,e,f){if(h in l.Md&&!b.pb.Zl){var g,k,
n=d.tiles,q=l.Md[h].Jf,r=!("missing"in d),u=[],v=0;for(;v<n.length;v++)k=n[v],g=k.getName(),c.Ta[g]||(k={data:k.url,type:"jpg",name:g},u.push(k),c.Ta[g]=k);r&&b.Gm.JO(n,d.z);b.Ta=JSON.parse(JSON.stringify(c.Ta));e.gX(n);b.pb=e.clone();q.mB(function(){l.ms.resolve();f()},u,!0);r&&a.utils.log("load","Server took "+d.runTime+"ms to generate "+n.length+" tiles")}});c=b.clone();l.rk[h]=c.pb;a.utils.log("load","blackbox(pg "+g+") calling resource load callback");k(v,c)},function(a){console.warn("Error creating resources for page: "+
a);k(a)})}else k(Error("The page "+(g+1)+" does not exist."))},EA:function(a,b){var c=this;if(a in this.J){this.tb[a]=this.tb[a]||new e(a,this);var d=this.tb[a],f=null,f=d.text?Promise.resolve(d):c.wd.AV(a).then(function(b){var e=new XODText.ve;e.Lr({m_Struct:b.struct,m_Str:b.str,m_Offsets:b.offsets,m_Quads:b.quads,m_Ready:!0});c.J[a].text=e;c.correctQuadsForPageRotation(a,e);d.text=e;return d},function(b){console.warn("Error retrieving text for page: "+b);b=new XODText.ve;b.Lr({m_Struct:[],m_Str:"",
m_Offsets:[],m_Quads:[],m_Ready:!0});c.J[a].text=b;d.text=b;return d});f.then(function(a){b(a.text)})}else b(Error("The page "+(a+1)+" does not exist."))},xq:function(a,b){b in this.rk&&(this.ms.resolve(),this.rk[b].cancel(),delete this.rk[b])},NZ:function(){for(var a=_.keys(this.rk),b=0;b<a.length;b++)this.xq(0,a[b])},BT:function(){this.tb&&_.each(this.tb,function(a){a.Gm&&a.Gm.EP()})},am:function(){return!1},Xl:g,ep:g,jk:function(){return!1},extractXFDF:function(){var a=this;return a.cx().then(function(){return a.pq.then(function(b){return{xfdfString:b,
pages:_.range(1,a.J.length+1)}})})},cx:function(){var b=this;b.pq||(b.pq=b.wd.fH());return b.pq.then(function(c){if(b.AC&&!b.vG){c=a.Annotations.ca.fr(c);b.BE(c);var d=[];b.mw.forEach(function(a){var c=a.IsModified,e=a.rb()-1;if(!d[e]){var f=b.FJ[e].bb;d[e]=new XODText.Matrix2D;d[e].initMatrix(b.J[e].bb);d[e].concat(f.inverse())}a.Kh(d[e]);a.IsModified=c});b.mw=[];b.vG=!0}})},Mn:g,mo:function(){return!1},Yo:g,zC:g,lo:function(){return[]},wb:function(){return this.J.length},gc:function(a){var b={};
b.width=this.J[a].width;b.height=this.J[a].height;return b},Uj:function(a){a in this.Md&&this.Md[a]&&delete this.Md[a];a in this.rk&&delete this.rk[a]},Mb:function(){var b=this,c;for(c in a.ci)(c.startsWith("tile_t")||c.startsWith("pageimg"))&&delete a.ci[c];h.Te.prototype.Mb.call(this);return b.wd&&b.wd.SF().then(function(){b.tb=[];b.Cg={};b.rk={};b.Ja=null;b.Wj&&b.Wj.Mb()})},it:function(){},vx:function(b){var c=new a.Sk(b.w,b.h),d=b.mtx;c.bb=new XODText.Matrix2D;c.bb.Ea(d[0],d[1],d[2],d[3],d[4],
d[5]);var e=this.Sj(c.bb);c.bb=this.PX(d,{w:b.w,Gf:b.h});c.rotation=e;return c},PX:function(a,b){var c=new XODText.Matrix2D;c.Ea(a[0],a[1],a[2],a[3],a[4],a[5]);var d=this.Ln(c,b);c.Ea(1,0,0,-1,-d.x1,d.y2);return c},getBookmarks:function(){return Promise.resolve(this.wf)},getFileData:function(a){if(!this.tg())return this.lg(function(a){return a.getFileData},arguments);if(this.Dq)return this.Dq.promise;var b=this.Dq=createPromiseCapability(),c=this,d={};a.xfdfString&&(d.annots=a.xfdfString);this.bA(d).then(function(a){var d=
new XMLHttpRequest;d.open("GET",a.url,!0);d.withCredentials=!0;d.responseType="arraybuffer";d.setRequestHeader("Cache-Control","no-cache");d.setRequestHeader("X-Requested-With","XMLHttpRequest");d.onreadystatechange=function(){if(4===d.readyState){c.Dq=null;try{200===d.status?b.resolve(d.response):b.reject("Unable to download PDF data: "+d.status)}catch(a){b.reject("Unable to download PDF data: "+a)}}};d.send()},function(a){b.reject("Unable to download PDF data: "+a)});return b.promise},qo:function(){return this.bA({print:!0})},
Qq:function(a){if(!this.tg())return null;a=a||{};var b=this;return this.bA(a).then(function(c){c.url=b.wH({downloadName:a.downloadName||a.filename,url:c.url});return Promise.resolve(c)})},wH:function(a){var b=a.downloadName||a.filename,c=a.url.lastIndexOf(".pdf");return a.url.substring(0,0<c?c:a.url.length)+"?attach=pdf"+(b?"&dlname="+encodeURIComponent(b):"")},Ol:function(a){a=a.length;for(var b=Array(a),c=0;c<a;++c)b[c]=Promise.reject("BlackBoxDocument does not support appearances");return b},bA:function(a){var b=
this;return this.jw.promise.then(function(c){var d=c.mh();return d.aI().then(function(c){var e=createPromiseCapability(),f=createPromiseCapability();c?b.bI().toBlob(function(a){e.resolve(a)}):e.resolve(null);c=d.Ba();c=a.annots||(c?c.Nu():null);a.annots=null;f.resolve(c);return Promise.all([f.promise,e.promise]).then(function(c){var d=JSON.parse(JSON.stringify(a||{}));d.annots=c[0];d.watermark=c[1];return b.wd.CH(d)})})})},bs:function(a,b){var c=this,d=Annotations.Wg.AS(a,b);return c.wd.CH(d).then(function(a){a.url=
c.wH(a);return a})},ik:function(){return!1},LH:function(a){return this.J[a].links},Ak:function(){return!0}})})(window);}).call(window);
