mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-02-18 02:55:48 +00:00
197 lines
340 KiB
JavaScript
197 lines
340 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.es-B80J6h3Q.js","./index-D1kS8pWe.js","./index-Dw7ALnar.css"])))=>i.map(i=>d[i]);
|
||
import{_ as ve,z as Zs,a as $s,u as Gu}from"./index-D1kS8pWe.js";var Ut=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function Vs(){Ut.console&&typeof Ut.console.log=="function"&&Ut.console.log.apply(Ut.console,arguments)}var me={log:Vs,warn:function(i){Ut.console&&(typeof Ut.console.warn=="function"?Ut.console.warn.apply(Ut.console,arguments):Vs.call(null,arguments))},error:function(i){Ut.console&&(typeof Ut.console.error=="function"?Ut.console.error.apply(Ut.console,arguments):Vs(i))}};function Gs(i,e,n){var a=new XMLHttpRequest;a.open("GET",i),a.responseType="blob",a.onload=function(){qn(a.response,e,n)},a.onerror=function(){me.error("could not download file")},a.send()}function Bo(i){var e=new XMLHttpRequest;e.open("HEAD",i,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Ga(i){try{i.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),i.dispatchEvent(e)}}var ea,Qs,qn=Ut.saveAs||((typeof window>"u"?"undefined":ve(window))!=="object"||window!==Ut?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(i,e,n){var a=Ut.URL||Ut.webkitURL,c=document.createElement("a");e=e||i.name||"download",c.download=e,c.rel="noopener",typeof i=="string"?(c.href=i,c.origin!==location.origin?Bo(c.href)?Gs(i,e,n):Ga(c,c.target="_blank"):Ga(c)):(c.href=a.createObjectURL(i),setTimeout(function(){a.revokeObjectURL(c.href)},4e4),setTimeout(function(){Ga(c)},0))}:"msSaveOrOpenBlob"in navigator?function(i,e,n){if(e=e||i.name||"download",typeof i=="string")if(Bo(i))Gs(i,e,n);else{var a=document.createElement("a");a.href=i,a.target="_blank",setTimeout(function(){Ga(a)})}else navigator.msSaveOrOpenBlob(function(c,s){return s===void 0?s={autoBom:!1}:ve(s)!=="object"&&(me.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}(i,n),e)}:function(i,e,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),typeof i=="string")return Gs(i,e,n);var c=i.type==="application/octet-stream",s=/constructor/i.test(Ut.HTMLElement)||Ut.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||c&&s)&&(typeof FileReader>"u"?"undefined":ve(FileReader))==="object"){var h=new FileReader;h.onloadend=function(){var x=h.result;x=l?x:x.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=x:location=x,a=null},h.readAsDataURL(i)}else{var f=Ut.URL||Ut.webkitURL,v=f.createObjectURL(i);a?a.location=v:location.href=v,a=null,setTimeout(function(){f.revokeObjectURL(v)},4e4)}});/**
|
||
* A class to parse color values
|
||
* @author Stoyan Stefanov <sstoo@gmail.com>
|
||
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
||
* @license Use it if you like it
|
||
*/function Zo(i){var e;i=i||"",this.ok=!1,i.charAt(0)=="#"&&(i=i.substr(1,6)),i={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[i=(i=i.replace(/ /g,"")).toLowerCase()]||i;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(h){return[parseInt(h[1]),parseInt(h[2]),parseInt(h[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(h){return[parseInt(h[1],16),parseInt(h[2],16),parseInt(h[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(h){return[parseInt(h[1]+h[1],16),parseInt(h[2]+h[2],16),parseInt(h[3]+h[3],16)]}}],a=0;a<n.length;a++){var c=n[a].re,s=n[a].process,l=c.exec(i);l&&(e=s(l),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var h=this.r.toString(16),f=this.g.toString(16),v=this.b.toString(16);return h.length==1&&(h="0"+h),f.length==1&&(f="0"+f),v.length==1&&(v="0"+v),"#"+h+f+v}}/**
|
||
* @license
|
||
* Joseph Myers does not specify a particular license for his work.
|
||
*
|
||
* Author: Joseph Myers
|
||
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
|
||
*
|
||
* Modified by: Owen Leong
|
||
*/function Js(i,e){var n=i[0],a=i[1],c=i[2],s=i[3];n=Xe(n,a,c,s,e[0],7,-680876936),s=Xe(s,n,a,c,e[1],12,-389564586),c=Xe(c,s,n,a,e[2],17,606105819),a=Xe(a,c,s,n,e[3],22,-1044525330),n=Xe(n,a,c,s,e[4],7,-176418897),s=Xe(s,n,a,c,e[5],12,1200080426),c=Xe(c,s,n,a,e[6],17,-1473231341),a=Xe(a,c,s,n,e[7],22,-45705983),n=Xe(n,a,c,s,e[8],7,1770035416),s=Xe(s,n,a,c,e[9],12,-1958414417),c=Xe(c,s,n,a,e[10],17,-42063),a=Xe(a,c,s,n,e[11],22,-1990404162),n=Xe(n,a,c,s,e[12],7,1804603682),s=Xe(s,n,a,c,e[13],12,-40341101),c=Xe(c,s,n,a,e[14],17,-1502002290),n=Ke(n,a=Xe(a,c,s,n,e[15],22,1236535329),c,s,e[1],5,-165796510),s=Ke(s,n,a,c,e[6],9,-1069501632),c=Ke(c,s,n,a,e[11],14,643717713),a=Ke(a,c,s,n,e[0],20,-373897302),n=Ke(n,a,c,s,e[5],5,-701558691),s=Ke(s,n,a,c,e[10],9,38016083),c=Ke(c,s,n,a,e[15],14,-660478335),a=Ke(a,c,s,n,e[4],20,-405537848),n=Ke(n,a,c,s,e[9],5,568446438),s=Ke(s,n,a,c,e[14],9,-1019803690),c=Ke(c,s,n,a,e[3],14,-187363961),a=Ke(a,c,s,n,e[8],20,1163531501),n=Ke(n,a,c,s,e[13],5,-1444681467),s=Ke(s,n,a,c,e[2],9,-51403784),c=Ke(c,s,n,a,e[7],14,1735328473),n=Ze(n,a=Ke(a,c,s,n,e[12],20,-1926607734),c,s,e[5],4,-378558),s=Ze(s,n,a,c,e[8],11,-2022574463),c=Ze(c,s,n,a,e[11],16,1839030562),a=Ze(a,c,s,n,e[14],23,-35309556),n=Ze(n,a,c,s,e[1],4,-1530992060),s=Ze(s,n,a,c,e[4],11,1272893353),c=Ze(c,s,n,a,e[7],16,-155497632),a=Ze(a,c,s,n,e[10],23,-1094730640),n=Ze(n,a,c,s,e[13],4,681279174),s=Ze(s,n,a,c,e[0],11,-358537222),c=Ze(c,s,n,a,e[3],16,-722521979),a=Ze(a,c,s,n,e[6],23,76029189),n=Ze(n,a,c,s,e[9],4,-640364487),s=Ze(s,n,a,c,e[12],11,-421815835),c=Ze(c,s,n,a,e[15],16,530742520),n=$e(n,a=Ze(a,c,s,n,e[2],23,-995338651),c,s,e[0],6,-198630844),s=$e(s,n,a,c,e[7],10,1126891415),c=$e(c,s,n,a,e[14],15,-1416354905),a=$e(a,c,s,n,e[5],21,-57434055),n=$e(n,a,c,s,e[12],6,1700485571),s=$e(s,n,a,c,e[3],10,-1894986606),c=$e(c,s,n,a,e[10],15,-1051523),a=$e(a,c,s,n,e[1],21,-2054922799),n=$e(n,a,c,s,e[8],6,1873313359),s=$e(s,n,a,c,e[15],10,-30611744),c=$e(c,s,n,a,e[6],15,-1560198380),a=$e(a,c,s,n,e[13],21,1309151649),n=$e(n,a,c,s,e[4],6,-145523070),s=$e(s,n,a,c,e[11],10,-1120210379),c=$e(c,s,n,a,e[2],15,718787259),a=$e(a,c,s,n,e[9],21,-343485551),i[0]=Nn(n,i[0]),i[1]=Nn(a,i[1]),i[2]=Nn(c,i[2]),i[3]=Nn(s,i[3])}function rs(i,e,n,a,c,s){return e=Nn(Nn(e,i),Nn(a,s)),Nn(e<<c|e>>>32-c,n)}function Xe(i,e,n,a,c,s,l){return rs(e&n|~e&a,i,e,c,s,l)}function Ke(i,e,n,a,c,s,l){return rs(e&a|n&~a,i,e,c,s,l)}function Ze(i,e,n,a,c,s,l){return rs(e^n^a,i,e,c,s,l)}function $e(i,e,n,a,c,s,l){return rs(n^(e|~a),i,e,c,s,l)}function $o(i){var e,n=i.length,a=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=i.length;e+=64)Js(a,Ju(i.substring(e-64,e)));i=i.substring(e-64);var c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i.length;e++)c[e>>2]|=i.charCodeAt(e)<<(e%4<<3);if(c[e>>2]|=128<<(e%4<<3),e>55)for(Js(a,c),e=0;e<16;e++)c[e]=0;return c[14]=8*n,Js(a,c),a}function Ju(i){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=i.charCodeAt(e)+(i.charCodeAt(e+1)<<8)+(i.charCodeAt(e+2)<<16)+(i.charCodeAt(e+3)<<24);return n}ea=Ut.atob.bind(Ut),Qs=Ut.btoa.bind(Ut);var Mo="0123456789abcdef".split("");function Yu(i){for(var e="",n=0;n<4;n++)e+=Mo[i>>8*n+4&15]+Mo[i>>8*n&15];return e}function Xu(i){return String.fromCharCode((255&i)>>0,(65280&i)>>8,(16711680&i)>>16,(4278190080&i)>>24)}function to(i){return $o(i).map(Xu).join("")}var Ku=function(i){for(var e=0;e<i.length;e++)i[e]=Yu(i[e]);return i.join("")}($o("hello"))!="5d41402abc4b2a76b9719d911017c592";function Nn(i,e){if(Ku){var n=(65535&i)+(65535&e);return(i>>16)+(e>>16)+(n>>16)<<16|65535&n}return i+e&4294967295}/**
|
||
* @license
|
||
* FPDF is released under a permissive license: there is no usage restriction.
|
||
* You may embed it freely in your application (commercial or not), with or
|
||
* without modifications.
|
||
*
|
||
* Reference: http://www.fpdf.org/en/script/script37.php
|
||
*/function eo(i,e){var n,a,c,s;if(i!==n){for(var l=(c=i,s=1+(256/i.length>>0),new Array(s+1).join(c)),h=[],f=0;f<256;f++)h[f]=f;var v=0;for(f=0;f<256;f++){var x=h[f];v=(v+x+l.charCodeAt(f))%256,h[f]=h[v],h[v]=x}n=i,a=h}else h=a;var A=e.length,_=0,p=0,B="";for(f=0;f<A;f++)p=(p+(x=h[_=(_+1)%256]))%256,h[_]=h[p],h[p]=x,l=h[(h[_]+h[p])%256],B+=String.fromCharCode(e.charCodeAt(f)^l);return B}/**
|
||
* @license
|
||
* Licensed under the MIT License.
|
||
* http://opensource.org/licenses/mit-license
|
||
* Author: Owen Leong (@owenl131)
|
||
* Date: 15 Oct 2020
|
||
* References:
|
||
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
||
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
||
* http://www.fpdf.org/en/script/script37.php
|
||
*/var Eo={print:4,modify:8,copy:16,"annot-forms":32};function bi(i,e,n,a){this.v=1,this.r=2;var c=192;i.forEach(function(h){if(Eo.perm!==void 0)throw new Error("Invalid permission: "+h);c+=Eo[h]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var s=(e+this.padding).substr(0,32),l=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,l),this.P=-(1+(255^c)),this.encryptionKey=to(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(a)).substr(0,5),this.U=eo(this.encryptionKey,this.padding)}function yi(i){if(/[^\u0000-\u00ff]/.test(i))throw new Error("Invalid PDF Name Object: "+i+", Only accept ASCII characters.");for(var e="",n=i.length,a=0;a<n;a++){var c=i.charCodeAt(a);c<33||c===35||c===37||c===40||c===41||c===47||c===60||c===62||c===91||c===93||c===123||c===125||c>126?e+="#"+("0"+c.toString(16)).slice(-2):e+=i[a]}return e}function qo(i){if(ve(i)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(n,a,c){if(c=c||!1,typeof n!="string"||typeof a!="function"||typeof c!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(n)||(e[n]={});var s=Math.random().toString(35);return e[n][s]=[a,!!c],s},this.unsubscribe=function(n){for(var a in e)if(e[a][n])return delete e[a][n],Object.keys(e[a]).length===0&&delete e[a],!0;return!1},this.publish=function(n){if(e.hasOwnProperty(n)){var a=Array.prototype.slice.call(arguments,1),c=[];for(var s in e[n]){var l=e[n][s];try{l[0].apply(i,a)}catch(h){Ut.console&&me.error("jsPDF PubSub Error",h.message,h)}l[1]&&c.push(s)}c.length&&c.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function ts(i){if(!(this instanceof ts))return new ts(i);var e="opacity,stroke-opacity".split(",");for(var n in i)i.hasOwnProperty(n)&&e.indexOf(n)>=0&&(this[n]=i[n]);this.id="",this.objectNumber=-1}function Qo(i,e){this.gState=i,this.matrix=e,this.id="",this.objectNumber=-1}function Dn(i,e,n,a,c){if(!(this instanceof Dn))return new Dn(i,e,n,a,c);this.type=i==="axial"?2:3,this.coords=e,this.colors=n,Qo.call(this,a,c)}function wi(i,e,n,a,c){if(!(this instanceof wi))return new wi(i,e,n,a,c);this.boundingBox=i,this.xStep=e,this.yStep=n,this.stream="",this.cloneIndex=0,Qo.call(this,a,c)}function zt(i){var e,n=typeof arguments[0]=="string"?arguments[0]:"p",a=arguments[1],c=arguments[2],s=arguments[3],l=[],h=1,f=16,v="S",x=null;ve(i=i||{})==="object"&&(n=i.orientation,a=i.unit||a,c=i.format||c,s=i.compress||i.compressPdf||s,(x=i.encryption||null)!==null&&(x.userPassword=x.userPassword||"",x.ownerPassword=x.ownerPassword||"",x.userPermissions=x.userPermissions||[]),h=typeof i.userUnit=="number"?Math.abs(i.userUnit):1,i.precision!==void 0&&(e=i.precision),i.floatPrecision!==void 0&&(f=i.floatPrecision),v=i.defaultPathOperation||"S"),l=i.filters||(s===!0?["FlateEncode"]:l),a=a||"mm",n=(""+(n||"P")).toLowerCase();var A=i.putOnlyUsedFonts||!1,_={},p={internal:{},__private__:{}};p.__private__.PubSub=qo;var B="1.3",I=p.__private__.getPdfVersion=function(){return B};p.__private__.setPdfVersion=function(o){B=o};var q={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return q};var S=p.__private__.getPageFormat=function(o){return q[o]};c=c||"a4";var M={COMPAT:"compat",ADVANCED:"advanced"},Z=M.COMPAT;function ut(){this.saveGraphicsState(),O(new Tt(Ft,0,0,-Ft,0,cn()*Ft).toString()+" cm"),this.setFontSize(this.getFontSize()/Ft),v="n",Z=M.ADVANCED}function dt(){this.restoreGraphicsState(),v="S",Z=M.COMPAT}var Nt=p.__private__.combineFontStyleAndFontWeight=function(o,m){if(o=="bold"&&m=="normal"||o=="bold"&&m==400||o=="normal"&&m=="italic"||o=="bold"&&m=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return m&&(o=m==400||m==="normal"?o==="italic"?"italic":"normal":m!=700&&m!=="bold"||o!=="normal"?(m==700?"bold":m)+""+o:"bold"),o};p.advancedAPI=function(o){var m=Z===M.COMPAT;return m&&ut.call(this),typeof o!="function"||(o(this),m&&dt.call(this)),this},p.compatAPI=function(o){var m=Z===M.ADVANCED;return m&&dt.call(this),typeof o!="function"||(o(this),m&&ut.call(this)),this},p.isAdvancedAPI=function(){return Z===M.ADVANCED};var nt,G=function(o){if(Z!==M.ADVANCED)throw new Error(o+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},vt=p.roundToPrecision=p.__private__.roundToPrecision=function(o,m){var C=e||m;if(isNaN(o)||isNaN(C))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return o.toFixed(C).replace(/0+$/,"")};nt=p.hpf=p.__private__.hpf=typeof f=="number"?function(o){if(isNaN(o))throw new Error("Invalid argument passed to jsPDF.hpf");return vt(o,f)}:f==="smart"?function(o){if(isNaN(o))throw new Error("Invalid argument passed to jsPDF.hpf");return vt(o,o>-1&&o<1?16:5)}:function(o){if(isNaN(o))throw new Error("Invalid argument passed to jsPDF.hpf");return vt(o,16)};var bt=p.f2=p.__private__.f2=function(o){if(isNaN(o))throw new Error("Invalid argument passed to jsPDF.f2");return vt(o,2)},k=p.__private__.f3=function(o){if(isNaN(o))throw new Error("Invalid argument passed to jsPDF.f3");return vt(o,3)},F=p.scale=p.__private__.scale=function(o){if(isNaN(o))throw new Error("Invalid argument passed to jsPDF.scale");return Z===M.COMPAT?o*Ft:Z===M.ADVANCED?o:void 0},H=function(o){return Z===M.COMPAT?cn()-o:Z===M.ADVANCED?o:void 0},z=function(o){return F(H(o))};p.__private__.setPrecision=p.setPrecision=function(o){typeof parseInt(o,10)=="number"&&(e=parseInt(o,10))};var ct,st="00000000000000000000000000000000",mt=p.__private__.getFileId=function(){return st},Q=p.__private__.setFileId=function(o){return st=o!==void 0&&/^[a-fA-F0-9]{32}$/.test(o)?o.toUpperCase():st.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),x!==null&&(Je=new bi(x.userPermissions,x.userPassword,x.ownerPassword,st)),st};p.setFileId=function(o){return Q(o),this},p.getFileId=function(){return mt()};var pt=p.__private__.convertDateToPDFDate=function(o){var m=o.getTimezoneOffset(),C=m<0?"+":"-",D=Math.floor(Math.abs(m/60)),Y=Math.abs(m%60),it=[C,E(D),"'",E(Y),"'"].join("");return["D:",o.getFullYear(),E(o.getMonth()+1),E(o.getDate()),E(o.getHours()),E(o.getMinutes()),E(o.getSeconds()),it].join("")},ot=p.__private__.convertPDFDateToDate=function(o){var m=parseInt(o.substr(2,4),10),C=parseInt(o.substr(6,2),10)-1,D=parseInt(o.substr(8,2),10),Y=parseInt(o.substr(10,2),10),it=parseInt(o.substr(12,2),10),yt=parseInt(o.substr(14,2),10);return new Date(m,C,D,Y,it,yt,0)},Et=p.__private__.setCreationDate=function(o){var m;if(o===void 0&&(o=new Date),o instanceof Date)m=pt(o);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(o))throw new Error("Invalid argument passed to jsPDF.setCreationDate");m=o}return ct=m},L=p.__private__.getCreationDate=function(o){var m=ct;return o==="jsDate"&&(m=ot(ct)),m};p.setCreationDate=function(o){return Et(o),this},p.getCreationDate=function(o){return L(o)};var j,E=p.__private__.padd2=function(o){return("0"+parseInt(o)).slice(-2)},W=p.__private__.padd2Hex=function(o){return("00"+(o=o.toString())).substr(o.length)},J=0,$=[],et=[],tt=0,At=[],Lt=[],Ot=!1,jt=et,Wt=function(){J=0,tt=0,et=[],$=[],At=[],Kr=Oe(),Sr=Oe()};p.__private__.setCustomOutputDestination=function(o){Ot=!0,jt=o};var at=function(o){Ot||(jt=o)};p.__private__.resetCustomOutputDestination=function(){Ot=!1,jt=et};var O=p.__private__.out=function(o){return o=o.toString(),tt+=o.length+1,jt.push(o),jt},Kt=p.__private__.write=function(o){return O(arguments.length===1?o.toString():Array.prototype.join.call(arguments," "))},Mt=p.__private__.getArrayBuffer=function(o){for(var m=o.length,C=new ArrayBuffer(m),D=new Uint8Array(C);m--;)D[m]=o.charCodeAt(m);return C},wt=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];p.__private__.getStandardFonts=function(){return wt};var xt=i.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(o){return xt=Z===M.ADVANCED?o/Ft:o,this};var kt,Pt=p.__private__.getFontSize=p.getFontSize=function(){return Z===M.COMPAT?xt:xt*Ft},qt=i.R2L||!1;p.__private__.setR2L=p.setR2L=function(o){return qt=o,this},p.__private__.getR2L=p.getR2L=function(){return qt};var Gt,Qt=p.__private__.setZoomMode=function(o){var m=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(o))kt=o;else if(isNaN(o)){if(m.indexOf(o)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+o+'" is not recognized.');kt=o}else kt=parseInt(o,10)};p.__private__.getZoomMode=function(){return kt};var te,ie=p.__private__.setPageMode=function(o){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(o)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+o+'" is not recognized.');Gt=o};p.__private__.getPageMode=function(){return Gt};var fe=p.__private__.setLayoutMode=function(o){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(o)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+o+'" is not recognized.');te=o};p.__private__.getLayoutMode=function(){return te},p.__private__.setDisplayMode=p.setDisplayMode=function(o,m,C){return Qt(o),fe(m),ie(C),this};var Ht={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(o){if(Object.keys(Ht).indexOf(o)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Ht[o]},p.__private__.getDocumentProperties=function(){return Ht},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(o){for(var m in Ht)Ht.hasOwnProperty(m)&&o[m]&&(Ht[m]=o[m]);return this},p.__private__.setDocumentProperty=function(o,m){if(Object.keys(Ht).indexOf(o)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Ht[o]=m};var ee,Ft,Ge,se,Nr,pe={},we={},Er=[],ue={},xn={},Ne={},Ar={},Xr=null,Ae=0,Jt=[],ce=new qo(p),Sn=i.hotfixes||[],He={},qr={},Dr=[],Tt=function o(m,C,D,Y,it,yt){if(!(this instanceof o))return new o(m,C,D,Y,it,yt);isNaN(m)&&(m=1),isNaN(C)&&(C=0),isNaN(D)&&(D=0),isNaN(Y)&&(Y=1),isNaN(it)&&(it=0),isNaN(yt)&&(yt=0),this._matrix=[m,C,D,Y,it,yt]};Object.defineProperty(Tt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(o){this._matrix[0]=o}}),Object.defineProperty(Tt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(o){this._matrix[1]=o}}),Object.defineProperty(Tt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(o){this._matrix[2]=o}}),Object.defineProperty(Tt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(o){this._matrix[3]=o}}),Object.defineProperty(Tt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(o){this._matrix[4]=o}}),Object.defineProperty(Tt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(o){this._matrix[5]=o}}),Object.defineProperty(Tt.prototype,"a",{get:function(){return this._matrix[0]},set:function(o){this._matrix[0]=o}}),Object.defineProperty(Tt.prototype,"b",{get:function(){return this._matrix[1]},set:function(o){this._matrix[1]=o}}),Object.defineProperty(Tt.prototype,"c",{get:function(){return this._matrix[2]},set:function(o){this._matrix[2]=o}}),Object.defineProperty(Tt.prototype,"d",{get:function(){return this._matrix[3]},set:function(o){this._matrix[3]=o}}),Object.defineProperty(Tt.prototype,"e",{get:function(){return this._matrix[4]},set:function(o){this._matrix[4]=o}}),Object.defineProperty(Tt.prototype,"f",{get:function(){return this._matrix[5]},set:function(o){this._matrix[5]=o}}),Object.defineProperty(Tt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Tt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Tt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Tt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Tt.prototype.join=function(o){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(nt).join(o)},Tt.prototype.multiply=function(o){var m=o.sx*this.sx+o.shy*this.shx,C=o.sx*this.shy+o.shy*this.sy,D=o.shx*this.sx+o.sy*this.shx,Y=o.shx*this.shy+o.sy*this.sy,it=o.tx*this.sx+o.ty*this.shx+this.tx,yt=o.tx*this.shy+o.ty*this.sy+this.ty;return new Tt(m,C,D,Y,it,yt)},Tt.prototype.decompose=function(){var o=this.sx,m=this.shy,C=this.shx,D=this.sy,Y=this.tx,it=this.ty,yt=Math.sqrt(o*o+m*m),It=(o/=yt)*C+(m/=yt)*D;C-=o*It,D-=m*It;var Dt=Math.sqrt(C*C+D*D);return It/=Dt,o*(D/=Dt)<m*(C/=Dt)&&(o=-o,m=-m,It=-It,yt=-yt),{scale:new Tt(yt,0,0,Dt,0,0),translate:new Tt(1,0,0,1,Y,it),rotate:new Tt(o,m,-m,o,0,0),skew:new Tt(1,0,It,1,0,0)}},Tt.prototype.toString=function(o){return this.join(" ")},Tt.prototype.inversed=function(){var o=this.sx,m=this.shy,C=this.shx,D=this.sy,Y=this.tx,it=this.ty,yt=1/(o*D-m*C),It=D*yt,Dt=-m*yt,Zt=-C*yt,Yt=o*yt;return new Tt(It,Dt,Zt,Yt,-It*Y-Zt*it,-Dt*Y-Yt*it)},Tt.prototype.applyToPoint=function(o){var m=o.x*this.sx+o.y*this.shx+this.tx,C=o.x*this.shy+o.y*this.sy+this.ty;return new ti(m,C)},Tt.prototype.applyToRectangle=function(o){var m=this.applyToPoint(o),C=this.applyToPoint(new ti(o.x+o.w,o.y+o.h));return new Mi(m.x,m.y,C.x-m.x,C.y-m.y)},Tt.prototype.clone=function(){var o=this.sx,m=this.shy,C=this.shx,D=this.sy,Y=this.tx,it=this.ty;return new Tt(o,m,C,D,Y,it)},p.Matrix=Tt;var xr=p.matrixMult=function(o,m){return m.multiply(o)},Rr=new Tt(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Rr;var rr=function(o,m){if(!xn[o]){var C=(m instanceof Dn?"Sh":"P")+(Object.keys(ue).length+1).toString(10);m.id=C,xn[o]=C,ue[C]=m,ce.publish("addPattern",m)}};p.ShadingPattern=Dn,p.TilingPattern=wi,p.addShadingPattern=function(o,m){return G("addShadingPattern()"),rr(o,m),this},p.beginTilingPattern=function(o){G("beginTilingPattern()"),wa(o.boundingBox[0],o.boundingBox[1],o.boundingBox[2]-o.boundingBox[0],o.boundingBox[3]-o.boundingBox[1],o.matrix)},p.endTilingPattern=function(o,m){G("endTilingPattern()"),m.stream=Lt[j].join(`
|
||
`),rr(o,m),ce.publish("endTilingPattern",m),Dr.pop().restore()};var qe=p.__private__.newObject=function(){var o=Oe();return cr(o,!0),o},Oe=p.__private__.newObjectDeferred=function(){return J++,$[J]=function(){return tt},J},cr=function(o,m){return m=typeof m=="boolean"&&m,$[o]=tt,m&&O(o+" 0 obj"),o},zn=p.__private__.newAdditionalObject=function(){var o={objId:Oe(),content:""};return At.push(o),o},Kr=Oe(),Sr=Oe(),_r=p.__private__.decodeColorString=function(o){var m=o.split(" ");if(m.length!==2||m[1]!=="g"&&m[1]!=="G")m.length===5&&(m[4]==="k"||m[4]==="K")&&(m=[(1-m[0])*(1-m[3]),(1-m[1])*(1-m[3]),(1-m[2])*(1-m[3]),"r"]);else{var C=parseFloat(m[0]);m=[C,C,C,"r"]}for(var D="#",Y=0;Y<3;Y++)D+=("0"+Math.floor(255*parseFloat(m[Y])).toString(16)).slice(-2);return D},Pr=p.__private__.encodeColorString=function(o){var m;typeof o=="string"&&(o={ch1:o});var C=o.ch1,D=o.ch2,Y=o.ch3,it=o.ch4,yt=o.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof C=="string"&&C.charAt(0)!=="#"){var It=new Zo(C);if(It.ok)C=It.toHex();else if(!/^\d*\.?\d*$/.test(C))throw new Error('Invalid color "'+C+'" passed to jsPDF.encodeColorString.')}if(typeof C=="string"&&/^#[0-9A-Fa-f]{3}$/.test(C)&&(C="#"+C[1]+C[1]+C[2]+C[2]+C[3]+C[3]),typeof C=="string"&&/^#[0-9A-Fa-f]{6}$/.test(C)){var Dt=parseInt(C.substr(1),16);C=Dt>>16&255,D=Dt>>8&255,Y=255&Dt}if(D===void 0||it===void 0&&C===D&&D===Y)if(typeof C=="string")m=C+" "+yt[0];else switch(o.precision){case 2:m=bt(C/255)+" "+yt[0];break;case 3:default:m=k(C/255)+" "+yt[0]}else if(it===void 0||ve(it)==="object"){if(it&&!isNaN(it.a)&&it.a===0)return m=["1.","1.","1.",yt[1]].join(" ");if(typeof C=="string")m=[C,D,Y,yt[1]].join(" ");else switch(o.precision){case 2:m=[bt(C/255),bt(D/255),bt(Y/255),yt[1]].join(" ");break;default:case 3:m=[k(C/255),k(D/255),k(Y/255),yt[1]].join(" ")}}else if(typeof C=="string")m=[C,D,Y,it,yt[2]].join(" ");else switch(o.precision){case 2:m=[bt(C),bt(D),bt(Y),bt(it),yt[2]].join(" ");break;case 3:default:m=[k(C),k(D),k(Y),k(it),yt[2]].join(" ")}return m},Tr=p.__private__.getFilters=function(){return l},pr=p.__private__.putStream=function(o){var m=(o=o||{}).data||"",C=o.filters||Tr(),D=o.alreadyAppliedFilters||[],Y=o.addLength1||!1,it=m.length,yt=o.objectId,It=function(Ye){return Ye};if(x!==null&&yt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");x!==null&&(It=Je.encryptor(yt,0));var Dt={};C===!0&&(C=["FlateEncode"]);var Zt=o.additionalKeyValues||[],Yt=(Dt=zt.API.processDataByFilters!==void 0?zt.API.processDataByFilters(m,C):{data:m,reverseChain:[]}).reverseChain+(Array.isArray(D)?D.join(" "):D.toString());if(Dt.data.length!==0&&(Zt.push({key:"Length",value:Dt.data.length}),Y===!0&&Zt.push({key:"Length1",value:it})),Yt.length!=0)if(Yt.split("/").length-1==1)Zt.push({key:"Filter",value:Yt});else{Zt.push({key:"Filter",value:"["+Yt+"]"});for(var ne=0;ne<Zt.length;ne+=1)if(Zt[ne].key==="DecodeParms"){for(var Le=[],xe=0;xe<Dt.reverseChain.split("/").length-1;xe+=1)Le.push("null");Le.push(Zt[ne].value),Zt[ne].value="["+Le.join(" ")+"]"}}O("<<");for(var Be=0;Be<Zt.length;Be++)O("/"+Zt[Be].key+" "+Zt[Be].value);O(">>"),Dt.data.length!==0&&(O("stream"),O(It(Dt.data)),O("endstream"))},zr=p.__private__.putPage=function(o){var m=o.number,C=o.data,D=o.objId,Y=o.contentsObjId;cr(D,!0),O("<</Type /Page"),O("/Parent "+o.rootDictionaryObjId+" 0 R"),O("/Resources "+o.resourceDictionaryObjId+" 0 R"),O("/MediaBox ["+parseFloat(nt(o.mediaBox.bottomLeftX))+" "+parseFloat(nt(o.mediaBox.bottomLeftY))+" "+nt(o.mediaBox.topRightX)+" "+nt(o.mediaBox.topRightY)+"]"),o.cropBox!==null&&O("/CropBox ["+nt(o.cropBox.bottomLeftX)+" "+nt(o.cropBox.bottomLeftY)+" "+nt(o.cropBox.topRightX)+" "+nt(o.cropBox.topRightY)+"]"),o.bleedBox!==null&&O("/BleedBox ["+nt(o.bleedBox.bottomLeftX)+" "+nt(o.bleedBox.bottomLeftY)+" "+nt(o.bleedBox.topRightX)+" "+nt(o.bleedBox.topRightY)+"]"),o.trimBox!==null&&O("/TrimBox ["+nt(o.trimBox.bottomLeftX)+" "+nt(o.trimBox.bottomLeftY)+" "+nt(o.trimBox.topRightX)+" "+nt(o.trimBox.topRightY)+"]"),o.artBox!==null&&O("/ArtBox ["+nt(o.artBox.bottomLeftX)+" "+nt(o.artBox.bottomLeftY)+" "+nt(o.artBox.topRightX)+" "+nt(o.artBox.topRightY)+"]"),typeof o.userUnit=="number"&&o.userUnit!==1&&O("/UserUnit "+o.userUnit),ce.publish("putPage",{objId:D,pageContext:Jt[m],pageNumber:m,page:C}),O("/Contents "+Y+" 0 R"),O(">>"),O("endobj");var it=C.join(`
|
||
`);return Z===M.ADVANCED&&(it+=`
|
||
Q`),cr(Y,!0),pr({data:it,filters:Tr(),objectId:Y}),O("endobj"),D},_n=p.__private__.putPages=function(){var o,m,C=[];for(o=1;o<=Ae;o++)Jt[o].objId=Oe(),Jt[o].contentsObjId=Oe();for(o=1;o<=Ae;o++)C.push(zr({number:o,data:Lt[o],objId:Jt[o].objId,contentsObjId:Jt[o].contentsObjId,mediaBox:Jt[o].mediaBox,cropBox:Jt[o].cropBox,bleedBox:Jt[o].bleedBox,trimBox:Jt[o].trimBox,artBox:Jt[o].artBox,userUnit:Jt[o].userUnit,rootDictionaryObjId:Kr,resourceDictionaryObjId:Sr}));cr(Kr,!0),O("<</Type /Pages");var D="/Kids [";for(m=0;m<Ae;m++)D+=C[m]+" 0 R ";O(D+"]"),O("/Count "+Ae),O(">>"),O("endobj"),ce.publish("postPutPages")},Un=function(o){ce.publish("putFont",{font:o,out:O,newObject:qe,putStream:pr}),o.isAlreadyPutted!==!0&&(o.objectNumber=qe(),O("<<"),O("/Type /Font"),O("/BaseFont /"+yi(o.postScriptName)),O("/Subtype /Type1"),typeof o.encoding=="string"&&O("/Encoding /"+o.encoding),O("/FirstChar 32"),O("/LastChar 255"),O(">>"),O("endobj"))},Hn=function(){for(var o in pe)pe.hasOwnProperty(o)&&(A===!1||A===!0&&_.hasOwnProperty(o))&&Un(pe[o])},Wn=function(o){o.objectNumber=qe();var m=[];m.push({key:"Type",value:"/XObject"}),m.push({key:"Subtype",value:"/Form"}),m.push({key:"BBox",value:"["+[nt(o.x),nt(o.y),nt(o.x+o.width),nt(o.y+o.height)].join(" ")+"]"}),m.push({key:"Matrix",value:"["+o.matrix.toString()+"]"});var C=o.pages[1].join(`
|
||
`);pr({data:C,additionalKeyValues:m,objectId:o.objectNumber}),O("endobj")},Vn=function(){for(var o in He)He.hasOwnProperty(o)&&Wn(He[o])},ra=function(o,m){var C,D=[],Y=1/(m-1);for(C=0;C<1;C+=Y)D.push(C);if(D.push(1),o[0].offset!=0){var it={offset:0,color:o[0].color};o.unshift(it)}if(o[o.length-1].offset!=1){var yt={offset:1,color:o[o.length-1].color};o.push(yt)}for(var It="",Dt=0,Zt=0;Zt<D.length;Zt++){for(C=D[Zt];C>o[Dt+1].offset;)Dt++;var Yt=o[Dt].offset,ne=(C-Yt)/(o[Dt+1].offset-Yt),Le=o[Dt].color,xe=o[Dt+1].color;It+=W(Math.round((1-ne)*Le[0]+ne*xe[0]).toString(16))+W(Math.round((1-ne)*Le[1]+ne*xe[1]).toString(16))+W(Math.round((1-ne)*Le[2]+ne*xe[2]).toString(16))}return It.trim()},ns=function(o,m){m||(m=21);var C=qe(),D=ra(o.colors,m),Y=[];Y.push({key:"FunctionType",value:"0"}),Y.push({key:"Domain",value:"[0.0 1.0]"}),Y.push({key:"Size",value:"["+m+"]"}),Y.push({key:"BitsPerSample",value:"8"}),Y.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Y.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),pr({data:D,additionalKeyValues:Y,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:C}),O("endobj"),o.objectNumber=qe(),O("<< /ShadingType "+o.type),O("/ColorSpace /DeviceRGB");var it="/Coords ["+nt(parseFloat(o.coords[0]))+" "+nt(parseFloat(o.coords[1]))+" ";o.type===2?it+=nt(parseFloat(o.coords[2]))+" "+nt(parseFloat(o.coords[3])):it+=nt(parseFloat(o.coords[2]))+" "+nt(parseFloat(o.coords[3]))+" "+nt(parseFloat(o.coords[4]))+" "+nt(parseFloat(o.coords[5])),O(it+="]"),o.matrix&&O("/Matrix ["+o.matrix.toString()+"]"),O("/Function "+C+" 0 R"),O("/Extend [true true]"),O(">>"),O("endobj")},is=function(o,m){var C=Oe(),D=qe();m.push({resourcesOid:C,objectOid:D}),o.objectNumber=D;var Y=[];Y.push({key:"Type",value:"/Pattern"}),Y.push({key:"PatternType",value:"1"}),Y.push({key:"PaintType",value:"1"}),Y.push({key:"TilingType",value:"1"}),Y.push({key:"BBox",value:"["+o.boundingBox.map(nt).join(" ")+"]"}),Y.push({key:"XStep",value:nt(o.xStep)}),Y.push({key:"YStep",value:nt(o.yStep)}),Y.push({key:"Resources",value:C+" 0 R"}),o.matrix&&Y.push({key:"Matrix",value:"["+o.matrix.toString()+"]"}),pr({data:o.stream,additionalKeyValues:Y,objectId:o.objectNumber}),O("endobj")},Gn=function(o){var m;for(m in ue)ue.hasOwnProperty(m)&&(ue[m]instanceof Dn?ns(ue[m]):ue[m]instanceof wi&&is(ue[m],o))},na=function(o){for(var m in o.objectNumber=qe(),O("<<"),o)switch(m){case"opacity":O("/ca "+bt(o[m]));break;case"stroke-opacity":O("/CA "+bt(o[m]))}O(">>"),O("endobj")},as=function(){var o;for(o in Ne)Ne.hasOwnProperty(o)&&na(Ne[o])},Si=function(){for(var o in O("/XObject <<"),He)He.hasOwnProperty(o)&&He[o].objectNumber>=0&&O("/"+o+" "+He[o].objectNumber+" 0 R");ce.publish("putXobjectDict"),O(">>")},ss=function(){Je.oid=qe(),O("<<"),O("/Filter /Standard"),O("/V "+Je.v),O("/R "+Je.r),O("/U <"+Je.toHexString(Je.U)+">"),O("/O <"+Je.toHexString(Je.O)+">"),O("/P "+Je.P),O(">>"),O("endobj")},ia=function(){for(var o in O("/Font <<"),pe)pe.hasOwnProperty(o)&&(A===!1||A===!0&&_.hasOwnProperty(o))&&O("/"+o+" "+pe[o].objectNumber+" 0 R");O(">>")},os=function(){if(Object.keys(ue).length>0){for(var o in O("/Shading <<"),ue)ue.hasOwnProperty(o)&&ue[o]instanceof Dn&&ue[o].objectNumber>=0&&O("/"+o+" "+ue[o].objectNumber+" 0 R");ce.publish("putShadingPatternDict"),O(">>")}},Jn=function(o){if(Object.keys(ue).length>0){for(var m in O("/Pattern <<"),ue)ue.hasOwnProperty(m)&&ue[m]instanceof p.TilingPattern&&ue[m].objectNumber>=0&&ue[m].objectNumber<o&&O("/"+m+" "+ue[m].objectNumber+" 0 R");ce.publish("putTilingPatternDict"),O(">>")}},us=function(){if(Object.keys(Ne).length>0){var o;for(o in O("/ExtGState <<"),Ne)Ne.hasOwnProperty(o)&&Ne[o].objectNumber>=0&&O("/"+o+" "+Ne[o].objectNumber+" 0 R");ce.publish("putGStateDict"),O(">>")}},Pe=function(o){cr(o.resourcesOid,!0),O("<<"),O("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),ia(),os(),Jn(o.objectOid),us(),Si(),O(">>"),O("endobj")},aa=function(){var o=[];Hn(),as(),Vn(),Gn(o),ce.publish("putResources"),o.forEach(Pe),Pe({resourcesOid:Sr,objectOid:Number.MAX_SAFE_INTEGER}),ce.publish("postPutResources")},sa=function(){ce.publish("putAdditionalObjects");for(var o=0;o<At.length;o++){var m=At[o];cr(m.objId,!0),O(m.content),O("endobj")}ce.publish("postPutAdditionalObjects")},oa=function(o){we[o.fontName]=we[o.fontName]||{},we[o.fontName][o.fontStyle]=o.id},_i=function(o,m,C,D,Y){var it={id:"F"+(Object.keys(pe).length+1).toString(10),postScriptName:o,fontName:m,fontStyle:C,encoding:D,isStandardFont:Y||!1,metadata:{}};return ce.publish("addFont",{font:it,instance:this}),pe[it.id]=it,oa(it),it.id},cs=function(o){for(var m=0,C=wt.length;m<C;m++){var D=_i.call(this,o[m][0],o[m][1],o[m][2],wt[m][3],!0);A===!1&&(_[D]=!0);var Y=o[m][0].split("-");oa({id:D,fontName:Y[0],fontStyle:Y[1]||""})}ce.publish("addFonts",{fonts:pe,dictionary:we})},kr=function(o){return o.foo=function(){try{return o.apply(this,arguments)}catch(D){var m=D.stack||"";~m.indexOf(" at ")&&(m=m.split(" at ")[1]);var C="Error in function "+m.split(`
|
||
`)[0].split("<")[0]+": "+D.message;if(!Ut.console)throw new Error(C);Ut.console.error(C,D),Ut.alert&&alert(C)}},o.foo.bar=o,o.foo},Yn=function(o,m){var C,D,Y,it,yt,It,Dt,Zt,Yt;if(Y=(m=m||{}).sourceEncoding||"Unicode",yt=m.outputEncoding,(m.autoencode||yt)&&pe[ee].metadata&&pe[ee].metadata[Y]&&pe[ee].metadata[Y].encoding&&(it=pe[ee].metadata[Y].encoding,!yt&&pe[ee].encoding&&(yt=pe[ee].encoding),!yt&&it.codePages&&(yt=it.codePages[0]),typeof yt=="string"&&(yt=it[yt]),yt)){for(Dt=!1,It=[],C=0,D=o.length;C<D;C++)(Zt=yt[o.charCodeAt(C)])?It.push(String.fromCharCode(Zt)):It.push(o[C]),It[C].charCodeAt(0)>>8&&(Dt=!0);o=It.join("")}for(C=o.length;Dt===void 0&&C!==0;)o.charCodeAt(C-1)>>8&&(Dt=!0),C--;if(!Dt)return o;for(It=m.noBOM?[]:[254,255],C=0,D=o.length;C<D;C++){if((Yt=(Zt=o.charCodeAt(C))>>8)>>8)throw new Error("Character at position "+C+" of string '"+o+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");It.push(Yt),It.push(Zt-(Yt<<8))}return String.fromCharCode.apply(void 0,It)},nr=p.__private__.pdfEscape=p.pdfEscape=function(o,m){return Yn(o,m).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Pi=p.__private__.beginPage=function(o){Lt[++Ae]=[],Jt[Ae]={objId:0,contentsObjId:0,userUnit:Number(h),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(o[0]),topRightY:Number(o[1])}},ca(Ae),at(Lt[j])},ua=function(o,m){var C,D,Y;switch(n=m||n,typeof o=="string"&&(C=S(o.toLowerCase()),Array.isArray(C)&&(D=C[0],Y=C[1])),Array.isArray(o)&&(D=o[0]*Ft,Y=o[1]*Ft),isNaN(D)&&(D=c[0],Y=c[1]),(D>14400||Y>14400)&&(me.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),D=Math.min(14400,D),Y=Math.min(14400,Y)),c=[D,Y],n.substr(0,1)){case"l":Y>D&&(c=[Y,D]);break;case"p":D>Y&&(c=[Y,D])}Pi(c),ga(Ci),O(Fr),Oi!==0&&O(Oi+" J"),Bi!==0&&O(Bi+" j"),ce.publish("addPage",{pageNumber:Ae})},ls=function(o){o>0&&o<=Ae&&(Lt.splice(o,1),Jt.splice(o,1),Ae--,j>Ae&&(j=Ae),this.setPage(j))},ca=function(o){o>0&&o<=Ae&&(j=o)},hs=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return Lt.length-1},la=function(o,m,C){var D,Y=void 0;return C=C||{},o=o!==void 0?o:pe[ee].fontName,m=m!==void 0?m:pe[ee].fontStyle,D=o.toLowerCase(),we[D]!==void 0&&we[D][m]!==void 0?Y=we[D][m]:we[o]!==void 0&&we[o][m]!==void 0?Y=we[o][m]:C.disableWarning===!1&&me.warn("Unable to look up font label for font '"+o+"', '"+m+"'. Refer to getFontList() for available fonts."),Y||C.noFallback||(Y=we.times[m])==null&&(Y=we.times.normal),Y},fs=p.__private__.putInfo=function(){var o=qe(),m=function(D){return D};for(var C in x!==null&&(m=Je.encryptor(o,0)),O("<<"),O("/Producer ("+nr(m("jsPDF "+zt.version))+")"),Ht)Ht.hasOwnProperty(C)&&Ht[C]&&O("/"+C.substr(0,1).toUpperCase()+C.substr(1)+" ("+nr(m(Ht[C]))+")");O("/CreationDate ("+nr(m(ct))+")"),O(">>"),O("endobj")},ki=p.__private__.putCatalog=function(o){var m=(o=o||{}).rootDictionaryObjId||Kr;switch(qe(),O("<<"),O("/Type /Catalog"),O("/Pages "+m+" 0 R"),kt||(kt="fullwidth"),kt){case"fullwidth":O("/OpenAction [3 0 R /FitH null]");break;case"fullheight":O("/OpenAction [3 0 R /FitV null]");break;case"fullpage":O("/OpenAction [3 0 R /Fit]");break;case"original":O("/OpenAction [3 0 R /XYZ null null 1]");break;default:var C=""+kt;C.substr(C.length-1)==="%"&&(kt=parseInt(kt)/100),typeof kt=="number"&&O("/OpenAction [3 0 R /XYZ null null "+bt(kt)+"]")}switch(te||(te="continuous"),te){case"continuous":O("/PageLayout /OneColumn");break;case"single":O("/PageLayout /SinglePage");break;case"two":case"twoleft":O("/PageLayout /TwoColumnLeft");break;case"tworight":O("/PageLayout /TwoColumnRight")}Gt&&O("/PageMode /"+Gt),ce.publish("putCatalog"),O(">>"),O("endobj")},ds=p.__private__.putTrailer=function(){O("trailer"),O("<<"),O("/Size "+(J+1)),O("/Root "+J+" 0 R"),O("/Info "+(J-1)+" 0 R"),x!==null&&O("/Encrypt "+Je.oid+" 0 R"),O("/ID [ <"+st+"> <"+st+"> ]"),O(">>")},ps=p.__private__.putHeader=function(){O("%PDF-"+B),O("%ºß¬à")},gs=p.__private__.putXRef=function(){var o="0000000000";O("xref"),O("0 "+(J+1)),O("0000000000 65535 f ");for(var m=1;m<=J;m++)typeof $[m]=="function"?O((o+$[m]()).slice(-10)+" 00000 n "):$[m]!==void 0?O((o+$[m]).slice(-10)+" 00000 n "):O("0000000000 00000 n ")},Zr=p.__private__.buildDocument=function(){Wt(),at(et),ce.publish("buildDocument"),ps(),_n(),sa(),aa(),x!==null&&ss(),fs(),ki();var o=tt;return gs(),ds(),O("startxref"),O(""+o),O("%%EOF"),at(Lt[j]),et.join(`
|
||
`)},Xn=p.__private__.getBlob=function(o){return new Blob([Mt(o)],{type:"application/pdf"})},Kn=p.output=p.__private__.output=kr(function(o,m){switch(typeof(m=m||{})=="string"?m={filename:m}:m.filename=m.filename||"generated.pdf",o){case void 0:return Zr();case"save":p.save(m.filename);break;case"arraybuffer":return Mt(Zr());case"blob":return Xn(Zr());case"bloburi":case"bloburl":if(Ut.URL!==void 0&&typeof Ut.URL.createObjectURL=="function")return Ut.URL&&Ut.URL.createObjectURL(Xn(Zr()))||void 0;me.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var C="",D=Zr();try{C=Qs(D)}catch{C=Qs(unescape(encodeURIComponent(D)))}return"data:application/pdf;filename="+m.filename+";base64,"+C;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Ut)==="[object Window]"){var Y="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",it=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';m.pdfObjectUrl&&(Y=m.pdfObjectUrl,it="");var yt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+Y+'"'+it+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(m)+");<\/script></body></html>",It=Ut.open();return It!==null&&It.document.write(yt),It}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Ut)==="[object Window]"){var Dt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(m.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+m.filename+'" width="500px" height="400px" /></body></html>',Zt=Ut.open();if(Zt!==null){Zt.document.write(Dt);var Yt=this;Zt.document.documentElement.querySelector("#pdfViewer").onload=function(){Zt.document.title=m.filename,Zt.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(Yt.output("bloburl"))}}return Zt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Ut)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var ne='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",m)+'"></iframe></body></html>',Le=Ut.open();if(Le!==null&&(Le.document.write(ne),Le.document.title=m.filename),Le||typeof safari>"u")return Le;break;case"datauri":case"dataurl":return Ut.document.location.href=this.output("datauristring",m);default:return null}}),ha=function(o){return Array.isArray(Sn)===!0&&Sn.indexOf(o)>-1};switch(a){case"pt":Ft=1;break;case"mm":Ft=72/25.4;break;case"cm":Ft=72/2.54;break;case"in":Ft=72;break;case"px":Ft=ha("px_scaling")==1?.75:96/72;break;case"pc":case"em":Ft=12;break;case"ex":Ft=6;break;default:if(typeof a!="number")throw new Error("Invalid unit: "+a);Ft=a}var Je=null;Et(),Q();var ms=function(o){return x!==null?Je.encryptor(o,0):function(m){return m}},fa=p.__private__.getPageInfo=p.getPageInfo=function(o){if(isNaN(o)||o%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Jt[o].objId,pageNumber:o,pageContext:Jt[o]}},Vt=p.__private__.getPageInfoByObjId=function(o){if(isNaN(o)||o%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var m in Jt)if(Jt[m].objId===o)break;return fa(m)},vs=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Jt[j].objId,pageNumber:j,pageContext:Jt[j]}};p.addPage=function(){return ua.apply(this,arguments),this},p.setPage=function(){return ca.apply(this,arguments),at.call(this,Lt[j]),this},p.insertPage=function(o){return this.addPage(),this.movePage(j,o),this},p.movePage=function(o,m){var C,D;if(o>m){C=Lt[o],D=Jt[o];for(var Y=o;Y>m;Y--)Lt[Y]=Lt[Y-1],Jt[Y]=Jt[Y-1];Lt[m]=C,Jt[m]=D,this.setPage(m)}else if(o<m){C=Lt[o],D=Jt[o];for(var it=o;it<m;it++)Lt[it]=Lt[it+1],Jt[it]=Jt[it+1];Lt[m]=C,Jt[m]=D,this.setPage(m)}return this},p.deletePage=function(){return ls.apply(this,arguments),this},p.__private__.text=p.text=function(o,m,C,D,Y){var it,yt,It,Dt,Zt,Yt,ne,Le,xe,Be=(D=D||{}).scope||this;if(typeof o=="number"&&typeof m=="number"&&(typeof C=="string"||Array.isArray(C))){var Ye=C;C=m,m=o,o=Ye}if(arguments[3]instanceof Tt?(G("The transform parameter of text() with a Matrix value"),xe=Y):(It=arguments[4],Dt=arguments[5],ve(ne=arguments[3])==="object"&&ne!==null||(typeof It=="string"&&(Dt=It,It=null),typeof ne=="string"&&(Dt=ne,ne=null),typeof ne=="number"&&(It=ne,ne=null),D={flags:ne,angle:It,align:Dt})),isNaN(m)||isNaN(C)||o==null)throw new Error("Invalid arguments passed to jsPDF.text");if(o.length===0)return Be;var Re="",Ir=!1,lr=typeof D.lineHeightFactor=="number"?D.lineHeightFactor:kn,Wr=Be.internal.scaleFactor;function La(be){return be=be.split(" ").join(Array(D.TabLen||9).join(" ")),nr(be,ne)}function Ri(be){for(var ye,Fe=be.concat(),De=[],rn=Fe.length;rn--;)typeof(ye=Fe.shift())=="string"?De.push(ye):Array.isArray(be)&&(ye.length===1||ye[1]===void 0&&ye[2]===void 0)?De.push(ye[0]):De.push([ye[0],ye[1],ye[2]]);return De}function Ti(be,ye){var Fe;if(typeof be=="string")Fe=ye(be)[0];else if(Array.isArray(be)){for(var De,rn,Yi=be.concat(),hi=[],_a=Yi.length;_a--;)typeof(De=Yi.shift())=="string"?hi.push(ye(De)[0]):Array.isArray(De)&&typeof De[0]=="string"&&(rn=ye(De[0],De[1],De[2]),hi.push([rn[0],rn[1],rn[2]]));Fe=hi}return Fe}var ri=!1,zi=!0;if(typeof o=="string")ri=!0;else if(Array.isArray(o)){var Ui=o.concat();yt=[];for(var ni,We=Ui.length;We--;)(typeof(ni=Ui.shift())!="string"||Array.isArray(ni)&&typeof ni[0]!="string")&&(zi=!1);ri=zi}if(ri===!1)throw new Error('Type of text must be string or Array. "'+o+'" is not recognized.');typeof o=="string"&&(o=o.match(/[\r?\n]/)?o.split(/\r\n|\r|\n/g):[o]);var ii=xt/Be.internal.scaleFactor,ai=ii*(lr-1);switch(D.baseline){case"bottom":C-=ai;break;case"top":C+=ii-ai;break;case"hanging":C+=ii-2*ai;break;case"middle":C+=ii/2-ai}if((Yt=D.maxWidth||0)>0&&(typeof o=="string"?o=Be.splitTextToSize(o,Yt):Object.prototype.toString.call(o)==="[object Array]"&&(o=o.reduce(function(be,ye){return be.concat(Be.splitTextToSize(ye,Yt))},[]))),it={text:o,x:m,y:C,options:D,mutex:{pdfEscape:nr,activeFontKey:ee,fonts:pe,activeFontSize:xt}},ce.publish("preProcessText",it),o=it.text,It=(D=it.options).angle,!(xe instanceof Tt)&&It&&typeof It=="number"){It*=Math.PI/180,D.rotationDirection===0&&(It=-It),Z===M.ADVANCED&&(It=-It);var si=Math.cos(It),Hi=Math.sin(It);xe=new Tt(si,Hi,-Hi,si,0,0)}else It&&It instanceof Tt&&(xe=It);Z!==M.ADVANCED||xe||(xe=Rr),(Zt=D.charSpace||Qn)!==void 0&&(Re+=nt(F(Zt))+` Tc
|
||
`,this.setCharSpace(this.getCharSpace()||0)),(Le=D.horizontalScale)!==void 0&&(Re+=nt(100*Le)+` Tz
|
||
`),D.lang;var ir=-1,Ps=D.renderingMode!==void 0?D.renderingMode:D.stroke,Wi=Be.internal.getCurrentPageInfo().pageContext;switch(Ps){case 0:case!1:case"fill":ir=0;break;case 1:case!0:case"stroke":ir=1;break;case 2:case"fillThenStroke":ir=2;break;case 3:case"invisible":ir=3;break;case 4:case"fillAndAddForClipping":ir=4;break;case 5:case"strokeAndAddPathForClipping":ir=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":ir=6;break;case 7:case"addToPathForClipping":ir=7}var Na=Wi.usedRenderingMode!==void 0?Wi.usedRenderingMode:-1;ir!==-1?Re+=ir+` Tr
|
||
`:Na!==-1&&(Re+=`0 Tr
|
||
`),ir!==-1&&(Wi.usedRenderingMode=ir),Dt=D.align||"left";var gr,oi=xt*lr,Aa=Be.internal.pageSize.getWidth(),xa=pe[ee];Zt=D.charSpace||Qn,Yt=D.maxWidth||0,ne=Object.assign({autoencode:!0,noBOM:!0},D.flags);var ln=[],Cn=function(be){return Be.getStringUnitWidth(be,{font:xa,charSpace:Zt,fontSize:xt,doKerning:!1})*xt/Wr};if(Object.prototype.toString.call(o)==="[object Array]"){var ar;yt=Ri(o),Dt!=="left"&&(gr=yt.map(Cn));var Qe,hn=0;if(Dt==="right"){m-=gr[0],o=[],We=yt.length;for(var Qr=0;Qr<We;Qr++)Qr===0?(Qe=Hr(m),ar=$r(C)):(Qe=F(hn-gr[Qr]),ar=-oi),o.push([yt[Qr],Qe,ar]),hn=gr[Qr]}else if(Dt==="center"){m-=gr[0]/2,o=[],We=yt.length;for(var tn=0;tn<We;tn++)tn===0?(Qe=Hr(m),ar=$r(C)):(Qe=F((hn-gr[tn])/2),ar=-oi),o.push([yt[tn],Qe,ar]),hn=gr[tn]}else if(Dt==="left"){o=[],We=yt.length;for(var ui=0;ui<We;ui++)o.push(yt[ui])}else if(Dt==="justify"&&xa.encoding==="Identity-H"){o=[],We=yt.length,Yt=Yt!==0?Yt:Aa;for(var en=0,ke=0;ke<We;ke++)if(ar=ke===0?$r(C):-oi,Qe=ke===0?Hr(m):en,ke<We-1){var Vi=F((Yt-gr[ke])/(yt[ke].split(" ").length-1)),tr=yt[ke].split(" ");o.push([tr[0]+" ",Qe,ar]),en=0;for(var mr=1;mr<tr.length;mr++){var ci=(Cn(tr[mr-1]+" "+tr[mr])-Cn(tr[mr]))*Wr+Vi;mr==tr.length-1?o.push([tr[mr],ci,0]):o.push([tr[mr]+" ",ci,0]),en-=ci}}else o.push([yt[ke],Qe,ar]);o.push(["",en,0])}else{if(Dt!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(o=[],We=yt.length,Yt=Yt!==0?Yt:Aa,ke=0;ke<We;ke++)ar=ke===0?$r(C):-oi,Qe=ke===0?Hr(m):0,ke<We-1?ln.push(nt(F((Yt-gr[ke])/(yt[ke].split(" ").length-1)))):ln.push(0),o.push([yt[ke],Qe,ar])}}var Sa=typeof D.R2L=="boolean"?D.R2L:qt;Sa===!0&&(o=Ti(o,function(be,ye,Fe){return[be.split("").reverse().join(""),ye,Fe]})),it={text:o,x:m,y:C,options:D,mutex:{pdfEscape:nr,activeFontKey:ee,fonts:pe,activeFontSize:xt}},ce.publish("postProcessText",it),o=it.text,Ir=it.mutex.isHex||!1;var Gi=pe[ee].encoding;Gi!=="WinAnsiEncoding"&&Gi!=="StandardEncoding"||(o=Ti(o,function(be,ye,Fe){return[La(be),ye,Fe]})),yt=Ri(o),o=[];for(var jn,On,fn,Bn=0,li=1,Mn=Array.isArray(yt[0])?li:Bn,dn="",Ji=function(be,ye,Fe){var De="";return Fe instanceof Tt?(Fe=typeof D.angle=="number"?xr(Fe,new Tt(1,0,0,1,be,ye)):xr(new Tt(1,0,0,1,be,ye),Fe),Z===M.ADVANCED&&(Fe=xr(new Tt(1,0,0,-1,0,0),Fe)),De=Fe.join(" ")+` Tm
|
||
`):De=nt(be)+" "+nt(ye)+` Td
|
||
`,De},vr=0;vr<yt.length;vr++){switch(dn="",Mn){case li:fn=(Ir?"<":"(")+yt[vr][0]+(Ir?">":")"),jn=parseFloat(yt[vr][1]),On=parseFloat(yt[vr][2]);break;case Bn:fn=(Ir?"<":"(")+yt[vr]+(Ir?">":")"),jn=Hr(m),On=$r(C)}ln!==void 0&&ln[vr]!==void 0&&(dn=ln[vr]+` Tw
|
||
`),vr===0?o.push(dn+Ji(jn,On,xe)+fn):Mn===Bn?o.push(dn+fn):Mn===li&&o.push(dn+Ji(jn,On,xe)+fn)}o=Mn===Bn?o.join(` Tj
|
||
T* `):o.join(` Tj
|
||
`),o+=` Tj
|
||
`;var br=`BT
|
||
/`;return br+=ee+" "+xt+` Tf
|
||
`,br+=nt(xt*lr)+` TL
|
||
`,br+=Fn+`
|
||
`,br+=Re,br+=o,O(br+="ET"),_[ee]=!0,Be};var bs=p.__private__.clip=p.clip=function(o){return O(o==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return bs("evenodd")},p.__private__.discardPath=p.discardPath=function(){return O("n"),this};var Ur=p.__private__.isValidStyle=function(o){var m=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(o)!==-1&&(m=!0),m};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(o){return Ur(o)&&(v=o),this};var da=p.__private__.getStyle=p.getStyle=function(o){var m=v;switch(o){case"D":case"S":m="S";break;case"F":m="f";break;case"FD":case"DF":m="B";break;case"f":case"f*":case"B":case"B*":m=o}return m},pa=p.close=function(){return O("h"),this};p.stroke=function(){return O("S"),this},p.fill=function(o){return Zn("f",o),this},p.fillEvenOdd=function(o){return Zn("f*",o),this},p.fillStroke=function(o){return Zn("B",o),this},p.fillStrokeEvenOdd=function(o){return Zn("B*",o),this};var Zn=function(o,m){ve(m)==="object"?ws(m,o):O(o)},Fi=function(o){o===null||Z===M.ADVANCED&&o===void 0||(o=da(o),O(o))};function ys(o,m,C,D,Y){var it=new wi(m||this.boundingBox,C||this.xStep,D||this.yStep,this.gState,Y||this.matrix);it.stream=this.stream;var yt=o+"$$"+this.cloneIndex+++"$$";return rr(yt,it),it}var ws=function(o,m){var C=xn[o.key],D=ue[C];if(D instanceof Dn)O("q"),O(Ls(m)),D.gState&&p.setGState(D.gState),O(o.matrix.toString()+" cm"),O("/"+C+" sh"),O("Q");else if(D instanceof wi){var Y=new Tt(1,0,0,-1,0,cn());o.matrix&&(Y=Y.multiply(o.matrix||Rr),C=ys.call(D,o.key,o.boundingBox,o.xStep,o.yStep,Y).id),O("q"),O("/Pattern cs"),O("/"+C+" scn"),D.gState&&p.setGState(D.gState),O(m),O("Q")}},Ls=function(o){switch(o){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},Ii=p.moveTo=function(o,m){return O(nt(F(o))+" "+nt(z(m))+" m"),this},Pn=p.lineTo=function(o,m){return O(nt(F(o))+" "+nt(z(m))+" l"),this},on=p.curveTo=function(o,m,C,D,Y,it){return O([nt(F(o)),nt(z(m)),nt(F(C)),nt(z(D)),nt(F(Y)),nt(z(it)),"c"].join(" ")),this};p.__private__.line=p.line=function(o,m,C,D,Y){if(isNaN(o)||isNaN(m)||isNaN(C)||isNaN(D)||!Ur(Y))throw new Error("Invalid arguments passed to jsPDF.line");return Z===M.COMPAT?this.lines([[C-o,D-m]],o,m,[1,1],Y||"S"):this.lines([[C-o,D-m]],o,m,[1,1]).stroke()},p.__private__.lines=p.lines=function(o,m,C,D,Y,it){var yt,It,Dt,Zt,Yt,ne,Le,xe,Be,Ye,Re,Ir;if(typeof o=="number"&&(Ir=C,C=m,m=o,o=Ir),D=D||[1,1],it=it||!1,isNaN(m)||isNaN(C)||!Array.isArray(o)||!Array.isArray(D)||!Ur(Y)||typeof it!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Ii(m,C),yt=D[0],It=D[1],Zt=o.length,Ye=m,Re=C,Dt=0;Dt<Zt;Dt++)(Yt=o[Dt]).length===2?(Ye=Yt[0]*yt+Ye,Re=Yt[1]*It+Re,Pn(Ye,Re)):(ne=Yt[0]*yt+Ye,Le=Yt[1]*It+Re,xe=Yt[2]*yt+Ye,Be=Yt[3]*It+Re,Ye=Yt[4]*yt+Ye,Re=Yt[5]*It+Re,on(ne,Le,xe,Be,Ye,Re));return it&&pa(),Fi(Y),this},p.path=function(o){for(var m=0;m<o.length;m++){var C=o[m],D=C.c;switch(C.op){case"m":Ii(D[0],D[1]);break;case"l":Pn(D[0],D[1]);break;case"c":on.apply(this,D);break;case"h":pa()}}return this},p.__private__.rect=p.rect=function(o,m,C,D,Y){if(isNaN(o)||isNaN(m)||isNaN(C)||isNaN(D)||!Ur(Y))throw new Error("Invalid arguments passed to jsPDF.rect");return Z===M.COMPAT&&(D=-D),O([nt(F(o)),nt(z(m)),nt(F(C)),nt(F(D)),"re"].join(" ")),Fi(Y),this},p.__private__.triangle=p.triangle=function(o,m,C,D,Y,it,yt){if(isNaN(o)||isNaN(m)||isNaN(C)||isNaN(D)||isNaN(Y)||isNaN(it)||!Ur(yt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[C-o,D-m],[Y-C,it-D],[o-Y,m-it]],o,m,[1,1],yt,!0),this},p.__private__.roundedRect=p.roundedRect=function(o,m,C,D,Y,it,yt){if(isNaN(o)||isNaN(m)||isNaN(C)||isNaN(D)||isNaN(Y)||isNaN(it)||!Ur(yt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var It=4/3*(Math.SQRT2-1);return Y=Math.min(Y,.5*C),it=Math.min(it,.5*D),this.lines([[C-2*Y,0],[Y*It,0,Y,it-it*It,Y,it],[0,D-2*it],[0,it*It,-Y*It,it,-Y,it],[2*Y-C,0],[-Y*It,0,-Y,-it*It,-Y,-it],[0,2*it-D],[0,-it*It,Y*It,-it,Y,-it]],o+Y,m,[1,1],yt,!0),this},p.__private__.ellipse=p.ellipse=function(o,m,C,D,Y){if(isNaN(o)||isNaN(m)||isNaN(C)||isNaN(D)||!Ur(Y))throw new Error("Invalid arguments passed to jsPDF.ellipse");var it=4/3*(Math.SQRT2-1)*C,yt=4/3*(Math.SQRT2-1)*D;return Ii(o+C,m),on(o+C,m-yt,o+it,m-D,o,m-D),on(o-it,m-D,o-C,m-yt,o-C,m),on(o-C,m+yt,o-it,m+D,o,m+D),on(o+it,m+D,o+C,m+yt,o+C,m),Fi(Y),this},p.__private__.circle=p.circle=function(o,m,C,D){if(isNaN(o)||isNaN(m)||isNaN(C)||!Ur(D))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(o,m,C,C,D)},p.setFont=function(o,m,C){return C&&(m=Nt(m,C)),ee=la(o,m,{disableWarning:!1}),this};var Ns=p.__private__.getFont=p.getFont=function(){return pe[la.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var o,m,C={};for(o in we)if(we.hasOwnProperty(o))for(m in C[o]=[],we[o])we[o].hasOwnProperty(m)&&C[o].push(m);return C},p.addFont=function(o,m,C,D,Y){var it=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&it.indexOf(arguments[3])!==-1?Y=arguments[3]:arguments[3]&&it.indexOf(arguments[3])==-1&&(C=Nt(C,D)),Y=Y||"Identity-H",_i.call(this,o,m,C,Y)};var kn,Ci=i.lineWidth||.200025,$n=p.__private__.getLineWidth=p.getLineWidth=function(){return Ci},ga=p.__private__.setLineWidth=p.setLineWidth=function(o){return Ci=o,O(nt(F(o))+" w"),this};p.__private__.setLineDash=zt.API.setLineDash=zt.API.setLineDashPattern=function(o,m){if(o=o||[],m=m||0,isNaN(m)||!Array.isArray(o))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return o=o.map(function(C){return nt(F(C))}).join(" "),m=nt(F(m)),O("["+o+"] "+m+" d"),this};var ma=p.__private__.getLineHeight=p.getLineHeight=function(){return xt*kn};p.__private__.getLineHeight=p.getLineHeight=function(){return xt*kn};var va=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(o){return typeof(o=o||1.15)=="number"&&(kn=o),this},ba=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return kn};va(i.lineHeight);var Hr=p.__private__.getHorizontalCoordinate=function(o){return F(o)},$r=p.__private__.getVerticalCoordinate=function(o){return Z===M.ADVANCED?o:Jt[j].mediaBox.topRightY-Jt[j].mediaBox.bottomLeftY-F(o)},As=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(o){return nt(Hr(o))},un=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(o){return nt($r(o))},Fr=i.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return _r(Fr)},p.__private__.setStrokeColor=p.setDrawColor=function(o,m,C,D){return Fr=Pr({ch1:o,ch2:m,ch3:C,ch4:D,pdfColorType:"draw",precision:2}),O(Fr),this};var ji=i.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return _r(ji)},p.__private__.setFillColor=p.setFillColor=function(o,m,C,D){return ji=Pr({ch1:o,ch2:m,ch3:C,ch4:D,pdfColorType:"fill",precision:2}),O(ji),this};var Fn=i.textColor||"0 g",xs=p.__private__.getTextColor=p.getTextColor=function(){return _r(Fn)};p.__private__.setTextColor=p.setTextColor=function(o,m,C,D){return Fn=Pr({ch1:o,ch2:m,ch3:C,ch4:D,pdfColorType:"text",precision:3}),this};var Qn=i.charSpace,Ss=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(Qn||0)};p.__private__.setCharSpace=p.setCharSpace=function(o){if(isNaN(o))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Qn=o,this};var Oi=0;p.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},p.__private__.setLineCap=p.setLineCap=function(o){var m=p.CapJoinStyles[o];if(m===void 0)throw new Error("Line cap style of '"+o+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Oi=m,O(m+" J"),this};var Bi=0;p.__private__.setLineJoin=p.setLineJoin=function(o){var m=p.CapJoinStyles[o];if(m===void 0)throw new Error("Line join style of '"+o+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Bi=m,O(m+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(o){if(o=o||0,isNaN(o))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return O(nt(F(o))+" M"),this},p.GState=ts,p.setGState=function(o){(o=typeof o=="string"?Ne[Ar[o]]:ya(null,o)).equals(Xr)||(O("/"+o.id+" gs"),Xr=o)};var ya=function(o,m){if(!o||!Ar[o]){var C=!1;for(var D in Ne)if(Ne.hasOwnProperty(D)&&Ne[D].equals(m)){C=!0;break}if(C)m=Ne[D];else{var Y="GS"+(Object.keys(Ne).length+1).toString(10);Ne[Y]=m,m.id=Y}return o&&(Ar[o]=m.id),ce.publish("addGState",m),m}};p.addGState=function(o,m){return ya(o,m),this},p.saveGraphicsState=function(){return O("q"),Er.push({key:ee,size:xt,color:Fn}),this},p.restoreGraphicsState=function(){O("Q");var o=Er.pop();return ee=o.key,xt=o.size,Fn=o.color,Xr=null,this},p.setCurrentTransformationMatrix=function(o){return O(o.toString()+" cm"),this},p.comment=function(o){return O("#"+o),this};var ti=function(o,m){var C=o||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return C},set:function(it){isNaN(it)||(C=parseFloat(it))}});var D=m||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return D},set:function(it){isNaN(it)||(D=parseFloat(it))}});var Y="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return Y},set:function(it){Y=it.toString()}}),this},Mi=function(o,m,C,D){ti.call(this,o,m),this.type="rect";var Y=C||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return Y},set:function(yt){isNaN(yt)||(Y=parseFloat(yt))}});var it=D||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return it},set:function(yt){isNaN(yt)||(it=parseFloat(yt))}}),this},Ei=function(){this.page=Ae,this.currentPage=j,this.pages=Lt.slice(0),this.pagesContext=Jt.slice(0),this.x=Ge,this.y=se,this.matrix=Nr,this.width=In(j),this.height=cn(j),this.outputDestination=jt,this.id="",this.objectNumber=-1};Ei.prototype.restore=function(){Ae=this.page,j=this.currentPage,Jt=this.pagesContext,Lt=this.pages,Ge=this.x,se=this.y,Nr=this.matrix,qi(j,this.width),Di(j,this.height),jt=this.outputDestination};var wa=function(o,m,C,D,Y){Dr.push(new Ei),Ae=j=0,Lt=[],Ge=o,se=m,Nr=Y,Pi([C,D])},_s=function(o){if(qr[o])Dr.pop().restore();else{var m=new Ei,C="Xo"+(Object.keys(He).length+1).toString(10);m.id=C,qr[o]=C,He[C]=m,ce.publish("addFormObject",m),Dr.pop().restore()}};for(var ei in p.beginFormObject=function(o,m,C,D,Y){return wa(o,m,C,D,Y),this},p.endFormObject=function(o){return _s(o),this},p.doFormObject=function(o,m){var C=He[qr[o]];return O("q"),O(m.toString()+" cm"),O("/"+C.id+" Do"),O("Q"),this},p.getFormObject=function(o){var m=He[qr[o]];return{x:m.x,y:m.y,width:m.width,height:m.height,matrix:m.matrix}},p.save=function(o,m){return o=o||"generated.pdf",(m=m||{}).returnPromise=m.returnPromise||!1,m.returnPromise===!1?(qn(Xn(Zr()),o),typeof qn.unload=="function"&&Ut.setTimeout&&setTimeout(qn.unload,911),this):new Promise(function(C,D){try{var Y=qn(Xn(Zr()),o);typeof qn.unload=="function"&&Ut.setTimeout&&setTimeout(qn.unload,911),C(Y)}catch(it){D(it.message)}})},zt.API)zt.API.hasOwnProperty(ei)&&(ei==="events"&&zt.API.events.length?function(o,m){var C,D,Y;for(Y=m.length-1;Y!==-1;Y--)C=m[Y][0],D=m[Y][1],o.subscribe.apply(o,[C].concat(typeof D=="function"?[D]:D))}(ce,zt.API.events):p[ei]=zt.API[ei]);var In=p.getPageWidth=function(o){return(Jt[o=o||j].mediaBox.topRightX-Jt[o].mediaBox.bottomLeftX)/Ft},qi=p.setPageWidth=function(o,m){Jt[o].mediaBox.topRightX=m*Ft+Jt[o].mediaBox.bottomLeftX},cn=p.getPageHeight=function(o){return(Jt[o=o||j].mediaBox.topRightY-Jt[o].mediaBox.bottomLeftY)/Ft},Di=p.setPageHeight=function(o,m){Jt[o].mediaBox.topRightY=m*Ft+Jt[o].mediaBox.bottomLeftY};return p.internal={pdfEscape:nr,getStyle:da,getFont:Ns,getFontSize:Pt,getCharSpace:Ss,getTextColor:xs,getLineHeight:ma,getLineHeightFactor:ba,getLineWidth:$n,write:Kt,getHorizontalCoordinate:Hr,getVerticalCoordinate:$r,getCoordinateString:As,getVerticalCoordinateString:un,collections:{},newObject:qe,newAdditionalObject:zn,newObjectDeferred:Oe,newObjectDeferredBegin:cr,getFilters:Tr,putStream:pr,events:ce,scaleFactor:Ft,pageSize:{getWidth:function(){return In(j)},setWidth:function(o){qi(j,o)},getHeight:function(){return cn(j)},setHeight:function(o){Di(j,o)}},encryptionOptions:x,encryption:Je,getEncryptor:ms,output:Kn,getNumberOfPages:hs,pages:Lt,out:O,f2:bt,f3:k,getPageInfo:fa,getPageInfoByObjId:Vt,getCurrentPageInfo:vs,getPDFVersion:I,Point:ti,Rectangle:Mi,Matrix:Tt,hasHotfix:ha},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return In(j)},set:function(o){qi(j,o)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return cn(j)},set:function(o){Di(j,o)},enumerable:!0,configurable:!0}),cs.call(p,wt),ee="F1",ua(c,n),ce.publish("initialized"),p}bi.prototype.lsbFirstWord=function(i){return String.fromCharCode(i>>0&255,i>>8&255,i>>16&255,i>>24&255)},bi.prototype.toHexString=function(i){return i.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},bi.prototype.hexToBytes=function(i){for(var e=[],n=0;n<i.length;n+=2)e.push(String.fromCharCode(parseInt(i.substr(n,2),16)));return e.join("")},bi.prototype.processOwnerPassword=function(i,e){return eo(to(e).substr(0,5),i)},bi.prototype.encryptor=function(i,e){var n=to(this.encryptionKey+String.fromCharCode(255&i,i>>8&255,i>>16&255,255&e,e>>8&255)).substr(0,10);return function(a){return eo(n,a)}},ts.prototype.equals=function(i){var e,n="id,objectNumber,equals";if(!i||ve(i)!==ve(this))return!1;var a=0;for(e in this)if(!(n.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!i.hasOwnProperty(e)||this[e]!==i[e])return!1;a++}for(e in i)i.hasOwnProperty(e)&&n.indexOf(e)<0&&a--;return a===0},zt.API={events:[]},zt.version="3.0.1";var _e=zt.API,ao=1,Tn=function(i){return i.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},mi=function(i){return i.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Xt=function(i){return i.toFixed(2)},Ln=function(i){return i.toFixed(5)};_e.__acroform__={};var ur=function(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i},Do=function(i){return i*ao},Gr=function(i){var e=new eu,n=Bt.internal.getHeight(i)||0,a=Bt.internal.getWidth(i)||0;return e.BBox=[0,0,Number(Xt(a)),Number(Xt(n))],e},Zu=_e.__acroform__.setBit=function(i,e){if(i=i||0,e=e||0,isNaN(i)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return i|=1<<e},$u=_e.__acroform__.clearBit=function(i,e){if(i=i||0,e=e||0,isNaN(i)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return i&=~(1<<e)},Qu=_e.__acroform__.getBit=function(i,e){if(isNaN(i)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return(i&1<<e)==0?0:1},Ie=_e.__acroform__.getBitForPdf=function(i,e){if(isNaN(i)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Qu(i,e-1)},Ce=_e.__acroform__.setBitForPdf=function(i,e){if(isNaN(i)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Zu(i,e-1)},je=_e.__acroform__.clearBitForPdf=function(i,e){if(isNaN(i)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return $u(i,e-1)},tc=_e.__acroform__.calculateCoordinates=function(i,e){var n=e.internal.getHorizontalCoordinate,a=e.internal.getVerticalCoordinate,c=i[0],s=i[1],l=i[2],h=i[3],f={};return f.lowerLeft_X=n(c)||0,f.lowerLeft_Y=a(s+h)||0,f.upperRight_X=n(c+l)||0,f.upperRight_Y=a(s)||0,[Number(Xt(f.lowerLeft_X)),Number(Xt(f.lowerLeft_Y)),Number(Xt(f.upperRight_X)),Number(Xt(f.upperRight_Y))]},ec=function(i){if(i.appearanceStreamContent)return i.appearanceStreamContent;if(i.V||i.DV){var e=[],n=i._V||i.DV,a=ro(i,n),c=i.scope.internal.getFont(i.fontName,i.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(i.scope.__private__.encodeColorString(i.color)),e.push("/"+c+" "+Xt(a.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(a.text),e.push("ET"),e.push("Q"),e.push("EMC");var s=Gr(i);return s.scope=i.scope,s.stream=e.join(`
|
||
`),s}},ro=function(i,e){var n=i.fontSize===0?i.maxFontSize:i.fontSize,a={text:"",fontSize:""},c=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");c=i.multiline?c.map(function(k){return k.split(`
|
||
`)}):c.map(function(k){return[k]});var s=n,l=Bt.internal.getHeight(i)||0;l=l<0?-l:l;var h=Bt.internal.getWidth(i)||0;h=h<0?-h:h;var f=function(k,F,H){if(k+1<c.length){var z=F+" "+c[k+1][0];return Ja(z,i,H).width<=h-4}return!1};s++;t:for(;s>0;){e="",s--;var v,x,A=Ja("3",i,s).height,_=i.multiline?l-s:(l-A)/2,p=_+=2,B=0,I=0,q=0;if(s<=0){e=`(...) Tj
|
||
`,e+="% Width of Text: "+Ja(e,i,s=12).width+", FieldWidth:"+h+`
|
||
`;break}for(var S="",M=0,Z=0;Z<c.length;Z++)if(c.hasOwnProperty(Z)){var ut=!1;if(c[Z].length!==1&&q!==c[Z].length-1){if((A+2)*(M+2)+2>l)continue t;S+=c[Z][q],ut=!0,I=Z,Z--}else{S=(S+=c[Z][q]+" ").substr(S.length-1)==" "?S.substr(0,S.length-1):S;var dt=parseInt(Z),Nt=f(dt,S,s),nt=Z>=c.length-1;if(Nt&&!nt){S+=" ",q=0;continue}if(Nt||nt){if(nt)I=dt;else if(i.multiline&&(A+2)*(M+2)+2>l)continue t}else{if(!i.multiline||(A+2)*(M+2)+2>l)continue t;I=dt}}for(var G="",vt=B;vt<=I;vt++){var bt=c[vt];if(i.multiline){if(vt===I){G+=bt[q]+" ",q=(q+1)%bt.length;continue}if(vt===B){G+=bt[bt.length-1]+" ";continue}}G+=bt[0]+" "}switch(G=G.substr(G.length-1)==" "?G.substr(0,G.length-1):G,x=Ja(G,i,s).width,i.textAlign){case"right":v=h-x-2;break;case"center":v=(h-x)/2;break;case"left":default:v=2}e+=Xt(v)+" "+Xt(p)+` Td
|
||
`,e+="("+Tn(G)+`) Tj
|
||
`,e+=-Xt(v)+` 0 Td
|
||
`,p=-(s+2),x=0,B=ut?I:I+1,M++,S=""}break}return a.text=e,a.fontSize=s,a},Ja=function(i,e,n){var a=e.scope.internal.getFont(e.fontName,e.fontStyle),c=e.scope.getStringUnitWidth(i,{font:a,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:e.scope.getStringUnitWidth("3",{font:a,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:c}},rc={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},nc=function(i,e){var n={type:"reference",object:i};e.internal.getPageInfo(i.page).pageContext.annotations.find(function(a){return a.type===n.type&&a.object===n.object})===void 0&&e.internal.getPageInfo(i.page).pageContext.annotations.push(n)},ic=function(i,e){for(var n in i)if(i.hasOwnProperty(n)){var a=n,c=i[n];e.internal.newObjectDeferredBegin(c.objId,!0),ve(c)==="object"&&typeof c.putStream=="function"&&c.putStream(),delete i[a]}},ac=function(i,e){if(e.scope=i,i.internal!==void 0&&(i.internal.acroformPlugin===void 0||i.internal.acroformPlugin.isInitialized===!1)){if(Br.FieldNum=0,i.internal.acroformPlugin=JSON.parse(JSON.stringify(rc)),i.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");ao=i.internal.scaleFactor,i.internal.acroformPlugin.acroFormDictionaryRoot=new ru,i.internal.acroformPlugin.acroFormDictionaryRoot.scope=i,i.internal.acroformPlugin.acroFormDictionaryRoot._eventID=i.internal.events.subscribe("postPutResources",function(){(function(n){n.internal.events.unsubscribe(n.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete n.internal.acroformPlugin.acroFormDictionaryRoot._eventID,n.internal.acroformPlugin.printedOut=!0})(i)}),i.internal.events.subscribe("buildDocument",function(){(function(n){n.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var a=n.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var c in a)if(a.hasOwnProperty(c)){var s=a[c];s.objId=void 0,s.hasAnnotation&&nc(s,n)}})(i)}),i.internal.events.subscribe("putCatalog",function(){(function(n){if(n.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");n.internal.write("/AcroForm "+n.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(i)}),i.internal.events.subscribe("postPutPages",function(n){(function(a,c){var s=!a;for(var l in a||(c.internal.newObjectDeferredBegin(c.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),c.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),a=a||c.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(a.hasOwnProperty(l)){var h=a[l],f=[],v=h.Rect;if(h.Rect&&(h.Rect=tc(h.Rect,c)),c.internal.newObjectDeferredBegin(h.objId,!0),h.DA=Bt.createDefaultAppearanceStream(h),ve(h)==="object"&&typeof h.getKeyValueListForStream=="function"&&(f=h.getKeyValueListForStream()),h.Rect=v,h.hasAppearanceStream&&!h.appearanceStreamContent){var x=ec(h);f.push({key:"AP",value:"<</N "+x+">>"}),c.internal.acroformPlugin.xForms.push(x)}if(h.appearanceStreamContent){var A="";for(var _ in h.appearanceStreamContent)if(h.appearanceStreamContent.hasOwnProperty(_)){var p=h.appearanceStreamContent[_];if(A+="/"+_+" ",A+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var l in p)if(p.hasOwnProperty(l)){var B=p[l];typeof B=="function"&&(B=B.call(c,h)),A+="/"+l+" "+B+" ",c.internal.acroformPlugin.xForms.indexOf(B)>=0||c.internal.acroformPlugin.xForms.push(B)}}else typeof(B=p)=="function"&&(B=B.call(c,h)),A+="/"+l+" "+B,c.internal.acroformPlugin.xForms.indexOf(B)>=0||c.internal.acroformPlugin.xForms.push(B);A+=">>"}f.push({key:"AP",value:`<<
|
||
`+A+">>"})}c.internal.putStream({additionalKeyValues:f,objectId:h.objId}),c.internal.out("endobj")}s&&ic(c.internal.acroformPlugin.xForms,c)})(n,i)}),i.internal.acroformPlugin.isInitialized=!0}},tu=_e.__acroform__.arrayToPdfArray=function(i,e,n){var a=function(l){return l};if(Array.isArray(i)){for(var c="[",s=0;s<i.length;s++)switch(s!==0&&(c+=" "),ve(i[s])){case"boolean":case"number":case"object":c+=i[s].toString();break;case"string":i[s].substr(0,1)!=="/"?(e!==void 0&&n&&(a=n.internal.getEncryptor(e)),c+="("+Tn(a(i[s].toString()))+")"):c+=i[s].toString()}return c+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Ys=function(i,e,n){var a=function(c){return c};return e!==void 0&&n&&(a=n.internal.getEncryptor(e)),(i=i||"").toString(),i="("+Tn(a(i))+")"},Jr=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(i){this._objId=i}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Jr.prototype.toString=function(){return this.objId+" 0 R"},Jr.prototype.putStream=function(){var i=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:i,objectId:this.objId}),this.scope.internal.out("endobj")},Jr.prototype.getKeyValueListForStream=function(){var i=[],e=Object.getOwnPropertyNames(this).filter(function(s){return s!="content"&&s!="appearanceStreamContent"&&s!="scope"&&s!="objId"&&s.substring(0,1)!="_"});for(var n in e)if(Object.getOwnPropertyDescriptor(this,e[n]).configurable===!1){var a=e[n],c=this[a];c&&(Array.isArray(c)?i.push({key:a,value:tu(c,this.objId,this.scope)}):c instanceof Jr?(c.scope=this.scope,i.push({key:a,value:c.objId+" 0 R"})):typeof c!="function"&&i.push({key:a,value:c}))}return i};var eu=function(){Jr.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var i,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(n){e=n}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(n){i=n.trim()},get:function(){return i||null}})};ur(eu,Jr);var ru=function(){Jr.call(this);var i,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(i){var n=function(a){return a};return this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),"("+Tn(n(i))+")"}},set:function(n){i=n}})};ur(ru,Jr);var Br=function i(){Jr.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute F supplied.');e=S}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Ie(e,3)},set:function(S){S?this.F=Ce(e,3):this.F=je(e,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute Ff supplied.');n=S}});var a=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(a.length!==0)return a},set:function(S){a=S!==void 0?S:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a[0])?0:a[0]},set:function(S){a[0]=S}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a[1])?0:a[1]},set:function(S){a[1]=S}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a[2])?0:a[2]},set:function(S){a[2]=S}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a[3])?0:a[3]},set:function(S){a[3]=S}});var c="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return c},set:function(S){switch(S){case"/Btn":case"/Tx":case"/Ch":case"/Sig":c=S;break;default:throw new Error('Invalid value "'+S+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!s||s.length<1){if(this instanceof es)return;s="FieldObject"+i.FieldNum++}var S=function(M){return M};return this.scope&&(S=this.scope.internal.getEncryptor(this.objId)),"("+Tn(S(s))+")"},set:function(S){s=S.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return s},set:function(S){s=S}});var l="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return l},set:function(S){l=S}});var h="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return h},set:function(S){h=S}});var f=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return f},set:function(S){f=S}});var v=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return v===void 0?50/ao:v},set:function(S){v=S}});var x="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return x},set:function(S){x=S}});var A="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!A||this instanceof es||this instanceof Rn))return Ys(A,this.objId,this.scope)},set:function(S){S=S.toString(),A=S}});var _=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(_)return this instanceof Ue?_:Ys(_,this.objId,this.scope)},set:function(S){S=S.toString(),_=this instanceof Ue?S:S.substr(0,1)==="("?mi(S.substr(1,S.length-2)):mi(S)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Ue?mi(_.substr(1,_.length-1)):_},set:function(S){S=S.toString(),_=this instanceof Ue?"/"+S:S}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(S){this.V=S}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof Ue?p:Ys(p,this.objId,this.scope)},set:function(S){S=S.toString(),p=this instanceof Ue?S:S.substr(0,1)==="("?mi(S.substr(1,S.length-2)):mi(S)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Ue?mi(p.substr(1,p.length-1)):p},set:function(S){S=S.toString(),p=this instanceof Ue?"/"+S:S}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var B,I=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return I},set:function(S){S=!!S,I=S}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(B)return B},set:function(S){B=S}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,1)},set:function(S){S?this.Ff=Ce(this.Ff,1):this.Ff=je(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,2)},set:function(S){S?this.Ff=Ce(this.Ff,2):this.Ff=je(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,3)},set:function(S){S?this.Ff=Ce(this.Ff,3):this.Ff=je(this.Ff,3)}});var q=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(q!==null)return q},set:function(S){if([0,1,2].indexOf(S)===-1)throw new Error('Invalid value "'+S+'" for attribute Q supplied.');q=S}}),Object.defineProperty(this,"textAlign",{get:function(){var S;switch(q){case 0:default:S="left";break;case 1:S="center";break;case 2:S="right"}return S},configurable:!0,enumerable:!0,set:function(S){switch(S){case"right":case 2:q=2;break;case"center":case 1:q=1;break;case"left":case 0:default:q=0}}})};ur(Br,Jr);var Li=function(){Br.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var i=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return i},set:function(n){i=n}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return i},set:function(n){i=n}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return tu(e,this.objId,this.scope)},set:function(n){var a,c;c=[],typeof(a=n)=="string"&&(c=function(s,l,h){h||(h=1);for(var f,v=[];f=l.exec(s);)v.push(f[h]);return v}(a,/\((.*?)\)/g)),e=c}}),this.getOptions=function(){return e},this.setOptions=function(n){e=n,this.sort&&e.sort()},this.addOption=function(n){n=(n=n||"").toString(),e.push(n),this.sort&&e.sort()},this.removeOption=function(n,a){for(a=a||!1,n=(n=n||"").toString();e.indexOf(n)!==-1&&(e.splice(e.indexOf(n),1),a!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,18)},set:function(n){n?this.Ff=Ce(this.Ff,18):this.Ff=je(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,19)},set:function(n){this.combo===!0&&(n?this.Ff=Ce(this.Ff,19):this.Ff=je(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,20)},set:function(n){n?(this.Ff=Ce(this.Ff,20),e.sort()):this.Ff=je(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,22)},set:function(n){n?this.Ff=Ce(this.Ff,22):this.Ff=je(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,23)},set:function(n){n?this.Ff=Ce(this.Ff,23):this.Ff=je(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,27)},set:function(n){n?this.Ff=Ce(this.Ff,27):this.Ff=je(this.Ff,27)}}),this.hasAppearanceStream=!1};ur(Li,Br);var Ni=function(){Li.call(this),this.fontName="helvetica",this.combo=!1};ur(Ni,Li);var Ai=function(){Ni.call(this),this.combo=!0};ur(Ai,Ni);var Ka=function(){Ai.call(this),this.edit=!0};ur(Ka,Ai);var Ue=function(){Br.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,15)},set:function(n){n?this.Ff=Ce(this.Ff,15):this.Ff=je(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,16)},set:function(n){n?this.Ff=Ce(this.Ff,16):this.Ff=je(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,17)},set:function(n){n?this.Ff=Ce(this.Ff,17):this.Ff=je(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,26)},set:function(n){n?this.Ff=Ce(this.Ff,26):this.Ff=je(this.Ff,26)}});var i,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var n=function(s){return s};if(this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var a,c=[];for(a in c.push("<<"),e)c.push("/"+a+" ("+Tn(n(e[a]))+")");return c.push(">>"),c.join(`
|
||
`)}},set:function(n){ve(n)==="object"&&(e=n)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(n){typeof n=="string"&&(e.CA=n)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return i},set:function(n){i=n}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return i.substr(1,i.length-1)},set:function(n){i="/"+n}})};ur(Ue,Br);var Za=function(){Ue.call(this),this.pushButton=!0};ur(Za,Ue);var xi=function(){Ue.call(this),this.radio=!0,this.pushButton=!1;var i=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){i=e!==void 0?e:[]}})};ur(xi,Ue);var es=function(){var i,e;Br.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return i},set:function(c){i=c}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(c){e=c}});var n,a={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var c=function(h){return h};this.scope&&(c=this.scope.internal.getEncryptor(this.objId));var s,l=[];for(s in l.push("<<"),a)l.push("/"+s+" ("+Tn(c(a[s]))+")");return l.push(">>"),l.join(`
|
||
`)},set:function(c){ve(c)==="object"&&(a=c)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return a.CA||""},set:function(c){typeof c=="string"&&(a.CA=c)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(c){n=c}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(c){n="/"+c}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Bt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};ur(es,Br),xi.prototype.setAppearance=function(i){if(!("createAppearanceStream"in i)||!("getCA"in i))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var n=this.Kids[e];n.appearanceStreamContent=i.createAppearanceStream(n.optionName),n.caption=i.getCA()}},xi.prototype.createOption=function(i){var e=new es;return e.Parent=this,e.optionName=i,this.Kids.push(e),sc.call(this.scope,e),e};var $a=function(){Ue.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Bt.CheckBox.createAppearanceStream()};ur($a,Ue);var Rn=function(){Br.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,13)},set:function(e){e?this.Ff=Ce(this.Ff,13):this.Ff=je(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,21)},set:function(e){e?this.Ff=Ce(this.Ff,21):this.Ff=je(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,23)},set:function(e){e?this.Ff=Ce(this.Ff,23):this.Ff=je(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,24)},set:function(e){e?this.Ff=Ce(this.Ff,24):this.Ff=je(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,25)},set:function(e){e?this.Ff=Ce(this.Ff,25):this.Ff=je(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,26)},set:function(e){e?this.Ff=Ce(this.Ff,26):this.Ff=je(this.Ff,26)}});var i=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){i=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return i},set:function(e){Number.isInteger(e)&&(i=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};ur(Rn,Br);var Qa=function(){Rn.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,14)},set:function(i){i?this.Ff=Ce(this.Ff,14):this.Ff=je(this.Ff,14)}}),this.password=!0};ur(Qa,Rn);var Bt={CheckBox:{createAppearanceStream:function(){return{N:{On:Bt.CheckBox.YesNormal},D:{On:Bt.CheckBox.YesPushDown,Off:Bt.CheckBox.OffPushDown}}},YesPushDown:function(i){var e=Gr(i);e.scope=i.scope;var n=[],a=i.scope.internal.getFont(i.fontName,i.fontStyle).id,c=i.scope.__private__.encodeColorString(i.color),s=ro(i,i.caption);return n.push("0.749023 g"),n.push("0 0 "+Xt(Bt.internal.getWidth(i))+" "+Xt(Bt.internal.getHeight(i))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+a+" "+Xt(s.fontSize)+" Tf "+c),n.push("BT"),n.push(s.text),n.push("ET"),n.push("Q"),n.push("EMC"),e.stream=n.join(`
|
||
`),e},YesNormal:function(i){var e=Gr(i);e.scope=i.scope;var n=i.scope.internal.getFont(i.fontName,i.fontStyle).id,a=i.scope.__private__.encodeColorString(i.color),c=[],s=Bt.internal.getHeight(i),l=Bt.internal.getWidth(i),h=ro(i,i.caption);return c.push("1 g"),c.push("0 0 "+Xt(l)+" "+Xt(s)+" re"),c.push("f"),c.push("q"),c.push("0 0 1 rg"),c.push("0 0 "+Xt(l-1)+" "+Xt(s-1)+" re"),c.push("W"),c.push("n"),c.push("0 g"),c.push("BT"),c.push("/"+n+" "+Xt(h.fontSize)+" Tf "+a),c.push(h.text),c.push("ET"),c.push("Q"),e.stream=c.join(`
|
||
`),e},OffPushDown:function(i){var e=Gr(i);e.scope=i.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Xt(Bt.internal.getWidth(i))+" "+Xt(Bt.internal.getHeight(i))+" re"),n.push("f"),e.stream=n.join(`
|
||
`),e}},RadioButton:{Circle:{createAppearanceStream:function(i){var e={D:{Off:Bt.RadioButton.Circle.OffPushDown},N:{}};return e.N[i]=Bt.RadioButton.Circle.YesNormal,e.D[i]=Bt.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(i){var e=Gr(i);e.scope=i.scope;var n=[],a=Bt.internal.getWidth(i)<=Bt.internal.getHeight(i)?Bt.internal.getWidth(i)/4:Bt.internal.getHeight(i)/4;a=Number((.9*a).toFixed(5));var c=Bt.internal.Bezier_C,s=Number((a*c).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+Ln(Bt.internal.getWidth(i)/2)+" "+Ln(Bt.internal.getHeight(i)/2)+" cm"),n.push(a+" 0 m"),n.push(a+" "+s+" "+s+" "+a+" 0 "+a+" c"),n.push("-"+s+" "+a+" -"+a+" "+s+" -"+a+" 0 c"),n.push("-"+a+" -"+s+" -"+s+" -"+a+" 0 -"+a+" c"),n.push(s+" -"+a+" "+a+" -"+s+" "+a+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(`
|
||
`),e},YesPushDown:function(i){var e=Gr(i);e.scope=i.scope;var n=[],a=Bt.internal.getWidth(i)<=Bt.internal.getHeight(i)?Bt.internal.getWidth(i)/4:Bt.internal.getHeight(i)/4;a=Number((.9*a).toFixed(5));var c=Number((2*a).toFixed(5)),s=Number((c*Bt.internal.Bezier_C).toFixed(5)),l=Number((a*Bt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+Ln(Bt.internal.getWidth(i)/2)+" "+Ln(Bt.internal.getHeight(i)/2)+" cm"),n.push(c+" 0 m"),n.push(c+" "+s+" "+s+" "+c+" 0 "+c+" c"),n.push("-"+s+" "+c+" -"+c+" "+s+" -"+c+" 0 c"),n.push("-"+c+" -"+s+" -"+s+" -"+c+" 0 -"+c+" c"),n.push(s+" -"+c+" "+c+" -"+s+" "+c+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+Ln(Bt.internal.getWidth(i)/2)+" "+Ln(Bt.internal.getHeight(i)/2)+" cm"),n.push(a+" 0 m"),n.push(a+" "+l+" "+l+" "+a+" 0 "+a+" c"),n.push("-"+l+" "+a+" -"+a+" "+l+" -"+a+" 0 c"),n.push("-"+a+" -"+l+" -"+l+" -"+a+" 0 -"+a+" c"),n.push(l+" -"+a+" "+a+" -"+l+" "+a+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(`
|
||
`),e},OffPushDown:function(i){var e=Gr(i);e.scope=i.scope;var n=[],a=Bt.internal.getWidth(i)<=Bt.internal.getHeight(i)?Bt.internal.getWidth(i)/4:Bt.internal.getHeight(i)/4;a=Number((.9*a).toFixed(5));var c=Number((2*a).toFixed(5)),s=Number((c*Bt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+Ln(Bt.internal.getWidth(i)/2)+" "+Ln(Bt.internal.getHeight(i)/2)+" cm"),n.push(c+" 0 m"),n.push(c+" "+s+" "+s+" "+c+" 0 "+c+" c"),n.push("-"+s+" "+c+" -"+c+" "+s+" -"+c+" 0 c"),n.push("-"+c+" -"+s+" -"+s+" -"+c+" 0 -"+c+" c"),n.push(s+" -"+c+" "+c+" -"+s+" "+c+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(`
|
||
`),e}},Cross:{createAppearanceStream:function(i){var e={D:{Off:Bt.RadioButton.Cross.OffPushDown},N:{}};return e.N[i]=Bt.RadioButton.Cross.YesNormal,e.D[i]=Bt.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(i){var e=Gr(i);e.scope=i.scope;var n=[],a=Bt.internal.calculateCross(i);return n.push("q"),n.push("1 1 "+Xt(Bt.internal.getWidth(i)-2)+" "+Xt(Bt.internal.getHeight(i)-2)+" re"),n.push("W"),n.push("n"),n.push(Xt(a.x1.x)+" "+Xt(a.x1.y)+" m"),n.push(Xt(a.x2.x)+" "+Xt(a.x2.y)+" l"),n.push(Xt(a.x4.x)+" "+Xt(a.x4.y)+" m"),n.push(Xt(a.x3.x)+" "+Xt(a.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(`
|
||
`),e},YesPushDown:function(i){var e=Gr(i);e.scope=i.scope;var n=Bt.internal.calculateCross(i),a=[];return a.push("0.749023 g"),a.push("0 0 "+Xt(Bt.internal.getWidth(i))+" "+Xt(Bt.internal.getHeight(i))+" re"),a.push("f"),a.push("q"),a.push("1 1 "+Xt(Bt.internal.getWidth(i)-2)+" "+Xt(Bt.internal.getHeight(i)-2)+" re"),a.push("W"),a.push("n"),a.push(Xt(n.x1.x)+" "+Xt(n.x1.y)+" m"),a.push(Xt(n.x2.x)+" "+Xt(n.x2.y)+" l"),a.push(Xt(n.x4.x)+" "+Xt(n.x4.y)+" m"),a.push(Xt(n.x3.x)+" "+Xt(n.x3.y)+" l"),a.push("s"),a.push("Q"),e.stream=a.join(`
|
||
`),e},OffPushDown:function(i){var e=Gr(i);e.scope=i.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Xt(Bt.internal.getWidth(i))+" "+Xt(Bt.internal.getHeight(i))+" re"),n.push("f"),e.stream=n.join(`
|
||
`),e}}},createDefaultAppearanceStream:function(i){var e=i.scope.internal.getFont(i.fontName,i.fontStyle).id,n=i.scope.__private__.encodeColorString(i.color);return"/"+e+" "+i.fontSize+" Tf "+n}};Bt.internal={Bezier_C:.551915024494,calculateCross:function(i){var e=Bt.internal.getWidth(i),n=Bt.internal.getHeight(i),a=Math.min(e,n);return{x1:{x:(e-a)/2,y:(n-a)/2+a},x2:{x:(e-a)/2+a,y:(n-a)/2},x3:{x:(e-a)/2,y:(n-a)/2},x4:{x:(e-a)/2+a,y:(n-a)/2+a}}}},Bt.internal.getWidth=function(i){var e=0;return ve(i)==="object"&&(e=Do(i.Rect[2])),e},Bt.internal.getHeight=function(i){var e=0;return ve(i)==="object"&&(e=Do(i.Rect[3])),e};var sc=_e.addField=function(i){if(ac(this,i),!(i instanceof Br))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=i).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),i.page=i.scope.internal.getCurrentPageInfo().pageNumber,this};_e.AcroFormChoiceField=Li,_e.AcroFormListBox=Ni,_e.AcroFormComboBox=Ai,_e.AcroFormEditBox=Ka,_e.AcroFormButton=Ue,_e.AcroFormPushButton=Za,_e.AcroFormRadioButton=xi,_e.AcroFormCheckBox=$a,_e.AcroFormTextField=Rn,_e.AcroFormPasswordField=Qa,_e.AcroFormAppearance=Bt,_e.AcroForm={ChoiceField:Li,ListBox:Ni,ComboBox:Ai,EditBox:Ka,Button:Ue,PushButton:Za,RadioButton:xi,CheckBox:$a,TextField:Rn,PasswordField:Qa,Appearance:Bt},zt.AcroForm={ChoiceField:Li,ListBox:Ni,ComboBox:Ai,EditBox:Ka,Button:Ue,PushButton:Za,RadioButton:xi,CheckBox:$a,TextField:Rn,PasswordField:Qa,Appearance:Bt};zt.AcroForm;function nu(i){return i.reduce(function(e,n,a){return e[n]=a,e},{})}(function(i){i.__addimage__={};var e="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},a=i.__addimage__.getImageFileTypeByImageData=function(k,F){var H,z,ct,st,mt,Q=e;if((F=F||e)==="RGBA"||k.data!==void 0&&k.data instanceof Uint8ClampedArray&&"height"in k&&"width"in k)return"RGBA";if(Nt(k))for(mt in n)for(ct=n[mt],H=0;H<ct.length;H+=1){for(st=!0,z=0;z<ct[H].length;z+=1)if(ct[H][z]!==void 0&&ct[H][z]!==k[z]){st=!1;break}if(st===!0){Q=mt;break}}else for(mt in n)for(ct=n[mt],H=0;H<ct.length;H+=1){for(st=!0,z=0;z<ct[H].length;z+=1)if(ct[H][z]!==void 0&&ct[H][z]!==k.charCodeAt(z)){st=!1;break}if(st===!0){Q=mt;break}}return Q===e&&F!==e&&(Q=F),Q},c=function k(F){for(var H=this.internal.write,z=this.internal.putStream,ct=(0,this.internal.getFilters)();ct.indexOf("FlateEncode")!==-1;)ct.splice(ct.indexOf("FlateEncode"),1);F.objectId=this.internal.newObject();var st=[];if(st.push({key:"Type",value:"/XObject"}),st.push({key:"Subtype",value:"/Image"}),st.push({key:"Width",value:F.width}),st.push({key:"Height",value:F.height}),F.colorSpace===q.INDEXED?st.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(F.palette.length/3-1)+" "+("sMask"in F&&F.sMask!==void 0?F.objectId+2:F.objectId+1)+" 0 R]"}):(st.push({key:"ColorSpace",value:"/"+F.colorSpace}),F.colorSpace===q.DEVICE_CMYK&&st.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),st.push({key:"BitsPerComponent",value:F.bitsPerComponent}),"decodeParameters"in F&&F.decodeParameters!==void 0&&st.push({key:"DecodeParms",value:"<<"+F.decodeParameters+">>"}),"transparency"in F&&Array.isArray(F.transparency)){for(var mt="",Q=0,pt=F.transparency.length;Q<pt;Q++)mt+=F.transparency[Q]+" "+F.transparency[Q]+" ";st.push({key:"Mask",value:"["+mt+"]"})}F.sMask!==void 0&&st.push({key:"SMask",value:F.objectId+1+" 0 R"});var ot=F.filter!==void 0?["/"+F.filter]:void 0;if(z({data:F.data,additionalKeyValues:st,alreadyAppliedFilters:ot,objectId:F.objectId}),H("endobj"),"sMask"in F&&F.sMask!==void 0){var Et="/Predictor "+F.predictor+" /Colors 1 /BitsPerComponent "+F.bitsPerComponent+" /Columns "+F.width,L={width:F.width,height:F.height,colorSpace:"DeviceGray",bitsPerComponent:F.bitsPerComponent,decodeParameters:Et,data:F.sMask};"filter"in F&&(L.filter=F.filter),k.call(this,L)}if(F.colorSpace===q.INDEXED){var j=this.internal.newObject();z({data:G(new Uint8Array(F.palette)),objectId:j}),H("endobj")}},s=function(){var k=this.internal.collections.addImage_images;for(var F in k)c.call(this,k[F])},l=function(){var k,F=this.internal.collections.addImage_images,H=this.internal.write;for(var z in F)H("/I"+(k=F[z]).index,k.objectId,"0","R")},h=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",s),this.internal.events.subscribe("putXobjectDict",l))},f=function(){var k=this.internal.collections.addImage_images;return h.call(this),k},v=function(){return Object.keys(this.internal.collections.addImage_images).length},x=function(k){return typeof i["process"+k.toUpperCase()]=="function"},A=function(k){return ve(k)==="object"&&k.nodeType===1},_=function(k,F){if(k.nodeName==="IMG"&&k.hasAttribute("src")){var H=""+k.getAttribute("src");if(H.indexOf("data:image/")===0)return ea(unescape(H).split("base64,").pop());var z=i.loadFile(H,!0);if(z!==void 0)return z}if(k.nodeName==="CANVAS"){if(k.width===0||k.height===0)throw new Error("Given canvas must have data. Canvas width: "+k.width+", height: "+k.height);var ct;switch(F){case"PNG":ct="image/png";break;case"WEBP":ct="image/webp";break;case"JPEG":case"JPG":default:ct="image/jpeg"}return ea(k.toDataURL(ct,1).split("base64,").pop())}},p=function(k){var F=this.internal.collections.addImage_images;if(F){for(var H in F)if(k===F[H].alias)return F[H]}},B=function(k,F,H){return k||F||(k=-96,F=-96),k<0&&(k=-1*H.width*72/k/this.internal.scaleFactor),F<0&&(F=-1*H.height*72/F/this.internal.scaleFactor),k===0&&(k=F*H.width/H.height),F===0&&(F=k*H.height/H.width),[k,F]},I=function(k,F,H,z,ct,st){var mt=B.call(this,H,z,ct),Q=this.internal.getCoordinateString,pt=this.internal.getVerticalCoordinateString,ot=f.call(this);if(H=mt[0],z=mt[1],ot[ct.index]=ct,st){st*=Math.PI/180;var Et=Math.cos(st),L=Math.sin(st),j=function(W){return W.toFixed(4)},E=[j(Et),j(L),j(-1*L),j(Et),0,0,"cm"]}this.internal.write("q"),st?(this.internal.write([1,"0","0",1,Q(k),pt(F+z),"cm"].join(" ")),this.internal.write(E.join(" ")),this.internal.write([Q(H),"0","0",Q(z),"0","0","cm"].join(" "))):this.internal.write([Q(H),"0","0",Q(z),Q(k),pt(F+z),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+ct.index+" Do"),this.internal.write("Q")},q=i.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};i.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var S=i.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},M=i.__addimage__.sHashCode=function(k){var F,H,z=0;if(typeof k=="string")for(H=k.length,F=0;F<H;F++)z=(z<<5)-z+k.charCodeAt(F),z|=0;else if(Nt(k))for(H=k.byteLength/2,F=0;F<H;F++)z=(z<<5)-z+k[F],z|=0;return z},Z=i.__addimage__.validateStringAsBase64=function(k){(k=k||"").toString().trim();var F=!0;return k.length===0&&(F=!1),k.length%4!=0&&(F=!1),/^[A-Za-z0-9+/]+$/.test(k.substr(0,k.length-2))===!1&&(F=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(k.substr(-2))===!1&&(F=!1),F},ut=i.__addimage__.extractImageFromDataUrl=function(k){if(k==null||!(k=k.trim()).startsWith("data:"))return null;var F=k.indexOf(",");return F<0?null:k.substring(0,F).trim().endsWith("base64")?k.substring(F+1):null},dt=i.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};i.__addimage__.isArrayBuffer=function(k){return dt()&&k instanceof ArrayBuffer};var Nt=i.__addimage__.isArrayBufferView=function(k){return dt()&&typeof Uint32Array<"u"&&(k instanceof Int8Array||k instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&k instanceof Uint8ClampedArray||k instanceof Int16Array||k instanceof Uint16Array||k instanceof Int32Array||k instanceof Uint32Array||k instanceof Float32Array||k instanceof Float64Array)},nt=i.__addimage__.binaryStringToUint8Array=function(k){for(var F=k.length,H=new Uint8Array(F),z=0;z<F;z++)H[z]=k.charCodeAt(z);return H},G=i.__addimage__.arrayBufferToBinaryString=function(k){for(var F="",H=Nt(k)?k:new Uint8Array(k),z=0;z<H.length;z+=8192)F+=String.fromCharCode.apply(null,H.subarray(z,z+8192));return F};i.addImage=function(){var k,F,H,z,ct,st,mt,Q,pt;if(typeof arguments[1]=="number"?(F=e,H=arguments[1],z=arguments[2],ct=arguments[3],st=arguments[4],mt=arguments[5],Q=arguments[6],pt=arguments[7]):(F=arguments[1],H=arguments[2],z=arguments[3],ct=arguments[4],st=arguments[5],mt=arguments[6],Q=arguments[7],pt=arguments[8]),ve(k=arguments[0])==="object"&&!A(k)&&"imageData"in k){var ot=k;k=ot.imageData,F=ot.format||F||e,H=ot.x||H||0,z=ot.y||z||0,ct=ot.w||ot.width||ct,st=ot.h||ot.height||st,mt=ot.alias||mt,Q=ot.compression||Q,pt=ot.rotation||ot.angle||pt}var Et=this.internal.getFilters();if(Q===void 0&&Et.indexOf("FlateEncode")!==-1&&(Q="SLOW"),isNaN(H)||isNaN(z))throw new Error("Invalid coordinates passed to jsPDF.addImage");h.call(this);var L=vt.call(this,k,F,mt,Q);return I.call(this,H,z,ct,st,L,pt),this};var vt=function(k,F,H,z){var ct,st,mt;if(typeof k=="string"&&a(k)===e){k=unescape(k);var Q=bt(k,!1);(Q!==""||(Q=i.loadFile(k,!0))!==void 0)&&(k=Q)}if(A(k)&&(k=_(k,F)),F=a(k,F),!x(F))throw new Error("addImage does not support files of type '"+F+"', please ensure that a plugin for '"+F+"' support is added.");if(((mt=H)==null||mt.length===0)&&(H=function(pt){return typeof pt=="string"||Nt(pt)?M(pt):Nt(pt.data)?M(pt.data):null}(k)),(ct=p.call(this,H))||(dt()&&(k instanceof Uint8Array||F==="RGBA"||(st=k,k=nt(k))),ct=this["process"+F.toUpperCase()](k,v.call(this),H,function(pt){return pt&&typeof pt=="string"&&(pt=pt.toUpperCase()),pt in i.image_compression?pt:S.NONE}(z),st)),!ct)throw new Error("An unknown error occurred whilst processing the image.");return ct},bt=i.__addimage__.convertBase64ToBinaryString=function(k,F){F=typeof F!="boolean"||F;var H,z="";if(typeof k=="string"){var ct;H=(ct=ut(k))!==null&&ct!==void 0?ct:k;try{z=ea(H)}catch(st){if(F)throw Z(H)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+st.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return z};i.getImageProperties=function(k){var F,H,z="";if(A(k)&&(k=_(k)),typeof k=="string"&&a(k)===e&&((z=bt(k,!1))===""&&(z=i.loadFile(k)||""),k=z),H=a(k),!x(H))throw new Error("addImage does not support files of type '"+H+"', please ensure that a plugin for '"+H+"' support is added.");if(!dt()||k instanceof Uint8Array||(k=nt(k)),!(F=this["process"+H.toUpperCase()](k)))throw new Error("An unknown error occurred whilst processing the image");return F.fileType=H,F}})(zt.API),function(i){var e=function(n){if(n!==void 0&&n!="")return!0};zt.API.events.push(["addPage",function(n){this.internal.getPageInfo(n.pageNumber).pageContext.annotations=[]}]),i.events.push(["putPage",function(n){for(var a,c,s,l=this.internal.getCoordinateString,h=this.internal.getVerticalCoordinateString,f=this.internal.getPageInfoByObjId(n.objId),v=n.pageContext.annotations,x=!1,A=0;A<v.length&&!x;A++)switch((a=v[A]).type){case"link":(e(a.options.url)||e(a.options.pageNumber))&&(x=!0);break;case"reference":case"text":case"freetext":x=!0}if(x!=0){this.internal.write("/Annots [");for(var _=0;_<v.length;_++){a=v[_];var p=this.internal.pdfEscape,B=this.internal.getEncryptor(n.objId);switch(a.type){case"reference":this.internal.write(" "+a.object.objId+" 0 R ");break;case"text":var I=this.internal.newAdditionalObject(),q=this.internal.newAdditionalObject(),S=this.internal.getEncryptor(I.objId),M=a.title||"Note";s="<</Type /Annot /Subtype /Text "+(c="/Rect ["+l(a.bounds.x)+" "+h(a.bounds.y+a.bounds.h)+" "+l(a.bounds.x+a.bounds.w)+" "+h(a.bounds.y)+"] ")+"/Contents ("+p(S(a.contents))+")",s+=" /Popup "+q.objId+" 0 R",s+=" /P "+f.objId+" 0 R",s+=" /T ("+p(S(M))+") >>",I.content=s;var Z=I.objId+" 0 R";s="<</Type /Annot /Subtype /Popup "+(c="/Rect ["+l(a.bounds.x+30)+" "+h(a.bounds.y+a.bounds.h)+" "+l(a.bounds.x+a.bounds.w+30)+" "+h(a.bounds.y)+"] ")+" /Parent "+Z,a.open&&(s+=" /Open true"),s+=" >>",q.content=s,this.internal.write(I.objId,"0 R",q.objId,"0 R");break;case"freetext":c="/Rect ["+l(a.bounds.x)+" "+h(a.bounds.y)+" "+l(a.bounds.x+a.bounds.w)+" "+h(a.bounds.y+a.bounds.h)+"] ";var ut=a.color||"#000000";s="<</Type /Annot /Subtype /FreeText "+c+"/Contents ("+p(B(a.contents))+")",s+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+ut+")",s+=" /Border [0 0 0]",s+=" >>",this.internal.write(s);break;case"link":if(a.options.name){var dt=this.annotations._nameMap[a.options.name];a.options.pageNumber=dt.page,a.options.top=dt.y}else a.options.top||(a.options.top=0);if(c="/Rect ["+a.finalBounds.x+" "+a.finalBounds.y+" "+a.finalBounds.w+" "+a.finalBounds.h+"] ",s="",a.options.url)s="<</Type /Annot /Subtype /Link "+c+"/Border [0 0 0] /A <</S /URI /URI ("+p(B(a.options.url))+") >>";else if(a.options.pageNumber)switch(s="<</Type /Annot /Subtype /Link "+c+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(a.options.pageNumber).objId+" 0 R",a.options.magFactor=a.options.magFactor||"XYZ",a.options.magFactor){case"Fit":s+=" /Fit]";break;case"FitH":s+=" /FitH "+a.options.top+"]";break;case"FitV":a.options.left=a.options.left||0,s+=" /FitV "+a.options.left+"]";break;case"XYZ":default:var Nt=h(a.options.top);a.options.left=a.options.left||0,a.options.zoom===void 0&&(a.options.zoom=0),s+=" /XYZ "+a.options.left+" "+Nt+" "+a.options.zoom+"]"}s!=""&&(s+=" >>",this.internal.write(s))}}this.internal.write("]")}}]),i.createAnnotation=function(n){var a=this.internal.getCurrentPageInfo();switch(n.type){case"link":this.link(n.bounds.x,n.bounds.y,n.bounds.w,n.bounds.h,n);break;case"text":case"freetext":a.pageContext.annotations.push(n)}},i.link=function(n,a,c,s,l){var h=this.internal.getCurrentPageInfo(),f=this.internal.getCoordinateString,v=this.internal.getVerticalCoordinateString;h.pageContext.annotations.push({finalBounds:{x:f(n),y:v(a),w:f(n+c),h:v(a+s)},options:l,type:"link"})},i.textWithLink=function(n,a,c,s){var l,h,f=this.getTextWidth(n),v=this.internal.getLineHeight()/this.internal.scaleFactor;if(s.maxWidth!==void 0){h=s.maxWidth;var x=this.splitTextToSize(n,h).length;l=Math.ceil(v*x)}else h=f,l=v;return this.text(n,a,c,s),c+=.2*v,s.align==="center"&&(a-=f/2),s.align==="right"&&(a-=f),this.link(a,c-v,h,l,s),f},i.getTextWidth=function(n){var a=this.internal.getFontSize();return this.getStringUnitWidth(n)*a/this.internal.scaleFactor}}(zt.API),function(i){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},a={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},c=[1570,1571,1573,1575];i.__arabicParser__={};var s=i.__arabicParser__.isInArabicSubstitutionA=function(I){return e[I.charCodeAt(0)]!==void 0},l=i.__arabicParser__.isArabicLetter=function(I){return typeof I=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(I)},h=i.__arabicParser__.isArabicEndLetter=function(I){return l(I)&&s(I)&&e[I.charCodeAt(0)].length<=2},f=i.__arabicParser__.isArabicAlfLetter=function(I){return l(I)&&c.indexOf(I.charCodeAt(0))>=0};i.__arabicParser__.arabicLetterHasIsolatedForm=function(I){return l(I)&&s(I)&&e[I.charCodeAt(0)].length>=1};var v=i.__arabicParser__.arabicLetterHasFinalForm=function(I){return l(I)&&s(I)&&e[I.charCodeAt(0)].length>=2};i.__arabicParser__.arabicLetterHasInitialForm=function(I){return l(I)&&s(I)&&e[I.charCodeAt(0)].length>=3};var x=i.__arabicParser__.arabicLetterHasMedialForm=function(I){return l(I)&&s(I)&&e[I.charCodeAt(0)].length==4},A=i.__arabicParser__.resolveLigatures=function(I){var q=0,S=n,M="",Z=0;for(q=0;q<I.length;q+=1)S[I.charCodeAt(q)]!==void 0?(Z++,typeof(S=S[I.charCodeAt(q)])=="number"&&(M+=String.fromCharCode(S),S=n,Z=0),q===I.length-1&&(S=n,M+=I.charAt(q-(Z-1)),q-=Z-1,Z=0)):(S=n,M+=I.charAt(q-Z),q-=Z,Z=0);return M};i.__arabicParser__.isArabicDiacritic=function(I){return I!==void 0&&a[I.charCodeAt(0)]!==void 0};var _=i.__arabicParser__.getCorrectForm=function(I,q,S){return l(I)?s(I)===!1?-1:!v(I)||!l(q)&&!l(S)||!l(S)&&h(q)||h(I)&&!l(q)||h(I)&&f(q)||h(I)&&h(q)?0:x(I)&&l(q)&&!h(q)&&l(S)&&v(S)?3:h(I)||!l(S)?1:2:-1},p=function(I){var q=0,S=0,M=0,Z="",ut="",dt="",Nt=(I=I||"").split("\\s+"),nt=[];for(q=0;q<Nt.length;q+=1){for(nt.push(""),S=0;S<Nt[q].length;S+=1)Z=Nt[q][S],ut=Nt[q][S-1],dt=Nt[q][S+1],l(Z)?(M=_(Z,ut,dt),nt[q]+=M!==-1?String.fromCharCode(e[Z.charCodeAt(0)][M]):Z):nt[q]+=Z;nt[q]=A(nt[q])}return nt.join(" ")},B=i.__arabicParser__.processArabic=i.processArabic=function(){var I,q=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,S=[];if(Array.isArray(q)){var M=0;for(S=[],M=0;M<q.length;M+=1)Array.isArray(q[M])?S.push([p(q[M][0]),q[M][1],q[M][2]]):S.push([p(q[M])]);I=S}else I=p(q);return typeof arguments[0]=="string"?I:(arguments[0].text=I,arguments[0])};i.events.push(["preProcessText",B])}(zt.API),zt.API.autoPrint=function(i){var e;switch((i=i||{}).variant=i.variant||"non-conform",i.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})}return this},function(i){var e=function(){var n=void 0;Object.defineProperty(this,"pdf",{get:function(){return n},set:function(h){n=h}});var a=150;Object.defineProperty(this,"width",{get:function(){return a},set:function(h){a=isNaN(h)||Number.isInteger(h)===!1||h<0?150:h,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=a+1)}});var c=300;Object.defineProperty(this,"height",{get:function(){return c},set:function(h){c=isNaN(h)||Number.isInteger(h)===!1||h<0?300:h,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=c+1)}});var s=[];Object.defineProperty(this,"childNodes",{get:function(){return s},set:function(h){s=h}});var l={};Object.defineProperty(this,"style",{get:function(){return l},set:function(h){l=h}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(n,a){var c;if((n=n||"2d")!=="2d")return null;for(c in a)this.pdf.context2d.hasOwnProperty(c)&&(this.pdf.context2d[c]=a[c]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},i.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(zt.API),function(i){var e={left:0,top:0,bottom:0,right:0},n=!1,a=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),c.call(this))},c=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var f=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return f},set:function(I){f=I}});var v=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return v},set:function(I){v=I}});var x=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return x},set:function(I){x=I}});var A=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return A},set:function(I){A=I}});var _=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return _},set:function(I){_=I}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(I){p=I}});var B=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return B},set:function(I){B=I}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},i.setHeaderFunction=function(f){return a.call(this),this.internal.__cell__.headerFunction=typeof f=="function"?f:void 0,this},i.getTextDimensions=function(f,v){a.call(this);var x=(v=v||{}).fontSize||this.getFontSize(),A=v.font||this.getFont(),_=v.scaleFactor||this.internal.scaleFactor,p=0,B=0,I=0,q=this;if(!Array.isArray(f)&&typeof f!="string"){if(typeof f!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");f=String(f)}var S=v.maxWidth;S>0?typeof f=="string"?f=this.splitTextToSize(f,S):Object.prototype.toString.call(f)==="[object Array]"&&(f=f.reduce(function(Z,ut){return Z.concat(q.splitTextToSize(ut,S))},[])):f=Array.isArray(f)?f:[f];for(var M=0;M<f.length;M++)p<(I=this.getStringUnitWidth(f[M],{font:A})*x)&&(p=I);return p!==0&&(B=f.length),{w:p/=_,h:Math.max((B*x*this.getLineHeightFactor()-x*(this.getLineHeightFactor()-1))/_,0)}},i.cellAddPage=function(){a.call(this),this.addPage();var f=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new s(f.left,f.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var l=i.cell=function(){var f;f=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),a.call(this);var v=this.internal.__cell__.lastCell,x=this.internal.__cell__.padding,A=this.internal.__cell__.margins||e,_=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return v.lineNumber!==void 0&&(v.lineNumber===f.lineNumber?(f.x=(v.x||0)+(v.width||0),f.y=v.y||0):v.y+v.height+f.height+A.bottom>this.getPageHeight()?(this.cellAddPage(),f.y=A.top,p&&_&&(this.printHeaderRow(f.lineNumber,!0),f.y+=_[0].height)):f.y=v.y+v.height||f.y),f.text[0]!==void 0&&(this.rect(f.x,f.y,f.width,f.height,n===!0?"FD":void 0),f.align==="right"?this.text(f.text,f.x+f.width-x,f.y+x,{align:"right",baseline:"top"}):f.align==="center"?this.text(f.text,f.x+f.width/2,f.y+x,{align:"center",baseline:"top",maxWidth:f.width-x-x}):this.text(f.text,f.x+x,f.y+x,{align:"left",baseline:"top",maxWidth:f.width-x-x})),this.internal.__cell__.lastCell=f,this};i.table=function(f,v,x,A,_){if(a.call(this),!x)throw new Error("No data for PDF table.");var p,B,I,q,S=[],M=[],Z=[],ut={},dt={},Nt=[],nt=[],G=(_=_||{}).autoSize||!1,vt=_.printHeaders!==!1,bt=_.css&&_.css["font-size"]!==void 0?16*_.css["font-size"]:_.fontSize||12,k=_.margins||Object.assign({width:this.getPageWidth()},e),F=typeof _.padding=="number"?_.padding:3,H=_.headerBackgroundColor||"#c8c8c8",z=_.headerTextColor||"#000";if(c.call(this),this.internal.__cell__.printHeaders=vt,this.internal.__cell__.margins=k,this.internal.__cell__.table_font_size=bt,this.internal.__cell__.padding=F,this.internal.__cell__.headerBackgroundColor=H,this.internal.__cell__.headerTextColor=z,this.setFontSize(bt),A==null)M=S=Object.keys(x[0]),Z=S.map(function(){return"left"});else if(Array.isArray(A)&&ve(A[0])==="object")for(S=A.map(function(ot){return ot.name}),M=A.map(function(ot){return ot.prompt||ot.name||""}),Z=A.map(function(ot){return ot.align||"left"}),p=0;p<A.length;p+=1)dt[A[p].name]=A[p].width*(19.049976/25.4);else Array.isArray(A)&&typeof A[0]=="string"&&(M=S=A,Z=S.map(function(){return"left"}));if(G||Array.isArray(A)&&typeof A[0]=="string")for(p=0;p<S.length;p+=1){for(ut[q=S[p]]=x.map(function(ot){return ot[q]}),this.setFont(void 0,"bold"),Nt.push(this.getTextDimensions(M[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),B=ut[q],this.setFont(void 0,"normal"),I=0;I<B.length;I+=1)Nt.push(this.getTextDimensions(B[I],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);dt[q]=Math.max.apply(null,Nt)+F+F,Nt=[]}if(vt){var ct={};for(p=0;p<S.length;p+=1)ct[S[p]]={},ct[S[p]].text=M[p],ct[S[p]].align=Z[p];var st=h.call(this,ct,dt);nt=S.map(function(ot){return new s(f,v,dt[ot],st,ct[ot].text,void 0,ct[ot].align)}),this.setTableHeaderRow(nt),this.printHeaderRow(1,!1)}var mt=A.reduce(function(ot,Et){return ot[Et.name]=Et.align,ot},{});for(p=0;p<x.length;p+=1){"rowStart"in _&&_.rowStart instanceof Function&&_.rowStart({row:p,data:x[p]},this);var Q=h.call(this,x[p],dt);for(I=0;I<S.length;I+=1){var pt=x[p][S[I]];"cellStart"in _&&_.cellStart instanceof Function&&_.cellStart({row:p,col:I,data:pt},this),l.call(this,new s(f,v,dt[S[I]],Q,pt,p+2,mt[S[I]]))}}return this.internal.__cell__.table_x=f,this.internal.__cell__.table_y=v,this};var h=function(f,v){var x=this.internal.__cell__.padding,A=this.internal.__cell__.table_font_size,_=this.internal.scaleFactor;return Object.keys(f).map(function(p){var B=f[p];return this.splitTextToSize(B.hasOwnProperty("text")?B.text:B,v[p]-x-x)},this).map(function(p){return this.getLineHeightFactor()*p.length*A/_+x+x},this).reduce(function(p,B){return Math.max(p,B)},0)};i.setTableHeaderRow=function(f){a.call(this),this.internal.__cell__.tableHeaderRow=f},i.printHeaderRow=function(f,v){if(a.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var x;if(n=!0,typeof this.internal.__cell__.headerFunction=="function"){var A=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(A[0],A[1],A[2],A[3],void 0,-1)}this.setFont(void 0,"bold");for(var _=[],p=0;p<this.internal.__cell__.tableHeaderRow.length;p+=1){x=this.internal.__cell__.tableHeaderRow[p].clone(),v&&(x.y=this.internal.__cell__.margins.top||0,_.push(x)),x.lineNumber=f;var B=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),l.call(this,x),this.setTextColor(B)}_.length>0&&this.setTableHeaderRow(_),this.setFont(void 0,"normal"),n=!1}}(zt.API);var iu={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},au=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],no=nu(au),su=[100,200,300,400,500,600,700,800,900],oc=nu(su);function io(i){var e=i.family.replace(/"|'/g,"").toLowerCase(),n=function(s){return iu[s=s||"normal"]?s:"normal"}(i.style),a=function(s){if(!s)return 400;if(typeof s=="number")return s>=100&&s<=900&&s%100==0?s:400;if(/^\d00$/.test(s))return parseInt(s);switch(s){case"bold":return 700;case"normal":default:return 400}}(i.weight),c=function(s){return typeof no[s=s||"normal"]=="number"?s:"normal"}(i.stretch);return{family:e,style:n,weight:a,stretch:c,src:i.src||[],ref:i.ref||{name:e,style:[c,n,a].join(" ")}}}function Ro(i,e,n,a){var c;for(c=n;c>=0&&c<e.length;c+=a)if(i[e[c]])return i[e[c]];for(c=n;c>=0&&c<e.length;c-=a)if(i[e[c]])return i[e[c]]}var uc={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},To={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function zo(i){return[i.stretch,i.style,i.weight,i.family].join(" ")}function cc(i,e,n){for(var a=(n=n||{}).defaultFontFamily||"times",c=Object.assign({},uc,n.genericFontFamilies||{}),s=null,l=null,h=0;h<e.length;++h)if(c[(s=io(e[h])).family]&&(s.family=c[s.family]),i.hasOwnProperty(s.family)){l=i[s.family];break}if(!(l=l||i[a]))throw new Error("Could not find a font-family for the rule '"+zo(s)+"' and default family '"+a+"'.");if(l=function(f,v){if(v[f])return v[f];var x=no[f],A=x<=no.normal?-1:1,_=Ro(v,au,x,A);if(!_)throw new Error("Could not find a matching font-stretch value for "+f);return _}(s.stretch,l),l=function(f,v){if(v[f])return v[f];for(var x=iu[f],A=0;A<x.length;++A)if(v[x[A]])return v[x[A]];throw new Error("Could not find a matching font-style for "+f)}(s.style,l),!(l=function(f,v){if(v[f])return v[f];if(f===400&&v[500])return v[500];if(f===500&&v[400])return v[400];var x=oc[f],A=Ro(v,su,x,f<400?-1:1);if(!A)throw new Error("Could not find a matching font-weight for value "+f);return A}(s.weight,l)))throw new Error("Failed to resolve a font for the rule '"+zo(s)+"'.");return l}function Uo(i){return i.trimLeft()}function lc(i,e){for(var n=0;n<i.length;){if(i.charAt(n)===e)return[i.substring(0,n),i.substring(n+1)];n+=1}return null}function hc(i){var e=i.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],i.substring(e[0].length)]}var Ya,Ho,Wo,Xs=["times"];(function(i){var e,n,a,c,s,l,h,f,v,x=function(L){return L=L||{},this.isStrokeTransparent=L.isStrokeTransparent||!1,this.strokeOpacity=L.strokeOpacity||1,this.strokeStyle=L.strokeStyle||"#000000",this.fillStyle=L.fillStyle||"#000000",this.isFillTransparent=L.isFillTransparent||!1,this.fillOpacity=L.fillOpacity||1,this.font=L.font||"10px sans-serif",this.textBaseline=L.textBaseline||"alphabetic",this.textAlign=L.textAlign||"left",this.lineWidth=L.lineWidth||1,this.lineJoin=L.lineJoin||"miter",this.lineCap=L.lineCap||"butt",this.path=L.path||[],this.transform=L.transform!==void 0?L.transform.clone():new f,this.globalCompositeOperation=L.globalCompositeOperation||"normal",this.globalAlpha=L.globalAlpha||1,this.clip_path=L.clip_path||[],this.currentPoint=L.currentPoint||new l,this.miterLimit=L.miterLimit||10,this.lastPoint=L.lastPoint||new l,this.lineDashOffset=L.lineDashOffset||0,this.lineDash=L.lineDash||[],this.margin=L.margin||[0,0,0,0],this.prevPageLastElemOffset=L.prevPageLastElemOffset||0,this.ignoreClearRect=typeof L.ignoreClearRect!="boolean"||L.ignoreClearRect,this};i.events.push(["initialized",function(){this.context2d=new A(this),e=this.internal.f2,n=this.internal.getCoordinateString,a=this.internal.getVerticalCoordinateString,c=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,l=this.internal.Point,h=this.internal.Rectangle,f=this.internal.Matrix,v=new x}]);var A=function(L){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var j=L;Object.defineProperty(this,"pdf",{get:function(){return j}});var E=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return E},set:function(at){E=!!at}});var W=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return W},set:function(at){W=!!at}});var J=0;Object.defineProperty(this,"posX",{get:function(){return J},set:function(at){isNaN(at)||(J=at)}});var $=0;Object.defineProperty(this,"posY",{get:function(){return $},set:function(at){isNaN(at)||($=at)}}),Object.defineProperty(this,"margin",{get:function(){return v.margin},set:function(at){var O;typeof at=="number"?O=[at,at,at,at]:((O=new Array(4))[0]=at[0],O[1]=at.length>=2?at[1]:O[0],O[2]=at.length>=3?at[2]:O[0],O[3]=at.length>=4?at[3]:O[1]),v.margin=O}});var et=!1;Object.defineProperty(this,"autoPaging",{get:function(){return et},set:function(at){et=at}});var tt=0;Object.defineProperty(this,"lastBreak",{get:function(){return tt},set:function(at){tt=at}});var At=[];Object.defineProperty(this,"pageBreaks",{get:function(){return At},set:function(at){At=at}}),Object.defineProperty(this,"ctx",{get:function(){return v},set:function(at){at instanceof x&&(v=at)}}),Object.defineProperty(this,"path",{get:function(){return v.path},set:function(at){v.path=at}});var Lt=[];Object.defineProperty(this,"ctxStack",{get:function(){return Lt},set:function(at){Lt=at}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(at){var O;O=_(at),this.ctx.fillStyle=O.style,this.ctx.isFillTransparent=O.a===0,this.ctx.fillOpacity=O.a,this.pdf.setFillColor(O.r,O.g,O.b,{a:O.a}),this.pdf.setTextColor(O.r,O.g,O.b,{a:O.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(at){var O=_(at);this.ctx.strokeStyle=O.style,this.ctx.isStrokeTransparent=O.a===0,this.ctx.strokeOpacity=O.a,O.a===0?this.pdf.setDrawColor(255,255,255):(O.a,this.pdf.setDrawColor(O.r,O.g,O.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(at){["butt","round","square"].indexOf(at)!==-1&&(this.ctx.lineCap=at,this.pdf.setLineCap(at))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(at){isNaN(at)||(this.ctx.lineWidth=at,this.pdf.setLineWidth(at))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(at){["bevel","round","miter"].indexOf(at)!==-1&&(this.ctx.lineJoin=at,this.pdf.setLineJoin(at))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(at){isNaN(at)||(this.ctx.miterLimit=at,this.pdf.setMiterLimit(at))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(at){this.ctx.textBaseline=at}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(at){["right","end","center","left","start"].indexOf(at)!==-1&&(this.ctx.textAlign=at)}});var Ot=null;function jt(at,O){if(Ot===null){var Kt=function(Mt){var wt=[];return Object.keys(Mt).forEach(function(xt){Mt[xt].forEach(function(kt){var Pt=null;switch(kt){case"bold":Pt={family:xt,weight:"bold"};break;case"italic":Pt={family:xt,style:"italic"};break;case"bolditalic":Pt={family:xt,weight:"bold",style:"italic"};break;case"":case"normal":Pt={family:xt}}Pt!==null&&(Pt.ref={name:xt,style:kt},wt.push(Pt))})}),wt}(at.getFontList());Ot=function(Mt){for(var wt={},xt=0;xt<Mt.length;++xt){var kt=io(Mt[xt]),Pt=kt.family,qt=kt.stretch,Gt=kt.style,Qt=kt.weight;wt[Pt]=wt[Pt]||{},wt[Pt][qt]=wt[Pt][qt]||{},wt[Pt][qt][Gt]=wt[Pt][qt][Gt]||{},wt[Pt][qt][Gt][Qt]=kt}return wt}(Kt.concat(O))}return Ot}var Wt=null;Object.defineProperty(this,"fontFaces",{get:function(){return Wt},set:function(at){Ot=null,Wt=at}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(at){var O;if(this.ctx.font=at,(O=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(at))!==null){var Kt=O[1];O[2];var Mt=O[3],wt=O[4];O[5];var xt=O[6],kt=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(wt)[2];wt=Math.floor(kt==="px"?parseFloat(wt)*this.pdf.internal.scaleFactor:kt==="em"?parseFloat(wt)*this.pdf.getFontSize():parseFloat(wt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(wt);var Pt=function(Ht){var ee,Ft,Ge=[],se=Ht.trim();if(se==="")return Xs;if(se in To)return[To[se]];for(;se!=="";){switch(Ft=null,ee=(se=Uo(se)).charAt(0)){case'"':case"'":Ft=lc(se.substring(1),ee);break;default:Ft=hc(se)}if(Ft===null||(Ge.push(Ft[0]),(se=Uo(Ft[1]))!==""&&se.charAt(0)!==","))return Xs;se=se.replace(/^,/,"")}return Ge}(xt);if(this.fontFaces){var qt=cc(jt(this.pdf,this.fontFaces),Pt.map(function(Ht){return{family:Ht,stretch:"normal",weight:Mt,style:Kt}}));this.pdf.setFont(qt.ref.name,qt.ref.style)}else{var Gt="";(Mt==="bold"||parseInt(Mt,10)>=700||Kt==="bold")&&(Gt="bold"),Kt==="italic"&&(Gt+="italic"),Gt.length===0&&(Gt="normal");for(var Qt="",te={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},ie=0;ie<Pt.length;ie++){if(this.pdf.internal.getFont(Pt[ie],Gt,{noFallback:!0,disableWarning:!0})!==void 0){Qt=Pt[ie];break}if(Gt==="bolditalic"&&this.pdf.internal.getFont(Pt[ie],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Qt=Pt[ie],Gt="bold";else if(this.pdf.internal.getFont(Pt[ie],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Qt=Pt[ie],Gt="normal";break}}if(Qt===""){for(var fe=0;fe<Pt.length;fe++)if(te[Pt[fe]]){Qt=te[Pt[fe]];break}}Qt=Qt===""?"Times":Qt,this.pdf.setFont(Qt,Gt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(at){this.ctx.globalCompositeOperation=at}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(at){this.ctx.globalAlpha=at}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(at){this.ctx.lineDashOffset=at,Et.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(at){this.ctx.lineDash=at,Et.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(at){this.ctx.ignoreClearRect=!!at}})};A.prototype.setLineDash=function(L){this.lineDash=L},A.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},A.prototype.fill=function(){ut.call(this,"fill",!1)},A.prototype.stroke=function(){ut.call(this,"stroke",!1)},A.prototype.beginPath=function(){this.path=[{type:"begin"}]},A.prototype.moveTo=function(L,j){if(isNaN(L)||isNaN(j))throw me.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var E=this.ctx.transform.applyToPoint(new l(L,j));this.path.push({type:"mt",x:E.x,y:E.y}),this.ctx.lastPoint=new l(L,j)},A.prototype.closePath=function(){var L=new l(0,0),j=0;for(j=this.path.length-1;j!==-1;j--)if(this.path[j].type==="begin"&&ve(this.path[j+1])==="object"&&typeof this.path[j+1].x=="number"){L=new l(this.path[j+1].x,this.path[j+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new l(L.x,L.y)},A.prototype.lineTo=function(L,j){if(isNaN(L)||isNaN(j))throw me.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var E=this.ctx.transform.applyToPoint(new l(L,j));this.path.push({type:"lt",x:E.x,y:E.y}),this.ctx.lastPoint=new l(E.x,E.y)},A.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),ut.call(this,null,!0)},A.prototype.quadraticCurveTo=function(L,j,E,W){if(isNaN(E)||isNaN(W)||isNaN(L)||isNaN(j))throw me.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var J=this.ctx.transform.applyToPoint(new l(E,W)),$=this.ctx.transform.applyToPoint(new l(L,j));this.path.push({type:"qct",x1:$.x,y1:$.y,x:J.x,y:J.y}),this.ctx.lastPoint=new l(J.x,J.y)},A.prototype.bezierCurveTo=function(L,j,E,W,J,$){if(isNaN(J)||isNaN($)||isNaN(L)||isNaN(j)||isNaN(E)||isNaN(W))throw me.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var et=this.ctx.transform.applyToPoint(new l(J,$)),tt=this.ctx.transform.applyToPoint(new l(L,j)),At=this.ctx.transform.applyToPoint(new l(E,W));this.path.push({type:"bct",x1:tt.x,y1:tt.y,x2:At.x,y2:At.y,x:et.x,y:et.y}),this.ctx.lastPoint=new l(et.x,et.y)},A.prototype.arc=function(L,j,E,W,J,$){if(isNaN(L)||isNaN(j)||isNaN(E)||isNaN(W)||isNaN(J))throw me.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if($=!!$,!this.ctx.transform.isIdentity){var et=this.ctx.transform.applyToPoint(new l(L,j));L=et.x,j=et.y;var tt=this.ctx.transform.applyToPoint(new l(0,E)),At=this.ctx.transform.applyToPoint(new l(0,0));E=Math.sqrt(Math.pow(tt.x-At.x,2)+Math.pow(tt.y-At.y,2))}Math.abs(J-W)>=2*Math.PI&&(W=0,J=2*Math.PI),this.path.push({type:"arc",x:L,y:j,radius:E,startAngle:W,endAngle:J,counterclockwise:$})},A.prototype.arcTo=function(L,j,E,W,J){throw new Error("arcTo not implemented.")},A.prototype.rect=function(L,j,E,W){if(isNaN(L)||isNaN(j)||isNaN(E)||isNaN(W))throw me.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(L,j),this.lineTo(L+E,j),this.lineTo(L+E,j+W),this.lineTo(L,j+W),this.lineTo(L,j),this.lineTo(L+E,j),this.lineTo(L,j)},A.prototype.fillRect=function(L,j,E,W){if(isNaN(L)||isNaN(j)||isNaN(E)||isNaN(W))throw me.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var J={};this.lineCap!=="butt"&&(J.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(J.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(L,j,E,W),this.fill(),J.hasOwnProperty("lineCap")&&(this.lineCap=J.lineCap),J.hasOwnProperty("lineJoin")&&(this.lineJoin=J.lineJoin)}},A.prototype.strokeRect=function(L,j,E,W){if(isNaN(L)||isNaN(j)||isNaN(E)||isNaN(W))throw me.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");B.call(this)||(this.beginPath(),this.rect(L,j,E,W),this.stroke())},A.prototype.clearRect=function(L,j,E,W){if(isNaN(L)||isNaN(j)||isNaN(E)||isNaN(W))throw me.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(L,j,E,W))},A.prototype.save=function(L){L=typeof L!="boolean"||L;for(var j=this.pdf.internal.getCurrentPageInfo().pageNumber,E=0;E<this.pdf.internal.getNumberOfPages();E++)this.pdf.setPage(E+1),this.pdf.internal.out("q");if(this.pdf.setPage(j),L){this.ctx.fontSize=this.pdf.internal.getFontSize();var W=new x(this.ctx);this.ctxStack.push(this.ctx),this.ctx=W}},A.prototype.restore=function(L){L=typeof L!="boolean"||L;for(var j=this.pdf.internal.getCurrentPageInfo().pageNumber,E=0;E<this.pdf.internal.getNumberOfPages();E++)this.pdf.setPage(E+1),this.pdf.internal.out("Q");this.pdf.setPage(j),L&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},A.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var _=function(L){var j,E,W,J;if(L.isCanvasGradient===!0&&(L=L.getColor()),!L)return{r:0,g:0,b:0,a:0,style:L};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(L))j=0,E=0,W=0,J=0;else{var $=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(L);if($!==null)j=parseInt($[1]),E=parseInt($[2]),W=parseInt($[3]),J=1;else if(($=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(L))!==null)j=parseInt($[1]),E=parseInt($[2]),W=parseInt($[3]),J=parseFloat($[4]);else{if(J=1,typeof L=="string"&&L.charAt(0)!=="#"){var et=new Zo(L);L=et.ok?et.toHex():"#000000"}L.length===4?(j=L.substring(1,2),j+=j,E=L.substring(2,3),E+=E,W=L.substring(3,4),W+=W):(j=L.substring(1,3),E=L.substring(3,5),W=L.substring(5,7)),j=parseInt(j,16),E=parseInt(E,16),W=parseInt(W,16)}}return{r:j,g:E,b:W,a:J,style:L}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},B=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};A.prototype.fillText=function(L,j,E,W){if(isNaN(j)||isNaN(E)||typeof L!="string")throw me.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(W=isNaN(W)?void 0:W,!p.call(this)){var J=Q(this.ctx.transform.rotation),$=this.ctx.transform.scaleX;F.call(this,{text:L,x:j,y:E,scale:$,angle:J,align:this.textAlign,maxWidth:W})}},A.prototype.strokeText=function(L,j,E,W){if(isNaN(j)||isNaN(E)||typeof L!="string")throw me.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!B.call(this)){W=isNaN(W)?void 0:W;var J=Q(this.ctx.transform.rotation),$=this.ctx.transform.scaleX;F.call(this,{text:L,x:j,y:E,scale:$,renderingMode:"stroke",angle:J,align:this.textAlign,maxWidth:W})}},A.prototype.measureText=function(L){if(typeof L!="string")throw me.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var j=this.pdf,E=this.pdf.internal.scaleFactor,W=j.internal.getFontSize(),J=j.getStringUnitWidth(L)*W/j.internal.scaleFactor,$=function(et){var tt=(et=et||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return tt}}),this};return new $({width:J*=Math.round(96*E/72*1e4)/1e4})},A.prototype.scale=function(L,j){if(isNaN(L)||isNaN(j))throw me.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var E=new f(L,0,0,j,0,0);this.ctx.transform=this.ctx.transform.multiply(E)},A.prototype.rotate=function(L){if(isNaN(L))throw me.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var j=new f(Math.cos(L),Math.sin(L),-Math.sin(L),Math.cos(L),0,0);this.ctx.transform=this.ctx.transform.multiply(j)},A.prototype.translate=function(L,j){if(isNaN(L)||isNaN(j))throw me.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var E=new f(1,0,0,1,L,j);this.ctx.transform=this.ctx.transform.multiply(E)},A.prototype.transform=function(L,j,E,W,J,$){if(isNaN(L)||isNaN(j)||isNaN(E)||isNaN(W)||isNaN(J)||isNaN($))throw me.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var et=new f(L,j,E,W,J,$);this.ctx.transform=this.ctx.transform.multiply(et)},A.prototype.setTransform=function(L,j,E,W,J,$){L=isNaN(L)?1:L,j=isNaN(j)?0:j,E=isNaN(E)?0:E,W=isNaN(W)?1:W,J=isNaN(J)?0:J,$=isNaN($)?0:$,this.ctx.transform=new f(L,j,E,W,J,$)};var I=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};A.prototype.drawImage=function(L,j,E,W,J,$,et,tt,At){var Lt=this.pdf.getImageProperties(L),Ot=1,jt=1,Wt=1,at=1;W!==void 0&&tt!==void 0&&(Wt=tt/W,at=At/J,Ot=Lt.width/W*tt/W,jt=Lt.height/J*At/J),$===void 0&&($=j,et=E,j=0,E=0),W!==void 0&&tt===void 0&&(tt=W,At=J),W===void 0&&tt===void 0&&(tt=Lt.width,At=Lt.height);for(var O,Kt=this.ctx.transform.decompose(),Mt=Q(Kt.rotate.shx),wt=new f,xt=(wt=(wt=(wt=wt.multiply(Kt.translate)).multiply(Kt.skew)).multiply(Kt.scale)).applyToRectangle(new h($-j*Wt,et-E*at,W*Ot,J*jt)),kt=q.call(this,xt),Pt=[],qt=0;qt<kt.length;qt+=1)Pt.indexOf(kt[qt])===-1&&Pt.push(kt[qt]);if(Z(Pt),this.autoPaging)for(var Gt=Pt[0],Qt=Pt[Pt.length-1],te=Gt;te<Qt+1;te++){this.pdf.setPage(te);var ie=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],fe=te===1?this.posY+this.margin[0]:this.margin[0],Ht=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ee=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Ft=te===1?0:Ht+(te-2)*ee;if(this.ctx.clip_path.length!==0){var Ge=this.path;O=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=M(O,this.posX+this.margin[3],-Ft+fe+this.ctx.prevPageLastElemOffset),dt.call(this,"fill",!0),this.path=Ge}var se=JSON.parse(JSON.stringify(xt));se=M([se],this.posX+this.margin[3],-Ft+fe+this.ctx.prevPageLastElemOffset)[0];var Nr=(te>Gt||te<Qt)&&I.call(this);Nr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ie,ee,null).clip().discardPath()),this.pdf.addImage(L,"JPEG",se.x,se.y,se.w,se.h,null,null,Mt),Nr&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(L,"JPEG",xt.x,xt.y,xt.w,xt.h,null,null,Mt)};var q=function(L,j,E){var W=[];j=j||this.pdf.internal.pageSize.width,E=E||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var J=this.posY+this.ctx.prevPageLastElemOffset;switch(L.type){default:case"mt":case"lt":W.push(Math.floor((L.y+J)/E)+1);break;case"arc":W.push(Math.floor((L.y+J-L.radius)/E)+1),W.push(Math.floor((L.y+J+L.radius)/E)+1);break;case"qct":var $=pt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,L.x1,L.y1,L.x,L.y);W.push(Math.floor(($.y+J)/E)+1),W.push(Math.floor(($.y+$.h+J)/E)+1);break;case"bct":var et=ot(this.ctx.lastPoint.x,this.ctx.lastPoint.y,L.x1,L.y1,L.x2,L.y2,L.x,L.y);W.push(Math.floor((et.y+J)/E)+1),W.push(Math.floor((et.y+et.h+J)/E)+1);break;case"rect":W.push(Math.floor((L.y+J)/E)+1),W.push(Math.floor((L.y+L.h+J)/E)+1)}for(var tt=0;tt<W.length;tt+=1)for(;this.pdf.internal.getNumberOfPages()<W[tt];)S.call(this);return W},S=function(){var L=this.fillStyle,j=this.strokeStyle,E=this.font,W=this.lineCap,J=this.lineWidth,$=this.lineJoin;this.pdf.addPage(),this.fillStyle=L,this.strokeStyle=j,this.font=E,this.lineCap=W,this.lineWidth=J,this.lineJoin=$},M=function(L,j,E){for(var W=0;W<L.length;W++)switch(L[W].type){case"bct":L[W].x2+=j,L[W].y2+=E;case"qct":L[W].x1+=j,L[W].y1+=E;case"mt":case"lt":case"arc":default:L[W].x+=j,L[W].y+=E}return L},Z=function(L){return L.sort(function(j,E){return j-E})},ut=function(L,j){for(var E,W,J=this.fillStyle,$=this.strokeStyle,et=this.lineCap,tt=this.lineWidth,At=Math.abs(tt*this.ctx.transform.scaleX),Lt=this.lineJoin,Ot=JSON.parse(JSON.stringify(this.path)),jt=JSON.parse(JSON.stringify(this.path)),Wt=[],at=0;at<jt.length;at++)if(jt[at].x!==void 0)for(var O=q.call(this,jt[at]),Kt=0;Kt<O.length;Kt+=1)Wt.indexOf(O[Kt])===-1&&Wt.push(O[Kt]);for(var Mt=0;Mt<Wt.length;Mt++)for(;this.pdf.internal.getNumberOfPages()<Wt[Mt];)S.call(this);if(Z(Wt),this.autoPaging)for(var wt=Wt[0],xt=Wt[Wt.length-1],kt=wt;kt<xt+1;kt++){this.pdf.setPage(kt),this.fillStyle=J,this.strokeStyle=$,this.lineCap=et,this.lineWidth=At,this.lineJoin=Lt;var Pt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],qt=kt===1?this.posY+this.margin[0]:this.margin[0],Gt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Qt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],te=kt===1?0:Gt+(kt-2)*Qt;if(this.ctx.clip_path.length!==0){var ie=this.path;E=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=M(E,this.posX+this.margin[3],-te+qt+this.ctx.prevPageLastElemOffset),dt.call(this,L,!0),this.path=ie}if(W=JSON.parse(JSON.stringify(Ot)),this.path=M(W,this.posX+this.margin[3],-te+qt+this.ctx.prevPageLastElemOffset),j===!1||kt===0){var fe=(kt>wt||kt<xt)&&I.call(this);fe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Pt,Qt,null).clip().discardPath()),dt.call(this,L,j),fe&&this.pdf.restoreGraphicsState()}this.lineWidth=tt}else this.lineWidth=At,dt.call(this,L,j),this.lineWidth=tt;this.path=Ot},dt=function(L,j){if((L!=="stroke"||j||!B.call(this))&&(L==="stroke"||j||!p.call(this))){for(var E,W,J=[],$=this.path,et=0;et<$.length;et++){var tt=$[et];switch(tt.type){case"begin":J.push({begin:!0});break;case"close":J.push({close:!0});break;case"mt":J.push({start:tt,deltas:[],abs:[]});break;case"lt":var At=J.length;if($[et-1]&&!isNaN($[et-1].x)&&(E=[tt.x-$[et-1].x,tt.y-$[et-1].y],At>0)){for(;At>=0;At--)if(J[At-1].close!==!0&&J[At-1].begin!==!0){J[At-1].deltas.push(E),J[At-1].abs.push(tt);break}}break;case"bct":E=[tt.x1-$[et-1].x,tt.y1-$[et-1].y,tt.x2-$[et-1].x,tt.y2-$[et-1].y,tt.x-$[et-1].x,tt.y-$[et-1].y],J[J.length-1].deltas.push(E);break;case"qct":var Lt=$[et-1].x+2/3*(tt.x1-$[et-1].x),Ot=$[et-1].y+2/3*(tt.y1-$[et-1].y),jt=tt.x+2/3*(tt.x1-tt.x),Wt=tt.y+2/3*(tt.y1-tt.y),at=tt.x,O=tt.y;E=[Lt-$[et-1].x,Ot-$[et-1].y,jt-$[et-1].x,Wt-$[et-1].y,at-$[et-1].x,O-$[et-1].y],J[J.length-1].deltas.push(E);break;case"arc":J.push({deltas:[],abs:[],arc:!0}),Array.isArray(J[J.length-1].abs)&&J[J.length-1].abs.push(tt)}}W=j?null:L==="stroke"?"stroke":"fill";for(var Kt=!1,Mt=0;Mt<J.length;Mt++)if(J[Mt].arc)for(var wt=J[Mt].abs,xt=0;xt<wt.length;xt++){var kt=wt[xt];kt.type==="arc"?G.call(this,kt.x,kt.y,kt.radius,kt.startAngle,kt.endAngle,kt.counterclockwise,void 0,j,!Kt):H.call(this,kt.x,kt.y),Kt=!0}else if(J[Mt].close===!0)this.pdf.internal.out("h"),Kt=!1;else if(J[Mt].begin!==!0){var Pt=J[Mt].start.x,qt=J[Mt].start.y;z.call(this,J[Mt].deltas,Pt,qt),Kt=!0}W&&vt.call(this,W),j&&bt.call(this)}},Nt=function(L){var j=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,E=j*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return L-E;case"top":return L+j-E;case"hanging":return L+j-2*E;case"middle":return L+j/2-E;case"ideographic":return L;case"alphabetic":default:return L}},nt=function(L){return L+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};A.prototype.createLinearGradient=function(){var L=function(){};return L.colorStops=[],L.addColorStop=function(j,E){this.colorStops.push([j,E])},L.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},L.isCanvasGradient=!0,L},A.prototype.createPattern=function(){return this.createLinearGradient()},A.prototype.createRadialGradient=function(){return this.createLinearGradient()};var G=function(L,j,E,W,J,$,et,tt,At){for(var Lt=st.call(this,E,W,J,$),Ot=0;Ot<Lt.length;Ot++){var jt=Lt[Ot];Ot===0&&(At?k.call(this,jt.x1+L,jt.y1+j):H.call(this,jt.x1+L,jt.y1+j)),ct.call(this,L,j,jt.x2,jt.y2,jt.x3,jt.y3,jt.x4,jt.y4)}tt?bt.call(this):vt.call(this,et)},vt=function(L){switch(L){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},bt=function(){this.pdf.clip(),this.pdf.discardPath()},k=function(L,j){this.pdf.internal.out(n(L)+" "+a(j)+" m")},F=function(L){var j;switch(L.align){case"right":case"end":j="right";break;case"center":j="center";break;case"left":case"start":default:j="left"}var E=this.pdf.getTextDimensions(L.text),W=Nt.call(this,L.y),J=nt.call(this,W)-E.h,$=this.ctx.transform.applyToPoint(new l(L.x,W)),et=this.ctx.transform.decompose(),tt=new f;tt=(tt=(tt=tt.multiply(et.translate)).multiply(et.skew)).multiply(et.scale);for(var At,Lt,Ot,jt=this.ctx.transform.applyToRectangle(new h(L.x,W,E.w,E.h)),Wt=tt.applyToRectangle(new h(L.x,J,E.w,E.h)),at=q.call(this,Wt),O=[],Kt=0;Kt<at.length;Kt+=1)O.indexOf(at[Kt])===-1&&O.push(at[Kt]);if(Z(O),this.autoPaging)for(var Mt=O[0],wt=O[O.length-1],xt=Mt;xt<wt+1;xt++){this.pdf.setPage(xt);var kt=xt===1?this.posY+this.margin[0]:this.margin[0],Pt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],qt=this.pdf.internal.pageSize.height-this.margin[2],Gt=qt-this.margin[0],Qt=this.pdf.internal.pageSize.width-this.margin[1],te=Qt-this.margin[3],ie=xt===1?0:Pt+(xt-2)*Gt;if(this.ctx.clip_path.length!==0){var fe=this.path;At=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=M(At,this.posX+this.margin[3],-1*ie+kt),dt.call(this,"fill",!0),this.path=fe}var Ht=M([JSON.parse(JSON.stringify(Wt))],this.posX+this.margin[3],-ie+kt+this.ctx.prevPageLastElemOffset)[0];L.scale>=.01&&(Lt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Lt*L.scale),Ot=this.lineWidth,this.lineWidth=Ot*L.scale);var ee=this.autoPaging!=="text";if(ee||Ht.y+Ht.h<=qt){if(ee||Ht.y>=kt&&Ht.x<=Qt){var Ft=ee?L.text:this.pdf.splitTextToSize(L.text,L.maxWidth||Qt-Ht.x)[0],Ge=M([JSON.parse(JSON.stringify(jt))],this.posX+this.margin[3],-ie+kt+this.ctx.prevPageLastElemOffset)[0],se=ee&&(xt>Mt||xt<wt)&&I.call(this);se&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],te,Gt,null).clip().discardPath()),this.pdf.text(Ft,Ge.x,Ge.y,{angle:L.angle,align:j,renderingMode:L.renderingMode}),se&&this.pdf.restoreGraphicsState()}}else Ht.y<qt&&(this.ctx.prevPageLastElemOffset+=qt-Ht.y);L.scale>=.01&&(this.pdf.setFontSize(Lt),this.lineWidth=Ot)}else L.scale>=.01&&(Lt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Lt*L.scale),Ot=this.lineWidth,this.lineWidth=Ot*L.scale),this.pdf.text(L.text,$.x+this.posX,$.y+this.posY,{angle:L.angle,align:j,renderingMode:L.renderingMode,maxWidth:L.maxWidth}),L.scale>=.01&&(this.pdf.setFontSize(Lt),this.lineWidth=Ot)},H=function(L,j,E,W){E=E||0,W=W||0,this.pdf.internal.out(n(L+E)+" "+a(j+W)+" l")},z=function(L,j,E){return this.pdf.lines(L,j,E,null,null)},ct=function(L,j,E,W,J,$,et,tt){this.pdf.internal.out([e(c(E+L)),e(s(W+j)),e(c(J+L)),e(s($+j)),e(c(et+L)),e(s(tt+j)),"c"].join(" "))},st=function(L,j,E,W){for(var J=2*Math.PI,$=Math.PI/2;j>E;)j-=J;var et=Math.abs(E-j);et<J&&W&&(et=J-et);for(var tt=[],At=W?-1:1,Lt=j;et>1e-5;){var Ot=Lt+At*Math.min(et,$);tt.push(mt.call(this,L,Lt,Ot)),et-=Math.abs(Ot-Lt),Lt=Ot}return tt},mt=function(L,j,E){var W=(E-j)/2,J=L*Math.cos(W),$=L*Math.sin(W),et=J,tt=-$,At=et*et+tt*tt,Lt=At+et*J+tt*$,Ot=4/3*(Math.sqrt(2*At*Lt)-Lt)/(et*$-tt*J),jt=et-Ot*tt,Wt=tt+Ot*et,at=jt,O=-Wt,Kt=W+j,Mt=Math.cos(Kt),wt=Math.sin(Kt);return{x1:L*Math.cos(j),y1:L*Math.sin(j),x2:jt*Mt-Wt*wt,y2:jt*wt+Wt*Mt,x3:at*Mt-O*wt,y3:at*wt+O*Mt,x4:L*Math.cos(E),y4:L*Math.sin(E)}},Q=function(L){return 180*L/Math.PI},pt=function(L,j,E,W,J,$){var et=L+.5*(E-L),tt=j+.5*(W-j),At=J+.5*(E-J),Lt=$+.5*(W-$),Ot=Math.min(L,J,et,At),jt=Math.max(L,J,et,At),Wt=Math.min(j,$,tt,Lt),at=Math.max(j,$,tt,Lt);return new h(Ot,Wt,jt-Ot,at-Wt)},ot=function(L,j,E,W,J,$,et,tt){var At,Lt,Ot,jt,Wt,at,O,Kt,Mt,wt,xt,kt,Pt,qt,Gt=E-L,Qt=W-j,te=J-E,ie=$-W,fe=et-J,Ht=tt-$;for(Lt=0;Lt<41;Lt++)Mt=(O=(Ot=L+(At=Lt/40)*Gt)+At*((Wt=E+At*te)-Ot))+At*(Wt+At*(J+At*fe-Wt)-O),wt=(Kt=(jt=j+At*Qt)+At*((at=W+At*ie)-jt))+At*(at+At*($+At*Ht-at)-Kt),Lt==0?(xt=Mt,kt=wt,Pt=Mt,qt=wt):(xt=Math.min(xt,Mt),kt=Math.min(kt,wt),Pt=Math.max(Pt,Mt),qt=Math.max(qt,wt));return new h(Math.round(xt),Math.round(kt),Math.round(Pt-xt),Math.round(qt-kt))},Et=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var L,j,E=(L=this.ctx.lineDash,j=this.ctx.lineDashOffset,JSON.stringify({lineDash:L,lineDashOffset:j}));this.prevLineDash!==E&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=E)}}})(zt.API),function(i){var e=function(s){var l,h,f,v,x,A,_,p,B,I;for(h=[],f=0,v=(s+=l="\0\0\0\0".slice(s.length%4||4)).length;v>f;f+=4)(x=(s.charCodeAt(f)<<24)+(s.charCodeAt(f+1)<<16)+(s.charCodeAt(f+2)<<8)+s.charCodeAt(f+3))!==0?(A=(x=((x=((x=((x=(x-(I=x%85))/85)-(B=x%85))/85)-(p=x%85))/85)-(_=x%85))/85)%85,h.push(A+33,_+33,p+33,B+33,I+33)):h.push(122);return function(q,S){for(var M=S;M>0;M--)q.pop()}(h,l.length),String.fromCharCode.apply(String,h)+"~>"},n=function(s){var l,h,f,v,x,A=String,_="length",p=255,B="charCodeAt",I="slice",q="replace";for(s[I](-2),s=s[I](0,-2)[q](/\s/g,"")[q]("z","!!!!!"),f=[],v=0,x=(s+=l="uuuuu"[I](s[_]%5||5))[_];x>v;v+=5)h=52200625*(s[B](v)-33)+614125*(s[B](v+1)-33)+7225*(s[B](v+2)-33)+85*(s[B](v+3)-33)+(s[B](v+4)-33),f.push(p&h>>24,p&h>>16,p&h>>8,p&h);return function(S,M){for(var Z=M;Z>0;Z--)S.pop()}(f,l[_]),A.fromCharCode.apply(A,f)},a=function(s){var l=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((s=s.replace(/\s/g,"")).indexOf(">")!==-1&&(s=s.substr(0,s.indexOf(">"))),s.length%2&&(s+="0"),l.test(s)===!1)return"";for(var h="",f=0;f<s.length;f+=2)h+=String.fromCharCode("0x"+(s[f]+s[f+1]));return h},c=function(s){for(var l=new Uint8Array(s.length),h=s.length;h--;)l[h]=s.charCodeAt(h);return s=(l=Zs(l)).reduce(function(f,v){return f+String.fromCharCode(v)},"")};i.processDataByFilters=function(s,l){var h=0,f=s||"",v=[];for(typeof(l=l||[])=="string"&&(l=[l]),h=0;h<l.length;h+=1)switch(l[h]){case"ASCII85Decode":case"/ASCII85Decode":f=n(f),v.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":f=e(f),v.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":f=a(f),v.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":f=f.split("").map(function(x){return("0"+x.charCodeAt().toString(16)).slice(-2)}).join("")+">",v.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":f=c(f),v.push("/FlateDecode");break;default:throw new Error('The filter: "'+l[h]+'" is not implemented')}return{data:f,reverseChain:v.reverse().join(" ")}}}(zt.API),function(i){i.loadFile=function(e,n,a){return function(c,s,l){s=s!==!1,l=typeof l=="function"?l:function(){};var h=void 0;try{h=function(f,v,x){var A=new XMLHttpRequest,_=0,p=function(B){var I=B.length,q=[],S=String.fromCharCode;for(_=0;_<I;_+=1)q.push(S(255&B.charCodeAt(_)));return q.join("")};if(A.open("GET",f,!v),A.overrideMimeType("text/plain; charset=x-user-defined"),v===!1&&(A.onload=function(){A.status===200?x(p(this.responseText)):x(void 0)}),A.send(null),v&&A.status===200)return p(A.responseText)}(c,s,l)}catch{}return h}(e,n,a)},i.loadImageFile=i.loadFile}(zt.API),function(i){function e(){return(Ut.html2canvas?Promise.resolve(Ut.html2canvas):$s(()=>import("./html2canvas.esm-CBrSDip1.js"),[],import.meta.url)).catch(function(l){return Promise.reject(new Error("Could not load html2canvas: "+l))}).then(function(l){return l.default?l.default:l})}function n(){return(Ut.DOMPurify?Promise.resolve(Ut.DOMPurify):$s(()=>import("./purify.es-Ci5xwkH_.js"),[],import.meta.url)).catch(function(l){return Promise.reject(new Error("Could not load dompurify: "+l))}).then(function(l){return l.default?l.default:l})}var a=function(l){var h=ve(l);return h==="undefined"?"undefined":h==="string"||l instanceof String?"string":h==="number"||l instanceof Number?"number":h==="function"||l instanceof Function?"function":l&&l.constructor===Array?"array":l&&l.nodeType===1?"element":h==="object"?"object":"unknown"},c=function(l,h){var f=document.createElement(l);for(var v in h.className&&(f.className=h.className),h.innerHTML&&h.dompurify&&(f.innerHTML=h.dompurify.sanitize(h.innerHTML)),h.style)f.style[v]=h.style[v];return f},s=function l(h){var f=Object.assign(l.convert(Promise.resolve()),JSON.parse(JSON.stringify(l.template))),v=l.convert(Promise.resolve(),f);return v=(v=v.setProgress(1,l,1,[l])).set(h)};(s.prototype=Object.create(Promise.prototype)).constructor=s,s.convert=function(l,h){return l.__proto__=h||s.prototype,l},s.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},s.prototype.from=function(l,h){return this.then(function(){switch(h=h||function(f){switch(a(f)){case"string":return"string";case"element":return f.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(l)){case"string":return this.then(n).then(function(f){return this.set({src:c("div",{innerHTML:l,dompurify:f})})});case"element":return this.set({src:l});case"canvas":return this.set({canvas:l});case"img":return this.set({img:l});default:return this.error("Unknown source type.")}})},s.prototype.to=function(l){switch(l){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},s.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var l={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},h=function f(v,x){for(var A=v.nodeType===3?document.createTextNode(v.nodeValue):v.cloneNode(!1),_=v.firstChild;_;_=_.nextSibling)x!==!0&&_.nodeType===1&&_.nodeName==="SCRIPT"||A.appendChild(f(_,x));return v.nodeType===1&&(v.nodeName==="CANVAS"?(A.width=v.width,A.height=v.height,A.getContext("2d").drawImage(v,0,0)):v.nodeName!=="TEXTAREA"&&v.nodeName!=="SELECT"||(A.value=v.value),A.addEventListener("load",function(){A.scrollTop=v.scrollTop,A.scrollLeft=v.scrollLeft},!0)),A}(this.prop.src,this.opt.html2canvas.javascriptEnabled);h.tagName==="BODY"&&(l.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=c("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=c("div",{className:"html2pdf__container",style:l}),this.prop.container.appendChild(h),this.prop.container.firstChild.appendChild(c("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},s.prototype.toCanvas=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(e).then(function(h){var f=Object.assign({},this.opt.html2canvas);return delete f.onrendered,h(this.prop.container,f)}).then(function(h){(this.opt.html2canvas.onrendered||function(){})(h),this.prop.canvas=h,document.body.removeChild(this.prop.overlay)})},s.prototype.toContext2d=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(e).then(function(h){var f=this.opt.jsPDF,v=this.opt.fontFaces,x=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,A=Object.assign({async:!0,allowTaint:!0,scale:x,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete A.onrendered,f.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,f.context2d.posX=this.opt.x,f.context2d.posY=this.opt.y,f.context2d.margin=this.opt.margin,f.context2d.fontFaces=v,v)for(var _=0;_<v.length;++_){var p=v[_],B=p.src.find(function(I){return I.format==="truetype"});B&&f.addFont(B.url,p.ref.name,p.ref.style)}return A.windowHeight=A.windowHeight||0,A.windowHeight=A.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):A.windowHeight,f.context2d.save(!0),h(this.prop.container,A)}).then(function(h){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(h),this.prop.canvas=h,document.body.removeChild(this.prop.overlay)})},s.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var l=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=l})},s.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},s.prototype.output=function(l,h,f){return(f=f||"pdf").toLowerCase()==="img"||f.toLowerCase()==="image"?this.outputImg(l,h):this.outputPdf(l,h)},s.prototype.outputPdf=function(l,h){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(l,h)})},s.prototype.outputImg=function(l){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(l){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+l+'" is not supported.'}})},s.prototype.save=function(l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(l?{filename:l}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},s.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},s.prototype.set=function(l){if(a(l)!=="object")return this;var h=Object.keys(l||{}).map(function(f){if(f in s.template.prop)return function(){this.prop[f]=l[f]};switch(f){case"margin":return this.setMargin.bind(this,l.margin);case"jsPDF":return function(){return this.opt.jsPDF=l.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,l.pageSize);default:return function(){this.opt[f]=l[f]}}},this);return this.then(function(){return this.thenList(h)})},s.prototype.get=function(l,h){return this.then(function(){var f=l in s.template.prop?this.prop[l]:this.opt[l];return h?h(f):f})},s.prototype.setMargin=function(l){return this.then(function(){switch(a(l)){case"number":l=[l,l,l,l];case"array":if(l.length===2&&(l=[l[0],l[1],l[0],l[1]]),l.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=l}).then(this.setPageSize)},s.prototype.setPageSize=function(l){function h(f,v){return Math.floor(f*v/72*96)}return this.then(function(){(l=l||zt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(l.inner={width:l.width-this.opt.margin[1]-this.opt.margin[3],height:l.height-this.opt.margin[0]-this.opt.margin[2]},l.inner.px={width:h(l.inner.width,l.k),height:h(l.inner.height,l.k)},l.inner.ratio=l.inner.height/l.inner.width),this.prop.pageSize=l})},s.prototype.setProgress=function(l,h,f,v){return l!=null&&(this.progress.val=l),h!=null&&(this.progress.state=h),f!=null&&(this.progress.n=f),v!=null&&(this.progress.stack=v),this.progress.ratio=this.progress.val/this.progress.state,this},s.prototype.updateProgress=function(l,h,f,v){return this.setProgress(l?this.progress.val+l:null,h||null,f?this.progress.n+f:null,v?this.progress.stack.concat(v):null)},s.prototype.then=function(l,h){var f=this;return this.thenCore(l,h,function(v,x){return f.updateProgress(null,null,1,[v]),Promise.prototype.then.call(this,function(A){return f.updateProgress(null,v),A}).then(v,x).then(function(A){return f.updateProgress(1),A})})},s.prototype.thenCore=function(l,h,f){f=f||Promise.prototype.then,l&&(l=l.bind(this)),h&&(h=h.bind(this));var v=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?this:s.convert(Object.assign({},this),Promise.prototype),x=f.call(v,l,h);return s.convert(x,this.__proto__)},s.prototype.thenExternal=function(l,h){return Promise.prototype.then.call(this,l,h)},s.prototype.thenList=function(l){var h=this;return l.forEach(function(f){h=h.thenCore(f)}),h},s.prototype.catch=function(l){l&&(l=l.bind(this));var h=Promise.prototype.catch.call(this,l);return s.convert(h,this)},s.prototype.catchExternal=function(l){return Promise.prototype.catch.call(this,l)},s.prototype.error=function(l){return this.then(function(){throw new Error(l)})},s.prototype.using=s.prototype.set,s.prototype.saveAs=s.prototype.save,s.prototype.export=s.prototype.output,s.prototype.run=s.prototype.then,zt.getPageSize=function(l,h,f){if(ve(l)==="object"){var v=l;l=v.orientation,h=v.unit||h,f=v.format||f}h=h||"mm",f=f||"a4",l=(""+(l||"P")).toLowerCase();var x,A=(""+f).toLowerCase(),_={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(h){case"pt":x=1;break;case"mm":x=72/25.4;break;case"cm":x=72/2.54;break;case"in":x=72;break;case"px":x=.75;break;case"pc":case"em":x=12;break;case"ex":x=6;break;default:throw"Invalid unit: "+h}var p,B=0,I=0;if(_.hasOwnProperty(A))B=_[A][1]/x,I=_[A][0]/x;else try{B=f[1],I=f[0]}catch{throw new Error("Invalid format: "+f)}if(l==="p"||l==="portrait")l="p",I>B&&(p=I,I=B,B=p);else{if(l!=="l"&&l!=="landscape")throw"Invalid orientation: "+l;l="l",B>I&&(p=I,I=B,B=p)}return{width:I,height:B,unit:h,k:x,orientation:l}},i.html=function(l,h){(h=h||{}).callback=h.callback||function(){},h.html2canvas=h.html2canvas||{},h.html2canvas.canvas=h.html2canvas.canvas||this.canvas,h.jsPDF=h.jsPDF||this,h.fontFaces=h.fontFaces?h.fontFaces.map(io):null;var f=new s(h);return h.worker?f:f.from(l).doCallback()}}(zt.API),zt.API.addJS=function(i){return Wo=i,this.internal.events.subscribe("postPutResources",function(){Ya=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Ya+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Ho=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Wo+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){Ya!==void 0&&Ho!==void 0&&this.internal.out("/Names <</JavaScript "+Ya+" 0 R>>")}),this},function(i){var e;i.events.push(["postPutResources",function(){var n=this,a=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var c=n.outline.render().split(/\r\n/),s=0;s<c.length;s++){var l=c[s],h=a.exec(l);if(h!=null){var f=h[1];n.internal.newObjectDeferredBegin(f,!1)}n.internal.write(l)}if(this.outline.createNamedDestinations){var v=this.internal.pages.length,x=[];for(s=0;s<v;s++){var A=n.internal.newObject();x.push(A);var _=n.internal.getPageInfo(s+1);n.internal.write("<< /D["+_.objId+" 0 R /XYZ null null null]>> endobj")}var p=n.internal.newObject();for(n.internal.write("<< /Names [ "),s=0;s<x.length;s++)n.internal.write("(page_"+(s+1)+")"+x[s]+" 0 R");n.internal.write(" ] >>","endobj"),e=n.internal.newObject(),n.internal.write("<< /Dests "+p+" 0 R"),n.internal.write(">>","endobj")}}]),i.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+e+" 0 R"))}]),i.events.push(["initialized",function(){var n=this;n.outline={createNamedDestinations:!1,root:{children:[]}},n.outline.add=function(a,c,s){var l={title:c,options:s,children:[]};return a==null&&(a=this.root),a.children.push(l),l},n.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=n,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},n.outline.genIds_r=function(a){a.id=n.internal.newObjectDeferred();for(var c=0;c<a.children.length;c++)this.genIds_r(a.children[c])},n.outline.renderRoot=function(a){this.objStart(a),this.line("/Type /Outlines"),a.children.length>0&&(this.line("/First "+this.makeRef(a.children[0])),this.line("/Last "+this.makeRef(a.children[a.children.length-1]))),this.line("/Count "+this.count_r({count:0},a)),this.objEnd()},n.outline.renderItems=function(a){for(var c=this.ctx.pdf.internal.getVerticalCoordinateString,s=0;s<a.children.length;s++){var l=a.children[s];this.objStart(l),this.line("/Title "+this.makeString(l.title)),this.line("/Parent "+this.makeRef(a)),s>0&&this.line("/Prev "+this.makeRef(a.children[s-1])),s<a.children.length-1&&this.line("/Next "+this.makeRef(a.children[s+1])),l.children.length>0&&(this.line("/First "+this.makeRef(l.children[0])),this.line("/Last "+this.makeRef(l.children[l.children.length-1])));var h=this.count=this.count_r({count:0},l);if(h>0&&this.line("/Count "+h),l.options&&l.options.pageNumber){var f=n.internal.getPageInfo(l.options.pageNumber);this.line("/Dest ["+f.objId+" 0 R /XYZ 0 "+c(0)+" 0]")}this.objEnd()}for(var v=0;v<a.children.length;v++)this.renderItems(a.children[v])},n.outline.line=function(a){this.ctx.val+=a+`\r
|
||
`},n.outline.makeRef=function(a){return a.id+" 0 R"},n.outline.makeString=function(a){return"("+n.internal.pdfEscape(a)+")"},n.outline.objStart=function(a){this.ctx.val+=`\r
|
||
`+a.id+` 0 obj\r
|
||
<<\r
|
||
`},n.outline.objEnd=function(){this.ctx.val+=`>> \r
|
||
endobj\r
|
||
`},n.outline.count_r=function(a,c){for(var s=0;s<c.children.length;s++)a.count++,this.count_r(a,c.children[s]);return a.count}}])}(zt.API),function(i){var e=[192,193,194,195,196,197,198,199];i.processJPEG=function(n,a,c,s,l,h){var f,v=this.decode.DCT_DECODE,x=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=l||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,(f=function(A){for(var _,p=256*A.charCodeAt(4)+A.charCodeAt(5),B=A.length,I={width:0,height:0,numcomponents:1},q=4;q<B;q+=2){if(q+=p,e.indexOf(A.charCodeAt(q+1))!==-1){_=256*A.charCodeAt(q+5)+A.charCodeAt(q+6),I={width:256*A.charCodeAt(q+7)+A.charCodeAt(q+8),height:_,numcomponents:A.charCodeAt(q+9)};break}p=256*A.charCodeAt(q+2)+A.charCodeAt(q+3)}return I}(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n)).numcomponents){case 1:h=this.color_spaces.DEVICE_GRAY;break;case 4:h=this.color_spaces.DEVICE_CMYK;break;case 3:h=this.color_spaces.DEVICE_RGB}x={data:n,width:f.width,height:f.height,colorSpace:h,bitsPerComponent:8,filter:v,index:a,alias:c}}return x}}(zt.API);var vi,Xa,Vo,Go,Jo,fc=function(){var i,e,n;function a(s){var l,h,f,v,x,A,_,p,B,I,q,S,M,Z;for(this.data=s,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},A=null;;){switch(l=this.readUInt32(),B=(function(){var ut,dt;for(dt=[],ut=0;ut<4;++ut)dt.push(String.fromCharCode(this.data[this.pos++]));return dt}).call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(l);break;case"fcTL":A&&this.animation.frames.push(A),this.pos+=4,A={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},x=this.readUInt16(),v=this.readUInt16()||100,A.delay=1e3*x/v,A.disposeOp=this.data[this.pos++],A.blendOp=this.data[this.pos++],A.data=[];break;case"IDAT":case"fdAT":for(B==="fdAT"&&(this.pos+=4,l-=4),s=(A!=null?A.data:void 0)||this.imgData,S=0;0<=l?S<l:S>l;0<=l?++S:--S)s.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(f=this.palette.length/3,this.transparency.indexed=this.read(l),this.transparency.indexed.length>f)throw new Error("More transparent colors than palette size");if((I=f-this.transparency.indexed.length)>0)for(M=0;0<=I?M<I:M>I;0<=I?++M:--M)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(l)[0];break;case 2:this.transparency.rgb=this.read(l)}break;case"tEXt":_=(q=this.read(l)).indexOf(0),p=String.fromCharCode.apply(String,q.slice(0,_)),this.text[p]=String.fromCharCode.apply(String,q.slice(_+1));break;case"IEND":return A&&this.animation.frames.push(A),this.colors=(function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}).call(this),this.hasAlphaChannel=(Z=this.colorType)===4||Z===6,h=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*h,this.colorSpace=(function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}).call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=l}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}a.prototype.read=function(s){var l,h;for(h=[],l=0;0<=s?l<s:l>s;0<=s?++l:--l)h.push(this.data[this.pos++]);return h},a.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.decodePixels=function(s){var l=this.pixelBitlength/8,h=new Uint8Array(this.width*this.height*l),f=0,v=this;if(s==null&&(s=this.imgData),s.length===0)return new Uint8Array(0);function x(A,_,p,B){var I,q,S,M,Z,ut,dt,Nt,nt,G,vt,bt,k,F,H,z,ct,st,mt,Q,pt,ot=Math.ceil((v.width-A)/p),Et=Math.ceil((v.height-_)/B),L=v.width==ot&&v.height==Et;for(F=l*ot,bt=L?h:new Uint8Array(F*Et),ut=s.length,k=0,q=0;k<Et&&f<ut;){switch(s[f++]){case 0:for(M=ct=0;ct<F;M=ct+=1)bt[q++]=s[f++];break;case 1:for(M=st=0;st<F;M=st+=1)I=s[f++],Z=M<l?0:bt[q-l],bt[q++]=(I+Z)%256;break;case 2:for(M=mt=0;mt<F;M=mt+=1)I=s[f++],S=(M-M%l)/l,H=k&&bt[(k-1)*F+S*l+M%l],bt[q++]=(H+I)%256;break;case 3:for(M=Q=0;Q<F;M=Q+=1)I=s[f++],S=(M-M%l)/l,Z=M<l?0:bt[q-l],H=k&&bt[(k-1)*F+S*l+M%l],bt[q++]=(I+Math.floor((Z+H)/2))%256;break;case 4:for(M=pt=0;pt<F;M=pt+=1)I=s[f++],S=(M-M%l)/l,Z=M<l?0:bt[q-l],k===0?H=z=0:(H=bt[(k-1)*F+S*l+M%l],z=S&&bt[(k-1)*F+(S-1)*l+M%l]),dt=Z+H-z,Nt=Math.abs(dt-Z),G=Math.abs(dt-H),vt=Math.abs(dt-z),nt=Nt<=G&&Nt<=vt?Z:G<=vt?H:z,bt[q++]=(I+nt)%256;break;default:throw new Error("Invalid filter algorithm: "+s[f-1])}if(!L){var j=((_+k*B)*v.width+A)*l,E=k*F;for(M=0;M<ot;M+=1){for(var W=0;W<l;W+=1)h[j++]=bt[E++];j+=(p-1)*l}}k++}}return s=Gu(s),v.interlaceMethod==1?(x(0,0,8,8),x(4,0,8,8),x(0,4,4,8),x(2,0,4,4),x(0,2,2,4),x(1,0,2,2),x(0,1,1,2)):x(0,0,1,1),h},a.prototype.decodePalette=function(){var s,l,h,f,v,x,A,_,p;for(h=this.palette,x=this.transparency.indexed||[],v=new Uint8Array((x.length||0)+h.length),f=0,s=0,l=A=0,_=h.length;A<_;l=A+=3)v[f++]=h[l],v[f++]=h[l+1],v[f++]=h[l+2],v[f++]=(p=x[s++])!=null?p:255;return v},a.prototype.copyToImageData=function(s,l){var h,f,v,x,A,_,p,B,I,q,S;if(f=this.colors,I=null,h=this.hasAlphaChannel,this.palette.length&&(I=(S=this._decodedPalette)!=null?S:this._decodedPalette=this.decodePalette(),f=4,h=!0),B=(v=s.data||s).length,A=I||l,x=_=0,f===1)for(;x<B;)p=I?4*l[x/4]:_,q=A[p++],v[x++]=q,v[x++]=q,v[x++]=q,v[x++]=h?A[p++]:255,_=p;else for(;x<B;)p=I?4*l[x/4]:_,v[x++]=A[p++],v[x++]=A[p++],v[x++]=A[p++],v[x++]=h?A[p++]:255,_=p},a.prototype.decode=function(){var s;return s=new Uint8Array(this.width*this.height*4),this.copyToImageData(s,this.decodePixels()),s};var c=function(){if(Object.prototype.toString.call(Ut)==="[object Window]"){try{e=Ut.document.createElement("canvas"),n=e.getContext("2d")}catch{return!1}return!0}return!1};return c(),i=function(s){var l;if(c()===!0)return n.width=s.width,n.height=s.height,n.clearRect(0,0,s.width,s.height),n.putImageData(s,0,0),(l=new Image).src=e.toDataURL(),l;throw new Error("This method requires a Browser with Canvas-capability.")},a.prototype.decodeFrames=function(s){var l,h,f,v,x,A,_,p;if(this.animation){for(p=[],h=x=0,A=(_=this.animation.frames).length;x<A;h=++x)l=_[h],f=s.createImageData(l.width,l.height),v=this.decodePixels(new Uint8Array(l.data)),this.copyToImageData(f,v),l.imageData=f,p.push(l.image=i(f));return p}},a.prototype.renderFrame=function(s,l){var h,f,v;return h=(f=this.animation.frames)[l],v=f[l-1],l===0&&s.clearRect(0,0,this.width,this.height),(v!=null?v.disposeOp:void 0)===1?s.clearRect(v.xOffset,v.yOffset,v.width,v.height):(v!=null?v.disposeOp:void 0)===2&&s.putImageData(v.imageData,v.xOffset,v.yOffset),h.blendOp===0&&s.clearRect(h.xOffset,h.yOffset,h.width,h.height),s.drawImage(h.image,h.xOffset,h.yOffset)},a.prototype.animate=function(s){var l,h,f,v,x,A,_=this;return h=0,A=this.animation,v=A.numFrames,f=A.frames,x=A.numPlays,(l=function(){var p,B;if(p=h++%v,B=f[p],_.renderFrame(s,p),v>1&&h/v<x)return _.animation._timeout=setTimeout(l,B.delay)})()},a.prototype.stopAnimation=function(){var s;return clearTimeout((s=this.animation)!=null?s._timeout:void 0)},a.prototype.render=function(s){var l,h;return s._png&&s._png.stopAnimation(),s._png=this,s.width=this.width,s.height=this.height,l=s.getContext("2d"),this.animation?(this.decodeFrames(l),this.animate(l)):(h=l.createImageData(this.width,this.height),this.copyToImageData(h,this.decodePixels()),l.putImageData(h,0,0))},a}();/**
|
||
* @license
|
||
*
|
||
* Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining
|
||
* a copy of this software and associated documentation files (the
|
||
* "Software"), to deal in the Software without restriction, including
|
||
* without limitation the rights to use, copy, modify, merge, publish,
|
||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||
* permit persons to whom the Software is furnished to do so, subject to
|
||
* the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be
|
||
* included in all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||
* ====================================================================
|
||
*//**
|
||
* @license
|
||
* (c) Dean McNamee <dean@gmail.com>, 2013.
|
||
*
|
||
* https://github.com/deanm/omggif
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to
|
||
* deal in the Software without restriction, including without limitation the
|
||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||
* sell copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||
* IN THE SOFTWARE.
|
||
*
|
||
* omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
|
||
* including animation and compression. It does not rely on any specific
|
||
* underlying system, so should run in the browser, Node, or Plask.
|
||
*/function dc(i){var e=0;if(i[e++]!==71||i[e++]!==73||i[e++]!==70||i[e++]!==56||(i[e++]+1&253)!=56||i[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var n=i[e++]|i[e++]<<8,a=i[e++]|i[e++]<<8,c=i[e++],s=c>>7,l=1<<(7&c)+1;i[e++],i[e++];var h=null,f=null;s&&(h=e,f=l,e+=3*l);var v=!0,x=[],A=0,_=null,p=0,B=null;for(this.width=n,this.height=a;v&&e<i.length;)switch(i[e++]){case 33:switch(i[e++]){case 255:if(i[e]!==11||i[e+1]==78&&i[e+2]==69&&i[e+3]==84&&i[e+4]==83&&i[e+5]==67&&i[e+6]==65&&i[e+7]==80&&i[e+8]==69&&i[e+9]==50&&i[e+10]==46&&i[e+11]==48&&i[e+12]==3&&i[e+13]==1&&i[e+16]==0)e+=14,B=i[e++]|i[e++]<<8,e++;else for(e+=12;;){if(!((k=i[e++])>=0))throw Error("Invalid block size");if(k===0)break;e+=k}break;case 249:if(i[e++]!==4||i[e+4]!==0)throw new Error("Invalid graphics extension block.");var I=i[e++];A=i[e++]|i[e++]<<8,_=i[e++],(1&I)==0&&(_=null),p=I>>2&7,e++;break;case 254:for(;;){if(!((k=i[e++])>=0))throw Error("Invalid block size");if(k===0)break;e+=k}break;default:throw new Error("Unknown graphic control label: 0x"+i[e-1].toString(16))}break;case 44:var q=i[e++]|i[e++]<<8,S=i[e++]|i[e++]<<8,M=i[e++]|i[e++]<<8,Z=i[e++]|i[e++]<<8,ut=i[e++],dt=ut>>6&1,Nt=1<<(7&ut)+1,nt=h,G=f,vt=!1;ut>>7&&(vt=!0,nt=e,G=Nt,e+=3*Nt);var bt=e;for(e++;;){var k;if(!((k=i[e++])>=0))throw Error("Invalid block size");if(k===0)break;e+=k}x.push({x:q,y:S,width:M,height:Z,has_local_palette:vt,palette_offset:nt,palette_size:G,data_offset:bt,data_length:e-bt,transparent_index:_,interlaced:!!dt,delay:A,disposal:p});break;case 59:v=!1;break;default:throw new Error("Unknown gif block: 0x"+i[e-1].toString(16))}this.numFrames=function(){return x.length},this.loopCount=function(){return B},this.frameInfo=function(F){if(F<0||F>=x.length)throw new Error("Frame index out of range.");return x[F]},this.decodeAndBlitFrameBGRA=function(F,H){var z=this.frameInfo(F),ct=z.width*z.height,st=new Uint8Array(ct);Yo(i,z.data_offset,st,ct);var mt=z.palette_offset,Q=z.transparent_index;Q===null&&(Q=256);var pt=z.width,ot=n-pt,Et=pt,L=4*(z.y*n+z.x),j=4*((z.y+z.height)*n+z.x),E=L,W=4*ot;z.interlaced===!0&&(W+=4*n*7);for(var J=8,$=0,et=st.length;$<et;++$){var tt=st[$];if(Et===0&&(Et=pt,(E+=W)>=j&&(W=4*ot+4*n*(J-1),E=L+(pt+ot)*(J<<1),J>>=1)),tt===Q)E+=4;else{var At=i[mt+3*tt],Lt=i[mt+3*tt+1],Ot=i[mt+3*tt+2];H[E++]=Ot,H[E++]=Lt,H[E++]=At,H[E++]=255}--Et}},this.decodeAndBlitFrameRGBA=function(F,H){var z=this.frameInfo(F),ct=z.width*z.height,st=new Uint8Array(ct);Yo(i,z.data_offset,st,ct);var mt=z.palette_offset,Q=z.transparent_index;Q===null&&(Q=256);var pt=z.width,ot=n-pt,Et=pt,L=4*(z.y*n+z.x),j=4*((z.y+z.height)*n+z.x),E=L,W=4*ot;z.interlaced===!0&&(W+=4*n*7);for(var J=8,$=0,et=st.length;$<et;++$){var tt=st[$];if(Et===0&&(Et=pt,(E+=W)>=j&&(W=4*ot+4*n*(J-1),E=L+(pt+ot)*(J<<1),J>>=1)),tt===Q)E+=4;else{var At=i[mt+3*tt],Lt=i[mt+3*tt+1],Ot=i[mt+3*tt+2];H[E++]=At,H[E++]=Lt,H[E++]=Ot,H[E++]=255}--Et}}}function Yo(i,e,n,a){for(var c=i[e++],s=1<<c,l=s+1,h=l+1,f=c+1,v=(1<<f)-1,x=0,A=0,_=0,p=i[e++],B=new Int32Array(4096),I=null;;){for(;x<16&&p!==0;)A|=i[e++]<<x,x+=8,p===1?p=i[e++]:--p;if(x<f)break;var q=A&v;if(A>>=f,x-=f,q!==s){if(q===l)break;for(var S=q<h?q:I,M=0,Z=S;Z>s;)Z=B[Z]>>8,++M;var ut=Z;if(_+M+(S!==q?1:0)>a)return void me.log("Warning, gif stream longer than expected.");n[_++]=ut;var dt=_+=M;for(S!==q&&(n[_++]=ut),Z=S;M--;)Z=B[Z],n[--dt]=255&Z,Z>>=8;I!==null&&h<4096&&(B[h++]=I<<8|ut,h>=v+1&&f<12&&(++f,v=v<<1|1)),I=q}else h=l+1,v=(1<<(f=c+1))-1,I=null}return _!==a&&me.log("Warning, gif stream shorter than expected."),n}/**
|
||
* @license
|
||
Copyright (c) 2008, Adobe Systems Incorporated
|
||
All rights reserved.
|
||
|
||
Redistribution and use in source and binary forms, with or without
|
||
modification, are permitted provided that the following conditions are
|
||
met:
|
||
|
||
* Redistributions of source code must retain the above copyright notice,
|
||
this list of conditions and the following disclaimer.
|
||
|
||
* Redistributions in binary form must reproduce the above copyright
|
||
notice, this list of conditions and the following disclaimer in the
|
||
documentation and/or other materials provided with the distribution.
|
||
|
||
* Neither the name of Adobe Systems Incorporated nor the names of its
|
||
contributors may be used to endorse or promote products derived from
|
||
this software without specific prior written permission.
|
||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/function Ks(i){var e,n,a,c,s,l=Math.floor,h=new Array(64),f=new Array(64),v=new Array(64),x=new Array(64),A=new Array(65535),_=new Array(65535),p=new Array(64),B=new Array(64),I=[],q=0,S=7,M=new Array(64),Z=new Array(64),ut=new Array(64),dt=new Array(256),Nt=new Array(2048),nt=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],G=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],vt=[0,1,2,3,4,5,6,7,8,9,10,11],bt=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],k=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],F=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],H=[0,1,2,3,4,5,6,7,8,9,10,11],z=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],ct=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function st(L,j){for(var E=0,W=0,J=new Array,$=1;$<=16;$++){for(var et=1;et<=L[$];et++)J[j[W]]=[],J[j[W]][0]=E,J[j[W]][1]=$,W++,E++;E*=2}return J}function mt(L){for(var j=L[0],E=L[1]-1;E>=0;)j&1<<E&&(q|=1<<S),E--,--S<0&&(q==255?(Q(255),Q(0)):Q(q),S=7,q=0)}function Q(L){I.push(L)}function pt(L){Q(L>>8&255),Q(255&L)}function ot(L,j,E,W,J){for(var $,et=J[0],tt=J[240],At=function(wt,xt){var kt,Pt,qt,Gt,Qt,te,ie,fe,Ht,ee,Ft=0;for(Ht=0;Ht<8;++Ht){kt=wt[Ft],Pt=wt[Ft+1],qt=wt[Ft+2],Gt=wt[Ft+3],Qt=wt[Ft+4],te=wt[Ft+5],ie=wt[Ft+6];var Ge=kt+(fe=wt[Ft+7]),se=kt-fe,Nr=Pt+ie,pe=Pt-ie,we=qt+te,Er=qt-te,ue=Gt+Qt,xn=Gt-Qt,Ne=Ge+ue,Ar=Ge-ue,Xr=Nr+we,Ae=Nr-we;wt[Ft]=Ne+Xr,wt[Ft+4]=Ne-Xr;var Jt=.707106781*(Ae+Ar);wt[Ft+2]=Ar+Jt,wt[Ft+6]=Ar-Jt;var ce=.382683433*((Ne=xn+Er)-(Ae=pe+se)),Sn=.5411961*Ne+ce,He=1.306562965*Ae+ce,qr=.707106781*(Xr=Er+pe),Dr=se+qr,Tt=se-qr;wt[Ft+5]=Tt+Sn,wt[Ft+3]=Tt-Sn,wt[Ft+1]=Dr+He,wt[Ft+7]=Dr-He,Ft+=8}for(Ft=0,Ht=0;Ht<8;++Ht){kt=wt[Ft],Pt=wt[Ft+8],qt=wt[Ft+16],Gt=wt[Ft+24],Qt=wt[Ft+32],te=wt[Ft+40],ie=wt[Ft+48];var xr=kt+(fe=wt[Ft+56]),Rr=kt-fe,rr=Pt+ie,qe=Pt-ie,Oe=qt+te,cr=qt-te,zn=Gt+Qt,Kr=Gt-Qt,Sr=xr+zn,_r=xr-zn,Pr=rr+Oe,Tr=rr-Oe;wt[Ft]=Sr+Pr,wt[Ft+32]=Sr-Pr;var pr=.707106781*(Tr+_r);wt[Ft+16]=_r+pr,wt[Ft+48]=_r-pr;var zr=.382683433*((Sr=Kr+cr)-(Tr=qe+Rr)),_n=.5411961*Sr+zr,Un=1.306562965*Tr+zr,Hn=.707106781*(Pr=cr+qe),Wn=Rr+Hn,Vn=Rr-Hn;wt[Ft+40]=Vn+_n,wt[Ft+24]=Vn-_n,wt[Ft+8]=Wn+Un,wt[Ft+56]=Wn-Un,Ft++}for(Ht=0;Ht<64;++Ht)ee=wt[Ht]*xt[Ht],p[Ht]=ee>0?ee+.5|0:ee-.5|0;return p}(L,j),Lt=0;Lt<64;++Lt)B[nt[Lt]]=At[Lt];var Ot=B[0]-E;E=B[0],Ot==0?mt(W[0]):(mt(W[_[$=32767+Ot]]),mt(A[$]));for(var jt=63;jt>0&&B[jt]==0;)jt--;if(jt==0)return mt(et),E;for(var Wt,at=1;at<=jt;){for(var O=at;B[at]==0&&at<=jt;)++at;var Kt=at-O;if(Kt>=16){Wt=Kt>>4;for(var Mt=1;Mt<=Wt;++Mt)mt(tt);Kt&=15}$=32767+B[at],mt(J[(Kt<<4)+_[$]]),mt(A[$]),at++}return jt!=63&&mt(et),E}function Et(L){L=Math.min(Math.max(L,1),100),s!=L&&(function(j){for(var E=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],W=0;W<64;W++){var J=l((E[W]*j+50)/100);J=Math.min(Math.max(J,1),255),h[nt[W]]=J}for(var $=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],et=0;et<64;et++){var tt=l(($[et]*j+50)/100);tt=Math.min(Math.max(tt,1),255),f[nt[et]]=tt}for(var At=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Lt=0,Ot=0;Ot<8;Ot++)for(var jt=0;jt<8;jt++)v[Lt]=1/(h[nt[Lt]]*At[Ot]*At[jt]*8),x[Lt]=1/(f[nt[Lt]]*At[Ot]*At[jt]*8),Lt++}(L<50?Math.floor(5e3/L):Math.floor(200-2*L)),s=L)}this.encode=function(L,j){j&&Et(j),I=new Array,q=0,S=7,pt(65496),pt(65504),pt(16),Q(74),Q(70),Q(73),Q(70),Q(0),Q(1),Q(1),Q(0),pt(1),pt(1),Q(0),Q(0),function(){pt(65499),pt(132),Q(0);for(var Pt=0;Pt<64;Pt++)Q(h[Pt]);Q(1);for(var qt=0;qt<64;qt++)Q(f[qt])}(),function(Pt,qt){pt(65472),pt(17),Q(8),pt(qt),pt(Pt),Q(3),Q(1),Q(17),Q(0),Q(2),Q(17),Q(1),Q(3),Q(17),Q(1)}(L.width,L.height),function(){pt(65476),pt(418),Q(0);for(var Pt=0;Pt<16;Pt++)Q(G[Pt+1]);for(var qt=0;qt<=11;qt++)Q(vt[qt]);Q(16);for(var Gt=0;Gt<16;Gt++)Q(bt[Gt+1]);for(var Qt=0;Qt<=161;Qt++)Q(k[Qt]);Q(1);for(var te=0;te<16;te++)Q(F[te+1]);for(var ie=0;ie<=11;ie++)Q(H[ie]);Q(17);for(var fe=0;fe<16;fe++)Q(z[fe+1]);for(var Ht=0;Ht<=161;Ht++)Q(ct[Ht])}(),pt(65498),pt(12),Q(3),Q(1),Q(0),Q(2),Q(17),Q(3),Q(17),Q(0),Q(63),Q(0);var E=0,W=0,J=0;q=0,S=7,this.encode.displayName="_encode_";for(var $,et,tt,At,Lt,Ot,jt,Wt,at,O=L.data,Kt=L.width,Mt=L.height,wt=4*Kt,xt=0;xt<Mt;){for($=0;$<wt;){for(Lt=wt*xt+$,jt=-1,Wt=0,at=0;at<64;at++)Ot=Lt+(Wt=at>>3)*wt+(jt=4*(7&at)),xt+Wt>=Mt&&(Ot-=wt*(xt+1+Wt-Mt)),$+jt>=wt&&(Ot-=$+jt-wt+4),et=O[Ot++],tt=O[Ot++],At=O[Ot++],M[at]=(Nt[et]+Nt[tt+256>>0]+Nt[At+512>>0]>>16)-128,Z[at]=(Nt[et+768>>0]+Nt[tt+1024>>0]+Nt[At+1280>>0]>>16)-128,ut[at]=(Nt[et+1280>>0]+Nt[tt+1536>>0]+Nt[At+1792>>0]>>16)-128;E=ot(M,v,E,e,a),W=ot(Z,x,W,n,c),J=ot(ut,x,J,n,c),$+=32}xt+=8}if(S>=0){var kt=[];kt[1]=S+1,kt[0]=(1<<S+1)-1,mt(kt)}return pt(65497),new Uint8Array(I)},i=i||50,function(){for(var L=String.fromCharCode,j=0;j<256;j++)dt[j]=L(j)}(),e=st(G,vt),n=st(F,H),a=st(bt,k),c=st(z,ct),function(){for(var L=1,j=2,E=1;E<=15;E++){for(var W=L;W<j;W++)_[32767+W]=E,A[32767+W]=[],A[32767+W][1]=E,A[32767+W][0]=W;for(var J=-(j-1);J<=-L;J++)_[32767+J]=E,A[32767+J]=[],A[32767+J][1]=E,A[32767+J][0]=j-1+J;L<<=1,j<<=1}}(),function(){for(var L=0;L<256;L++)Nt[L]=19595*L,Nt[L+256>>0]=38470*L,Nt[L+512>>0]=7471*L+32768,Nt[L+768>>0]=-11059*L,Nt[L+1024>>0]=-21709*L,Nt[L+1280>>0]=32768*L+8421375,Nt[L+1536>>0]=-27439*L,Nt[L+1792>>0]=-5329*L}(),Et(i)}/**
|
||
* @license
|
||
* Copyright (c) 2017 Aras Abbasi
|
||
*
|
||
* Licensed under the MIT License.
|
||
* http://opensource.org/licenses/mit-license
|
||
*/function Or(i,e){if(this.pos=0,this.buffer=i,this.datav=new DataView(i.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Xo(i){function e(G){if(!G)throw Error("assert :P")}function n(G,vt,bt){for(var k=0;4>k;k++)if(G[vt+k]!=bt.charCodeAt(k))return!0;return!1}function a(G,vt,bt,k,F){for(var H=0;H<F;H++)G[vt+H]=bt[k+H]}function c(G,vt,bt,k){for(var F=0;F<k;F++)G[vt+F]=bt}function s(G){return new Int32Array(G)}function l(G,vt){for(var bt=[],k=0;k<G;k++)bt.push(new vt);return bt}function h(G,vt){var bt=[];return function k(F,H,z){for(var ct=z[H],st=0;st<ct&&(F.push(z.length>H+1?[]:new vt),!(z.length<H+1));st++)k(F[st],H+1,z)}(bt,0,G),bt}var f=function(){var G=this;function vt(t,r){for(var u=1<<r-1>>>0;t&u;)u>>>=1;return u?(t&u-1)+u:t}function bt(t,r,u,d,g){e(!(d%u));do t[r+(d-=u)]=g;while(0<d)}function k(t,r,u,d,g){if(e(2328>=g),512>=g)var b=s(512);else if((b=s(g))==null)return 0;return function(y,w,N,P,R,X){var K,V,ft=w,rt=1<<N,T=s(16),U=s(16);for(e(R!=0),e(P!=null),e(y!=null),e(0<N),V=0;V<R;++V){if(15<P[V])return 0;++T[P[V]]}if(T[0]==R)return 0;for(U[1]=0,K=1;15>K;++K){if(T[K]>1<<K)return 0;U[K+1]=U[K]+T[K]}for(V=0;V<R;++V)K=P[V],0<P[V]&&(X[U[K]++]=V);if(U[15]==1)return(P=new F).g=0,P.value=X[0],bt(y,ft,1,rt,P),rt;var lt,gt=-1,ht=rt-1,Ct=0,St=1,Rt=1,_t=1<<N;for(V=0,K=1,R=2;K<=N;++K,R<<=1){if(St+=Rt<<=1,0>(Rt-=T[K]))return 0;for(;0<T[K];--T[K])(P=new F).g=K,P.value=X[V++],bt(y,ft+Ct,R,_t,P),Ct=vt(Ct,K)}for(K=N+1,R=2;15>=K;++K,R<<=1){if(St+=Rt<<=1,0>(Rt-=T[K]))return 0;for(;0<T[K];--T[K]){if(P=new F,(Ct&ht)!=gt){for(ft+=_t,lt=1<<(gt=K)-N;15>gt&&!(0>=(lt-=T[gt]));)++gt,lt<<=1;rt+=_t=1<<(lt=gt-N),y[w+(gt=Ct&ht)].g=lt+N,y[w+gt].value=ft-w-gt}P.g=K-N,P.value=X[V++],bt(y,ft+(Ct>>N),R,_t,P),Ct=vt(Ct,K)}}return St!=2*U[15]-1?0:rt}(t,r,u,d,g,b)}function F(){this.value=this.g=0}function H(){this.value=this.g=0}function z(){this.G=l(5,F),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=l(We,H)}function ct(t,r,u,d){e(t!=null),e(r!=null),e(2147483648>d),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=r,t.pa=u,t.Jd=r,t.Yc=u+d,t.Zc=4<=d?u+d-4+1:u,$(t)}function st(t,r){for(var u=0;0<r--;)u|=tt(t,128)<<r;return u}function mt(t,r){var u=st(t,r);return et(t)?-u:u}function Q(t,r,u,d){var g,b=0;for(e(t!=null),e(r!=null),e(4294967288>d),t.Sb=d,t.Ra=0,t.u=0,t.h=0,4<d&&(d=4),g=0;g<d;++g)b+=r[u+g]<<8*g;t.Ra=b,t.bb=d,t.oa=r,t.pa=u}function pt(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<si-8>>>0,++t.bb,t.u-=8;E(t)&&(t.h=1,t.u=0)}function ot(t,r){if(e(0<=r),!t.h&&r<=ai){var u=j(t)&ii[r];return t.u+=r,pt(t),u}return t.h=1,t.u=0}function Et(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function L(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function j(t){return t.Ra>>>(t.u&si-1)>>>0}function E(t){return e(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>si}function W(t,r){t.u=r,t.h=E(t)}function J(t){t.u>=Hi&&(e(t.u>=Hi),pt(t))}function $(t){e(t!=null&&t.oa!=null),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(e(t!=null&&t.oa!=null),t.pa<t.Yc?(t.b+=8,t.I=t.oa[t.pa++]|t.I<<8):t.Ka?t.b=0:(t.I<<=8,t.b+=8,t.Ka=1))}function et(t){return st(t,1)}function tt(t,r){var u=t.Ca;0>t.b&&$(t);var d=t.b,g=u*r>>>8,b=(t.I>>>d>g)+0;for(b?(u-=g,t.I-=g+1<<d>>>0):u=g+1,d=u,g=0;256<=d;)g+=8,d>>=8;return d=7^g+ir[d],t.b-=d,t.Ca=(u<<d)-1,b}function At(t,r,u){t[r+0]=u>>24&255,t[r+1]=u>>16&255,t[r+2]=u>>8&255,t[r+3]=u>>0&255}function Lt(t,r){return t[r+0]<<0|t[r+1]<<8}function Ot(t,r){return Lt(t,r)|t[r+2]<<16}function jt(t,r){return Lt(t,r)|Lt(t,r+2)<<16}function Wt(t,r){var u=1<<r;return e(t!=null),e(0<r),t.X=s(u),t.X==null?0:(t.Mb=32-r,t.Xa=r,1)}function at(t,r){e(t!=null),e(r!=null),e(t.Xa==r.Xa),a(r.X,0,t.X,0,1<<r.Xa)}function O(){this.X=[],this.Xa=this.Mb=0}function Kt(t,r,u,d){e(u!=null),e(d!=null);var g=u[0],b=d[0];return g==0&&(g=(t*b+r/2)/r),b==0&&(b=(r*g+t/2)/t),0>=g||0>=b?0:(u[0]=g,d[0]=b,1)}function Mt(t,r){return t+(1<<r)-1>>>r}function wt(t,r){return((4278255360&t)+(4278255360&r)>>>0&4278255360)+((16711935&t)+(16711935&r)>>>0&16711935)>>>0}function xt(t,r){G[r]=function(u,d,g,b,y,w,N){var P;for(P=0;P<y;++P){var R=G[t](w[N+P-1],g,b+P);w[N+P]=wt(u[d+P],R)}}}function kt(){this.ud=this.hd=this.jd=0}function Pt(t,r){return((4278124286&(t^r))>>>1)+(t&r)>>>0}function qt(t){return 0<=t&&256>t?t:0>t?0:255<t?255:void 0}function Gt(t,r){return qt(t+(t-r+.5>>1))}function Qt(t,r,u){return Math.abs(r-u)-Math.abs(t-u)}function te(t,r,u,d,g,b,y){for(d=b[y-1],u=0;u<g;++u)b[y+u]=d=wt(t[r+u],d)}function ie(t,r,u,d,g){var b;for(b=0;b<u;++b){var y=t[r+b],w=y>>8&255,N=16711935&(N=(N=16711935&y)+((w<<16)+w));d[g+b]=(4278255360&y)+N>>>0}}function fe(t,r){r.jd=t>>0&255,r.hd=t>>8&255,r.ud=t>>16&255}function Ht(t,r,u,d,g,b){var y;for(y=0;y<d;++y){var w=r[u+y],N=w>>>8,P=w,R=255&(R=(R=w>>>16)+((t.jd<<24>>24)*(N<<24>>24)>>>5));P=255&(P=(P=P+((t.hd<<24>>24)*(N<<24>>24)>>>5))+((t.ud<<24>>24)*(R<<24>>24)>>>5)),g[b+y]=(4278255360&w)+(R<<16)+P}}function ee(t,r,u,d,g){G[r]=function(b,y,w,N,P,R,X,K,V){for(N=X;N<K;++N)for(X=0;X<V;++X)P[R++]=g(w[d(b[y++])])},G[t]=function(b,y,w,N,P,R,X){var K=8>>b.b,V=b.Ea,ft=b.K[0],rt=b.w;if(8>K)for(b=(1<<b.b)-1,rt=(1<<K)-1;y<w;++y){var T,U=0;for(T=0;T<V;++T)T&b||(U=d(N[P++])),R[X++]=g(ft[U&rt]),U>>=K}else G["VP8LMapColor"+u](N,P,ft,rt,R,X,y,w,V)}}function Ft(t,r,u,d,g){for(u=r+u;r<u;){var b=t[r++];d[g++]=b>>16&255,d[g++]=b>>8&255,d[g++]=b>>0&255}}function Ge(t,r,u,d,g){for(u=r+u;r<u;){var b=t[r++];d[g++]=b>>16&255,d[g++]=b>>8&255,d[g++]=b>>0&255,d[g++]=b>>24&255}}function se(t,r,u,d,g){for(u=r+u;r<u;){var b=(y=t[r++])>>16&240|y>>12&15,y=y>>0&240|y>>28&15;d[g++]=b,d[g++]=y}}function Nr(t,r,u,d,g){for(u=r+u;r<u;){var b=(y=t[r++])>>16&248|y>>13&7,y=y>>5&224|y>>3&31;d[g++]=b,d[g++]=y}}function pe(t,r,u,d,g){for(u=r+u;r<u;){var b=t[r++];d[g++]=b>>0&255,d[g++]=b>>8&255,d[g++]=b>>16&255}}function we(t,r,u,d,g,b){if(b==0)for(u=r+u;r<u;)At(d,((b=t[r++])[0]>>24|b[1]>>8&65280|b[2]<<8&16711680|b[3]<<24)>>>0),g+=32;else a(d,g,t,r,u)}function Er(t,r){G[r][0]=G[t+"0"],G[r][1]=G[t+"1"],G[r][2]=G[t+"2"],G[r][3]=G[t+"3"],G[r][4]=G[t+"4"],G[r][5]=G[t+"5"],G[r][6]=G[t+"6"],G[r][7]=G[t+"7"],G[r][8]=G[t+"8"],G[r][9]=G[t+"9"],G[r][10]=G[t+"10"],G[r][11]=G[t+"11"],G[r][12]=G[t+"12"],G[r][13]=G[t+"13"],G[r][14]=G[t+"0"],G[r][15]=G[t+"0"]}function ue(t){return t==Is||t==Cs||t==ja||t==js}function xn(){this.eb=[],this.size=this.A=this.fb=0}function Ne(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function Ar(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new xn,this.f.kb=new Ne,this.sd=null}function Xr(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Ae(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Jt(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ce(t,r){var u=t.T,d=r.ba.f.RGBA,g=d.eb,b=d.fb+t.ka*d.A,y=wr[r.ba.S],w=t.y,N=t.O,P=t.f,R=t.N,X=t.ea,K=t.W,V=r.cc,ft=r.dc,rt=r.Mc,T=r.Nc,U=t.ka,lt=t.ka+t.T,gt=t.U,ht=gt+1>>1;for(U==0?y(w,N,null,null,P,R,X,K,P,R,X,K,g,b,null,null,gt):(y(r.ec,r.fc,w,N,V,ft,rt,T,P,R,X,K,g,b-d.A,g,b,gt),++u);U+2<lt;U+=2)V=P,ft=R,rt=X,T=K,R+=t.Rc,K+=t.Rc,b+=2*d.A,y(w,(N+=2*t.fa)-t.fa,w,N,V,ft,rt,T,P,R,X,K,g,b-d.A,g,b,gt);return N+=t.fa,t.j+lt<t.o?(a(r.ec,r.fc,w,N,gt),a(r.cc,r.dc,P,R,ht),a(r.Mc,r.Nc,X,K,ht),u--):1<||y(w,N,null,null,P,R,X,K,P,R,X,K,g,b+d.A,null,null,gt),u}function Sn(t,r,u){var d=t.F,g=[t.J];if(d!=null){var b=t.U,y=r.ba.S,w=y==Ca||y==ja;r=r.ba.f.RGBA;var N=[0],P=t.ka;N[0]=t.T,t.Kb&&(P==0?--N[0]:(--P,g[0]-=t.width),t.j+t.ka+t.T==t.o&&(N[0]=t.o-t.j-P));var R=r.eb;P=r.fb+P*r.A,t=ye(d,g[0],t.width,b,N,R,P+(w?0:3),r.A),e(u==N),t&&ue(y)&&br(R,P,w,b,N,r.A)}return 0}function He(t){var r=t.ma,u=r.ba.S,d=11>u,g=u==Fa||u==Ia||u==Ca||u==Fs||u==12||ue(u);if(r.memory=null,r.Ib=null,r.Jb=null,r.Nd=null,!zi(r.Oa,t,g?11:12))return 0;if(g&&ue(u)&&yt(),t.da)alert("todo:use_scaling");else{if(d){if(r.Ib=Jt,t.Kb){if(u=t.U+1>>1,r.memory=s(t.U+2*u),r.memory==null)return 0;r.ec=r.memory,r.fc=0,r.cc=r.ec,r.dc=r.fc+t.U,r.Mc=r.cc,r.Nc=r.dc+u,r.Ib=ce,yt()}}else alert("todo:EmitYUV");g&&(r.Jb=Sn,d&&Y())}if(d&&!mo){for(t=0;256>t;++t)Pu[t]=89858*(t-128)+Ba>>Oa,Iu[t]=-22014*(t-128)+Ba,Fu[t]=-45773*(t-128),ku[t]=113618*(t-128)+Ba>>Oa;for(t=Ki;t<Ms;++t)r=76283*(t-16)+Ba>>Oa,Cu[t-Ki]=lr(r,255),ju[t-Ki]=lr(r+8>>4,15);mo=1}return 1}function qr(t){var r=t.ma,u=t.U,d=t.T;return e(!(1&t.ka)),0>=u||0>=d?0:(u=r.Ib(t,r),r.Jb!=null&&r.Jb(t,r,u),r.Dc+=u,1)}function Dr(t){t.ma.memory=null}function Tt(t,r,u,d){return ot(t,8)!=47?0:(r[0]=ot(t,14)+1,u[0]=ot(t,14)+1,d[0]=ot(t,1),ot(t,3)!=0?0:!t.h)}function xr(t,r){if(4>t)return t+1;var u=t-2>>1;return(2+(1&t)<<u)+ot(r,u)+1}function Rr(t,r){return 120<r?r-120:1<=(u=((u=du[r-1])>>4)*t+(8-(15&u)))?u:1;var u}function rr(t,r,u){var d=j(u),g=t[r+=255&d].g-8;return 0<g&&(W(u,u.u+8),d=j(u),r+=t[r].value,r+=d&(1<<g)-1),W(u,u.u+t[r].g),t[r].value}function qe(t,r,u){return u.g+=t.g,u.value+=t.value<<r>>>0,e(8>=u.g),t.g}function Oe(t,r,u){var d=t.xc;return e((r=d==0?0:t.vc[t.md*(u>>d)+(r>>d)])<t.Wb),t.Ya[r]}function cr(t,r,u,d){var g=t.ab,b=t.c*r,y=t.C;r=y+r;var w=u,N=d;for(d=t.Ta,u=t.Ua;0<g--;){var P=t.gc[g],R=y,X=r,K=w,V=N,ft=(N=d,w=u,P.Ea);switch(e(R<X),e(X<=P.nc),P.hc){case 2:Na(K,V,(X-R)*ft,N,w);break;case 0:var rt=R,T=X,U=N,lt=w,gt=(_t=P).Ea;rt==0&&(Ps(K,V,null,null,1,U,lt),te(K,V+1,0,0,gt-1,U,lt+1),V+=gt,lt+=gt,++rt);for(var ht=1<<_t.b,Ct=ht-1,St=Mt(gt,_t.b),Rt=_t.K,_t=_t.w+(rt>>_t.b)*St;rt<T;){var oe=Rt,le=_t,ae=1;for(Wi(K,V,U,lt-gt,1,U,lt);ae<gt;){var re=(ae&~Ct)+ht;re>gt&&(re=gt),(0,ln[oe[le++]>>8&15])(K,V+ +ae,U,lt+ae-gt,re-ae,U,lt+ae),ae=re}V+=gt,lt+=gt,++rt&Ct||(_t+=St)}X!=P.nc&&a(N,w-ft,N,w+(X-R-1)*ft,ft);break;case 1:for(ft=K,T=V,gt=(K=P.Ea)-(lt=K&~(U=(V=1<<P.b)-1)),rt=Mt(K,P.b),ht=P.K,P=P.w+(R>>P.b)*rt;R<X;){for(Ct=ht,St=P,Rt=new kt,_t=T+lt,oe=T+K;T<_t;)fe(Ct[St++],Rt),Cn(Rt,ft,T,V,N,w),T+=V,w+=V;T<oe&&(fe(Ct[St++],Rt),Cn(Rt,ft,T,gt,N,w),T+=gt,w+=gt),++R&U||(P+=rt)}break;case 3:if(K==N&&V==w&&0<P.b){for(T=N,K=ft=w+(X-R)*ft-(lt=(X-R)*Mt(P.Ea,P.b)),V=N,U=w,rt=[],lt=(gt=lt)-1;0<=lt;--lt)rt[lt]=V[U+lt];for(lt=gt-1;0<=lt;--lt)T[K+lt]=rt[lt];gr(P,R,X,N,ft,N,w)}else gr(P,R,X,K,V,N,w)}w=d,N=u}N!=u&&a(d,u,w,N,b)}function zn(t,r){var u=t.V,d=t.Ba+t.c*t.C,g=r-t.C;if(e(r<=t.l.o),e(16>=g),0<g){var b=t.l,y=t.Ta,w=t.Ua,N=b.width;if(cr(t,g,u,d),g=w=[w],e((u=t.C)<(d=r)),e(b.v<b.va),d>b.o&&(d=b.o),u<b.j){var P=b.j-u;u=b.j,g[0]+=P*N}if(u>=d?u=0:(g[0]+=4*b.v,b.ka=u-b.j,b.U=b.va-b.v,b.T=d-u,u=1),u){if(w=w[0],11>(u=t.ca).S){var R=u.f.RGBA,X=(d=u.S,g=b.U,b=b.T,P=R.eb,R.A),K=b;for(R=R.fb+t.Ma*R.A;0<K--;){var V=y,ft=w,rt=g,T=P,U=R;switch(d){case ka:ar(V,ft,rt,T,U);break;case Fa:Qe(V,ft,rt,T,U);break;case Is:Qe(V,ft,rt,T,U),br(T,U,0,rt,1,0);break;case so:tn(V,ft,rt,T,U);break;case Ia:we(V,ft,rt,T,U,1);break;case Cs:we(V,ft,rt,T,U,1),br(T,U,0,rt,1,0);break;case Ca:we(V,ft,rt,T,U,0);break;case ja:we(V,ft,rt,T,U,0),br(T,U,1,rt,1,0);break;case Fs:hn(V,ft,rt,T,U);break;case js:hn(V,ft,rt,T,U),be(T,U,rt,1,0);break;case oo:Qr(V,ft,rt,T,U);break;default:e(0)}w+=N,R+=X}t.Ma+=b}else alert("todo:EmitRescaledRowsYUVA");e(t.Ma<=u.height)}}t.C=r,e(t.C<=t.i)}function Kr(t){var r;if(0<t.ua)return 0;for(r=0;r<t.Wb;++r){var u=t.Ya[r].G,d=t.Ya[r].H;if(0<u[1][d[1]+0].g||0<u[2][d[2]+0].g||0<u[3][d[3]+0].g)return 0}return 1}function Sr(t,r,u,d,g,b){if(t.Z!=0){var y=t.qd,w=t.rd;for(e(gn[t.Z]!=null);r<u;++r)gn[t.Z](y,w,d,g,d,g,b),y=d,w=g,g+=b;t.qd=y,t.rd=w}}function _r(t,r){var u=t.l.ma,d=u.Z==0||u.Z==1?t.l.j:t.C;if(d=t.C<d?d:t.C,e(r<=t.l.o),r>d){var g=t.l.width,b=u.ca,y=u.tb+g*d,w=t.V,N=t.Ba+t.c*d,P=t.gc;e(t.ab==1),e(P[0].hc==3),Aa(P[0],d,r,w,N,b,y),Sr(u,d,r,b,y,g)}t.C=t.Ma=r}function Pr(t,r,u,d,g,b,y){var w=t.$/d,N=t.$%d,P=t.m,R=t.s,X=u+t.$,K=X;g=u+d*g;var V=u+d*b,ft=280+R.ua,rt=t.Pb?w:16777216,T=0<R.ua?R.Wa:null,U=R.wc,lt=X<V?Oe(R,N,w):null;e(t.C<b),e(V<=g);var gt=!1;t:for(;;){for(;gt||X<V;){var ht=0;if(w>=rt){var Ct=X-u;e((rt=t).Pb),rt.wd=rt.m,rt.xd=Ct,0<rt.s.ua&&at(rt.s.Wa,rt.s.vb),rt=w+gu}if(N&U||(lt=Oe(R,N,w)),e(lt!=null),lt.Qb&&(r[X]=lt.qb,gt=!0),!gt)if(J(P),lt.jc){ht=P,Ct=r;var St=X,Rt=lt.pd[j(ht)&We-1];e(lt.jc),256>Rt.g?(W(ht,ht.u+Rt.g),Ct[St]=Rt.value,ht=0):(W(ht,ht.u+Rt.g-256),e(256<=Rt.value),ht=Rt.value),ht==0&&(gt=!0)}else ht=rr(lt.G[0],lt.H[0],P);if(P.h)break;if(gt||256>ht){if(!gt)if(lt.nd)r[X]=(lt.qb|ht<<8)>>>0;else{if(J(P),gt=rr(lt.G[1],lt.H[1],P),J(P),Ct=rr(lt.G[2],lt.H[2],P),St=rr(lt.G[3],lt.H[3],P),P.h)break;r[X]=(St<<24|gt<<16|ht<<8|Ct)>>>0}if(gt=!1,++X,++N>=d&&(N=0,++w,y!=null&&w<=b&&!(w%16)&&y(t,w),T!=null))for(;K<X;)ht=r[K++],T.X[(506832829*ht&4294967295)>>>T.Mb]=ht}else if(280>ht){if(ht=xr(ht-256,P),Ct=rr(lt.G[4],lt.H[4],P),J(P),Ct=Rr(d,Ct=xr(Ct,P)),P.h)break;if(X-u<Ct||g-X<ht)break t;for(St=0;St<ht;++St)r[X+St]=r[X+St-Ct];for(X+=ht,N+=ht;N>=d;)N-=d,++w,y!=null&&w<=b&&!(w%16)&&y(t,w);if(e(X<=g),N&U&&(lt=Oe(R,N,w)),T!=null)for(;K<X;)ht=r[K++],T.X[(506832829*ht&4294967295)>>>T.Mb]=ht}else{if(!(ht<ft))break t;for(gt=ht-280,e(T!=null);K<X;)ht=r[K++],T.X[(506832829*ht&4294967295)>>>T.Mb]=ht;ht=X,e(!(gt>>>(Ct=T).Xa)),r[ht]=Ct.X[gt],gt=!0}gt||e(P.h==E(P))}if(t.Pb&&P.h&&X<g)e(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&at(t.s.vb,t.s.Wa);else{if(P.h)break t;y!=null&&y(t,w>b?b:w),t.a=0,t.$=X-u}return 1}return t.a=3,0}function Tr(t){e(t!=null),t.vc=null,t.yc=null,t.Ya=null;var r=t.Wa;r!=null&&(r.X=null),t.vb=null,e(t!=null)}function pr(){var t=new _s;return t==null?null:(t.a=0,t.xb=lo,Er("Predictor","VP8LPredictors"),Er("Predictor","VP8LPredictors_C"),Er("PredictorAdd","VP8LPredictorsAdd"),Er("PredictorAdd","VP8LPredictorsAdd_C"),Na=ie,Cn=Ht,ar=Ft,Qe=Ge,hn=se,Qr=Nr,tn=pe,G.VP8LMapColor32b=oi,G.VP8LMapColor8b=xa,t)}function zr(t,r,u,d,g){var b=1,y=[t],w=[r],N=d.m,P=d.s,R=null,X=0;t:for(;;){if(u)for(;b&&ot(N,1);){var K=y,V=w,ft=d,rt=1,T=ft.m,U=ft.gc[ft.ab],lt=ot(T,2);if(ft.Oc&1<<lt)b=0;else{switch(ft.Oc|=1<<lt,U.hc=lt,U.Ea=K[0],U.nc=V[0],U.K=[null],++ft.ab,e(4>=ft.ab),lt){case 0:case 1:U.b=ot(T,3)+2,rt=zr(Mt(U.Ea,U.b),Mt(U.nc,U.b),0,ft,U.K),U.K=U.K[0];break;case 3:var gt,ht=ot(T,8)+1,Ct=16<ht?0:4<ht?1:2<ht?2:3;if(K[0]=Mt(U.Ea,Ct),U.b=Ct,gt=rt=zr(ht,1,0,ft,U.K)){var St,Rt=ht,_t=U,oe=1<<(8>>_t.b),le=s(oe);if(le==null)gt=0;else{var ae=_t.K[0],re=_t.w;for(le[0]=_t.K[0][0],St=1;St<1*Rt;++St)le[St]=wt(ae[re+St],le[St-1]);for(;St<4*oe;++St)le[St]=0;_t.K[0]=null,_t.K[0]=le,gt=1}}rt=gt;break;case 2:break;default:e(0)}b=rt}}if(y=y[0],w=w[0],b&&ot(N,1)&&!(b=1<=(X=ot(N,4))&&11>=X)){d.a=3;break t}var ge;if(ge=b)e:{var de,$t,Me,sr=d,Ee=y,or=w,he=X,fr=u,dr=sr.m,Te=sr.s,Ve=[null],er=1,Lr=0,Vr=pu[he];r:for(;;){if(fr&&ot(dr,1)){var ze=ot(dr,3)+2,an=Mt(Ee,ze),En=Mt(or,ze),fi=an*En;if(!zr(an,En,0,sr,Ve))break r;for(Ve=Ve[0],Te.xc=ze,de=0;de<fi;++de){var mn=Ve[de]>>8&65535;Ve[de]=mn,mn>=er&&(er=mn+1)}}if(dr.h)break r;for($t=0;5>$t;++$t){var Se=uo[$t];!$t&&0<he&&(Se+=1<<he),Lr<Se&&(Lr=Se)}var Es=l(er*Vr,F),yo=er,wo=l(yo,z);if(wo==null)var Ea=null;else e(65536>=yo),Ea=wo;var Zi=s(Lr);if(Ea==null||Zi==null||Es==null){sr.a=1;break r}var qa=Es;for(de=Me=0;de<er;++de){var jr=Ea[de],di=jr.G,pi=jr.H,Lo=0,Da=1,No=0;for($t=0;5>$t;++$t){Se=uo[$t],di[$t]=qa,pi[$t]=Me,!$t&&0<he&&(Se+=1<<he);i:{var Ra,qs=Se,Ta=sr,$i=Zi,Mu=qa,Eu=Me,Ds=0,vn=Ta.m,qu=ot(vn,1);if(c($i,0,0,qs),qu){var Du=ot(vn,1)+1,Ru=ot(vn,1),Ao=ot(vn,Ru==0?1:8);$i[Ao]=1,Du==2&&($i[Ao=ot(vn,8)]=1);var za=1}else{var xo=s(19),So=ot(vn,4)+4;if(19<So){Ta.a=3;var Ua=0;break i}for(Ra=0;Ra<So;++Ra)xo[fu[Ra]]=ot(vn,3);var Rs=void 0,Qi=void 0,_o=Ta,Tu=xo,Ha=qs,Po=$i,Ts=0,bn=_o.m,ko=8,Fo=l(128,F);n:for(;k(Fo,0,7,Tu,19);){if(ot(bn,1)){var zu=2+2*ot(bn,3);if((Rs=2+ot(bn,zu))>Ha)break n}else Rs=Ha;for(Qi=0;Qi<Ha&&Rs--;){J(bn);var Io=Fo[0+(127&j(bn))];W(bn,bn.u+Io.g);var gi=Io.value;if(16>gi)Po[Qi++]=gi,gi!=0&&(ko=gi);else{var Uu=gi==16,Co=gi-16,Hu=lu[Co],jo=ot(bn,cu[Co])+Hu;if(Qi+jo>Ha)break n;for(var Wu=Uu?ko:0;0<jo--;)Po[Qi++]=Wu}}Ts=1;break n}Ts||(_o.a=3),za=Ts}(za=za&&!vn.h)&&(Ds=k(Mu,Eu,8,$i,qs)),za&&Ds!=0?Ua=Ds:(Ta.a=3,Ua=0)}if(Ua==0)break r;if(Da&&hu[$t]==1&&(Da=qa[Me].g==0),Lo+=qa[Me].g,Me+=Ua,3>=$t){var ta,zs=Zi[0];for(ta=1;ta<Se;++ta)Zi[ta]>zs&&(zs=Zi[ta]);No+=zs}}if(jr.nd=Da,jr.Qb=0,Da&&(jr.qb=(di[3][pi[3]+0].value<<24|di[1][pi[1]+0].value<<16|di[2][pi[2]+0].value)>>>0,Lo==0&&256>di[0][pi[0]+0].value&&(jr.Qb=1,jr.qb+=di[0][pi[0]+0].value<<8)),jr.jc=!jr.Qb&&6>No,jr.jc){var Wa,sn=jr;for(Wa=0;Wa<We;++Wa){var yn=Wa,wn=sn.pd[yn],Va=sn.G[0][sn.H[0]+yn];256<=Va.value?(wn.g=Va.g+256,wn.value=Va.value):(wn.g=0,wn.value=0,yn>>=qe(Va,8,wn),yn>>=qe(sn.G[1][sn.H[1]+yn],16,wn),yn>>=qe(sn.G[2][sn.H[2]+yn],0,wn),qe(sn.G[3][sn.H[3]+yn],24,wn))}}}Te.vc=Ve,Te.Wb=er,Te.Ya=Ea,Te.yc=Es,ge=1;break e}ge=0}if(!(b=ge)){d.a=3;break t}if(0<X){if(P.ua=1<<X,!Wt(P.Wa,X)){d.a=1,b=0;break t}}else P.ua=0;var Us=d,Oo=y,Vu=w,Hs=Us.s,Ws=Hs.xc;if(Us.c=Oo,Us.i=Vu,Hs.md=Mt(Oo,Ws),Hs.wc=Ws==0?-1:(1<<Ws)-1,u){d.xb=Nu;break t}if((R=s(y*w))==null){d.a=1,b=0;break t}b=(b=Pr(d,R,0,y,w,w,null))&&!N.h;break t}return b?(g!=null?g[0]=R:(e(R==null),e(u)),d.$=0,u||Tr(P)):Tr(P),b}function _n(t,r){var u=t.c*t.i,d=u+r+16*r;return e(t.c<=r),t.V=s(d),t.V==null?(t.Ta=null,t.Ua=0,t.a=1,0):(t.Ta=t.V,t.Ua=t.Ba+u+r,1)}function Un(t,r){var u=t.C,d=r-u,g=t.V,b=t.Ba+t.c*u;for(e(r<=t.l.o);0<d;){var y=16<d?16:d,w=t.l.ma,N=t.l.width,P=N*y,R=w.ca,X=w.tb+N*u,K=t.Ta,V=t.Ua;cr(t,y,g,b),Fe(K,V,R,X,P),Sr(w,u,u+y,R,X,N),d-=y,g+=y*t.c,u+=y}e(u==r),t.C=t.Ma=r}function Hn(){this.ub=this.yd=this.td=this.Rb=0}function Wn(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Vn(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function ra(){this.Yb=function(){var t=[];return function r(u,d,g){for(var b=g[d],y=0;y<b&&(u.push(g.length>d+1?[]:0),!(g.length<d+1));y++)r(u[y],d+1,g)}(t,0,[3,11]),t}()}function ns(){this.jb=s(3),this.Wc=h([4,8],ra),this.Xc=h([4,17],ra)}function is(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function Gn(){this.ld=this.La=this.dd=this.tc=0}function na(){this.Na=this.la=0}function as(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Si(){this.ad=s(384),this.Za=0,this.Ob=s(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function ss(){this.uc=this.M=this.Nb=0,this.wa=Array(new Gn),this.Y=0,this.ya=Array(new Si),this.aa=0,this.l=new Jn}function ia(){this.y=s(16),this.f=s(8),this.ea=s(8)}function os(){this.cb=this.a=0,this.sc="",this.m=new Et,this.Od=new Hn,this.Kc=new Wn,this.ed=new is,this.Qa=new Vn,this.Ic=this.$c=this.Aa=0,this.D=new ss,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=l(8,Et),this.ia=0,this.pb=l(4,as),this.Pa=new ns,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new ia),this.Hd=0,this.rb=Array(new na),this.sb=0,this.wa=Array(new Gn),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Si),this.L=this.aa=0,this.gd=h([4,2],Gn),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Jn(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function us(){var t=new os;return t!=null&&(t.a=0,t.sc="OK",t.cb=0,t.Xb=0,Xi||(Xi=oa)),t}function Pe(t,r,u){return t.a==0&&(t.a=r,t.sc=u,t.cb=0),0}function aa(t,r,u){return 3<=u&&t[r+0]==157&&t[r+1]==1&&t[r+2]==42}function sa(t,r){if(t==null)return 0;if(t.a=0,t.sc="OK",r==null)return Pe(t,2,"null VP8Io passed to VP8GetHeaders()");var u=r.data,d=r.w,g=r.ha;if(4>g)return Pe(t,7,"Truncated header.");var b=u[d+0]|u[d+1]<<8|u[d+2]<<16,y=t.Od;if(y.Rb=!(1&b),y.td=b>>1&7,y.yd=b>>4&1,y.ub=b>>5,3<y.td)return Pe(t,3,"Incorrect keyframe parameters.");if(!y.yd)return Pe(t,4,"Frame not displayable.");d+=3,g-=3;var w=t.Kc;if(y.Rb){if(7>g)return Pe(t,7,"cannot parse picture header");if(!aa(u,d,g))return Pe(t,3,"Bad code word");w.c=16383&(u[d+4]<<8|u[d+3]),w.Td=u[d+4]>>6,w.i=16383&(u[d+6]<<8|u[d+5]),w.Ud=u[d+6]>>6,d+=7,g-=7,t.za=w.c+15>>4,t.Ub=w.i+15>>4,r.width=w.c,r.height=w.i,r.Da=0,r.j=0,r.v=0,r.va=r.width,r.o=r.height,r.da=0,r.ib=r.width,r.hb=r.height,r.U=r.width,r.T=r.height,c((b=t.Pa).jb,0,255,b.jb.length),e((b=t.Qa)!=null),b.Cb=0,b.Bb=0,b.Fb=1,c(b.Zb,0,0,b.Zb.length),c(b.Lb,0,0,b.Lb)}if(y.ub>g)return Pe(t,7,"bad partition length");ct(b=t.m,u,d,y.ub),d+=y.ub,g-=y.ub,y.Rb&&(w.Ld=et(b),w.Kd=et(b)),w=t.Qa;var N,P=t.Pa;if(e(b!=null),e(w!=null),w.Cb=et(b),w.Cb){if(w.Bb=et(b),et(b)){for(w.Fb=et(b),N=0;4>N;++N)w.Zb[N]=et(b)?mt(b,7):0;for(N=0;4>N;++N)w.Lb[N]=et(b)?mt(b,6):0}if(w.Bb)for(N=0;3>N;++N)P.jb[N]=et(b)?st(b,8):255}else w.Bb=0;if(b.Ka)return Pe(t,3,"cannot parse segment header");if((w=t.ed).zd=et(b),w.Tb=st(b,6),w.wb=st(b,3),w.Pc=et(b),w.Pc&&et(b)){for(P=0;4>P;++P)et(b)&&(w.vd[P]=mt(b,6));for(P=0;4>P;++P)et(b)&&(w.od[P]=mt(b,6))}if(t.L=w.Tb==0?0:w.zd?1:2,b.Ka)return Pe(t,3,"cannot parse filter header");var R=g;if(g=N=d,d=N+R,w=R,t.Xb=(1<<st(t.m,2))-1,R<3*(P=t.Xb))u=7;else{for(N+=3*P,w-=3*P,R=0;R<P;++R){var X=u[g+0]|u[g+1]<<8|u[g+2]<<16;X>w&&(X=w),ct(t.Jc[+R],u,N,X),N+=X,w-=X,g+=3}ct(t.Jc[+P],u,N,w),u=N<d?0:5}if(u!=0)return Pe(t,u,"cannot parse partitions");for(u=st(N=t.m,7),g=et(N)?mt(N,4):0,d=et(N)?mt(N,4):0,w=et(N)?mt(N,4):0,P=et(N)?mt(N,4):0,N=et(N)?mt(N,4):0,R=t.Qa,X=0;4>X;++X){if(R.Cb){var K=R.Zb[X];R.Fb||(K+=u)}else{if(0<X){t.pb[X]=t.pb[0];continue}K=u}var V=t.pb[X];V.Sc[0]=Os[lr(K+g,127)],V.Sc[1]=Bs[lr(K+0,127)],V.Eb[0]=2*Os[lr(K+d,127)],V.Eb[1]=101581*Bs[lr(K+w,127)]>>16,8>V.Eb[1]&&(V.Eb[1]=8),V.Qc[0]=Os[lr(K+P,117)],V.Qc[1]=Bs[lr(K+N,127)],V.lc=K+N}if(!y.Rb)return Pe(t,4,"Not a key frame.");for(et(b),y=t.Pa,u=0;4>u;++u){for(g=0;8>g;++g)for(d=0;3>d;++d)for(w=0;11>w;++w)P=tt(b,wu[u][g][d][w])?st(b,8):bu[u][g][d][w],y.Wc[u][g].Yb[d][w]=P;for(g=0;17>g;++g)y.Xc[u][g]=y.Wc[u][Lu[g]]}return t.kc=et(b),t.kc&&(t.Bd=st(b,8)),t.cb=1}function oa(t,r,u,d,g,b,y){var w=r[g].Yb[u];for(u=0;16>g;++g){if(!tt(t,w[u+0]))return g;for(;!tt(t,w[u+1]);)if(w=r[++g].Yb[0],u=0,g==16)return 16;var N=r[g+1].Yb;if(tt(t,w[u+2])){var P=t,R=0;if(tt(P,(K=w)[(X=u)+3]))if(tt(P,K[X+6])){for(w=0,X=2*(R=tt(P,K[X+8]))+(K=tt(P,K[X+9+R])),R=0,K=mu[X];K[w];++w)R+=R+tt(P,K[w]);R+=3+(8<<X)}else tt(P,K[X+7])?(R=7+2*tt(P,165),R+=tt(P,145)):R=5+tt(P,159);else R=tt(P,K[X+4])?3+tt(P,K[X+5]):2;w=N[2]}else R=1,w=N[1];N=y+vu[g],0>(P=t).b&&$(P);var X,K=P.b,V=(X=P.Ca>>1)-(P.I>>K)>>31;--P.b,P.Ca+=V,P.Ca|=1,P.I-=(X+1&V)<<K,b[N]=((R^V)-V)*d[(0<g)+0]}return 16}function _i(t){var r=t.rb[t.sb-1];r.la=0,r.Na=0,c(t.zc,0,0,t.zc.length),t.ja=0}function cs(t,r){if(t==null)return 0;if(r==null)return Pe(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!sa(t,r))return 0;if(e(t.cb),r.ac==null||r.ac(r)){r.ob&&(t.L=0);var u=Ma[t.L];if(t.L==2?(t.yb=0,t.zb=0):(t.yb=r.v-u>>4,t.zb=r.j-u>>4,0>t.yb&&(t.yb=0),0>t.zb&&(t.zb=0)),t.Va=r.o+15+u>>4,t.Hb=r.va+15+u>>4,t.Hb>t.za&&(t.Hb=t.za),t.Va>t.Ub&&(t.Va=t.Ub),0<t.L){var d=t.ed;for(u=0;4>u;++u){var g;if(t.Qa.Cb){var b=t.Qa.Lb[u];t.Qa.Fb||(b+=d.Tb)}else b=d.Tb;for(g=0;1>=g;++g){var y=t.gd[u][g],w=b;if(d.Pc&&(w+=d.vd[0],g&&(w+=d.od[0])),0<(w=0>w?0:63<w?63:w)){var N=w;0<d.wb&&(N=4<d.wb?N>>2:N>>1)>9-d.wb&&(N=9-d.wb),1>N&&(N=1),y.dd=N,y.tc=2*w+N,y.ld=40<=w?2:15<=w?1:0}else y.tc=0;y.La=g}}}u=0}else Pe(t,6,"Frame setup failed"),u=t.a;if(u=u==0){if(u){t.$c=0,0<t.Aa||(t.Ic=Bu);t:{u=t.Ic,d=4*(N=t.za);var P=32*N,R=N+1,X=0<t.L?N*(0<t.Aa?2:1):0,K=(t.Aa==2?2:1)*N;if((y=d+832+(g=3*(16*u+Ma[t.L])/2*P)+(b=t.Fa!=null&&0<t.Fa.length?t.Kc.c*t.Kc.i:0))!=y)u=0;else{if(y>t.Vb){if(t.Vb=0,t.Ec=s(y),t.Fc=0,t.Ec==null){u=Pe(t,1,"no memory during frame initialization.");break t}t.Vb=y}y=t.Ec,w=t.Fc,t.Ac=y,t.Bc=w,w+=d,t.Gd=l(P,ia),t.Hd=0,t.rb=l(R+1,na),t.sb=1,t.wa=X?l(X,Gn):null,t.Y=0,t.D.Nb=0,t.D.wa=t.wa,t.D.Y=t.Y,0<t.Aa&&(t.D.Y+=N),e(!0),t.oc=y,t.pc=w,w+=832,t.ya=l(K,Si),t.aa=0,t.D.ya=t.ya,t.D.aa=t.aa,t.Aa==2&&(t.D.aa+=N),t.R=16*N,t.B=8*N,N=(P=Ma[t.L])*t.R,P=P/2*t.B,t.sa=y,t.ta=w+N,t.qa=t.sa,t.ra=t.ta+16*u*t.R+P,t.Ha=t.qa,t.Ia=t.ra+8*u*t.B+P,t.$c=0,w+=g,t.mb=b?y:null,t.nb=b?w:null,e(w+b<=t.Fc+t.Vb),_i(t),c(t.Ac,t.Bc,0,d),u=1}}if(u){if(r.ka=0,r.y=t.sa,r.O=t.ta,r.f=t.qa,r.N=t.ra,r.ea=t.Ha,r.Vd=t.Ia,r.fa=t.R,r.Rc=t.B,r.F=null,r.J=0,!_a){for(u=-255;255>=u;++u)De[255+u]=0>u?-u:u;for(u=-1020;1020>=u;++u)rn[1020+u]=-128>u?-128:127<u?127:u;for(u=-112;112>=u;++u)Yi[112+u]=-16>u?-16:15<u?15:u;for(u=-255;510>=u;++u)hi[255+u]=0>u?0:255<u?255:u;_a=1}ui=fs,en=ls,Vi=ca,tr=hs,mr=la,ke=ua,ci=ji,Sa=Fn,Gi=Ss,jn=Oi,On=xs,fn=Qn,Bn=Bi,li=ya,Mn=ba,dn=Hr,Ji=$r,vr=As,Cr[0]=Ur,Cr[1]=ds,Cr[2]=vs,Cr[3]=bs,Cr[4]=da,Cr[5]=Zn,Cr[6]=pa,Cr[7]=Fi,Cr[8]=ws,Cr[9]=ys,pn[0]=ha,pn[1]=gs,pn[2]=Zr,pn[3]=Xn,pn[4]=Je,pn[5]=ms,pn[6]=fa,nn[0]=on,nn[1]=ps,nn[2]=Ls,nn[3]=Ii,nn[4]=kn,nn[5]=Ns,nn[6]=Ci,u=1}else u=0}u&&(u=function(V,ft){for(V.M=0;V.M<V.Va;++V.M){var rt,T=V.Jc[V.M&V.Xb],U=V.m,lt=V;for(rt=0;rt<lt.za;++rt){var gt=U,ht=lt,Ct=ht.Ac,St=ht.Bc+4*rt,Rt=ht.zc,_t=ht.ya[ht.aa+rt];if(ht.Qa.Bb?_t.$b=tt(gt,ht.Pa.jb[0])?2+tt(gt,ht.Pa.jb[2]):tt(gt,ht.Pa.jb[1]):_t.$b=0,ht.kc&&(_t.Ad=tt(gt,ht.Bd)),_t.Za=!tt(gt,145)+0,_t.Za){var oe=_t.Ob,le=0;for(ht=0;4>ht;++ht){var ae,re=Rt[0+ht];for(ae=0;4>ae;++ae){re=yu[Ct[St+ae]][re];for(var ge=co[tt(gt,re[0])];0<ge;)ge=co[2*ge+tt(gt,re[ge])];re=-ge,Ct[St+ae]=re}a(oe,le,Ct,St,4),le+=4,Rt[0+ht]=re}}else re=tt(gt,156)?tt(gt,128)?1:3:tt(gt,163)?2:0,_t.Ob[0]=re,c(Ct,St,re,4),c(Rt,0,re,4);_t.Dd=tt(gt,142)?tt(gt,114)?tt(gt,183)?1:3:2:0}if(lt.m.Ka)return Pe(V,7,"Premature end-of-partition0 encountered.");for(;V.ja<V.za;++V.ja){if(lt=T,gt=(U=V).rb[U.sb-1],Ct=U.rb[U.sb+U.ja],rt=U.ya[U.aa+U.ja],St=U.kc?rt.Ad:0)gt.la=Ct.la=0,rt.Za||(gt.Na=Ct.Na=0),rt.Hc=0,rt.Gc=0,rt.ia=0;else{var de,$t;if(gt=Ct,Ct=lt,St=U.Pa.Xc,Rt=U.ya[U.aa+U.ja],_t=U.pb[Rt.$b],ht=Rt.ad,oe=0,le=U.rb[U.sb-1],re=ae=0,c(ht,oe,0,384),Rt.Za)var Me=0,sr=St[3];else{ge=s(16);var Ee=gt.Na+le.Na;if(Ee=Xi(Ct,St[1],Ee,_t.Eb,0,ge,0),gt.Na=le.Na=(0<Ee)+0,1<Ee)ui(ge,0,ht,oe);else{var or=ge[0]+3>>3;for(ge=0;256>ge;ge+=16)ht[oe+ge]=or}Me=1,sr=St[0]}var he=15>.la,fr=15&le.la;for(ge=0;4>ge;++ge){var dr=1&fr;for(or=$t=0;4>or;++or)he=he>>1|(dr=(Ee=Xi(Ct,sr,Ee=dr+(1&he),_t.Sc,Me,ht,oe))>Me)<<7,$t=$t<<2|(3<Ee?3:1<Ee?2:ht[oe+0]!=0),oe+=16;he>>=4,fr=fr>>1|dr<<7,ae=(ae<<8|$t)>>>0}for(sr=he,Me=fr>>4,de=0;4>de;de+=2){for($t=0,he=gt.la>>4+de,fr=le.la>>4+de,ge=0;2>ge;++ge){for(dr=1&fr,or=0;2>or;++or)Ee=dr+(1&he),he=he>>1|(dr=0<(Ee=Xi(Ct,St[2],Ee,_t.Qc,0,ht,oe)))<<3,$t=$t<<2|(3<Ee?3:1<Ee?2:ht[oe+0]!=0),oe+=16;he>>=2,fr=fr>>1|dr<<5}re|=$t<<4*de,sr|=he<<4<<de,Me|=(240&fr)<<de}gt.la=sr,le.la=Me,Rt.Hc=ae,Rt.Gc=re,Rt.ia=43690&re?0:_t.ia,St=!(ae|re)}if(0<U.L&&(U.wa[U.Y+U.ja]=U.gd[rt.$b][rt.Za],U.wa[U.Y+U.ja].La|=!St),lt.Ka)return Pe(V,7,"Premature end-of-file encountered.")}if(_i(V),U=ft,lt=1,rt=(T=V).D,gt=0<T.L&&T.M>=T.zb&&T.M<=T.Va,T.Aa==0)t:{if(rt.M=T.M,rt.uc=gt,Ti(T,rt),lt=1,rt=($t=T.D).Nb,gt=(re=Ma[T.L])*T.R,Ct=re/2*T.B,ge=16*rt*T.R,or=8*rt*T.B,St=T.sa,Rt=T.ta-gt+ge,_t=T.qa,ht=T.ra-Ct+or,oe=T.Ha,le=T.Ia-Ct+or,fr=(he=$t.M)==0,ae=he>=T.Va-1,T.Aa==2&&Ti(T,$t),$t.uc)for(dr=(Ee=T).D.M,e(Ee.D.uc),$t=Ee.yb;$t<Ee.Hb;++$t){Me=$t,sr=dr;var Te=(Ve=(Se=Ee).D).Nb;de=Se.R;var Ve=Ve.wa[Ve.Y+Me],er=Se.sa,Lr=Se.ta+16*Te*de+16*Me,Vr=Ve.dd,ze=Ve.tc;if(ze!=0)if(e(3<=ze),Se.L==1)0<Me&&dn(er,Lr,de,ze+4),Ve.La&&vr(er,Lr,de,ze),0<sr&&Mn(er,Lr,de,ze+4),Ve.La&&Ji(er,Lr,de,ze);else{var an=Se.B,En=Se.qa,fi=Se.ra+8*Te*an+8*Me,mn=Se.Ha,Se=Se.Ia+8*Te*an+8*Me;Te=Ve.ld,0<Me&&(Sa(er,Lr,de,ze+4,Vr,Te),jn(En,fi,mn,Se,an,ze+4,Vr,Te)),Ve.La&&(fn(er,Lr,de,ze,Vr,Te),li(En,fi,mn,Se,an,ze,Vr,Te)),0<sr&&(ci(er,Lr,de,ze+4,Vr,Te),Gi(En,fi,mn,Se,an,ze+4,Vr,Te)),Ve.La&&(On(er,Lr,de,ze,Vr,Te),Bn(En,fi,mn,Se,an,ze,Vr,Te))}}if(T.ia&&alert("todo:DitherRow"),U.put!=null){if($t=16*he,he=16*(he+1),fr?(U.y=T.sa,U.O=T.ta+ge,U.f=T.qa,U.N=T.ra+or,U.ea=T.Ha,U.W=T.Ia+or):($t-=re,U.y=St,U.O=Rt,U.f=_t,U.N=ht,U.ea=oe,U.W=le),ae||(he-=re),he>U.o&&(he=U.o),U.F=null,U.J=null,T.Fa!=null&&0<T.Fa.length&&$t<he&&(U.J=Di(T,U,$t,he-$t),U.F=T.mb,U.F==null&&U.F.length==0)){lt=Pe(T,3,"Could not decode alpha data.");break t}$t<U.j&&(re=U.j-$t,$t=U.j,e(!(1&re)),U.O+=T.R*re,U.N+=T.B*(re>>1),U.W+=T.B*(re>>1),U.F!=null&&(U.J+=U.width*re)),$t<he&&(U.O+=U.v,U.N+=U.v>>1,U.W+=U.v>>1,U.F!=null&&(U.J+=U.v),U.ka=$t-U.j,U.U=U.va-U.v,U.T=he-$t,lt=U.put(U))}rt+1!=T.Ic||ae||(a(T.sa,T.ta-gt,St,Rt+16*T.R,gt),a(T.qa,T.ra-Ct,_t,ht+8*T.B,Ct),a(T.Ha,T.Ia-Ct,oe,le+8*T.B,Ct))}if(!lt)return Pe(V,6,"Output aborted.")}return 1}(t,r)),r.bc!=null&&r.bc(r),u&=1}return u?(t.cb=0,u):0}function kr(t,r,u,d,g){g=t[r+u+32*d]+(g>>3),t[r+u+32*d]=-256&g?0>g?0:255:g}function Yn(t,r,u,d,g,b){kr(t,r,0,u,d+g),kr(t,r,1,u,d+b),kr(t,r,2,u,d-b),kr(t,r,3,u,d-g)}function nr(t){return(20091*t>>16)+t}function Pi(t,r,u,d){var g,b=0,y=s(16);for(g=0;4>g;++g){var w=t[r+0]+t[r+8],N=t[r+0]-t[r+8],P=(35468*t[r+4]>>16)-nr(t[r+12]),R=nr(t[r+4])+(35468*t[r+12]>>16);y[b+0]=w+R,y[b+1]=N+P,y[b+2]=N-P,y[b+3]=w-R,b+=4,r++}for(g=b=0;4>g;++g)w=(t=y[b+0]+4)+y[b+8],N=t-y[b+8],P=(35468*y[b+4]>>16)-nr(y[b+12]),kr(u,d,0,0,w+(R=nr(y[b+4])+(35468*y[b+12]>>16))),kr(u,d,1,0,N+P),kr(u,d,2,0,N-P),kr(u,d,3,0,w-R),b++,d+=32}function ua(t,r,u,d){var g=t[r+0]+4,b=35468*t[r+4]>>16,y=nr(t[r+4]),w=35468*t[r+1]>>16;Yn(u,d,0,g+y,t=nr(t[r+1]),w),Yn(u,d,1,g+b,t,w),Yn(u,d,2,g-b,t,w),Yn(u,d,3,g-y,t,w)}function ls(t,r,u,d,g){Pi(t,r,u,d),g&&Pi(t,r+16,u,d+4)}function ca(t,r,u,d){en(t,r+0,u,d,1),en(t,r+32,u,d+128,1)}function hs(t,r,u,d){var g;for(t=t[r+0]+4,g=0;4>g;++g)for(r=0;4>r;++r)kr(u,d,r,g,t)}function la(t,r,u,d){t[r+0]&&tr(t,r+0,u,d),t[r+16]&&tr(t,r+16,u,d+4),t[r+32]&&tr(t,r+32,u,d+128),t[r+48]&&tr(t,r+48,u,d+128+4)}function fs(t,r,u,d){var g,b=s(16);for(g=0;4>g;++g){var y=t[r+0+g]+t[r+12+g],w=t[r+4+g]+t[r+8+g],N=t[r+4+g]-t[r+8+g],P=t[r+0+g]-t[r+12+g];b[0+g]=y+w,b[8+g]=y-w,b[4+g]=P+N,b[12+g]=P-N}for(g=0;4>g;++g)y=(t=b[0+4*g]+3)+b[3+4*g],w=b[1+4*g]+b[2+4*g],N=b[1+4*g]-b[2+4*g],P=t-b[3+4*g],u[d+0]=y+w>>3,u[d+16]=P+N>>3,u[d+32]=y-w>>3,u[d+48]=P-N>>3,d+=64}function ki(t,r,u){var d,g=r-32,b=hr,y=255-t[g-1];for(d=0;d<u;++d){var w,N=b,P=y+t[r-1];for(w=0;w<u;++w)t[r+w]=N[P+t[g+w]];r+=32}}function ds(t,r){ki(t,r,4)}function ps(t,r){ki(t,r,8)}function gs(t,r){ki(t,r,16)}function Zr(t,r){var u;for(u=0;16>u;++u)a(t,r+32*u,t,r-32,16)}function Xn(t,r){var u;for(u=16;0<u;--u)c(t,r,t[r-1],16),r+=32}function Kn(t,r,u){var d;for(d=0;16>d;++d)c(r,u+32*d,t,16)}function ha(t,r){var u,d=16;for(u=0;16>u;++u)d+=t[r-1+32*u]+t[r+u-32];Kn(d>>5,t,r)}function Je(t,r){var u,d=8;for(u=0;16>u;++u)d+=t[r-1+32*u];Kn(d>>4,t,r)}function ms(t,r){var u,d=8;for(u=0;16>u;++u)d+=t[r+u-32];Kn(d>>4,t,r)}function fa(t,r){Kn(128,t,r)}function Vt(t,r,u){return t+2*r+u+2>>2}function vs(t,r){var u,d=r-32;for(d=new Uint8Array([Vt(t[d-1],t[d+0],t[d+1]),Vt(t[d+0],t[d+1],t[d+2]),Vt(t[d+1],t[d+2],t[d+3]),Vt(t[d+2],t[d+3],t[d+4])]),u=0;4>u;++u)a(t,r+32*u,d,0,d.length)}function bs(t,r){var u=t[r-1],d=t[r-1+32],g=t[r-1+64],b=t[r-1+96];At(t,r+0,16843009*Vt(t[r-1-32],u,d)),At(t,r+32,16843009*Vt(u,d,g)),At(t,r+64,16843009*Vt(d,g,b)),At(t,r+96,16843009*Vt(g,b,b))}function Ur(t,r){var u,d=4;for(u=0;4>u;++u)d+=t[r+u-32]+t[r-1+32*u];for(d>>=3,u=0;4>u;++u)c(t,r+32*u,d,4)}function da(t,r){var u=t[r-1+0],d=t[r-1+32],g=t[r-1+64],b=t[r-1-32],y=t[r+0-32],w=t[r+1-32],N=t[r+2-32],P=t[r+3-32];t[r+0+96]=Vt(d,g,t[r-1+96]),t[r+1+96]=t[r+0+64]=Vt(u,d,g),t[r+2+96]=t[r+1+64]=t[r+0+32]=Vt(b,u,d),t[r+3+96]=t[r+2+64]=t[r+1+32]=t[r+0+0]=Vt(y,b,u),t[r+3+64]=t[r+2+32]=t[r+1+0]=Vt(w,y,b),t[r+3+32]=t[r+2+0]=Vt(N,w,y),t[r+3+0]=Vt(P,N,w)}function pa(t,r){var u=t[r+1-32],d=t[r+2-32],g=t[r+3-32],b=t[r+4-32],y=t[r+5-32],w=t[r+6-32],N=t[r+7-32];t[r+0+0]=Vt(t[r+0-32],u,d),t[r+1+0]=t[r+0+32]=Vt(u,d,g),t[r+2+0]=t[r+1+32]=t[r+0+64]=Vt(d,g,b),t[r+3+0]=t[r+2+32]=t[r+1+64]=t[r+0+96]=Vt(g,b,y),t[r+3+32]=t[r+2+64]=t[r+1+96]=Vt(b,y,w),t[r+3+64]=t[r+2+96]=Vt(y,w,N),t[r+3+96]=Vt(w,N,N)}function Zn(t,r){var u=t[r-1+0],d=t[r-1+32],g=t[r-1+64],b=t[r-1-32],y=t[r+0-32],w=t[r+1-32],N=t[r+2-32],P=t[r+3-32];t[r+0+0]=t[r+1+64]=b+y+1>>1,t[r+1+0]=t[r+2+64]=y+w+1>>1,t[r+2+0]=t[r+3+64]=w+N+1>>1,t[r+3+0]=N+P+1>>1,t[r+0+96]=Vt(g,d,u),t[r+0+64]=Vt(d,u,b),t[r+0+32]=t[r+1+96]=Vt(u,b,y),t[r+1+32]=t[r+2+96]=Vt(b,y,w),t[r+2+32]=t[r+3+96]=Vt(y,w,N),t[r+3+32]=Vt(w,N,P)}function Fi(t,r){var u=t[r+0-32],d=t[r+1-32],g=t[r+2-32],b=t[r+3-32],y=t[r+4-32],w=t[r+5-32],N=t[r+6-32],P=t[r+7-32];t[r+0+0]=u+d+1>>1,t[r+1+0]=t[r+0+64]=d+g+1>>1,t[r+2+0]=t[r+1+64]=g+b+1>>1,t[r+3+0]=t[r+2+64]=b+y+1>>1,t[r+0+32]=Vt(u,d,g),t[r+1+32]=t[r+0+96]=Vt(d,g,b),t[r+2+32]=t[r+1+96]=Vt(g,b,y),t[r+3+32]=t[r+2+96]=Vt(b,y,w),t[r+3+64]=Vt(y,w,N),t[r+3+96]=Vt(w,N,P)}function ys(t,r){var u=t[r-1+0],d=t[r-1+32],g=t[r-1+64],b=t[r-1+96];t[r+0+0]=u+d+1>>1,t[r+2+0]=t[r+0+32]=d+g+1>>1,t[r+2+32]=t[r+0+64]=g+b+1>>1,t[r+1+0]=Vt(u,d,g),t[r+3+0]=t[r+1+32]=Vt(d,g,b),t[r+3+32]=t[r+1+64]=Vt(g,b,b),t[r+3+64]=t[r+2+64]=t[r+0+96]=t[r+1+96]=t[r+2+96]=t[r+3+96]=b}function ws(t,r){var u=t[r-1+0],d=t[r-1+32],g=t[r-1+64],b=t[r-1+96],y=t[r-1-32],w=t[r+0-32],N=t[r+1-32],P=t[r+2-32];t[r+0+0]=t[r+2+32]=u+y+1>>1,t[r+0+32]=t[r+2+64]=d+u+1>>1,t[r+0+64]=t[r+2+96]=g+d+1>>1,t[r+0+96]=b+g+1>>1,t[r+3+0]=Vt(w,N,P),t[r+2+0]=Vt(y,w,N),t[r+1+0]=t[r+3+32]=Vt(u,y,w),t[r+1+32]=t[r+3+64]=Vt(d,u,y),t[r+1+64]=t[r+3+96]=Vt(g,d,u),t[r+1+96]=Vt(b,g,d)}function Ls(t,r){var u;for(u=0;8>u;++u)a(t,r+32*u,t,r-32,8)}function Ii(t,r){var u;for(u=0;8>u;++u)c(t,r,t[r-1],8),r+=32}function Pn(t,r,u){var d;for(d=0;8>d;++d)c(r,u+32*d,t,8)}function on(t,r){var u,d=8;for(u=0;8>u;++u)d+=t[r+u-32]+t[r-1+32*u];Pn(d>>4,t,r)}function Ns(t,r){var u,d=4;for(u=0;8>u;++u)d+=t[r+u-32];Pn(d>>3,t,r)}function kn(t,r){var u,d=4;for(u=0;8>u;++u)d+=t[r-1+32*u];Pn(d>>3,t,r)}function Ci(t,r){Pn(128,t,r)}function $n(t,r,u){var d=t[r-u],g=t[r+0],b=3*(g-d)+ks[1020+t[r-2*u]-t[r+u]],y=Pa[112+(b+4>>3)];t[r-u]=hr[255+d+Pa[112+(b+3>>3)]],t[r+0]=hr[255+g-y]}function ga(t,r,u,d){var g=t[r+0],b=t[r+u];return yr[255+t[r-2*u]-t[r-u]]>d||yr[255+b-g]>d}function ma(t,r,u,d){return 4*yr[255+t[r-u]-t[r+0]]+yr[255+t[r-2*u]-t[r+u]]<=d}function va(t,r,u,d,g){var b=t[r-3*u],y=t[r-2*u],w=t[r-u],N=t[r+0],P=t[r+u],R=t[r+2*u],X=t[r+3*u];return 4*yr[255+w-N]+yr[255+y-P]>d?0:yr[255+t[r-4*u]-b]<=g&&yr[255+b-y]<=g&&yr[255+y-w]<=g&&yr[255+X-R]<=g&&yr[255+R-P]<=g&&yr[255+P-N]<=g}function ba(t,r,u,d){var g=2*d+1;for(d=0;16>d;++d)ma(t,r+d,u,g)&&$n(t,r+d,u)}function Hr(t,r,u,d){var g=2*d+1;for(d=0;16>d;++d)ma(t,r+d*u,1,g)&&$n(t,r+d*u,1)}function $r(t,r,u,d){var g;for(g=3;0<g;--g)ba(t,r+=4*u,u,d)}function As(t,r,u,d){var g;for(g=3;0<g;--g)Hr(t,r+=4,u,d)}function un(t,r,u,d,g,b,y,w){for(b=2*b+1;0<g--;){if(va(t,r,u,b,y))if(ga(t,r,u,w))$n(t,r,u);else{var N=t,P=r,R=u,X=N[P-2*R],K=N[P-R],V=N[P+0],ft=N[P+R],rt=N[P+2*R],T=27*(lt=ks[1020+3*(V-K)+ks[1020+X-ft]])+63>>7,U=18*lt+63>>7,lt=9*lt+63>>7;N[P-3*R]=hr[255+N[P-3*R]+lt],N[P-2*R]=hr[255+X+U],N[P-R]=hr[255+K+T],N[P+0]=hr[255+V-T],N[P+R]=hr[255+ft-U],N[P+2*R]=hr[255+rt-lt]}r+=d}}function Fr(t,r,u,d,g,b,y,w){for(b=2*b+1;0<g--;){if(va(t,r,u,b,y))if(ga(t,r,u,w))$n(t,r,u);else{var N=t,P=r,R=u,X=N[P-R],K=N[P+0],V=N[P+R],ft=Pa[112+((rt=3*(K-X))+4>>3)],rt=Pa[112+(rt+3>>3)],T=ft+1>>1;N[P-2*R]=hr[255+N[P-2*R]+T],N[P-R]=hr[255+X+rt],N[P+0]=hr[255+K-ft],N[P+R]=hr[255+V-T]}r+=d}}function ji(t,r,u,d,g,b){un(t,r,u,1,16,d,g,b)}function Fn(t,r,u,d,g,b){un(t,r,1,u,16,d,g,b)}function xs(t,r,u,d,g,b){var y;for(y=3;0<y;--y)Fr(t,r+=4*u,u,1,16,d,g,b)}function Qn(t,r,u,d,g,b){var y;for(y=3;0<y;--y)Fr(t,r+=4,1,u,16,d,g,b)}function Ss(t,r,u,d,g,b,y,w){un(t,r,g,1,8,b,y,w),un(u,d,g,1,8,b,y,w)}function Oi(t,r,u,d,g,b,y,w){un(t,r,1,g,8,b,y,w),un(u,d,1,g,8,b,y,w)}function Bi(t,r,u,d,g,b,y,w){Fr(t,r+4*g,g,1,8,b,y,w),Fr(u,d+4*g,g,1,8,b,y,w)}function ya(t,r,u,d,g,b,y,w){Fr(t,r+4,1,g,8,b,y,w),Fr(u,d+4,1,g,8,b,y,w)}function ti(){this.ba=new Ar,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Ae,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Mi(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Ei(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function wa(){this.ua=0,this.Wa=new O,this.vb=new O,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new z,this.yc=new F}function _s(){this.xb=this.a=0,this.l=new Jn,this.ca=new Ar,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new L,this.Pb=0,this.wd=new L,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new wa,this.ab=0,this.gc=l(4,Ei),this.Oc=0}function ei(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Jn,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function In(t,r,u,d,g,b,y){for(t=t==null?0:t[r+0],r=0;r<y;++r)g[b+r]=t+u[d+r]&255,t=g[b+r]}function qi(t,r,u,d,g,b,y){var w;if(t==null)In(null,null,u,d,g,b,y);else for(w=0;w<y;++w)g[b+w]=t[r+w]+u[d+w]&255}function cn(t,r,u,d,g,b,y){if(t==null)In(null,null,u,d,g,b,y);else{var w,N=t[r+0],P=N,R=N;for(w=0;w<y;++w)P=R+(N=t[r+w])-P,R=u[d+w]+(-256&P?0>P?0:255:P)&255,P=N,g[b+w]=R}}function Di(t,r,u,d){var g=r.width,b=r.o;if(e(t!=null&&r!=null),0>u||0>=d||u+d>b)return null;if(!t.Cc){if(t.ga==null){var y;if(t.ga=new ei,(y=t.ga==null)||(y=r.width*r.o,e(t.Gb.length==0),t.Gb=s(y),t.Uc=0,t.Gb==null?y=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,y=1),y=!y),!y){y=t.ga;var w=t.Fa,N=t.P,P=t.qc,R=t.mb,X=t.nb,K=N+1,V=P-1,ft=y.l;if(e(w!=null&&R!=null&&r!=null),gn[0]=null,gn[1]=In,gn[2]=qi,gn[3]=cn,y.ca=R,y.tb=X,y.c=r.width,y.i=r.height,e(0<y.c&&0<y.i),1>=P)r=0;else if(y.$a=w[N+0]>>0&3,y.Z=w[N+0]>>2&3,y.Lc=w[N+0]>>4&3,N=w[N+0]>>6&3,0>y.$a||1<y.$a||4<=y.Z||1<y.Lc||N)r=0;else if(ft.put=qr,ft.ac=He,ft.bc=Dr,ft.ma=y,ft.width=r.width,ft.height=r.height,ft.Da=r.Da,ft.v=r.v,ft.va=r.va,ft.j=r.j,ft.o=r.o,y.$a)t:{e(y.$a==1),r=pr();e:for(;;){if(r==null){r=0;break t}if(e(y!=null),y.mc=r,r.c=y.c,r.i=y.i,r.l=y.l,r.l.ma=y,r.l.width=y.c,r.l.height=y.i,r.a=0,Q(r.m,w,K,V),!zr(y.c,y.i,1,r,null)||(r.ab==1&&r.gc[0].hc==3&&Kr(r.s)?(y.ic=1,w=r.c*r.i,r.Ta=null,r.Ua=0,r.V=s(w),r.Ba=0,r.V==null?(r.a=1,r=0):r=1):(y.ic=0,r=_n(r,y.c)),!r))break e;r=1;break t}y.mc=null,r=0}else r=V>=y.c*y.i;y=!r}if(y)return null;t.ga.Lc!=1?t.Ga=0:d=b-u}e(t.ga!=null),e(u+d<=b);t:{if(r=(w=t.ga).c,b=w.l.o,w.$a==0){if(K=t.rc,V=t.Vc,ft=t.Fa,N=t.P+1+u*r,P=t.mb,R=t.nb+u*r,e(N<=t.P+t.qc),w.Z!=0)for(e(gn[w.Z]!=null),y=0;y<d;++y)gn[w.Z](K,V,ft,N,P,R,r),K=P,V=R,R+=r,N+=r;else for(y=0;y<d;++y)a(P,R,ft,N,r),K=P,V=R,R+=r,N+=r;t.rc=K,t.Vc=V}else{if(e(w.mc!=null),r=u+d,e((y=w.mc)!=null),e(r<=y.i),y.C>=r)r=1;else if(w.ic||Y(),w.ic){w=y.V,K=y.Ba,V=y.c;var rt=y.i,T=(ft=1,N=y.$/V,P=y.$%V,R=y.m,X=y.s,y.$),U=V*rt,lt=V*r,gt=X.wc,ht=T<lt?Oe(X,P,N):null;e(T<=U),e(r<=rt),e(Kr(X));e:for(;;){for(;!R.h&&T<lt;){if(P>||(ht=Oe(X,P,N)),e(ht!=null),J(R),256>(rt=rr(ht.G[0],ht.H[0],R)))w[K+T]=rt,++T,++P>=V&&(P=0,++N<=r&&!(N%16)&&_r(y,N));else{if(!(280>rt)){ft=0;break e}rt=xr(rt-256,R);var Ct,St=rr(ht.G[4],ht.H[4],R);if(J(R),!(T>=(St=Rr(V,St=xr(St,R)))&&U-T>=rt)){ft=0;break e}for(Ct=0;Ct<rt;++Ct)w[K+T+Ct]=w[K+T+Ct-St];for(T+=rt,P+=rt;P>=V;)P-=V,++N<=r&&!(N%16)&&_r(y,N);T<lt&&P>&&(ht=Oe(X,P,N))}e(R.h==E(R))}_r(y,N>r?r:N);break e}!ft||R.h&&T<U?(ft=0,y.a=R.h?5:3):y.$=T,r=ft}else r=Pr(y,y.V,y.Ba,y.c,y.i,r,Un);if(!r){d=0;break t}}u+d>=b&&(t.Cc=1),d=1}if(!d)return null;if(t.Cc&&((d=t.ga)!=null&&(d.mc=null),t.ga=null,0<t.Ga))return alert("todo:WebPDequantizeLevels"),null}return t.nb+u*g}function o(t,r,u,d,g,b){for(;0<g--;){var y,w=t,N=r+(u?1:0),P=t,R=r+(u?0:3);for(y=0;y<d;++y){var X=P[R+4*y];X!=255&&(X*=32897,w[N+4*y+0]=w[N+4*y+0]*X>>23,w[N+4*y+1]=w[N+4*y+1]*X>>23,w[N+4*y+2]=w[N+4*y+2]*X>>23)}r+=b}}function m(t,r,u,d,g){for(;0<d--;){var b;for(b=0;b<u;++b){var y=t[r+2*b+0],w=15&(P=t[r+2*b+1]),N=4369*w,P=(240&P|P>>4)*N>>16;t[r+2*b+0]=(240&y|y>>4)*N>>16&240|(15&y|y<<4)*N>>16>>4&15,t[r+2*b+1]=240&P|w}r+=g}}function C(t,r,u,d,g,b,y,w){var N,P,R=255;for(P=0;P<g;++P){for(N=0;N<d;++N){var X=t[r+N];b[y+4*N]=X,R&=X}r+=u,y+=w}return R!=255}function D(t,r,u,d,g){var b;for(b=0;b<g;++b)u[d+b]=t[r+b]>>8}function Y(){br=o,be=m,ye=C,Fe=D}function it(t,r,u){G[t]=function(d,g,b,y,w,N,P,R,X,K,V,ft,rt,T,U,lt,gt){var ht,Ct=gt-1>>1,St=w[N+0]|P[R+0]<<16,Rt=X[K+0]|V[ft+0]<<16;e(d!=null);var _t=3*St+Rt+131074>>2;for(r(d[g+0],255&_t,_t>>16,rt,T),b!=null&&(_t=3*Rt+St+131074>>2,r(b[y+0],255&_t,_t>>16,U,lt)),ht=1;ht<=Ct;++ht){var oe=w[N+ht]|P[R+ht]<<16,le=X[K+ht]|V[ft+ht]<<16,ae=St+oe+Rt+le+524296,re=ae+2*(oe+Rt)>>3;_t=re+St>>1,St=(ae=ae+2*(St+le)>>3)+oe>>1,r(d[g+2*ht-1],255&_t,_t>>16,rt,T+(2*ht-1)*u),r(d[g+2*ht-0],255&St,St>>16,rt,T+(2*ht-0)*u),b!=null&&(_t=ae+Rt>>1,St=re+le>>1,r(b[y+2*ht-1],255&_t,_t>>16,U,lt+(2*ht-1)*u),r(b[y+2*ht+0],255&St,St>>16,U,lt+(2*ht+0)*u)),St=oe,Rt=le}1>||(_t=3*St+Rt+131074>>2,r(d[g+gt-1],255&_t,_t>>16,rt,T+(gt-1)*u),b!=null&&(_t=3*Rt+St+131074>>2,r(b[y+gt-1],255&_t,_t>>16,U,lt+(gt-1)*u)))}}function yt(){wr[ka]=Au,wr[Fa]=ho,wr[so]=xu,wr[Ia]=fo,wr[Ca]=po,wr[Fs]=go,wr[oo]=Su,wr[Is]=ho,wr[Cs]=fo,wr[ja]=po,wr[js]=go}function It(t){return t&-16384?0>t?0:255:t>>_u}function Dt(t,r){return It((19077*t>>8)+(26149*r>>8)-14234)}function Zt(t,r,u){return It((19077*t>>8)-(6419*r>>8)-(13320*u>>8)+8708)}function Yt(t,r){return It((19077*t>>8)+(33050*r>>8)-17685)}function ne(t,r,u,d,g){d[g+0]=Dt(t,u),d[g+1]=Zt(t,r,u),d[g+2]=Yt(t,r)}function Le(t,r,u,d,g){d[g+0]=Yt(t,r),d[g+1]=Zt(t,r,u),d[g+2]=Dt(t,u)}function xe(t,r,u,d,g){var b=Zt(t,r,u);r=b<<3&224|Yt(t,r)>>3,d[g+0]=248&Dt(t,u)|b>>5,d[g+1]=r}function Be(t,r,u,d,g){var b=240&Yt(t,r)|15;d[g+0]=240&Dt(t,u)|Zt(t,r,u)>>4,d[g+1]=b}function Ye(t,r,u,d,g){d[g+0]=255,ne(t,r,u,d,g+1)}function Re(t,r,u,d,g){Le(t,r,u,d,g),d[g+3]=255}function Ir(t,r,u,d,g){ne(t,r,u,d,g),d[g+3]=255}function lr(t,r){return 0>t?0:t>r?r:t}function Wr(t,r,u){G[t]=function(d,g,b,y,w,N,P,R,X){for(var K=R+(-2&X)*u;R!=K;)r(d[g+0],b[y+0],w[N+0],P,R),r(d[g+1],b[y+0],w[N+0],P,R+u),g+=2,++y,++N,R+=2*u;1&X&&r(d[g+0],b[y+0],w[N+0],P,R)}}function La(t,r,u){return u==0?t==0?r==0?6:5:r==0?4:0:u}function Ri(t,r,u,d,g){switch(t>>>30){case 3:en(r,u,d,g,0);break;case 2:ke(r,u,d,g);break;case 1:tr(r,u,d,g)}}function Ti(t,r){var u,d,g=r.M,b=r.Nb,y=t.oc,w=t.pc+40,N=t.oc,P=t.pc+584,R=t.oc,X=t.pc+600;for(u=0;16>u;++u)y[w+32*u-1]=129;for(u=0;8>u;++u)N[P+32*u-1]=129,R[X+32*u-1]=129;for(0<g?y[w-1-32]=N[P-1-32]=R[X-1-32]=129:(c(y,w-32-1,127,21),c(N,P-32-1,127,9),c(R,X-32-1,127,9)),d=0;d<t.za;++d){var K=r.ya[r.aa+d];if(0<d){for(u=-1;16>u;++u)a(y,w+32*u-4,y,w+32*u+12,4);for(u=-1;8>u;++u)a(N,P+32*u-4,N,P+32*u+4,4),a(R,X+32*u-4,R,X+32*u+4,4)}var V=t.Gd,ft=t.Hd+d,rt=K.ad,T=K.Hc;if(0<g&&(a(y,w-32,V[ft].y,0,16),a(N,P-32,V[ft].f,0,8),a(R,X-32,V[ft].ea,0,8)),K.Za){var U=y,lt=w-32+16;for(0<g&&(d>=t.za-1?c(U,lt,V[ft].y[15],4):a(U,lt,V[ft+1].y,0,4)),u=0;4>u;u++)U[lt+128+u]=U[lt+256+u]=U[lt+384+u]=U[lt+0+u];for(u=0;16>u;++u,T<<=2)U=y,lt=w+vo[u],Cr[K.Ob[u]](U,lt),Ri(T,rt,16*+u,U,lt)}else if(U=La(d,g,K.Ob[0]),pn[U](y,w),T!=0)for(u=0;16>u;++u,T<<=2)Ri(T,rt,16*+u,y,w+vo[u]);for(u=K.Gc,U=La(d,g,K.Dd),nn[U](N,P),nn[U](R,X),T=rt,U=N,lt=P,255&(K=u>>0)&&(170&K?Vi(T,256,U,lt):mr(T,256,U,lt)),K=R,T=X,255&(u>>=8)&&(170&u?Vi(rt,320,K,T):mr(rt,320,K,T)),g<t.Ub-1&&(a(V[ft].y,0,y,w+480,16),a(V[ft].f,0,N,P+224,8),a(V[ft].ea,0,R,X+224,8)),u=8*b*t.B,V=t.sa,ft=t.ta+16*d+16*b*t.R,rt=t.qa,K=t.ra+8*d+u,T=t.Ha,U=t.Ia+8*d+u,u=0;16>u;++u)a(V,ft+u*t.R,y,w+32*u,16);for(u=0;8>u;++u)a(rt,K+u*t.B,N,P+32*u,8),a(T,U+u*t.B,R,X+32*u,8)}}function ri(t,r,u,d,g,b,y,w,N){var P=[0],R=[0],X=0,K=N!=null?N.kd:0,V=N??new Mi;if(t==null||12>u)return 7;V.data=t,V.w=r,V.ha=u,r=[r],u=[u],V.gb=[V.gb];t:{var ft=r,rt=u,T=V.gb;if(e(t!=null),e(rt!=null),e(T!=null),T[0]=0,12<=rt[0]&&!n(t,ft[0],"RIFF")){if(n(t,ft[0]+8,"WEBP")){T=3;break t}var U=jt(t,ft[0]+4);if(12>U||4294967286<U){T=3;break t}if(K&&U>rt[0]-8){T=7;break t}T[0]=U,ft[0]+=12,rt[0]-=12}T=0}if(T!=0)return T;for(U=0<V.gb[0],u=u[0];;){t:{var lt=t;rt=r,T=u;var gt=P,ht=R,Ct=ft=[0];if((_t=X=[X])[0]=0,8>T[0])T=7;else{if(!n(lt,rt[0],"VP8X")){if(jt(lt,rt[0]+4)!=10){T=3;break t}if(18>T[0]){T=7;break t}var St=jt(lt,rt[0]+8),Rt=1+Ot(lt,rt[0]+12);if(2147483648<=Rt*(lt=1+Ot(lt,rt[0]+15))){T=3;break t}Ct!=null&&(Ct[0]=St),gt!=null&&(gt[0]=Rt),ht!=null&&(ht[0]=lt),rt[0]+=18,T[0]-=18,_t[0]=1}T=0}}if(X=X[0],ft=ft[0],T!=0)return T;if(rt=!!(2&ft),!U&&X)return 3;if(b!=null&&(b[0]=!!(16&ft)),y!=null&&(y[0]=rt),w!=null&&(w[0]=0),y=P[0],ft=R[0],X&&rt&&N==null){T=0;break}if(4>u){T=7;break}if(U&&X||!U&&!X&&!n(t,r[0],"ALPH")){u=[u],V.na=[V.na],V.P=[V.P],V.Sa=[V.Sa];t:{St=t,T=r,U=u;var _t=V.gb;gt=V.na,ht=V.P,Ct=V.Sa,Rt=22,e(St!=null),e(U!=null),lt=T[0];var oe=U[0];for(e(gt!=null),e(Ct!=null),gt[0]=null,ht[0]=null,Ct[0]=0;;){if(T[0]=lt,U[0]=oe,8>oe){T=7;break t}var le=jt(St,lt+4);if(4294967286<le){T=3;break t}var ae=8+le+1&-2;if(Rt+=ae,0<_t&&Rt>_t){T=3;break t}if(!n(St,lt,"VP8 ")||!n(St,lt,"VP8L")){T=0;break t}if(oe[0]<ae){T=7;break t}n(St,lt,"ALPH")||(gt[0]=St,ht[0]=lt+8,Ct[0]=le),lt+=ae,oe-=ae}}if(u=u[0],V.na=V.na[0],V.P=V.P[0],V.Sa=V.Sa[0],T!=0)break}u=[u],V.Ja=[V.Ja],V.xa=[V.xa];t:if(_t=t,T=r,U=u,gt=V.gb[0],ht=V.Ja,Ct=V.xa,St=T[0],lt=!n(_t,St,"VP8 "),Rt=!n(_t,St,"VP8L"),e(_t!=null),e(U!=null),e(ht!=null),e(Ct!=null),8>U[0])T=7;else{if(lt||Rt){if(_t=jt(_t,St+4),12<=gt&&_t>gt-12){T=3;break t}if(K&&_t>U[0]-8){T=7;break t}ht[0]=_t,T[0]+=8,U[0]-=8,Ct[0]=Rt}else Ct[0]=5<=U[0]&&_t[St+0]==47&&!(_t[St+4]>>5),ht[0]=U[0];T=0}if(u=u[0],V.Ja=V.Ja[0],V.xa=V.xa[0],r=r[0],T!=0)break;if(4294967286<V.Ja)return 3;if(w==null||rt||(w[0]=V.xa?2:1),y=[y],ft=[ft],V.xa){if(5>u){T=7;break}w=y,K=ft,rt=b,t==null||5>u?t=0:5<=u&&t[r+0]==47&&!(t[r+4]>>5)?(U=[0],_t=[0],gt=[0],Q(ht=new L,t,r,u),Tt(ht,U,_t,gt)?(w!=null&&(w[0]=U[0]),K!=null&&(K[0]=_t[0]),rt!=null&&(rt[0]=gt[0]),t=1):t=0):t=0}else{if(10>u){T=7;break}w=ft,t==null||10>u||!aa(t,r+3,u-3)?t=0:(K=t[r+0]|t[r+1]<<8|t[r+2]<<16,rt=16383&(t[r+7]<<8|t[r+6]),t=16383&(t[r+9]<<8|t[r+8]),1&K||3<(K>>1&7)||!(K>>4&1)||K>>5>=V.Ja||!rt||!t?t=0:(y&&(y[0]=rt),w&&(w[0]=t),t=1))}if(!t||(y=y[0],ft=ft[0],X&&(P[0]!=y||R[0]!=ft)))return 3;N!=null&&(N[0]=V,N.offset=r-N.w,e(4294967286>r-N.w),e(N.offset==N.ha-u));break}return T==0||T==7&&X&&N==null?(b!=null&&(b[0]|=V.na!=null&&0<V.na.length),d!=null&&(d[0]=y),g!=null&&(g[0]=ft),0):T}function zi(t,r,u){var d=r.width,g=r.height,b=0,y=0,w=d,N=g;if(r.Da=t!=null&&0<t.Da,r.Da&&(w=t.cd,N=t.bd,b=t.v,y=t.j,11>u||(b&=-2,y&=-2),0>b||0>y||0>=w||0>=N||b+w>d||y+N>g))return 0;if(r.v=b,r.j=y,r.va=b+w,r.o=y+N,r.U=w,r.T=N,r.da=t!=null&&0<t.da,r.da){if(!Kt(w,N,u=[t.ib],b=[t.hb]))return 0;r.ib=u[0],r.hb=b[0]}return r.ob=t!=null&&t.ob,r.Kb=t==null||!t.Sd,r.da&&(r.ob=r.ib<3*d/4&&r.hb<3*g/4,r.Kb=0),1}function Ui(t){if(t==null)return 2;if(11>t.S){var r=t.f.RGBA;r.fb+=(t.height-1)*r.A,r.A=-r.A}else r=t.f.kb,t=t.height,r.O+=(t-1)*r.fa,r.fa=-r.fa,r.N+=(t-1>>1)*r.Ab,r.Ab=-r.Ab,r.W+=(t-1>>1)*r.Db,r.Db=-r.Db,r.F!=null&&(r.J+=(t-1)*r.lb,r.lb=-r.lb);return 0}function ni(t,r,u,d){if(d==null||0>=t||0>=r)return 2;if(u!=null){if(u.Da){var g=u.cd,b=u.bd,y=-2&u.v,w=-2&u.j;if(0>y||0>w||0>=g||0>=b||y+g>t||w+b>r)return 2;t=g,r=b}if(u.da){if(!Kt(t,r,g=[u.ib],b=[u.hb]))return 2;t=g[0],r=b[0]}}d.width=t,d.height=r;t:{var N=d.width,P=d.height;if(t=d.S,0>=N||0>=P||!(t>=ka&&13>t))t=2;else{if(0>=d.Rd&&d.sd==null){y=b=g=r=0;var R=(w=N*bo[t])*P;if(11>t||(b=(P+1)/2*(r=(N+1)/2),t==12&&(y=(g=N)*P)),(P=s(R+2*b+y))==null){t=1;break t}d.sd=P,11>t?((N=d.f.RGBA).eb=P,N.fb=0,N.A=w,N.size=R):((N=d.f.kb).y=P,N.O=0,N.fa=w,N.Fd=R,N.f=P,N.N=0+R,N.Ab=r,N.Cd=b,N.ea=P,N.W=0+R+b,N.Db=r,N.Ed=b,t==12&&(N.F=P,N.J=0+R+2*b),N.Tc=y,N.lb=g)}if(r=1,g=d.S,b=d.width,y=d.height,g>=ka&&13>g)if(11>g)t=d.f.RGBA,r&=(w=Math.abs(t.A))*(y-1)+b<=t.size,r&=w>=b*bo[g],r&=t.eb!=null;else{t=d.f.kb,w=(b+1)/2,R=(y+1)/2,N=Math.abs(t.fa),P=Math.abs(t.Ab);var X=Math.abs(t.Db),K=Math.abs(t.lb),V=K*(y-1)+b;r&=N*(y-1)+b<=t.Fd,r&=P*(R-1)+w<=t.Cd,r=(r&=X*(R-1)+w<=t.Ed)&N>=b&P>=w&X>=w,r&=t.y!=null,r&=t.f!=null,r&=t.ea!=null,g==12&&(r&=K>=b,r&=V<=t.Tc,r&=t.F!=null)}else r=0;t=r?0:2}}return t!=0||u!=null&&u.fd&&(t=Ui(d)),t}var We=64,ii=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],ai=24,si=32,Hi=8,ir=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];xt("Predictor0","PredictorAdd0"),G.Predictor0=function(){return 4278190080},G.Predictor1=function(t){return t},G.Predictor2=function(t,r,u){return r[u+0]},G.Predictor3=function(t,r,u){return r[u+1]},G.Predictor4=function(t,r,u){return r[u-1]},G.Predictor5=function(t,r,u){return Pt(Pt(t,r[u+1]),r[u+0])},G.Predictor6=function(t,r,u){return Pt(t,r[u-1])},G.Predictor7=function(t,r,u){return Pt(t,r[u+0])},G.Predictor8=function(t,r,u){return Pt(r[u-1],r[u+0])},G.Predictor9=function(t,r,u){return Pt(r[u+0],r[u+1])},G.Predictor10=function(t,r,u){return Pt(Pt(t,r[u-1]),Pt(r[u+0],r[u+1]))},G.Predictor11=function(t,r,u){var d=r[u+0];return 0>=Qt(d>>24&255,t>>24&255,(r=r[u-1])>>24&255)+Qt(d>>16&255,t>>16&255,r>>16&255)+Qt(d>>8&255,t>>8&255,r>>8&255)+Qt(255&d,255&t,255&r)?d:t},G.Predictor12=function(t,r,u){var d=r[u+0];return(qt((t>>24&255)+(d>>24&255)-((r=r[u-1])>>24&255))<<24|qt((t>>16&255)+(d>>16&255)-(r>>16&255))<<16|qt((t>>8&255)+(d>>8&255)-(r>>8&255))<<8|qt((255&t)+(255&d)-(255&r)))>>>0},G.Predictor13=function(t,r,u){var d=r[u-1];return(Gt((t=Pt(t,r[u+0]))>>24&255,d>>24&255)<<24|Gt(t>>16&255,d>>16&255)<<16|Gt(t>>8&255,d>>8&255)<<8|Gt(t>>0&255,d>>0&255))>>>0};var Ps=G.PredictorAdd0;G.PredictorAdd1=te,xt("Predictor2","PredictorAdd2"),xt("Predictor3","PredictorAdd3"),xt("Predictor4","PredictorAdd4"),xt("Predictor5","PredictorAdd5"),xt("Predictor6","PredictorAdd6"),xt("Predictor7","PredictorAdd7"),xt("Predictor8","PredictorAdd8"),xt("Predictor9","PredictorAdd9"),xt("Predictor10","PredictorAdd10"),xt("Predictor11","PredictorAdd11"),xt("Predictor12","PredictorAdd12"),xt("Predictor13","PredictorAdd13");var Wi=G.PredictorAdd2;ee("ColorIndexInverseTransform","MapARGB","32b",function(t){return t>>8&255},function(t){return t}),ee("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(t){return t},function(t){return t>>8&255});var Na,gr=G.ColorIndexInverseTransform,oi=G.MapARGB,Aa=G.VP8LColorIndexInverseTransformAlpha,xa=G.MapAlpha,ln=G.VP8LPredictorsAdd=[];ln.length=16,(G.VP8LPredictors=[]).length=16,(G.VP8LPredictorsAdd_C=[]).length=16,(G.VP8LPredictors_C=[]).length=16;var Cn,ar,Qe,hn,Qr,tn,ui,en,ke,Vi,tr,mr,ci,Sa,Gi,jn,On,fn,Bn,li,Mn,dn,Ji,vr,br,be,ye,Fe,De=s(511),rn=s(2041),Yi=s(225),hi=s(767),_a=0,ks=rn,Pa=Yi,hr=hi,yr=De,ka=0,Fa=1,so=2,Ia=3,Ca=4,Fs=5,oo=6,Is=7,Cs=8,ja=9,js=10,cu=[2,3,7],lu=[3,3,11],uo=[280,256,256,256,40],hu=[0,1,1,1,0],fu=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],du=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],pu=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],gu=8,Os=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Bs=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,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,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Xi=null,mu=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],vu=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],co=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],bu=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],yu=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],wu=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Lu=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],pn=[],Cr=[],nn=[],Nu=1,lo=2,gn=[],wr=[];it("UpsampleRgbLinePair",ne,3),it("UpsampleBgrLinePair",Le,3),it("UpsampleRgbaLinePair",Ir,4),it("UpsampleBgraLinePair",Re,4),it("UpsampleArgbLinePair",Ye,4),it("UpsampleRgba4444LinePair",Be,2),it("UpsampleRgb565LinePair",xe,2);var Au=G.UpsampleRgbLinePair,xu=G.UpsampleBgrLinePair,ho=G.UpsampleRgbaLinePair,fo=G.UpsampleBgraLinePair,po=G.UpsampleArgbLinePair,go=G.UpsampleRgba4444LinePair,Su=G.UpsampleRgb565LinePair,Oa=16,Ba=1<<Oa-1,Ki=-227,Ms=482,_u=6,mo=0,Pu=s(256),ku=s(256),Fu=s(256),Iu=s(256),Cu=s(Ms-Ki),ju=s(Ms-Ki);Wr("YuvToRgbRow",ne,3),Wr("YuvToBgrRow",Le,3),Wr("YuvToRgbaRow",Ir,4),Wr("YuvToBgraRow",Re,4),Wr("YuvToArgbRow",Ye,4),Wr("YuvToRgba4444Row",Be,2),Wr("YuvToRgb565Row",xe,2);var vo=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Ma=[0,2,8],Ou=[8,7,6,4,4,2,2,2,1,1,1,1],Bu=1;this.WebPDecodeRGBA=function(t,r,u,d,g){var b=Fa,y=new ti,w=new Ar;y.ba=w,w.S=b,w.width=[w.width],w.height=[w.height];var N=w.width,P=w.height,R=new Xr;if(R==null||t==null)var X=2;else e(R!=null),X=ri(t,r,u,R.width,R.height,R.Pd,R.Qd,R.format,null);if(X!=0?N=0:(N!=null&&(N[0]=R.width[0]),P!=null&&(P[0]=R.height[0]),N=1),N){w.width=w.width[0],w.height=w.height[0],d!=null&&(d[0]=w.width),g!=null&&(g[0]=w.height);t:{if(d=new Jn,(g=new Mi).data=t,g.w=r,g.ha=u,g.kd=1,r=[0],e(g!=null),((t=ri(g.data,g.w,g.ha,null,null,null,r,null,g))==0||t==7)&&r[0]&&(t=4),(r=t)==0){if(e(y!=null),d.data=g.data,d.w=g.w+g.offset,d.ha=g.ha-g.offset,d.put=qr,d.ac=He,d.bc=Dr,d.ma=y,g.xa){if((t=pr())==null){y=1;break t}if(function(K,V){var ft=[0],rt=[0],T=[0];e:for(;;){if(K==null)return 0;if(V==null)return K.a=2,0;if(K.l=V,K.a=0,Q(K.m,V.data,V.w,V.ha),!Tt(K.m,ft,rt,T)){K.a=3;break e}if(K.xb=lo,V.width=ft[0],V.height=rt[0],!zr(ft[0],rt[0],1,K,null))break e;return 1}return e(K.a!=0),0}(t,d)){if(d=(r=ni(d.width,d.height,y.Oa,y.ba))==0){e:{d=t;r:for(;;){if(d==null){d=0;break e}if(e(d.s.yc!=null),e(d.s.Ya!=null),e(0<d.s.Wb),e((u=d.l)!=null),e((g=u.ma)!=null),d.xb!=0){if(d.ca=g.ba,d.tb=g.tb,e(d.ca!=null),!zi(g.Oa,u,Ia)){d.a=2;break r}if(!_n(d,u.width)||u.da)break r;if((u.da||ue(d.ca.S))&&Y(),11>d.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),d.ca.f.kb.F!=null&&Y()),d.Pb&&0<d.s.ua&&d.s.vb.X==null&&!Wt(d.s.vb,d.s.Wa.Xa)){d.a=1;break r}d.xb=0}if(!Pr(d,d.V,d.Ba,d.c,d.i,u.o,zn))break r;g.Dc=d.Ma,d=1;break e}e(d.a!=0),d=0}d=!d}d&&(r=t.a)}else r=t.a}else{if((t=new us)==null){y=1;break t}if(t.Fa=g.na,t.P=g.P,t.qc=g.Sa,sa(t,d)){if((r=ni(d.width,d.height,y.Oa,y.ba))==0){if(t.Aa=0,u=y.Oa,e((g=t)!=null),u!=null){if(0<(N=0>(N=u.Md)?0:100<N?255:255*N/100)){for(P=R=0;4>P;++P)12>(X=g.pb[P]).lc&&(X.ia=N*Ou[0>X.lc?0:X.lc]>>3),R|=X.ia;R&&(alert("todo:VP8InitRandom"),g.ia=1)}g.Ga=u.Id,100<g.Ga?g.Ga=100:0>g.Ga&&(g.Ga=0)}cs(t,d)||(r=t.a)}}else r=t.a}r==0&&y.Oa!=null&&y.Oa.fd&&(r=Ui(y.ba))}y=r}b=y!=0?null:11>b?w.f.RGBA.eb:w.f.kb.y}else b=null;return b};var bo=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function v(G,vt){for(var bt="",k=0;k<4;k++)bt+=String.fromCharCode(G[vt++]);return bt}function x(G,vt){return(G[vt+0]<<0|G[vt+1]<<8|G[vt+2]<<16)>>>0}function A(G,vt){return(G[vt+0]<<0|G[vt+1]<<8|G[vt+2]<<16|G[vt+3]<<24)>>>0}new f;var _=[0],p=[0],B=[],I=new f,q=i,S=function(G,vt){var bt={},k=0,F=!1,H=0,z=0;if(bt.frames=[],!function(j,E,W,J){for(var $=0;$<J;$++)if(j[E+$]!=W.charCodeAt($))return!0;return!1}(G,vt,"RIFF",4)){for(A(G,vt+=4),vt+=8;vt<G.length;){var ct=v(G,vt),st=A(G,vt+=4);vt+=4;var mt=st+(1&st);switch(ct){case"VP8 ":case"VP8L":bt.frames[k]===void 0&&(bt.frames[k]={}),(ot=bt.frames[k]).src_off=F?z:vt-8,ot.src_size=H+st+8,k++,F&&(F=!1,H=0,z=0);break;case"VP8X":(ot=bt.header={}).feature_flags=G[vt];var Q=vt+4;ot.canvas_width=1+x(G,Q),Q+=3,ot.canvas_height=1+x(G,Q),Q+=3;break;case"ALPH":F=!0,H=mt+8,z=vt-8;break;case"ANIM":(ot=bt.header).bgcolor=A(G,vt),Q=vt+4,ot.loop_count=(Et=G)[(L=Q)+0]<<0|Et[L+1]<<8,Q+=2;break;case"ANMF":var pt,ot;(ot=bt.frames[k]={}).offset_x=2*x(G,vt),vt+=3,ot.offset_y=2*x(G,vt),vt+=3,ot.width=1+x(G,vt),vt+=3,ot.height=1+x(G,vt),vt+=3,ot.duration=x(G,vt),vt+=3,pt=G[vt++],ot.dispose=1&pt,ot.blend=pt>>1&1}ct!="ANMF"&&(vt+=mt)}var Et,L;return bt}}(q,0);S.response=q,S.rgbaoutput=!0,S.dataurl=!1;var M=S.header?S.header:null,Z=S.frames?S.frames:null;if(M){M.loop_counter=M.loop_count,_=[M.canvas_height],p=[M.canvas_width];for(var ut=0;ut<Z.length&&Z[ut].blend!=0;ut++);}var dt=Z[0],Nt=I.WebPDecodeRGBA(q,dt.src_off,dt.src_size,p,_);dt.rgba=Nt,dt.imgwidth=p[0],dt.imgheight=_[0];for(var nt=0;nt<p[0]*_[0]*4;nt++)B[nt]=Nt[nt];return this.width=p,this.height=_,this.data=B,this}(function(i){var e=function(){return typeof Zs=="function"},n=function(_,p,B,I){var q=4,S=l;switch(I){case i.image_compression.FAST:q=1,S=s;break;case i.image_compression.MEDIUM:q=6,S=h;break;case i.image_compression.SLOW:q=9,S=f}_=a(_,p,B,S);var M=Zs(_,{level:q});return i.__addimage__.arrayBufferToBinaryString(M)},a=function(_,p,B,I){for(var q,S,M,Z=_.length/p,ut=new Uint8Array(_.length+Z),dt=x(),Nt=0;Nt<Z;Nt+=1){if(M=Nt*p,q=_.subarray(M,M+p),I)ut.set(I(q,B,S),M+Nt);else{for(var nt,G=dt.length,vt=[];nt<G;nt+=1)vt[nt]=dt[nt](q,B,S);var bt=A(vt.concat());ut.set(vt[bt],M+Nt)}S=q}return ut},c=function(_){var p=Array.apply([],_);return p.unshift(0),p},s=function(_,p){var B,I=[],q=_.length;I[0]=1;for(var S=0;S<q;S+=1)B=_[S-p]||0,I[S+1]=_[S]-B+256&255;return I},l=function(_,p,B){var I,q=[],S=_.length;q[0]=2;for(var M=0;M<S;M+=1)I=B&&B[M]||0,q[M+1]=_[M]-I+256&255;return q},h=function(_,p,B){var I,q,S=[],M=_.length;S[0]=3;for(var Z=0;Z<M;Z+=1)I=_[Z-p]||0,q=B&&B[Z]||0,S[Z+1]=_[Z]+256-(I+q>>>1)&255;return S},f=function(_,p,B){var I,q,S,M,Z=[],ut=_.length;Z[0]=4;for(var dt=0;dt<ut;dt+=1)I=_[dt-p]||0,q=B&&B[dt]||0,S=B&&B[dt-p]||0,M=v(I,q,S),Z[dt+1]=_[dt]-M+256&255;return Z},v=function(_,p,B){if(_===p&&p===B)return _;var I=Math.abs(p-B),q=Math.abs(_-B),S=Math.abs(_+p-B-B);return I<=q&&I<=S?_:q<=S?p:B},x=function(){return[c,s,l,h,f]},A=function(_){var p=_.map(function(B){return B.reduce(function(I,q){return I+Math.abs(q)},0)});return p.indexOf(Math.min.apply(null,p))};i.processPNG=function(_,p,B,I){var q,S,M,Z,ut,dt,Nt,nt,G,vt,bt,k,F,H,z,ct=this.decode.FLATE_DECODE,st="";if(this.__addimage__.isArrayBuffer(_)&&(_=new Uint8Array(_)),this.__addimage__.isArrayBufferView(_)){if(_=(M=new fc(_)).imgData,S=M.bits,q=M.colorSpace,ut=M.colors,[4,6].indexOf(M.colorType)!==-1){if(M.bits===8){G=(nt=M.pixelBitlength==32?new Uint32Array(M.decodePixels().buffer):M.pixelBitlength==16?new Uint16Array(M.decodePixels().buffer):new Uint8Array(M.decodePixels().buffer)).length,bt=new Uint8Array(G*M.colors),vt=new Uint8Array(G);var mt,Q=M.pixelBitlength-M.bits;for(H=0,z=0;H<G;H++){for(F=nt[H],mt=0;mt<Q;)bt[z++]=F>>>mt&255,mt+=M.bits;vt[H]=F>>>mt&255}}if(M.bits===16){G=(nt=new Uint32Array(M.decodePixels().buffer)).length,bt=new Uint8Array(G*(32/M.pixelBitlength)*M.colors),vt=new Uint8Array(G*(32/M.pixelBitlength)),k=M.colors>1,H=0,z=0;for(var pt=0;H<G;)F=nt[H++],bt[z++]=F>>>0&255,k&&(bt[z++]=F>>>16&255,F=nt[H++],bt[z++]=F>>>0&255),vt[pt++]=F>>>16&255;S=8}I!==i.image_compression.NONE&&e()?(_=n(bt,M.width*M.colors,M.colors,I),Nt=n(vt,M.width,1,I)):(_=bt,Nt=vt,ct=void 0)}if(M.colorType===3&&(q=this.color_spaces.INDEXED,dt=M.palette,M.transparency.indexed)){var ot=M.transparency.indexed,Et=0;for(H=0,G=ot.length;H<G;++H)Et+=ot[H];if((Et/=255)===G-1&&ot.indexOf(0)!==-1)Z=[ot.indexOf(0)];else if(Et!==G){for(nt=M.decodePixels(),vt=new Uint8Array(nt.length),H=0,G=nt.length;H<G;H++)vt[H]=ot[nt[H]];Nt=n(vt,M.width,1)}}var L=function(j){var E;switch(j){case i.image_compression.FAST:E=11;break;case i.image_compression.MEDIUM:E=13;break;case i.image_compression.SLOW:E=14;break;default:E=12}return E}(I);return ct===this.decode.FLATE_DECODE&&(st="/Predictor "+L+" "),st+="/Colors "+ut+" /BitsPerComponent "+S+" /Columns "+M.width,(this.__addimage__.isArrayBuffer(_)||this.__addimage__.isArrayBufferView(_))&&(_=this.__addimage__.arrayBufferToBinaryString(_)),(Nt&&this.__addimage__.isArrayBuffer(Nt)||this.__addimage__.isArrayBufferView(Nt))&&(Nt=this.__addimage__.arrayBufferToBinaryString(Nt)),{alias:B,data:_,index:p,filter:ct,decodeParameters:st,transparency:Z,palette:dt,sMask:Nt,predictor:L,width:M.width,height:M.height,bitsPerComponent:S,colorSpace:q}}}})(zt.API),function(i){i.processGIF89A=function(e,n,a,c){var s=new dc(e),l=s.width,h=s.height,f=[];s.decodeAndBlitFrameRGBA(0,f);var v={data:f,width:l,height:h},x=new Ks(100).encode(v,100);return i.processJPEG.call(this,x,n,a,c)},i.processGIF87A=i.processGIF89A}(zt.API),Or.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var i=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(i);for(var e=0;e<i;e++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),c=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:c,green:a,blue:n,quad:s}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Or.prototype.parseBGR=function(){this.pos=this.offset;try{var i="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[i]()}catch(n){me.log("bit decode error:"+n)}},Or.prototype.bit1=function(){var i,e=Math.ceil(this.width/8),n=e%4;for(i=this.height-1;i>=0;i--){for(var a=this.bottom_up?i:this.height-1-i,c=0;c<e;c++)for(var s=this.datav.getUint8(this.pos++,!0),l=a*this.width*4+8*c*4,h=0;h<8&&8*c+h<this.width;h++){var f=this.palette[s>>7-h&1];this.data[l+4*h]=f.blue,this.data[l+4*h+1]=f.green,this.data[l+4*h+2]=f.red,this.data[l+4*h+3]=255}n!==0&&(this.pos+=4-n)}},Or.prototype.bit4=function(){for(var i=Math.ceil(this.width/2),e=i%4,n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,c=0;c<i;c++){var s=this.datav.getUint8(this.pos++,!0),l=a*this.width*4+2*c*4,h=s>>4,f=15&s,v=this.palette[h];if(this.data[l]=v.blue,this.data[l+1]=v.green,this.data[l+2]=v.red,this.data[l+3]=255,2*c+1>=this.width)break;v=this.palette[f],this.data[l+4]=v.blue,this.data[l+4+1]=v.green,this.data[l+4+2]=v.red,this.data[l+4+3]=255}e!==0&&(this.pos+=4-e)}},Or.prototype.bit8=function(){for(var i=this.width%4,e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,a=0;a<this.width;a++){var c=this.datav.getUint8(this.pos++,!0),s=n*this.width*4+4*a;if(c<this.palette.length){var l=this.palette[c];this.data[s]=l.red,this.data[s+1]=l.green,this.data[s+2]=l.blue,this.data[s+3]=255}else this.data[s]=255,this.data[s+1]=255,this.data[s+2]=255,this.data[s+3]=255}i!==0&&(this.pos+=4-i)}},Or.prototype.bit15=function(){for(var i=this.width%3,e=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,c=0;c<this.width;c++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(s&e)/e*255|0,h=(s>>5&e)/e*255|0,f=(s>>10&e)/e*255|0,v=s>>15?255:0,x=a*this.width*4+4*c;this.data[x]=f,this.data[x+1]=h,this.data[x+2]=l,this.data[x+3]=v}this.pos+=i}},Or.prototype.bit16=function(){for(var i=this.width%3,e=parseInt("11111",2),n=parseInt("111111",2),a=this.height-1;a>=0;a--){for(var c=this.bottom_up?a:this.height-1-a,s=0;s<this.width;s++){var l=this.datav.getUint16(this.pos,!0);this.pos+=2;var h=(l&e)/e*255|0,f=(l>>5&n)/n*255|0,v=(l>>11)/e*255|0,x=c*this.width*4+4*s;this.data[x]=v,this.data[x+1]=f,this.data[x+2]=h,this.data[x+3]=255}this.pos+=i}},Or.prototype.bit24=function(){for(var i=this.height-1;i>=0;i--){for(var e=this.bottom_up?i:this.height-1-i,n=0;n<this.width;n++){var a=this.datav.getUint8(this.pos++,!0),c=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),l=e*this.width*4+4*n;this.data[l]=s,this.data[l+1]=c,this.data[l+2]=a,this.data[l+3]=255}this.pos+=this.width%4}},Or.prototype.bit32=function(){for(var i=this.height-1;i>=0;i--)for(var e=this.bottom_up?i:this.height-1-i,n=0;n<this.width;n++){var a=this.datav.getUint8(this.pos++,!0),c=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),l=this.datav.getUint8(this.pos++,!0),h=e*this.width*4+4*n;this.data[h]=s,this.data[h+1]=c,this.data[h+2]=a,this.data[h+3]=l}},Or.prototype.getData=function(){return this.data},function(i){i.processBMP=function(e,n,a,c){var s=new Or(e,!1),l=s.width,h=s.height,f={data:s.getData(),width:l,height:h},v=new Ks(100).encode(f,100);return i.processJPEG.call(this,v,n,a,c)}}(zt.API),Xo.prototype.getData=function(){return this.data},function(i){i.processWEBP=function(e,n,a,c){var s=new Xo(e),l=s.width,h=s.height,f={data:s.getData(),width:l,height:h},v=new Ks(100).encode(f,100);return i.processJPEG.call(this,v,n,a,c)}}(zt.API),zt.API.processRGBA=function(i,e,n){for(var a=i.data,c=a.length,s=new Uint8Array(c/4*3),l=new Uint8Array(c/4),h=0,f=0,v=0;v<c;v+=4){var x=a[v],A=a[v+1],_=a[v+2],p=a[v+3];s[h++]=x,s[h++]=A,s[h++]=_,l[f++]=p}var B=this.__addimage__.arrayBufferToBinaryString(s);return{alpha:this.__addimage__.arrayBufferToBinaryString(l),data:B,index:e,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:i.width,height:i.height}},zt.API.setLanguage=function(i){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[i]!==void 0&&(this.internal.languageSettings.languageCode=i,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},vi=zt.API,Xa=vi.getCharWidthsArray=function(i,e){var n,a,c=(e=e||{}).font||this.internal.getFont(),s=e.fontSize||this.internal.getFontSize(),l=e.charSpace||this.internal.getCharSpace(),h=e.widths?e.widths:c.metadata.Unicode.widths,f=h.fof?h.fof:1,v=e.kerning?e.kerning:c.metadata.Unicode.kerning,x=v.fof?v.fof:1,A=e.doKerning!==!1,_=0,p=i.length,B=0,I=h[0]||f,q=[];for(n=0;n<p;n++)a=i.charCodeAt(n),typeof c.metadata.widthOfString=="function"?q.push((c.metadata.widthOfGlyph(c.metadata.characterToGlyph(a))+l*(1e3/s)||0)/1e3):(_=A&&ve(v[a])==="object"&&!isNaN(parseInt(v[a][B],10))?v[a][B]/x:0,q.push((h[a]||I)/f+_)),B=a;return q},Vo=vi.getStringUnitWidth=function(i,e){var n=(e=e||{}).fontSize||this.internal.getFontSize(),a=e.font||this.internal.getFont(),c=e.charSpace||this.internal.getCharSpace();return vi.processArabic&&(i=vi.processArabic(i)),typeof a.metadata.widthOfString=="function"?a.metadata.widthOfString(i,n,c)/n:Xa.apply(this,arguments).reduce(function(s,l){return s+l},0)},Go=function(i,e,n,a){for(var c=[],s=0,l=i.length,h=0;s!==l&&h+e[s]<n;)h+=e[s],s++;c.push(i.slice(0,s));var f=s;for(h=0;s!==l;)h+e[s]>a&&(c.push(i.slice(f,s)),h=0,f=s),h+=e[s],s++;return f!==s&&c.push(i.slice(f,s)),c},Jo=function(i,e,n){n||(n={});var a,c,s,l,h,f,v,x=[],A=[x],_=n.textIndent||0,p=0,B=0,I=i.split(" "),q=Xa.apply(this,[" ",n])[0];if(f=n.lineIndent===-1?I[0].length+2:n.lineIndent||0){var S=Array(f).join(" "),M=[];I.map(function(ut){(ut=ut.split(/\s*\n/)).length>1?M=M.concat(ut.map(function(dt,Nt){return(Nt&&dt.length?`
|
||
`:"")+dt})):M.push(ut[0])}),I=M,f=Vo.apply(this,[S,n])}for(s=0,l=I.length;s<l;s++){var Z=0;if(a=I[s],f&&a[0]==`
|
||
`&&(a=a.substr(1),Z=1),_+p+(B=(c=Xa.apply(this,[a,n])).reduce(function(ut,dt){return ut+dt},0))>e||Z){if(B>e){for(h=Go.apply(this,[a,c,e-(_+p),e]),x.push(h.shift()),x=[h.pop()];h.length;)A.push([h.shift()]);B=c.slice(a.length-(x[0]?x[0].length:0)).reduce(function(ut,dt){return ut+dt},0)}else x=[a];A.push(x),_=B+f,p=q}else x.push(a),_+=p+B,p=q}return v=f?function(ut,dt){return(dt?S:"")+ut.join(" ")}:function(ut){return ut.join(" ")},A.map(v)},vi.splitTextToSize=function(i,e,n){var a,c=(n=n||{}).fontSize||this.internal.getFontSize(),s=(function(x){if(x.widths&&x.kerning)return{widths:x.widths,kerning:x.kerning};var A=this.internal.getFont(x.fontName,x.fontStyle);return A.metadata.Unicode?{widths:A.metadata.Unicode.widths||{0:1},kerning:A.metadata.Unicode.kerning||{}}:{font:A.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);a=Array.isArray(i)?i:String(i).split(/\r?\n/);var l=1*this.internal.scaleFactor*e/c;s.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/c:0,s.lineIndent=n.lineIndent;var h,f,v=[];for(h=0,f=a.length;h<f;h++)v=v.concat(Jo.apply(this,[a[h],l,s]));return v},function(i){i.__fontmetrics__=i.__fontmetrics__||{};for(var e="klmnopqrstuvwxyz",n={},a={},c=0;c<e.length;c++)n[e[c]]="0123456789abcdef"[c],a["0123456789abcdef"[c]]=e[c];var s=function(A){return"0x"+parseInt(A,10).toString(16)},l=i.__fontmetrics__.compress=function(A){var _,p,B,I,q=["{"];for(var S in A){if(_=A[S],isNaN(parseInt(S,10))?p="'"+S+"'":(S=parseInt(S,10),p=(p=s(S).slice(2)).slice(0,-1)+a[p.slice(-1)]),typeof _=="number")_<0?(B=s(_).slice(3),I="-"):(B=s(_).slice(2),I=""),B=I+B.slice(0,-1)+a[B.slice(-1)];else{if(ve(_)!=="object")throw new Error("Don't know what to do with value type "+ve(_)+".");B=l(_)}q.push(p+B)}return q.push("}"),q.join("")},h=i.__fontmetrics__.uncompress=function(A){if(typeof A!="string")throw new Error("Invalid argument passed to uncompress.");for(var _,p,B,I,q={},S=1,M=q,Z=[],ut="",dt="",Nt=A.length-1,nt=1;nt<Nt;nt+=1)(I=A[nt])=="'"?_?(B=_.join(""),_=void 0):_=[]:_?_.push(I):I=="{"?(Z.push([M,B]),M={},B=void 0):I=="}"?((p=Z.pop())[0][p[1]]=M,B=void 0,M=p[0]):I=="-"?S=-1:B===void 0?n.hasOwnProperty(I)?(ut+=n[I],B=parseInt(ut,16)*S,S=1,ut=""):ut+=I:n.hasOwnProperty(I)?(dt+=n[I],M[B]=parseInt(dt,16)*S,S=1,B=void 0,dt=""):dt+=I;return q},f={codePages:["WinAnsiEncoding"],WinAnsiEncoding:h("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},v={Unicode:{Courier:f,"Courier-Bold":f,"Courier-BoldOblique":f,"Courier-Oblique":f,Helvetica:f,"Helvetica-Bold":f,"Helvetica-BoldOblique":f,"Helvetica-Oblique":f,"Times-Roman":f,"Times-Bold":f,"Times-BoldItalic":f,"Times-Italic":f}},x={Unicode:{"Courier-Oblique":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":h("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":h("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":h("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:h("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:h("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":h("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:h("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":h("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":h("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":h("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};i.events.push(["addFont",function(A){var _=A.font,p=x.Unicode[_.postScriptName];p&&(_.metadata.Unicode={},_.metadata.Unicode.widths=p.widths,_.metadata.Unicode.kerning=p.kerning);var B=v.Unicode[_.postScriptName];B&&(_.metadata.Unicode.encoding=B,_.encoding=B.codePages[0])}])}(zt.API),function(i){var e=function(n){for(var a=n.length,c=new Uint8Array(a),s=0;s<a;s++)c[s]=n.charCodeAt(s);return c};i.API.events.push(["addFont",function(n){var a=void 0,c=n.font,s=n.instance;if(!c.isStandardFont){if(s===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+c.postScriptName+"').");if(typeof(a=s.existsFileInVFS(c.postScriptName)===!1?s.loadFile(c.postScriptName):s.getFileFromVFS(c.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+c.postScriptName+"').");(function(l,h){h=/^\x00\x01\x00\x00/.test(h)?e(h):e(ea(h)),l.metadata=i.API.TTFFont.open(h),l.metadata.Unicode=l.metadata.Unicode||{encoding:{},kerning:{},widths:[]},l.metadata.glyIdsUsed=[0]})(c,a)}}])}(zt),function(i){function e(){return(Ut.canvg?Promise.resolve(Ut.canvg):$s(()=>import("./index.es-B80J6h3Q.js"),__vite__mapDeps([0,1,2]),import.meta.url)).catch(function(n){return Promise.reject(new Error("Could not load canvg: "+n))}).then(function(n){return n.default?n.default:n})}zt.API.addSvgAsImage=function(n,a,c,s,l,h,f,v){if(isNaN(a)||isNaN(c))throw me.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(s)||isNaN(l))throw me.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var x=document.createElement("canvas");x.width=s,x.height=l;var A=x.getContext("2d");A.fillStyle="#fff",A.fillRect(0,0,x.width,x.height);var _={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},p=this;return e().then(function(B){return B.fromString(A,n,_)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(B){return B.render(_)}).then(function(){p.addImage(x.toDataURL("image/jpeg",1),a,c,s,l,f,v)})}}(),zt.API.putTotalPages=function(i){var e,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(i,"g"),n=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(i,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var a=1;a<=this.internal.getNumberOfPages();a++)for(var c=0;c<this.internal.pages[a].length;c++)this.internal.pages[a][c]=this.internal.pages[a][c].replace(e,n);return this},zt.API.viewerPreferences=function(i,e){var n;i=i||{},e=e||!1;var a,c,s,l={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},h=Object.keys(l),f=[],v=0,x=0,A=0;function _(B,I){var q,S=!1;for(q=0;q<B.length;q+=1)B[q]===I&&(S=!0);return S}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(l)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,i==="reset"||e===!0){var p=h.length;for(A=0;A<p;A+=1)n[h[A]].value=n[h[A]].defaultValue,n[h[A]].explicitSet=!1}if(ve(i)==="object"){for(c in i)if(s=i[c],_(h,c)&&s!==void 0){if(n[c].type==="boolean"&&typeof s=="boolean")n[c].value=s;else if(n[c].type==="name"&&_(n[c].valueSet,s))n[c].value=s;else if(n[c].type==="integer"&&Number.isInteger(s))n[c].value=s;else if(n[c].type==="array"){for(v=0;v<s.length;v+=1)if(a=!0,s[v].length===1&&typeof s[v][0]=="number")f.push(String(s[v]-1));else if(s[v].length>1){for(x=0;x<s[v].length;x+=1)typeof s[v][x]!="number"&&(a=!1);a===!0&&f.push([s[v][0]-1,s[v][1]-1].join(" "))}n[c].value="["+f.join(" ")+"]"}else n[c].value=n[c].defaultValue;n[c].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var B,I=[];for(B in n)n[B].explicitSet===!0&&(n[B].type==="name"?I.push("/"+B+" /"+n[B].value):I.push("/"+B+" "+n[B].value));I.length!==0&&this.internal.write(`/ViewerPreferences
|
||
<<
|
||
`+I.join(`
|
||
`)+`
|
||
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},function(i){var e=function(){var a='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',c=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),s=unescape(encodeURIComponent(a)),l=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),h=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),f=unescape(encodeURIComponent("</x:xmpmeta>")),v=s.length+l.length+h.length+c.length+f.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+v+" >>"),this.internal.write("stream"),this.internal.write(c+s+l+h+f),this.internal.write("endstream"),this.internal.write("endobj")},n=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};i.addMetadata=function(a,c){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:a,namespaceuri:c||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",n),this.internal.events.subscribe("postPutResources",e)),this}}(zt.API),function(i){var e=i.API,n=e.pdfEscape16=function(s,l){for(var h,f=l.metadata.Unicode.widths,v=["","0","00","000","0000"],x=[""],A=0,_=s.length;A<_;++A){if(h=l.metadata.characterToGlyph(s.charCodeAt(A)),l.metadata.glyIdsUsed.push(h),l.metadata.toUnicode[h]=s.charCodeAt(A),f.indexOf(h)==-1&&(f.push(h),f.push([parseInt(l.metadata.widthOfGlyph(h),10)])),h=="0")return x.join("");h=h.toString(16),x.push(v[4-h.length],h)}return x.join("")},a=function(s){var l,h,f,v,x,A,_;for(x=`/CIDInit /ProcSet findresource begin
|
||
12 dict begin
|
||
begincmap
|
||
/CIDSystemInfo <<
|
||
/Registry (Adobe)
|
||
/Ordering (UCS)
|
||
/Supplement 0
|
||
>> def
|
||
/CMapName /Adobe-Identity-UCS def
|
||
/CMapType 2 def
|
||
1 begincodespacerange
|
||
<0000><ffff>
|
||
endcodespacerange`,f=[],A=0,_=(h=Object.keys(s).sort(function(p,B){return p-B})).length;A<_;A++)l=h[A],f.length>=100&&(x+=`
|
||
`+f.length+` beginbfchar
|
||
`+f.join(`
|
||
`)+`
|
||
endbfchar`,f=[]),s[l]!==void 0&&s[l]!==null&&typeof s[l].toString=="function"&&(v=("0000"+s[l].toString(16)).slice(-4),l=("0000"+(+l).toString(16)).slice(-4),f.push("<"+l+"><"+v+">"));return f.length&&(x+=`
|
||
`+f.length+` beginbfchar
|
||
`+f.join(`
|
||
`)+`
|
||
endbfchar
|
||
`),x+=`endcmap
|
||
CMapName currentdict /CMap defineresource pop
|
||
end
|
||
end`};e.events.push(["putFont",function(s){(function(l){var h=l.font,f=l.out,v=l.newObject,x=l.putStream;if(h.metadata instanceof i.API.TTFFont&&h.encoding==="Identity-H"){for(var A=h.metadata.Unicode.widths,_=h.metadata.subset.encode(h.metadata.glyIdsUsed,1),p="",B=0;B<_.length;B++)p+=String.fromCharCode(_[B]);var I=v();x({data:p,addLength1:!0,objectId:I}),f("endobj");var q=v();x({data:a(h.metadata.toUnicode),addLength1:!0,objectId:q}),f("endobj");var S=v();f("<<"),f("/Type /FontDescriptor"),f("/FontName /"+yi(h.fontName)),f("/FontFile2 "+I+" 0 R"),f("/FontBBox "+i.API.PDFObject.convert(h.metadata.bbox)),f("/Flags "+h.metadata.flags),f("/StemV "+h.metadata.stemV),f("/ItalicAngle "+h.metadata.italicAngle),f("/Ascent "+h.metadata.ascender),f("/Descent "+h.metadata.decender),f("/CapHeight "+h.metadata.capHeight),f(">>"),f("endobj");var M=v();f("<<"),f("/Type /Font"),f("/BaseFont /"+yi(h.fontName)),f("/FontDescriptor "+S+" 0 R"),f("/W "+i.API.PDFObject.convert(A)),f("/CIDToGIDMap /Identity"),f("/DW 1000"),f("/Subtype /CIDFontType2"),f("/CIDSystemInfo"),f("<<"),f("/Supplement 0"),f("/Registry (Adobe)"),f("/Ordering ("+h.encoding+")"),f(">>"),f(">>"),f("endobj"),h.objectNumber=v(),f("<<"),f("/Type /Font"),f("/Subtype /Type0"),f("/ToUnicode "+q+" 0 R"),f("/BaseFont /"+yi(h.fontName)),f("/Encoding /"+h.encoding),f("/DescendantFonts ["+M+" 0 R]"),f(">>"),f("endobj"),h.isAlreadyPutted=!0}})(s)}]),e.events.push(["putFont",function(s){(function(l){var h=l.font,f=l.out,v=l.newObject,x=l.putStream;if(h.metadata instanceof i.API.TTFFont&&h.encoding==="WinAnsiEncoding"){for(var A=h.metadata.rawData,_="",p=0;p<A.length;p++)_+=String.fromCharCode(A[p]);var B=v();x({data:_,addLength1:!0,objectId:B}),f("endobj");var I=v();x({data:a(h.metadata.toUnicode),addLength1:!0,objectId:I}),f("endobj");var q=v();f("<<"),f("/Descent "+h.metadata.decender),f("/CapHeight "+h.metadata.capHeight),f("/StemV "+h.metadata.stemV),f("/Type /FontDescriptor"),f("/FontFile2 "+B+" 0 R"),f("/Flags 96"),f("/FontBBox "+i.API.PDFObject.convert(h.metadata.bbox)),f("/FontName /"+yi(h.fontName)),f("/ItalicAngle "+h.metadata.italicAngle),f("/Ascent "+h.metadata.ascender),f(">>"),f("endobj"),h.objectNumber=v();for(var S=0;S<h.metadata.hmtx.widths.length;S++)h.metadata.hmtx.widths[S]=parseInt(h.metadata.hmtx.widths[S]*(1e3/h.metadata.head.unitsPerEm));f("<</Subtype/TrueType/Type/Font/ToUnicode "+I+" 0 R/BaseFont/"+yi(h.fontName)+"/FontDescriptor "+q+" 0 R/Encoding/"+h.encoding+" /FirstChar 29 /LastChar 255 /Widths "+i.API.PDFObject.convert(h.metadata.hmtx.widths)+">>"),f("endobj"),h.isAlreadyPutted=!0}})(s)}]);var c=function(s){var l,h=s.text||"",f=s.x,v=s.y,x=s.options||{},A=s.mutex||{},_=A.pdfEscape,p=A.activeFontKey,B=A.fonts,I=p,q="",S=0,M="",Z=B[I].encoding;if(B[I].encoding!=="Identity-H")return{text:h,x:f,y:v,options:x,mutex:A};for(M=h,I=p,Array.isArray(h)&&(M=h[0]),S=0;S<M.length;S+=1)B[I].metadata.hasOwnProperty("cmap")&&(l=B[I].metadata.cmap.unicode.codeMap[M[S].charCodeAt(0)]),l||M[S].charCodeAt(0)<256&&B[I].metadata.hasOwnProperty("Unicode")?q+=M[S]:q+="";var ut="";return parseInt(I.slice(1))<14||Z==="WinAnsiEncoding"?ut=_(q,I).split("").map(function(dt){return dt.charCodeAt(0).toString(16)}).join(""):Z==="Identity-H"&&(ut=n(q,B[I])),A.isHex=!0,{text:ut,x:f,y:v,options:x,mutex:A}};e.events.push(["postProcessText",function(s){var l=s.text||"",h=[],f={text:l,x:s.x,y:s.y,options:s.options,mutex:s.mutex};if(Array.isArray(l)){var v=0;for(v=0;v<l.length;v+=1)Array.isArray(l[v])&&l[v].length===3?h.push([c(Object.assign({},f,{text:l[v][0]})).text,l[v][1],l[v][2]]):h.push(c(Object.assign({},f,{text:l[v]})).text);s.text=h}else s.text=c(Object.assign({},f,{text:l})).text}])}(zt),function(i){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};i.existsFileInVFS=function(n){return e.call(this),this.internal.vFS[n]!==void 0},i.addFileToVFS=function(n,a){return e.call(this),this.internal.vFS[n]=a,this},i.getFileFromVFS=function(n){return e.call(this),this.internal.vFS[n]!==void 0?this.internal.vFS[n]:null}}(zt.API),function(i){i.__bidiEngine__=i.prototype.__bidiEngine__=function(a){var c,s,l,h,f,v,x,A=e,_=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],p=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],B={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},I={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},q=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],S=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),M=!1,Z=0;this.__bidiEngine__={};var ut=function(k){var F=k.charCodeAt(),H=F>>8,z=I[H];return z!==void 0?A[256*z+(255&F)]:H===252||H===253?"AL":S.test(H)?"L":H===8?"R":"N"},dt=function(k){for(var F,H=0;H<k.length;H++){if((F=ut(k.charAt(H)))==="L")return!1;if(F==="R")return!0}return!1},Nt=function(k,F,H,z){var ct,st,mt,Q,pt=F[z];switch(pt){case"L":case"R":M=!1;break;case"N":case"AN":break;case"EN":M&&(pt="AN");break;case"AL":M=!0,pt="R";break;case"WS":pt="N";break;case"CS":z<1||z+1>=F.length||(ct=H[z-1])!=="EN"&&ct!=="AN"||(st=F[z+1])!=="EN"&&st!=="AN"?pt="N":M&&(st="AN"),pt=st===ct?st:"N";break;case"ES":pt=(ct=z>0?H[z-1]:"B")==="EN"&&z+1<F.length&&F[z+1]==="EN"?"EN":"N";break;case"ET":if(z>0&&H[z-1]==="EN"){pt="EN";break}if(M){pt="N";break}for(mt=z+1,Q=F.length;mt<Q&&F[mt]==="ET";)mt++;pt=mt<Q&&F[mt]==="EN"?"EN":"N";break;case"NSM":if(l&&!h){for(Q=F.length,mt=z+1;mt<Q&&F[mt]==="NSM";)mt++;if(mt<Q){var ot=k[z],Et=ot>=1425&&ot<=2303||ot===64286;if(ct=F[mt],Et&&(ct==="R"||ct==="AL")){pt="R";break}}}pt=z<1||(ct=F[z-1])==="B"?"N":H[z-1];break;case"B":M=!1,c=!0,pt=Z;break;case"S":s=!0,pt="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":M=!1;break;case"BN":pt="N"}return pt},nt=function(k,F,H){var z=k.split("");return H&&G(z,H,{hiLevel:Z}),z.reverse(),F&&F.reverse(),z.join("")},G=function(k,F,H){var z,ct,st,mt,Q,pt=-1,ot=k.length,Et=0,L=[],j=Z?p:_,E=[];for(M=!1,c=!1,s=!1,ct=0;ct<ot;ct++)E[ct]=ut(k[ct]);for(st=0;st<ot;st++){if(Q=Et,L[st]=Nt(k,E,L,st),z=240&(Et=j[Q][B[L[st]]]),Et&=15,F[st]=mt=j[Et][5],z>0)if(z===16){for(ct=pt;ct<st;ct++)F[ct]=1;pt=-1}else pt=-1;if(j[Et][6])pt===-1&&(pt=st);else if(pt>-1){for(ct=pt;ct<st;ct++)F[ct]=mt;pt=-1}E[st]==="B"&&(F[st]=0),H.hiLevel|=mt}s&&function(W,J,$){for(var et=0;et<$;et++)if(W[et]==="S"){J[et]=Z;for(var tt=et-1;tt>=0&&W[tt]==="WS";tt--)J[tt]=Z}}(E,F,ot)},vt=function(k,F,H,z,ct){if(!(ct.hiLevel<k)){if(k===1&&Z===1&&!c)return F.reverse(),void(H&&H.reverse());for(var st,mt,Q,pt,ot=F.length,Et=0;Et<ot;){if(z[Et]>=k){for(Q=Et+1;Q<ot&&z[Q]>=k;)Q++;for(pt=Et,mt=Q-1;pt<mt;pt++,mt--)st=F[pt],F[pt]=F[mt],F[mt]=st,H&&(st=H[pt],H[pt]=H[mt],H[mt]=st);Et=Q}Et++}}},bt=function(k,F,H){var z=k.split(""),ct={hiLevel:Z};return H||(H=[]),G(z,H,ct),function(st,mt,Q){if(Q.hiLevel!==0&&x)for(var pt,ot=0;ot<st.length;ot++)mt[ot]===1&&(pt=q.indexOf(st[ot]))>=0&&(st[ot]=q[pt+1])}(z,H,ct),vt(2,z,F,H,ct),vt(1,z,F,H,ct),z.join("")};return this.__bidiEngine__.doBidiReorder=function(k,F,H){if(function(ct,st){if(st)for(var mt=0;mt<ct.length;mt++)st[mt]=mt;h===void 0&&(h=dt(ct)),v===void 0&&(v=dt(ct))}(k,F),l||!f||v)if(l&&f&&h^v)Z=h?1:0,k=nt(k,F,H);else if(!l&&f&&v)Z=h?1:0,k=bt(k,F,H),k=nt(k,F);else if(!l||h||f||v){if(l&&!f&&h^v)k=nt(k,F),h?(Z=0,k=bt(k,F,H)):(Z=1,k=bt(k,F,H),k=nt(k,F));else if(l&&h&&!f&&v)Z=1,k=bt(k,F,H),k=nt(k,F);else if(!l&&!f&&h^v){var z=x;h?(Z=1,k=bt(k,F,H),Z=0,x=!1,k=bt(k,F,H),x=z):(Z=0,k=bt(k,F,H),k=nt(k,F),Z=1,x=!1,k=bt(k,F,H),x=z,k=nt(k,F))}}else Z=0,k=bt(k,F,H);else Z=h?1:0,k=bt(k,F,H);return k},this.__bidiEngine__.setOptions=function(k){k&&(l=k.isInputVisual,f=k.isOutputVisual,h=k.isInputRtl,v=k.isOutputRtl,x=k.isSymmetricSwapping)},this.__bidiEngine__.setOptions(a),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],n=new i.__bidiEngine__({isInputVisual:!0});i.API.events.push(["postProcessText",function(a){var c=a.text;a.x,a.y;var s=a.options||{};a.mutex,s.lang;var l=[];if(s.isInputVisual=typeof s.isInputVisual!="boolean"||s.isInputVisual,n.setOptions(s),Object.prototype.toString.call(c)==="[object Array]"){var h=0;for(l=[],h=0;h<c.length;h+=1)Object.prototype.toString.call(c[h])==="[object Array]"?l.push([n.doBidiReorder(c[h][0]),c[h][1],c[h][2]]):l.push([n.doBidiReorder(c[h])]);a.text=l}else a.text=n.doBidiReorder(c);n.setOptions({isInputVisual:!0})}])}(zt),zt.API.TTFFont=function(){function i(e){var n;if(this.rawData=e,n=this.contents=new An(e),this.contents.pos=4,n.readString(4)==="ttcf")throw new Error("TTCF not supported.");n.pos=0,this.parse(),this.subset=new kc(this),this.registerTTF()}return i.open=function(e){return new i(e)},i.prototype.parse=function(){return this.directory=new pc(this.contents),this.head=new mc(this),this.name=new Lc(this),this.cmap=new ou(this),this.toUnicode={},this.hhea=new vc(this),this.maxp=new Nc(this),this.hmtx=new Ac(this),this.post=new yc(this),this.os2=new bc(this),this.loca=new Pc(this),this.glyf=new xc(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},i.prototype.registerTTF=function(){var e,n,a,c,s;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var l,h,f,v;for(v=[],l=0,h=(f=this.bbox).length;l<h;l++)e=f[l],v.push(Math.round(e*this.scaleFactor));return v}).call(this),this.stemV=0,this.post.exists?(a=255&(c=this.post.italic_angle),(32768&(n=c>>16))!=0&&(n=-(1+(65535^n))),this.italicAngle=+(n+"."+a)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(s=this.familyClass)===1||s===2||s===3||s===4||s===5||s===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},i.prototype.characterToGlyph=function(e){var n;return((n=this.cmap.unicode)!=null?n.codeMap[e]:void 0)||0},i.prototype.widthOfGlyph=function(e){var n;return n=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*n},i.prototype.widthOfString=function(e,n,a){var c,s,l,h;for(l=0,s=0,h=(e=""+e).length;0<=h?s<h:s>h;s=0<=h?++s:--s)c=e.charCodeAt(s),l+=this.widthOfGlyph(this.characterToGlyph(c))+a*(1e3/n)||0;return l*(n/1e3)},i.prototype.lineHeight=function(e,n){var a;return n==null&&(n=!1),a=n?this.lineGap:0,(this.ascender+a-this.decender)/1e3*e},i}();var Mr,An=function(){function i(e){this.data=e??[],this.pos=0,this.length=this.data.length}return i.prototype.readByte=function(){return this.data[this.pos++]},i.prototype.writeByte=function(e){return this.data[this.pos++]=e},i.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},i.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},i.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},i.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},i.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},i.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},i.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},i.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},i.prototype.readString=function(e){var n,a;for(a=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)a[n]=String.fromCharCode(this.readByte());return a.join("")},i.prototype.writeString=function(e){var n,a,c;for(c=[],n=0,a=e.length;0<=a?n<a:n>a;n=0<=a?++n:--n)c.push(this.writeByte(e.charCodeAt(n)));return c},i.prototype.readShort=function(){return this.readInt16()},i.prototype.writeShort=function(e){return this.writeInt16(e)},i.prototype.readLongLong=function(){var e,n,a,c,s,l,h,f;return e=this.readByte(),n=this.readByte(),a=this.readByte(),c=this.readByte(),s=this.readByte(),l=this.readByte(),h=this.readByte(),f=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^n)+1099511627776*(255^a)+4294967296*(255^c)+16777216*(255^s)+65536*(255^l)+256*(255^h)+(255^f)+1):72057594037927940*e+281474976710656*n+1099511627776*a+4294967296*c+16777216*s+65536*l+256*h+f},i.prototype.writeLongLong=function(e){var n,a;return n=Math.floor(e/4294967296),a=4294967295&e,this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n),this.writeByte(a>>24&255),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(255&a)},i.prototype.readInt=function(){return this.readInt32()},i.prototype.writeInt=function(e){return this.writeInt32(e)},i.prototype.read=function(e){var n,a;for(n=[],a=0;0<=e?a<e:a>e;a=0<=e?++a:--a)n.push(this.readByte());return n},i.prototype.write=function(e){var n,a,c,s;for(s=[],a=0,c=e.length;a<c;a++)n=e[a],s.push(this.writeByte(n));return s},i}(),pc=function(){var i;function e(n){var a,c,s;for(this.scalarType=n.readInt(),this.tableCount=n.readShort(),this.searchRange=n.readShort(),this.entrySelector=n.readShort(),this.rangeShift=n.readShort(),this.tables={},c=0,s=this.tableCount;0<=s?c<s:c>s;c=0<=s?++c:--c)a={tag:n.readString(4),checksum:n.readInt(),offset:n.readInt(),length:n.readInt()},this.tables[a.tag]=a}return e.prototype.encode=function(n){var a,c,s,l,h,f,v,x,A,_,p,B,I;for(I in p=Object.keys(n).length,f=Math.log(2),A=16*Math.floor(Math.log(p)/f),l=Math.floor(A/f),x=16*p-A,(c=new An).writeInt(this.scalarType),c.writeShort(p),c.writeShort(A),c.writeShort(l),c.writeShort(x),s=16*p,v=c.pos+s,h=null,B=[],n)for(_=n[I],c.writeString(I),c.writeInt(i(_)),c.writeInt(v),c.writeInt(_.length),B=B.concat(_),I==="head"&&(h=v),v+=_.length;v%4;)B.push(0),v++;return c.write(B),a=2981146554-i(c.data),c.pos=h+8,c.writeUInt32(a),c.data},i=function(n){var a,c,s,l;for(n=uu.call(n);n.length%4;)n.push(0);for(s=new An(n),c=0,a=0,l=n.length;a<l;a=a+=4)c+=s.readUInt32();return 4294967295&c},e}(),gc={}.hasOwnProperty,Yr=function(i,e){for(var n in e)gc.call(e,n)&&(i[n]=e[n]);function a(){this.constructor=i}return a.prototype=e.prototype,i.prototype=new a,i.__super__=e.prototype,i};Mr=function(){function i(e){var n;this.file=e,n=this.file.directory.tables[this.tag],this.exists=!!n,n&&(this.offset=n.offset,this.length=n.length,this.parse(this.file.contents))}return i.prototype.parse=function(){},i.prototype.encode=function(){},i.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},i}();var mc=function(i){function e(){return e.__super__.constructor.apply(this,arguments)}return Yr(e,Mr),e.prototype.tag="head",e.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.revision=n.readInt(),this.checkSumAdjustment=n.readInt(),this.magicNumber=n.readInt(),this.flags=n.readShort(),this.unitsPerEm=n.readShort(),this.created=n.readLongLong(),this.modified=n.readLongLong(),this.xMin=n.readShort(),this.yMin=n.readShort(),this.xMax=n.readShort(),this.yMax=n.readShort(),this.macStyle=n.readShort(),this.lowestRecPPEM=n.readShort(),this.fontDirectionHint=n.readShort(),this.indexToLocFormat=n.readShort(),this.glyphDataFormat=n.readShort()},e.prototype.encode=function(n){var a;return(a=new An).writeInt(this.version),a.writeInt(this.revision),a.writeInt(this.checkSumAdjustment),a.writeInt(this.magicNumber),a.writeShort(this.flags),a.writeShort(this.unitsPerEm),a.writeLongLong(this.created),a.writeLongLong(this.modified),a.writeShort(this.xMin),a.writeShort(this.yMin),a.writeShort(this.xMax),a.writeShort(this.yMax),a.writeShort(this.macStyle),a.writeShort(this.lowestRecPPEM),a.writeShort(this.fontDirectionHint),a.writeShort(n),a.writeShort(this.glyphDataFormat),a.data},e}(),Ko=function(){function i(e,n){var a,c,s,l,h,f,v,x,A,_,p,B,I,q,S,M,Z;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=n+e.readInt(),A=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(f=0;f<256;++f)this.codeMap[f]=e.readByte();break;case 4:for(p=e.readUInt16(),_=p/2,e.pos+=6,s=function(){var ut,dt;for(dt=[],f=ut=0;0<=_?ut<_:ut>_;f=0<=_?++ut:--ut)dt.push(e.readUInt16());return dt}(),e.pos+=2,I=function(){var ut,dt;for(dt=[],f=ut=0;0<=_?ut<_:ut>_;f=0<=_?++ut:--ut)dt.push(e.readUInt16());return dt}(),v=function(){var ut,dt;for(dt=[],f=ut=0;0<=_?ut<_:ut>_;f=0<=_?++ut:--ut)dt.push(e.readUInt16());return dt}(),x=function(){var ut,dt;for(dt=[],f=ut=0;0<=_?ut<_:ut>_;f=0<=_?++ut:--ut)dt.push(e.readUInt16());return dt}(),c=(this.length-e.pos+this.offset)/2,h=function(){var ut,dt;for(dt=[],f=ut=0;0<=c?ut<c:ut>c;f=0<=c?++ut:--ut)dt.push(e.readUInt16());return dt}(),f=S=0,Z=s.length;S<Z;f=++S)for(q=s[f],a=M=B=I[f];B<=q?M<=q:M>=q;a=B<=q?++M:--M)x[f]===0?l=a+v[f]:(l=h[x[f]/2+(a-B)-(_-f)]||0)!==0&&(l+=v[f]),this.codeMap[a]=65535&l}e.pos=A}return i.encode=function(e,n){var a,c,s,l,h,f,v,x,A,_,p,B,I,q,S,M,Z,ut,dt,Nt,nt,G,vt,bt,k,F,H,z,ct,st,mt,Q,pt,ot,Et,L,j,E,W,J,$,et,tt,At,Lt,Ot;switch(z=new An,l=Object.keys(e).sort(function(jt,Wt){return jt-Wt}),n){case"macroman":for(I=0,q=function(){var jt=[];for(B=0;B<256;++B)jt.push(0);return jt}(),M={0:0},s={},ct=0,pt=l.length;ct<pt;ct++)M[tt=e[c=l[ct]]]==null&&(M[tt]=++I),s[c]={old:e[c],new:M[e[c]]},q[c]=M[e[c]];return z.writeUInt16(1),z.writeUInt16(0),z.writeUInt32(12),z.writeUInt16(0),z.writeUInt16(262),z.writeUInt16(0),z.write(q),{charMap:s,subtable:z.data,maxGlyphID:I+1};case"unicode":for(F=[],A=[],Z=0,M={},a={},S=v=null,st=0,ot=l.length;st<ot;st++)M[dt=e[c=l[st]]]==null&&(M[dt]=++Z),a[c]={old:dt,new:M[dt]},h=M[dt]-c,S!=null&&h===v||(S&&A.push(S),F.push(c),v=h),S=c;for(S&&A.push(S),A.push(65535),F.push(65535),bt=2*(vt=F.length),G=2*Math.pow(Math.log(vt)/Math.LN2,2),_=Math.log(G/2)/Math.LN2,nt=2*vt-G,f=[],Nt=[],p=[],B=mt=0,Et=F.length;mt<Et;B=++mt){if(k=F[B],x=A[B],k===65535){f.push(0),Nt.push(0);break}if(k-(H=a[k].new)>=32768)for(f.push(0),Nt.push(2*(p.length+vt-B)),c=Q=k;k<=x?Q<=x:Q>=x;c=k<=x?++Q:--Q)p.push(a[c].new);else f.push(H-k),Nt.push(0)}for(z.writeUInt16(3),z.writeUInt16(1),z.writeUInt32(12),z.writeUInt16(4),z.writeUInt16(16+8*vt+2*p.length),z.writeUInt16(0),z.writeUInt16(bt),z.writeUInt16(G),z.writeUInt16(_),z.writeUInt16(nt),$=0,L=A.length;$<L;$++)c=A[$],z.writeUInt16(c);for(z.writeUInt16(0),et=0,j=F.length;et<j;et++)c=F[et],z.writeUInt16(c);for(At=0,E=f.length;At<E;At++)h=f[At],z.writeUInt16(h);for(Lt=0,W=Nt.length;Lt<W;Lt++)ut=Nt[Lt],z.writeUInt16(ut);for(Ot=0,J=p.length;Ot<J;Ot++)I=p[Ot],z.writeUInt16(I);return{charMap:a,subtable:z.data,maxGlyphID:Z+1}}},i}(),ou=function(i){function e(){return e.__super__.constructor.apply(this,arguments)}return Yr(e,Mr),e.prototype.tag="cmap",e.prototype.parse=function(n){var a,c,s;for(n.pos=this.offset,this.version=n.readUInt16(),s=n.readUInt16(),this.tables=[],this.unicode=null,c=0;0<=s?c<s:c>s;c=0<=s?++c:--c)a=new Ko(n,this.offset),this.tables.push(a),a.isUnicode&&this.unicode==null&&(this.unicode=a);return!0},e.encode=function(n,a){var c,s;return a==null&&(a="macroman"),c=Ko.encode(n,a),(s=new An).writeUInt16(0),s.writeUInt16(1),c.table=s.data.concat(c.subtable),c},e}(),vc=function(i){function e(){return e.__super__.constructor.apply(this,arguments)}return Yr(e,Mr),e.prototype.tag="hhea",e.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.ascender=n.readShort(),this.decender=n.readShort(),this.lineGap=n.readShort(),this.advanceWidthMax=n.readShort(),this.minLeftSideBearing=n.readShort(),this.minRightSideBearing=n.readShort(),this.xMaxExtent=n.readShort(),this.caretSlopeRise=n.readShort(),this.caretSlopeRun=n.readShort(),this.caretOffset=n.readShort(),n.pos+=8,this.metricDataFormat=n.readShort(),this.numberOfMetrics=n.readUInt16()},e}(),bc=function(i){function e(){return e.__super__.constructor.apply(this,arguments)}return Yr(e,Mr),e.prototype.tag="OS/2",e.prototype.parse=function(n){if(n.pos=this.offset,this.version=n.readUInt16(),this.averageCharWidth=n.readShort(),this.weightClass=n.readUInt16(),this.widthClass=n.readUInt16(),this.type=n.readShort(),this.ySubscriptXSize=n.readShort(),this.ySubscriptYSize=n.readShort(),this.ySubscriptXOffset=n.readShort(),this.ySubscriptYOffset=n.readShort(),this.ySuperscriptXSize=n.readShort(),this.ySuperscriptYSize=n.readShort(),this.ySuperscriptXOffset=n.readShort(),this.ySuperscriptYOffset=n.readShort(),this.yStrikeoutSize=n.readShort(),this.yStrikeoutPosition=n.readShort(),this.familyClass=n.readShort(),this.panose=function(){var a,c;for(c=[],a=0;a<10;++a)c.push(n.readByte());return c}(),this.charRange=function(){var a,c;for(c=[],a=0;a<4;++a)c.push(n.readInt());return c}(),this.vendorID=n.readString(4),this.selection=n.readShort(),this.firstCharIndex=n.readShort(),this.lastCharIndex=n.readShort(),this.version>0&&(this.ascent=n.readShort(),this.descent=n.readShort(),this.lineGap=n.readShort(),this.winAscent=n.readShort(),this.winDescent=n.readShort(),this.codePageRange=function(){var a,c;for(c=[],a=0;a<2;a=++a)c.push(n.readInt());return c}(),this.version>1))return this.xHeight=n.readShort(),this.capHeight=n.readShort(),this.defaultChar=n.readShort(),this.breakChar=n.readShort(),this.maxContext=n.readShort()},e}(),yc=function(i){function e(){return e.__super__.constructor.apply(this,arguments)}return Yr(e,Mr),e.prototype.tag="post",e.prototype.parse=function(n){var a,c,s;switch(n.pos=this.offset,this.format=n.readInt(),this.italicAngle=n.readInt(),this.underlinePosition=n.readShort(),this.underlineThickness=n.readShort(),this.isFixedPitch=n.readInt(),this.minMemType42=n.readInt(),this.maxMemType42=n.readInt(),this.minMemType1=n.readInt(),this.maxMemType1=n.readInt(),this.format){case 65536:break;case 131072:var l;for(c=n.readUInt16(),this.glyphNameIndex=[],l=0;0<=c?l<c:l>c;l=0<=c?++l:--l)this.glyphNameIndex.push(n.readUInt16());for(this.names=[],s=[];n.pos<this.offset+this.length;)a=n.readByte(),s.push(this.names.push(n.readString(a)));return s;case 151552:return c=n.readUInt16(),this.offsets=n.read(c);case 196608:break;case 262144:return this.map=(function(){var h,f,v;for(v=[],l=h=0,f=this.file.maxp.numGlyphs;0<=f?h<f:h>f;l=0<=f?++h:--h)v.push(n.readUInt32());return v}).call(this)}},e}(),wc=function(i,e){this.raw=i,this.length=i.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},Lc=function(i){function e(){return e.__super__.constructor.apply(this,arguments)}return Yr(e,Mr),e.prototype.tag="name",e.prototype.parse=function(n){var a,c,s,l,h,f,v,x,A,_,p;for(n.pos=this.offset,n.readShort(),a=n.readShort(),f=n.readShort(),c=[],l=0;0<=a?l<a:l>a;l=0<=a?++l:--l)c.push({platformID:n.readShort(),encodingID:n.readShort(),languageID:n.readShort(),nameID:n.readShort(),length:n.readShort(),offset:this.offset+f+n.readShort()});for(v={},l=A=0,_=c.length;A<_;l=++A)s=c[l],n.pos=s.offset,x=n.readString(s.length),h=new wc(x,s),v[p=s.nameID]==null&&(v[p]=[]),v[s.nameID].push(h);this.strings=v,this.copyright=v[0],this.fontFamily=v[1],this.fontSubfamily=v[2],this.uniqueSubfamily=v[3],this.fontName=v[4],this.version=v[5];try{this.postscriptName=v[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=v[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=v[7],this.manufacturer=v[8],this.designer=v[9],this.description=v[10],this.vendorUrl=v[11],this.designerUrl=v[12],this.license=v[13],this.licenseUrl=v[14],this.preferredFamily=v[15],this.preferredSubfamily=v[17],this.compatibleFull=v[18],this.sampleText=v[19]},e}(),Nc=function(i){function e(){return e.__super__.constructor.apply(this,arguments)}return Yr(e,Mr),e.prototype.tag="maxp",e.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.numGlyphs=n.readUInt16(),this.maxPoints=n.readUInt16(),this.maxContours=n.readUInt16(),this.maxCompositePoints=n.readUInt16(),this.maxComponentContours=n.readUInt16(),this.maxZones=n.readUInt16(),this.maxTwilightPoints=n.readUInt16(),this.maxStorage=n.readUInt16(),this.maxFunctionDefs=n.readUInt16(),this.maxInstructionDefs=n.readUInt16(),this.maxStackElements=n.readUInt16(),this.maxSizeOfInstructions=n.readUInt16(),this.maxComponentElements=n.readUInt16(),this.maxComponentDepth=n.readUInt16()},e}(),Ac=function(i){function e(){return e.__super__.constructor.apply(this,arguments)}return Yr(e,Mr),e.prototype.tag="hmtx",e.prototype.parse=function(n){var a,c,s,l,h,f,v;for(n.pos=this.offset,this.metrics=[],a=0,f=this.file.hhea.numberOfMetrics;0<=f?a<f:a>f;a=0<=f?++a:--a)this.metrics.push({advance:n.readUInt16(),lsb:n.readInt16()});for(s=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var x,A;for(A=[],a=x=0;0<=s?x<s:x>s;a=0<=s?++x:--x)A.push(n.readInt16());return A}(),this.widths=(function(){var x,A,_,p;for(p=[],x=0,A=(_=this.metrics).length;x<A;x++)l=_[x],p.push(l.advance);return p}).call(this),c=this.widths[this.widths.length-1],v=[],a=h=0;0<=s?h<s:h>s;a=0<=s?++h:--h)v.push(this.widths.push(c));return v},e.prototype.forGlyph=function(n){return n in this.metrics?this.metrics[n]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[n-this.metrics.length]}},e}(),uu=[].slice,xc=function(i){function e(){return e.__super__.constructor.apply(this,arguments)}return Yr(e,Mr),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(n){var a,c,s,l,h,f,v,x,A,_;return n in this.cache?this.cache[n]:(l=this.file.loca,a=this.file.contents,c=l.indexOf(n),(s=l.lengthOf(n))===0?this.cache[n]=null:(a.pos=this.offset+c,h=(f=new An(a.read(s))).readShort(),x=f.readShort(),_=f.readShort(),v=f.readShort(),A=f.readShort(),this.cache[n]=h===-1?new _c(f,x,_,v,A):new Sc(f,h,x,_,v,A),this.cache[n]))},e.prototype.encode=function(n,a,c){var s,l,h,f,v;for(h=[],l=[],f=0,v=a.length;f<v;f++)s=n[a[f]],l.push(h.length),s&&(h=h.concat(s.encode(c)));return l.push(h.length),{table:h,offsets:l}},e}(),Sc=function(){function i(e,n,a,c,s,l){this.raw=e,this.numberOfContours=n,this.xMin=a,this.yMin=c,this.xMax=s,this.yMax=l,this.compound=!1}return i.prototype.encode=function(){return this.raw.data},i}(),_c=function(){function i(e,n,a,c,s){var l,h;for(this.raw=e,this.xMin=n,this.yMin=a,this.xMax=c,this.yMax=s,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],l=this.raw;h=l.readShort(),this.glyphOffsets.push(l.pos),this.glyphIDs.push(l.readUInt16()),32&h;)l.pos+=1&h?4:2,128&h?l.pos+=8:64&h?l.pos+=4:8&h&&(l.pos+=2)}return i.prototype.encode=function(){var e,n,a;for(n=new An(uu.call(this.raw.data)),e=0,a=this.glyphIDs.length;e<a;++e)n.pos=this.glyphOffsets[e];return n.data},i}(),Pc=function(i){function e(){return e.__super__.constructor.apply(this,arguments)}return Yr(e,Mr),e.prototype.tag="loca",e.prototype.parse=function(n){var a,c;return n.pos=this.offset,a=this.file.head.indexToLocFormat,this.offsets=a===0?(function(){var s,l;for(l=[],c=0,s=this.length;c<s;c+=2)l.push(2*n.readUInt16());return l}).call(this):(function(){var s,l;for(l=[],c=0,s=this.length;c<s;c+=4)l.push(n.readUInt32());return l}).call(this)},e.prototype.indexOf=function(n){return this.offsets[n]},e.prototype.lengthOf=function(n){return this.offsets[n+1]-this.offsets[n]},e.prototype.encode=function(n,a){for(var c=new Uint32Array(this.offsets.length),s=0,l=0,h=0;h<c.length;++h)if(c[h]=s,l<a.length&&a[l]==h){++l,c[h]=s;var f=this.offsets[h],v=this.offsets[h+1]-f;v>0&&(s+=v)}for(var x=new Array(4*c.length),A=0;A<c.length;++A)x[4*A+3]=255&c[A],x[4*A+2]=(65280&c[A])>>8,x[4*A+1]=(16711680&c[A])>>16,x[4*A]=(4278190080&c[A])>>24;return x},e}(),kc=function(){function i(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return i.prototype.generateCmap=function(){var e,n,a,c,s;for(n in c=this.font.cmap.tables[0].codeMap,e={},s=this.subset)a=s[n],e[n]=c[a];return e},i.prototype.glyphsFor=function(e){var n,a,c,s,l,h,f;for(c={},l=0,h=e.length;l<h;l++)c[s=e[l]]=this.font.glyf.glyphFor(s);for(s in n=[],c)(a=c[s])!=null&&a.compound&&n.push.apply(n,a.glyphIDs);if(n.length>0)for(s in f=this.glyphsFor(n))a=f[s],c[s]=a;return c},i.prototype.encode=function(e,n){var a,c,s,l,h,f,v,x,A,_,p,B,I,q,S;for(c in a=ou.encode(this.generateCmap(),"unicode"),l=this.glyphsFor(e),p={0:0},S=a.charMap)p[(f=S[c]).old]=f.new;for(B in _=a.maxGlyphID,l)B in p||(p[B]=_++);return x=function(M){var Z,ut;for(Z in ut={},M)ut[M[Z]]=Z;return ut}(p),A=Object.keys(x).sort(function(M,Z){return M-Z}),I=function(){var M,Z,ut;for(ut=[],M=0,Z=A.length;M<Z;M++)h=A[M],ut.push(x[h]);return ut}(),s=this.font.glyf.encode(l,I,p),v=this.font.loca.encode(s.offsets,I),q={cmap:this.font.cmap.raw(),glyf:s.table,loca:v,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(n)},this.font.os2.exists&&(q["OS/2"]=this.font.os2.raw()),this.font.directory.encode(q)},i}();zt.API.PDFObject=function(){var i;function e(){}return i=function(n,a){return(Array(a+1).join("0")+n).slice(-a)},e.convert=function(n){var a,c,s,l;if(Array.isArray(n))return"["+function(){var h,f,v;for(v=[],h=0,f=n.length;h<f;h++)a=n[h],v.push(e.convert(a));return v}().join(" ")+"]";if(typeof n=="string")return"/"+n;if(n!=null&&n.isString)return"("+n+")";if(n instanceof Date)return"(D:"+i(n.getUTCFullYear(),4)+i(n.getUTCMonth(),2)+i(n.getUTCDate(),2)+i(n.getUTCHours(),2)+i(n.getUTCMinutes(),2)+i(n.getUTCSeconds(),2)+"Z)";if({}.toString.call(n)==="[object Object]"){for(c in s=["<<"],n)l=n[c],s.push("/"+c+" "+e.convert(l));return s.push(">>"),s.join(`
|
||
`)}return""+n},e}();export{Bt as AcroFormAppearance,Ue as AcroFormButton,$a as AcroFormCheckBox,Li as AcroFormChoiceField,Ai as AcroFormComboBox,Ka as AcroFormEditBox,Ni as AcroFormListBox,Qa as AcroFormPasswordField,Za as AcroFormPushButton,xi as AcroFormRadioButton,Rn as AcroFormTextField,ts as GState,Dn as ShadingPattern,wi as TilingPattern,zt as default,zt as jsPDF};
|